java.lang.Object
com.sun.xml.wss.util.XWSSUtil
- Author:
- Abhijit Das
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretKeygenerateSymmetricKey(String algorithm) static X509CertificategetCertificateFromTrustStore(byte[] ski, KeyStore trustStore) static X509CertificategetCertificateFromTrustStore(String issuerName, BigInteger serialNumber, KeyStore trustStore) static CertSelectorgetCertSelector(Class<?> certSelectorClass, Map context) static PrivateKeygetPrivateKey(byte[] ski, KeyStore keyStore, String keyStorePassword) static PrivateKeygetPrivateKey(String issuerName, BigInteger serialNumber, KeyStore keyStore, String keyStorePassword) static PrivateKeygetPrivateKey(X509Certificate certificate, KeyStore keyStore, String keyStorePassword) static PrivateKeygetProgrammaticPrivateKey(Map context) static byte[]static X509CertificatematchesProgrammaticInfo(Object obj, byte[] keyIdentifier, String valueType) static X509CertificatematchesProgrammaticInfo(Object obj, BigInteger serialNumber, String issuerName) static X509CertificatematchesProgrammaticInfo(Object obj, PublicKey publicKey)
-
Field Details
-
log
logger
-
-
Constructor Details
-
XWSSUtil
public XWSSUtil()
-
-
Method Details
-
getCertificateFromTrustStore
public static X509Certificate getCertificateFromTrustStore(byte[] ski, KeyStore trustStore) throws IOException - Parameters:
ski- byte[] representing SubjectKeyIdentifiertrustStore- java.security.KeyStore- Returns:
- X509Certificate from trustStore if present otherwise null.
- Throws:
IOException
-
getCertificateFromTrustStore
public static X509Certificate getCertificateFromTrustStore(String issuerName, BigInteger serialNumber, KeyStore trustStore) throws IOException - Parameters:
issuerName- Certificate Issuer NameserialNumber- Serial number of the certificatetrustStore- java.security.Keystore- Returns:
- java.security.X509Certificate
- Throws:
IOException
-
getPrivateKey
public static PrivateKey getPrivateKey(byte[] ski, KeyStore keyStore, String keyStorePassword) throws IOException - Throws:
IOException
-
getPrivateKey
public static PrivateKey getPrivateKey(String issuerName, BigInteger serialNumber, KeyStore keyStore, String keyStorePassword) throws IOException - Throws:
IOException
-
getPrivateKey
public static PrivateKey getPrivateKey(X509Certificate certificate, KeyStore keyStore, String keyStorePassword) throws IOException - Throws:
IOException
-
generateSymmetricKey
- Throws:
XWSSecurityException
-
matchesProgrammaticInfo
public static X509Certificate matchesProgrammaticInfo(Object obj, byte[] keyIdentifier, String valueType) -
matchesProgrammaticInfo
-
matchesProgrammaticInfo
public static X509Certificate matchesProgrammaticInfo(Object obj, BigInteger serialNumber, String issuerName) -
getProgrammaticPrivateKey
-
getThumbprintIdentifier
- Throws:
XWSSecurityException
-
getCertSelector
-