buildCertPath(KeytoolParameters param, X509Certificate newCert) Build a certificate chain up to the trust anchor, based on trusted
certificates contained in the keystore and possibly cacerts file (if
param.isTrustCACerts() returns true).
buildFullCertPath(KeytoolParameters param, X509Certificate newCert) Builds a certificate chain from the given X509Certificate newCert to a
self-signed root CA whose certificate is contained in the keystore or
cacerts file (if "-trustcacerts" option is specified).
Parameters: param - -specifies the keystore, provider name and other options (suchas "-trustcacerts"). Parameters: newCert - -certificate to start the chain the chain as an array of X509Certificate-s.
static boolean
isTrusted(KeytoolParameters param, X509Certificate cert) Checks if the X509Certificate cert is contained as a trusted certificate
entry in keystore and possibly cacerts file (if "-trustcacerts" option is
specified).
orderChain(Collection<X509Certificate> certs, PublicKey aliasPubKey) Orders a collection of certificates into a certificate chain beginning
with the certificate which has public key equal to aliasPubKey.
Builds a certificate chain from the given X509Certificate newCert to a
self-signed root CA whose certificate is contained in the keystore or
cacerts file (if "-trustcacerts" option is specified).
Parameters: param - -specifies the keystore, provider name and other options (suchas "-trustcacerts"). Parameters: newCert - -certificate to start the chain the chain as an array of X509Certificate-s. If the chain cannotbe built for some reason an exception is thrown. throws: KeyStoreException - throws: FileNotFoundException - throws: NoSuchAlgorithmException - throws: CertificateException - throws: IOException - throws: KeytoolException - throws: NoSuchProviderException - throws: CertPathBuilderException -
Orders a collection of certificates into a certificate chain beginning
with the certificate which has public key equal to aliasPubKey.
throws: KeytoolException -
A cerificate chain is built by looking up the certificate of the issuer
of the current certificate. If a sertificate is self-signed it is assumed
to be the root CA. After that the certificates are searched in the lists
of revoked certificates. Certificate signatures are checked and
certificate path is built in the same way as in import operation. If an
error occurs the flow is not stopped but an attempt to continue is made.
The results of the verification are printed to stdout.
Parameters: param - throws: NoSuchAlgorithmException - throws: NoSuchProviderException - throws: FileNotFoundException - throws: CertificateException - throws: IOException - throws: KeytoolException - throws: KeyStoreException -