Class KeyManagementUtils

java.lang.Object
org.apache.cxf.rs.security.jose.common.KeyManagementUtils

public final class KeyManagementUtils extends Object
Encryption helpers
  • Method Details

    • loadAndEncodeX509CertificateOrChain

      public static List<String> loadAndEncodeX509CertificateOrChain(org.apache.cxf.message.Message m, Properties props)
    • loadDigestAndEncodeX509Certificate

      public static String loadDigestAndEncodeX509Certificate(org.apache.cxf.message.Message m, Properties props, String digestAlgo)
    • loadX509CertificateOrChain

      public static X509Certificate[] loadX509CertificateOrChain(org.apache.cxf.message.Message m, Properties props)
    • loadPublicKey

      public static PublicKey loadPublicKey(org.apache.cxf.message.Message m, Properties props)
    • loadPublicKey

      public static PublicKey loadPublicKey(org.apache.cxf.message.Message m, String keyStoreLocProp)
    • loadPublicKey

      public static PublicKey loadPublicKey(org.apache.cxf.message.Message m, String keyStoreLocPropPreferred, String keyStoreLocPropDefault)
    • loadPublicKey

      public static PublicKey loadPublicKey(String keyStorePropLoc, org.apache.cxf.Bus bus)
    • loadPublicKey

      public static PublicKey loadPublicKey(String keyStoreLoc, String keyStorePassword, String keyAlias, org.apache.cxf.Bus bus)
    • loadPrivateKey

      public static PrivateKey loadPrivateKey(org.apache.cxf.message.Message m, String keyStoreLocProp, KeyOperation keyOper)
    • loadPrivateKey

      public static PrivateKey loadPrivateKey(org.apache.cxf.message.Message m, String keyStoreLocPropPreferred, String keyStoreLocPropDefault, KeyOperation keyOper)
    • loadPrivateKey

      public static PrivateKey loadPrivateKey(String keyStoreLoc, String keyStorePassword, String keyAlias, String keyPassword, org.apache.cxf.Bus bus)
    • loadPrivateKey

      public static PrivateKey loadPrivateKey(String keyStorePropLoc, org.apache.cxf.Bus bus)
    • getKeyId

      public static String getKeyId(org.apache.cxf.message.Message m, Properties props, String preferredPropertyName, KeyOperation keyOper)
    • loadPasswordProvider

      public static org.apache.cxf.rt.security.rs.PrivateKeyPasswordProvider loadPasswordProvider(org.apache.cxf.message.Message m, Properties props, KeyOperation keyOper)
    • loadPrivateKey

      public static PrivateKey loadPrivateKey(org.apache.cxf.message.Message m, Properties props, KeyOperation keyOper)
    • loadPersistKeyStore

      public static KeyStore loadPersistKeyStore(org.apache.cxf.message.Message m, Properties props)
    • loadKeyStore

      public static KeyStore loadKeyStore(Properties props, org.apache.cxf.Bus bus)
    • loadKeyStore

      public static KeyStore loadKeyStore(String keyStoreLoc, String keyStoreType, String keyStorePswd, org.apache.cxf.Bus bus)
    • encodeX509CertificateChain

      public static List<String> encodeX509CertificateChain(X509Certificate[] chain)
    • encodeX509CertificateChain

      public static List<String> encodeX509CertificateChain(List<X509Certificate> chain)
    • toX509CertificateChain

      public static List<X509Certificate> toX509CertificateChain(List<String> base64EncodedChain)
    • validateCertificateChain

      public static void validateCertificateChain(Properties storeProperties, List<X509Certificate> inCerts)
    • toX509CertificateChainArray

      public static X509Certificate[] toX509CertificateChainArray(List<String> base64EncodedChain)
    • getKeyAlgorithm

      public static String getKeyAlgorithm(org.apache.cxf.message.Message m, Properties props, String propName, String defaultAlg)
    • loadStoreProperties

      public static Properties loadStoreProperties(org.apache.cxf.message.Message m, boolean required, String storeProp1, String storeProp2)
    • loadPrivateKey

      public static PrivateKey loadPrivateKey(org.apache.cxf.message.Message m, Properties props, X509Certificate inCert, KeyOperation keyOper)
    • getCertificateFromThumbprint

      public static X509Certificate getCertificateFromThumbprint(String thumbprint, String digestAlgorithm, org.apache.cxf.message.Message m, Properties props)
    • setSha1DigestHeader

      public static void setSha1DigestHeader(JoseHeaders headers, org.apache.cxf.message.Message m, Properties props)
    • setSha256DigestHeader

      public static void setSha256DigestHeader(JoseHeaders headers, org.apache.cxf.message.Message m, Properties props)