Class XWSSUtil


  • public abstract class XWSSUtil
    extends Object
    Author:
    Abhijit Das
    • 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
      • 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)
      • 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)