Class KeyResolverSpi

    • Field Detail

      • properties

        protected java.util.Map<java.lang.String,​java.lang.String> properties
        Field properties
      • globalResolver

        protected boolean globalResolver
      • secureValidation

        protected boolean secureValidation
    • Constructor Detail

      • KeyResolverSpi

        public KeyResolverSpi()
    • Method Detail

      • setSecureValidation

        public void setSecureValidation​(boolean secureValidation)
        Set whether secure validation is enabled or not. The default is false.
      • engineCanResolve

        public 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

        public java.security.PublicKey engineResolvePublicKey​(org.w3c.dom.Element element,
                                                              java.lang.String baseURI,
                                                              StorageResolver storage)
                                                       throws KeyResolverException
        Method engineResolvePublicKey
        Parameters:
        element -
        baseURI -
        storage -
        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)
                                                                throws KeyResolverException
        Method engineLookupAndResolvePublicKey
        Parameters:
        element -
        baseURI -
        storage -
        Returns:
        resolved public key from the registered from the element.
        Throws:
        KeyResolverException
      • engineResolveX509Certificate

        public java.security.cert.X509Certificate engineResolveX509Certificate​(org.w3c.dom.Element element,
                                                                               java.lang.String baseURI,
                                                                               StorageResolver storage)
                                                                        throws KeyResolverException
        Method engineResolveCertificate
        Parameters:
        element -
        baseURI -
        storage -
        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)
                                                                              throws KeyResolverException
        Method engineLookupResolveX509Certificate
        Parameters:
        element -
        baseURI -
        storage -
        Returns:
        resolved X509Certificate key from the registered from the elements
        Throws:
        KeyResolverException
      • engineResolveSecretKey

        public javax.crypto.SecretKey engineResolveSecretKey​(org.w3c.dom.Element element,
                                                             java.lang.String baseURI,
                                                             StorageResolver storage)
                                                      throws KeyResolverException
        Method engineResolveSecretKey
        Parameters:
        element -
        baseURI -
        storage -
        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)
                                                               throws KeyResolverException
        Method engineLookupAndResolveSecretKey
        Parameters:
        element -
        baseURI -
        storage -
        Returns:
        resolved SecretKey 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)
                                                                  throws KeyResolverException
        Method engineLookupAndResolvePrivateKey
        Parameters:
        element -
        baseURI -
        storage -
        Returns:
        resolved PrivateKey key from the registered from the elements
        Throws:
        KeyResolverException
      • engineSetProperty

        public void engineSetProperty​(java.lang.String key,
                                      java.lang.String value)
        Method engineSetProperty
        Parameters:
        key -
        value -
      • engineGetProperty

        public java.lang.String engineGetProperty​(java.lang.String key)
        Method engineGetProperty
        Parameters:
        key -
        Returns:
        obtain the property appointed by key
      • understandsProperty

        public boolean understandsProperty​(java.lang.String propertyToTest)
        Method understandsProperty
        Parameters:
        propertyToTest -
        Returns:
        true if understood the property
      • setGlobalResolver

        public void setGlobalResolver​(boolean globalResolver)
      • 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