com.sun.xml.wss.util
Class XWSSUtil

java.lang.Object
  extended by com.sun.xml.wss.util.XWSSUtil

public abstract class XWSSUtil
extends Object

Author:
Abhijit Das

Field Summary
protected static Logger log
          logger
 
Constructor Summary
XWSSUtil()
           
 
Method Summary
static SecretKey generateSymmetricKey(String algorithm)
           
static X509Certificate getCertificateFromTrustStore(byte[] ski, KeyStore trustStore)
           
static X509Certificate getCertificateFromTrustStore(String issuerName, BigInteger serialNumber, KeyStore trustStore)
           
static CertSelector getCertSelector(Class<?> certSelectorClass, Map context)
           
static PrivateKey getPrivateKey(byte[] ski, KeyStore keyStore, String keyStorePassword)
           
static PrivateKey getPrivateKey(String issuerName, BigInteger serialNumber, KeyStore keyStore, String keyStorePassword)
           
static PrivateKey getPrivateKey(X509Certificate certificate, KeyStore keyStore, String keyStorePassword)
           
static PrivateKey getProgrammaticPrivateKey(Map context)
           
static byte[] getThumbprintIdentifier(X509Certificate cert)
           
static X509Certificate matchesProgrammaticInfo(Object obj, BigInteger serialNumber, String issuerName)
           
static X509Certificate matchesProgrammaticInfo(Object obj, byte[] keyIdentifier, String valueType)
           
static X509Certificate matchesProgrammaticInfo(Object obj, PublicKey publicKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log
logger

Constructor Detail

XWSSUtil

public XWSSUtil()
Method Detail

getCertificateFromTrustStore

public static X509Certificate getCertificateFromTrustStore(byte[] ski,
                                                           KeyStore trustStore)
                                                    throws IOException
Parameters:
ski - byte[] representing SubjectKeyIdentifier
trustStore - 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 Name
serialNumber - Serial number of the certificate
trustStore - 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)


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.