Package com.sun.xml.wss.util
Class XWSSUtil
- java.lang.Object
-
- com.sun.xml.wss.util.XWSSUtil
-
public abstract class XWSSUtil extends Object
- Author:
- Abhijit Das
-
-
Constructor Summary
Constructors Constructor Description XWSSUtil()
-
Method Summary
-
-
-
Field Detail
-
log
protected static final Logger log
logger
-
-
Method Detail
-
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
- Parameters:
ski-keyStore-keyStorePassword-- Returns:
- Throws:
IOException
-
getPrivateKey
public static PrivateKey getPrivateKey(String issuerName, BigInteger serialNumber, KeyStore keyStore, String keyStorePassword) throws IOException
- Parameters:
issuerName-serialNumber-keyStore-keyStorePassword-- Returns:
- Throws:
IOException
-
getPrivateKey
public static PrivateKey getPrivateKey(X509Certificate certificate, KeyStore keyStore, String keyStorePassword) throws IOException
- Parameters:
certificate-keyStore-keyStorePassword-- Returns:
- Throws:
IOException
-
generateSymmetricKey
public static SecretKey generateSymmetricKey(String algorithm) throws XWSSecurityException
- Parameters:
algorithm-- Returns:
- Throws:
XWSSecurityException
-
matchesProgrammaticInfo
public static X509Certificate matchesProgrammaticInfo(Object obj, byte[] keyIdentifier, String valueType)
-
matchesProgrammaticInfo
public static X509Certificate matchesProgrammaticInfo(Object obj, PublicKey publicKey)
-
matchesProgrammaticInfo
public static X509Certificate matchesProgrammaticInfo(Object obj, BigInteger serialNumber, String issuerName)
-
getProgrammaticPrivateKey
public static PrivateKey getProgrammaticPrivateKey(Map context)
-
getThumbprintIdentifier
public static byte[] getThumbprintIdentifier(X509Certificate cert) throws XWSSecurityException
- Throws:
XWSSecurityException
-
getCertSelector
public static CertSelector getCertSelector(Class<?> certSelectorClass, Map context)
-
-