/** * Extracts the certificate(s) from the Binary Security token reference. * * @param token The BinarySecurity instance corresponding to either X509Security or * PKIPathSecurity * @return The X509Certificates associated with this reference * @throws WSSecurityException */ private X509Certificate[] getCertificatesTokenReference(BinarySecurity token, Crypto crypto) throws WSSecurityException { if (token instanceof PKIPathSecurity) { return ((PKIPathSecurity) token).getX509Certificates(crypto); } else if (token instanceof X509Security) { X509Certificate cert = ((X509Security) token).getX509Certificate(crypto); return new X509Certificate[]{cert}; } return null; }
/** * Extracts the certificate(s) from the Binary Security token reference. * * @param token The BinarySecurity instance corresponding to either X509Security or * PKIPathSecurity * @return The X509Certificates associated with this reference * @throws WSSecurityException */ private X509Certificate[] getCertificatesTokenReference(BinarySecurity token, Crypto crypto) throws WSSecurityException { if (token instanceof PKIPathSecurity) { return ((PKIPathSecurity) token).getX509Certificates(crypto); } else if (token instanceof X509Security) { X509Certificate cert = ((X509Security) token).getX509Certificate(crypto); return new X509Certificate[]{cert}; } return null; }
X509Security token = new X509Security(elem); if (token != null) { X509Certificate cert = token.getX509Certificate(crypto); return new X509Certificate[]{cert};
X509Security token = new X509Security(elem); if (token != null) { X509Certificate cert = token.getX509Certificate(crypto); return new X509Certificate[]{cert};
BSPEnforcer.checkBinarySecurityBSPCompliance(secRef, token); certs = new X509Certificate[]{token.getX509Certificate(crypto)}; } else { throw new WSSecurityException(
BSPEnforcer.checkBinarySecurityBSPCompliance(secRef, token); certs = new X509Certificate[]{token.getX509Certificate(crypto)}; } else { throw new WSSecurityException(