Class PrivateKeyResolver


  • public class PrivateKeyResolver
    extends KeyResolverSpi
    Resolves a PrivateKey within a KeyStore based on the KeyInfo hints. For X509Data hints, the certificate associated with the private key entry must match. For a KeyName hint, the KeyName must match the alias of a PrivateKey entry within the KeyStore.
    • Field Detail

      • LOG

        private static final java.lang.System.Logger LOG
      • keyStore

        private final java.security.KeyStore keyStore
      • password

        private final char[] password
    • Constructor Detail

      • PrivateKeyResolver

        public PrivateKeyResolver​(java.security.KeyStore keyStore,
                                  char[] password)
        Constructor.
    • Method Detail

      • engineCanResolve

        protected boolean engineCanResolve​(org.w3c.dom.Element element,
                                           java.lang.String baseURI,
                                           StorageResolver storage)
        This method returns whether the KeyResolverSpi is able to perform the requested action.
        Specified by:
        engineCanResolve in class KeyResolverSpi
        Returns:
        whether the KeyResolverSpi is able to perform the requested action.
      • resolveX509Data

        private java.security.PrivateKey resolveX509Data​(org.w3c.dom.Element element,
                                                         java.lang.String baseURI)
      • resolveX509IssuerSerial

        private java.security.PrivateKey resolveX509IssuerSerial​(XMLX509IssuerSerial x509Serial)
                                                          throws java.security.KeyStoreException
        Throws:
        java.security.KeyStoreException
      • resolveX509SubjectName

        private java.security.PrivateKey resolveX509SubjectName​(XMLX509SubjectName x509SubjectName)
                                                         throws java.security.KeyStoreException
        Throws:
        java.security.KeyStoreException