001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: package org.apache.harmony.tools.jarsigner;
021:
022: import java.util.logging.Logger;
023:
024: /**
025: * The class prints JarSigner help message.
026: */
027: class JSHelper {
028: /**
029: * Prints help message.
030: */
031: static void printHelp() {
032: StringBuilder buf = new StringBuilder();
033: buf.append("JarSigner help.");
034: buf.append("\nUsage:");
035: buf.append("\tjarsigner {options} JAR-file alias");
036: buf.append("\n\tjarsigner -verify {options} JAR-file");
037:
038: buf.append("\n\n-verify\t\t\t\t verify a signed JAR file");
039:
040: buf
041: .append("\n-keystore <keystore_path>\t location of the keystore");
042:
043: buf
044: .append("\n-storetype <keystore_type>\t type of the keystore");
045:
046: buf
047: .append("\n-storepass <keystore_password>\t keystore password");
048:
049: buf
050: .append("\n-keypass <key_password>\t\t private key password ");
051: buf.append("(if differs from <keystore_password>)");
052:
053: buf
054: .append("\n-signedjar <file_name>\t\t name of the signed JAR file");
055:
056: buf
057: .append("\n-sigfile <file_name>\t\t name of .SF and .DSA files");
058:
059: buf.append("\n-verbose \t\t\t provide additional output");
060:
061: buf
062: .append("\n-silent \t\t\t provide as few output as possible");
063:
064: buf.append("\n-certs \t\t\t\t display certificates ");
065: buf.append("(use with -verify and -verbose)");
066:
067: buf
068: .append("\n-tsa <TSA_URL>\t\t\t location of time-stamp authority");
069:
070: buf
071: .append("\n-tsacert <TSA_cert_alias>\t keystore alias of the ");
072: buf.append("TSA certificate");
073:
074: buf
075: .append("\n-proxy <host_address>{:<port>}\t proxy server host ");
076: buf.append("address and port, e.g. proxy.server.com:1234");
077:
078: buf
079: .append("\n-proxytype <type_name>\t\t type of the proxy server (HTTP or SOCKS)");
080:
081: buf
082: .append("\n-providerclass <class>\t\t class name of cryptographic ");
083: buf.append("service provider");
084:
085: buf.append("\n-providername <name>\t\t provider name");
086:
087: buf
088: .append("\n-ksproviderclass <class>\t class name of cryptographic ");
089: buf.append("service provider for managing keystore");
090:
091: buf
092: .append("\n-ksprovidername <name>\t\t keystore provider name");
093:
094: buf
095: .append("\n-sigproviderclass <class>\t class name of cryptographic ");
096: buf.append("service provider for work with signatures");
097:
098: buf
099: .append("\n-sigprovidername <name>\t\t signature provider name");
100:
101: buf
102: .append("\n-certproviderclass <class>\t class name of cryptographic ");
103: buf.append("service provider for work with certificates");
104:
105: buf
106: .append("\n-certprovidername <name>\t certificate provider name");
107:
108: buf
109: .append("\n-mdproviderclass <class>\t class name of cryptographic ");
110: buf.append("service provider for work with message digests");
111:
112: buf
113: .append("\n-mdprovidername <name>\t\t message digest provider name");
114:
115: Logger.getLogger(JSParameters.loggerName).info(buf.toString());
116: }
117: }
|