Class KeyInfoReferenceResolver


  • public class KeyInfoReferenceResolver
    extends KeyResolverSpi
    KeyResolverSpi implementation which resolves public keys, private keys, secret keys, and X.509 certificates from a dsig11:KeyInfoReference element.
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
    • Constructor Detail

      • KeyInfoReferenceResolver

        public KeyInfoReferenceResolver()
    • Method Detail

      • 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.}.
        Overrides:
        engineCanResolve in class KeyResolverSpi
        Returns:
        whether the KeyResolverSpi is able to perform the requested action.
      • resolveReferentKeyInfo

        private KeyInfo resolveReferentKeyInfo​(org.w3c.dom.Element element,
                                               java.lang.String baseURI,
                                               StorageResolver storage)
                                        throws XMLSecurityException
        Resolve the KeyInfoReference Element's URI attribute into a KeyInfo instance.
        Parameters:
        element -
        baseURI -
        storage -
        Returns:
        the KeyInfo which is referred to by this KeyInfoReference, or null if can not be resolved
        Throws:
        XMLSecurityException
      • validateReference

        private void validateReference​(org.w3c.dom.Element referentElement)
                                throws XMLSecurityException
        Validate the Element referred to by the KeyInfoReference.
        Parameters:
        referentElement -
        Throws:
        XMLSecurityException
      • resolveInput

        private XMLSignatureInput resolveInput​(org.w3c.dom.Attr uri,
                                               java.lang.String baseURI,
                                               boolean secureValidation)
                                        throws XMLSecurityException
        Resolve the XML signature input represented by the specified URI.
        Parameters:
        uri -
        baseURI -
        secureValidation -
        Returns:
        the XML signature input represented by the specified URI.
        Throws:
        XMLSecurityException
      • obtainReferenceElement

        private org.w3c.dom.Element obtainReferenceElement​(XMLSignatureInput resource)
                                                    throws CanonicalizationException,
                                                           javax.xml.parsers.ParserConfigurationException,
                                                           java.io.IOException,
                                                           org.xml.sax.SAXException,
                                                           KeyResolverException
        Resolve the Element effectively represented by the XML signature input source.
        Parameters:
        resource -
        Returns:
        the Element effectively represented by the XML signature input source.
        Throws:
        CanonicalizationException
        javax.xml.parsers.ParserConfigurationException
        java.io.IOException
        org.xml.sax.SAXException
        KeyResolverException