Lines Matching refs:cert

35 import java.security.cert.*;
289 * cert has been signed by someDN.
302 X509Certificate cert = getCert(someDN, ks);
305 myCert.getSubjectDN().toString(), cert.getSubjectDN());
310 * is in ab's cert chain.
313 // Get cert for input DN
338 // Get cert for input DN
370 X509Certificate cert = getSignAsCert();
373 if (cert == null) {
378 String DN = cert.getSubjectDN().toString();
389 String alg = cert.getPublicKey().getAlgorithm();
407 * Returns the cert corresponding to our signing alias.
422 X509Certificate cert = null;
429 cert = getCert(alias, ks);
432 return cert;
621 // get cert for this spi
622 X509Certificate cert = getCert(spi, ks);
624 // check cert validity
626 cert.checkValidity();
644 checkSPIs(cert, ks);
649 new Object[] {cert.getSubjectDN(), e.getMessage()});
655 sig.initVerify(cert.getPublicKey());
864 * messages signed by 'cert' to be verified. This method
865 * also verifies and validates 'cert's cert chain.
867 private void checkSPIs(X509Certificate cert, KeyStore ks)
878 // Get cert chain
879 java.security.cert.Certificate[] chain =
880 ks.getCertificateChain(cert.getSubjectDN().toString());
885 new Object[] {cert.getSubjectDN().toString()});
891 // Add cert's own subjec to equiv set
916 new Object[] {cert.getSubjectDN().toString(), ""});
921 * verify a message signed by the Principal named by 'cert'.
924 java.security.cert.Certificate[] chain,
938 // get CA cert to get CA Principal
959 * Determines if sub if equivalent to ca by getting sub's cert
961 * This routine does not verify the cert chain.
966 java.security.cert.Certificate[] chain;
974 // Get cert keystore
977 // Get cert chain for subject
987 // walk the cert chain
992 * Operates the same as above, but rather than getting the cert
993 * chain for sub, uses a given cert chain.
996 java.security.cert.Certificate[] chain)
998 // walk the cert chain
1023 X509Certificate cert = null;
1036 cert = (X509Certificate)ks.getCertificate(DN);
1041 new Object[] {cert.getType(), e.getMessage()});
1049 if (cert == null) {
1056 return cert;