Class XWSSUtil

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

public abstract class XWSSUtil extends Object
Author:
Abhijit Das
  • Field Details

    • log

      protected static final Logger log
      logger
  • Constructor Details

    • XWSSUtil

      public XWSSUtil()
  • Method Details

    • 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 com.sun.xml.wss.XWSSecurityException
      Parameters:
      algorithm -
      Returns:
      Throws:
      com.sun.xml.wss.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 com.sun.xml.wss.XWSSecurityException
      Throws:
      com.sun.xml.wss.XWSSecurityException
    • getCertSelector

      public static CertSelector getCertSelector(Class<?> certSelectorClass, Map context)