Additional top-level class in compilation unit: Pair.
java.security.KeyStore , sun.security.provider.KeyProtector , sun.security.provider.JavaKeyStore
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | |
| private static class | |
| pack-priv static enum | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private boolean | |
| private KeyStore | |
| private static final Collator | |
| private Main. | |
| private static final byte[] | |
| private boolean | |
| private String | |
| private char[] | |
| private static final DisabledAlgorithmConstraints | |
| private String | |
| private static final String[] | |
| private String | |
| private String | |
| private final List | |
| private String | |
| private String | |
| private boolean | |
| private boolean | |
| private String | |
| private String | |
| private static final String | |
| private char[] | |
| private char[] | |
| private int | |
| private KeyStore | |
| private File | |
| private String | |
| private boolean | |
| private InputStream | |
| private static final DisabledAlgorithmConstraints | |
| private char[] | |
| private static final String | |
| private boolean | |
| private boolean | |
| private boolean | |
| private String | |
| private static final String | |
| private static final String | |
| private final Set | |
| private String | |
| private boolean | |
| private Set | |
| private String | |
| private Set | |
| private static final ResourceBundle | |
| private boolean | |
| private static final Set | |
| private String | |
| private String | |
| private char[] | |
| private char[] | |
| private String | |
| private boolean | |
| private String | |
| private char[] | |
| private String | |
| private String | |
| private String | |
| private char[] | |
| private char[] | |
| private String | |
| private boolean | |
| private boolean | |
| private boolean | |
| private final Set | |
| private final List | |
| private long | |
| private boolean | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | Returns: true if the certificate was added, otherwise false.Imports a certificate and adds it to the list of trusted certificates. |
| private CertPathConstraintsParameters | |
| private boolean | Returns: true if successful, false otherwise.the cert that needs to be verified. certToVerify, Vector<Pair<String, X509Certificate>> the chain that's being built. chain, Hashtable<Principal, Vector<Pair<String, X509Certificate>>> the pool of trusted certs certs)Recursively tries to establish chain from pool of certs starting from certToVerify until a self-signed cert is found, and fill the certs found into chain. |
| private KeyStore | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private X509Certificate[] | |
| private GeneralName | Returns: which oneone of 5 known types t, String value v, int X.509 extension type exttype)Create a GeneralName object from known types |
| private CertificateExtensions | Returns: the created CertificateExtensionsthe requested extensions, can be null, used for -gencert requestedEx, CertificateExtensions the original extensions, can be null, used for -selfcert existingEx, List<String> -ext values, Read keytool doc extstrs, PublicKey the public key for the certificate pkey, KeyIdentifier the subject key identifier for the authority (issuer) aSubjectKeyId)Create X509v3 extensions from a string representation. |
| private void | doCertReq(String alias, String sigAlgName, PrintStream out)
Creates a PKCS#10 cert signing request, corresponding to the keys (and name) associated with a given alias. |
| private void | |
| private void | |
| private void | doCloneEntry(String
original alias orig, String destination alias dest, boolean if the password can be changed changePassword)Clones an entry |
| pack-priv void | |
| private void | |
| private void | |
| private void | doGenCert(String alias, String sigAlgName, InputStream in, PrintStream out)
Generate a certificate: Read PKCS10 request from in, and print certificate to out. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private int | Returns: 1 if the import action succeed 0 if user choose to ignore an alias-dumplicated entry 2 if setEntry throws ExceptionImport a single entry named alias from srckeystore |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | doSelfCert(String alias, String dname, String sigAlgName)
Creates a self-signed certificate, and stores it as a single-element certificate chain. |
| private void | |
| private static String | |
| private void | dumpCert(Certificate cert, PrintStream out)
Writes an X.509 certificate in base64 or binary encoding to an output stream. |
| private String | |
| private void | |
| private Certificate[] | Returns: the established chain, might be null if user decides notoptional existing certificate, mostly likely be the
original self-signed cert created by -genkeypair.
It must have the same public key as certToVerify
but cannot be the same cert. userCert, Certificate the starting certificate to build the chain certToVerify)Establishes a certificate chain (using trusted certificates in the keystore and cacerts), starting with the reply (certToVerify) and ending at a self-signed certificate found in the keystore. |
| private ObjectIdentifier | |
| private TrustAnchor | |
| private static String | Returns: the full namethe key object, cannot be null key)Returns the full display name of the given key object. |
| private Certificate | |
| private Collection | |
| private String | |
| private String | getCertFingerPrint(String mdAlg, Certificate cert)
Gets the requested fingerprint of the certificate. |
| private static String | getCompatibleSigAlgName(PrivateKey key)
If no signature algorithm was specified at the command line, we choose one that is compatible with the selected private key |
| private char[] | |
| private Date | |
| private char[] | getNewPasswd(String
the message that gets prompted on the screen prompt, char[] the current (i.e., old) password oldPasswd)Prompts user for new password. |
| private char[] | |
| private static Pair | Returns: cert itself if it's already inside ks,
or a certificate inside ks who signs cert,
or null otherwise. A label is added.the certificate whose signer is searched, not null cert, KeyStore the keystore to search with, not null ks)Locates a signer for a given certificate from a given keystore and returns the signer's certificate. |
| private static Date | getStartDate(String
the value of -startdate option s)Returns the issue time that's specified the -startdate option |
| private X500Name | |
| private String | Returns: the user's decision, can only be "YES" or "NO"Prompts user for yes/no decision. |
| pack-priv boolean | |
| private String | |
| private String | Returns: the string entered by the user, without the \n at the endthe prompt string printed prompt)Prompts user for an input string from the command line (System.in) |
| private boolean | Returns: true if the certificate reply was installed, otherwise false.Processes a certificate reply from a certificate authority. |
| pack-priv boolean | |
| private boolean | |
| private void | keystorecerts2Hashtable(KeyStore ks, Hashtable<Principal, Vector<Pair<String, X509Certificate>>> hash)
Stores the (leaf) certificates of a keystore in a hashtable. |
| public static Collection | |
| pack-priv KeyStore | Returns: the src KeyStoreLoad the srckeystore from a stream, used in -importkeystore |
| public static void | |
| private static String | |
| private static String | |
| private static int | |
| private static int | Returns: the position of a single match, or -1 if none matchedthe command provided by user s, String... the legal command set. If there is a null, commands after it
are regarded experimental, which means they are supported but their
existence should not be revealed to user. list)Match a command with a command set. |
| private static int | Returns: the position of a single match, or -1 if none matcheda BiFunction which returns matcher, String true if the 1st
argument (user input) matches the 2nd one (full command)the command provided by user s, String... the legal command set list)Match a command with a command set. |
| pack-priv String[] | |
| private void | printCertFromStream(InputStream in, PrintStream out)
Reads a certificate (or certificate chain) and prints its contents in a human-readable format. |
| private void | |
| private static void | |
| private void | |
| private void | |
| private void | printX509Cert(X509Certificate cert, PrintStream out)
Prints a certificate in a human-readable format. |
| private char[] | |
| private char[] | promptForKeyPass(String
the entry we will set password for alias, String the original entry of doing a dup, null if generate new orig, char[] the password to copy from if user press ENTER origPass)Prompt the user for a keypass when generating a key entry. |
| public static List | readCRLsFromCert(X509Certificate cert)
Returns CRLs described in a X509Certificate's CRLDistributionPoints Extension. |
| private Pair | Returns: an array of objects, where the 1st element in the array is the recovered entry, and the 2nd element is the password used to recover it (null if no password).Recovers entry associated with given alias. |
| private Pair | Returns: an array of objects, where the 1st element in the array is the recovered private key, and the 2nd element is the password used to recover it.Recovers (private) key associated with given alias. |
| public int | |
| private static void | |
| private static BufferedReader | |
| private void | |
| private void | |
| private Certificate[] | validateReply(String
the alias name alias, Certificate the user certificate of the alias userCert, Certificate[] the chain provided in the reply replyCerts)Validates chain in certification reply, and returns the ordered elements of the chain (with user certificate first, and root certificate last in the array). |
| private static String | |
| private String | |
| private String | |
| private String |