Class KeyResolverSpi

    • Constructor Summary

      Constructors 
      Constructor Description
      KeyResolverSpi()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract 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.
      java.security.PrivateKey engineLookupAndResolvePrivateKey​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineLookupAndResolvePrivateKey
      java.security.PublicKey engineLookupAndResolvePublicKey​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineLookupAndResolvePublicKey
      javax.crypto.SecretKey engineLookupAndResolveSecretKey​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineLookupAndResolveSecretKey
      java.security.cert.X509Certificate engineLookupResolveX509Certificate​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineLookupResolveX509Certificate
      protected abstract java.security.PrivateKey engineResolvePrivateKey​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineResolvePrivateKey
      protected abstract java.security.PublicKey engineResolvePublicKey​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineResolvePublicKey
      protected abstract javax.crypto.SecretKey engineResolveSecretKey​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineResolveSecretKey
      protected abstract java.security.cert.X509Certificate engineResolveX509Certificate​(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage, boolean secureValidation)
      Method engineResolveCertificate
      protected static org.w3c.dom.Element getDocFromBytes​(byte[] bytes, boolean secureValidation)
      Parses a byte array and returns the parsed Element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyResolverSpi

        public KeyResolverSpi()
    • Method Detail

      • engineCanResolve

        protected abstract 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.
        Parameters:
        element -
        baseURI -
        storage -
        Returns:
        whether the KeyResolverSpi is able to perform the requested action.
      • engineResolvePublicKey

        protected abstract java.security.PublicKey engineResolvePublicKey​(org.w3c.dom.Element element,
                                                                          java.lang.String baseURI,
                                                                          StorageResolver storage,
                                                                          boolean secureValidation)
                                                                   throws KeyResolverException
        Method engineResolvePublicKey
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved public key from the registered from the element.
        Throws:
        KeyResolverException
      • engineLookupAndResolvePublicKey

        public java.security.PublicKey engineLookupAndResolvePublicKey​(org.w3c.dom.Element element,
                                                                       java.lang.String baseURI,
                                                                       StorageResolver storage,
                                                                       boolean secureValidation)
                                                                throws KeyResolverException
        Method engineLookupAndResolvePublicKey
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved public key from the registered from the element.
        Throws:
        KeyResolverException
      • engineResolveX509Certificate

        protected abstract java.security.cert.X509Certificate engineResolveX509Certificate​(org.w3c.dom.Element element,
                                                                                           java.lang.String baseURI,
                                                                                           StorageResolver storage,
                                                                                           boolean secureValidation)
                                                                                    throws KeyResolverException
        Method engineResolveCertificate
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved X509Certificate key from the registered from the elements
        Throws:
        KeyResolverException
      • engineLookupResolveX509Certificate

        public java.security.cert.X509Certificate engineLookupResolveX509Certificate​(org.w3c.dom.Element element,
                                                                                     java.lang.String baseURI,
                                                                                     StorageResolver storage,
                                                                                     boolean secureValidation)
                                                                              throws KeyResolverException
        Method engineLookupResolveX509Certificate
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved X509Certificate key from the registered from the elements
        Throws:
        KeyResolverException
      • engineResolveSecretKey

        protected abstract javax.crypto.SecretKey engineResolveSecretKey​(org.w3c.dom.Element element,
                                                                         java.lang.String baseURI,
                                                                         StorageResolver storage,
                                                                         boolean secureValidation)
                                                                  throws KeyResolverException
        Method engineResolveSecretKey
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved SecretKey key from the registered from the elements
        Throws:
        KeyResolverException
      • engineLookupAndResolveSecretKey

        public javax.crypto.SecretKey engineLookupAndResolveSecretKey​(org.w3c.dom.Element element,
                                                                      java.lang.String baseURI,
                                                                      StorageResolver storage,
                                                                      boolean secureValidation)
                                                               throws KeyResolverException
        Method engineLookupAndResolveSecretKey
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved SecretKey key from the registered from the elements
        Throws:
        KeyResolverException
      • engineResolvePrivateKey

        protected abstract java.security.PrivateKey engineResolvePrivateKey​(org.w3c.dom.Element element,
                                                                            java.lang.String baseURI,
                                                                            StorageResolver storage,
                                                                            boolean secureValidation)
                                                                     throws KeyResolverException
        Method engineResolvePrivateKey
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved PrivateKey key from the registered from the elements
        Throws:
        KeyResolverException
      • engineLookupAndResolvePrivateKey

        public java.security.PrivateKey engineLookupAndResolvePrivateKey​(org.w3c.dom.Element element,
                                                                         java.lang.String baseURI,
                                                                         StorageResolver storage,
                                                                         boolean secureValidation)
                                                                  throws KeyResolverException
        Method engineLookupAndResolvePrivateKey
        Parameters:
        element -
        baseURI -
        storage -
        secureValidation -
        Returns:
        resolved PrivateKey key from the registered from the elements
        Throws:
        KeyResolverException
      • getDocFromBytes

        protected static org.w3c.dom.Element getDocFromBytes​(byte[] bytes,
                                                             boolean secureValidation)
                                                      throws KeyResolverException
        Parses a byte array and returns the parsed Element.
        Parameters:
        bytes -
        Returns:
        the Document Element after parsing bytes
        Throws:
        KeyResolverException - if something goes wrong