public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
adv = AdvertisementFactory.newAdvertisement(param); } catch (NoSuchElementException notAnAdv) { CertificateException cnfe = new CertificateException("No membership advertisement found"); cnfe.initCause(notAnAdv); } catch (IllegalArgumentException invalidAdv) { CertificateException cnfe = new CertificateException("Invalid membership advertisement"); cnfe.initCause(invalidAdv); cert = pseConf.getCertificateChain(); } else { throw new CertificateException("Error processing the Membership config advertisement. Unexpected membership advertisement " + adv.getAdvertisementType());
/** * Converts the peer certificates into a cert chain. */ static javax.security.cert.X509Certificate[] toCertificateChain(X509Certificate[] certificates) throws SSLPeerUnverifiedException { try { javax.security.cert.X509Certificate[] chain = new javax.security.cert.X509Certificate[certificates.length]; for (int i = 0; i < certificates.length; i++) { byte[] encoded = certificates[i].getEncoded(); chain[i] = javax.security.cert.X509Certificate.getInstance(encoded); } return chain; } catch (CertificateEncodingException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } catch (CertificateException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } }
/** * Converts the peer certificates into a cert chain. */ static javax.security.cert.X509Certificate[] toCertificateChain(X509Certificate[] certificates) throws SSLPeerUnverifiedException { try { javax.security.cert.X509Certificate[] chain = new javax.security.cert.X509Certificate[certificates.length]; for (int i = 0; i < certificates.length; i++) { byte[] encoded = certificates[i].getEncoded(); chain[i] = javax.security.cert.X509Certificate.getInstance(encoded); } return chain; } catch (CertificateEncodingException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } catch (CertificateException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } }
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key, sigProvider); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
/** * Provide a value to initialize the volatile peerCertificateChain * field based on the native SSL_SESSION */ private javax.security.cert.X509Certificate[] createPeerCertificateChain() throws SSLPeerUnverifiedException { try { javax.security.cert.X509Certificate[] chain = new javax.security.cert.X509Certificate[peerCertificates.length]; for (int i = 0; i < peerCertificates.length; i++) { byte[] encoded = peerCertificates[i].getEncoded(); chain[i] = javax.security.cert.X509Certificate.getInstance(encoded); } return chain; } catch (CertificateEncodingException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } catch (CertificateException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } }
/** * Creates a new {@code X509Certificate} and initializes it from the * specified byte array. * * @param certData * byte array containing data to initialize the certificate. * @return the certificate initialized from the specified byte array * @throws CertificateException * if the certificate cannot be created or initialized. */ public static final X509Certificate getInstance(byte[] certData) throws CertificateException { if (certData == null) { throw new CertificateException("certData == null"); } ByteArrayInputStream bais = new ByteArrayInputStream(certData); return getInstance(bais); }
/** * Provide a value to initialize the volatile peerCertificateChain * field based on the native SSL_SESSION */ private javax.security.cert.X509Certificate[] createPeerCertificateChain() throws SSLPeerUnverifiedException { try { javax.security.cert.X509Certificate[] chain = new javax.security.cert.X509Certificate[peerCertificates.length]; for (int i = 0; i < peerCertificates.length; i++) { byte[] encoded = peerCertificates[i].getEncoded(); chain[i] = javax.security.cert.X509Certificate.getInstance(encoded); } return chain; } catch (CertificateEncodingException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } catch (CertificateException e) { SSLPeerUnverifiedException exception = new SSLPeerUnverifiedException(e.getMessage()); exception.initCause(exception); throw exception; } }
throws CertificateException { if (inStream == null) { throw new CertificateException("inStream == null"); constructor.newInstance(new Object[] {inStream}); } catch (Throwable e) { throw new CertificateException(e.getMessage()); cf.generateCertificate(inStream); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage());
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key, sigProvider); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key, sigProvider); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key, sigProvider); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key, sigProvider); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key, String sigProvider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key, sigProvider); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }
public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { try { cert.verify(key); } catch (java.security.cert.CertificateException e) { throw new CertificateException(e.getMessage()); } }