Examples of DigestMethod


Examples of org.opensaml.xml.signature.DigestMethod

*/
public class DigestMethodMarshaller extends AbstractXMLSignatureMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        DigestMethod dm = (DigestMethod) xmlObject;

        if (dm.getAlgorithm() != null) {
            domElement.setAttributeNS(null, DigestMethod.ALGORITHM_ATTRIB_NAME, dm.getAlgorithm());
        }
    }
View Full Code Here

Examples of org.opensaml.xml.signature.DigestMethod

        String keyTransportAlgorithm = encryptedKey.getEncryptionMethod().getAlgorithm();
        if (EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP.equals(keyTransportAlgorithm)) {
            List<XMLObject> digestMethods =
                encryptedKey.getEncryptionMethod().getUnknownXMLObjects(DigestMethod.DEFAULT_ELEMENT_NAME);
            if (!digestMethods.isEmpty()) {
                DigestMethod dm = (DigestMethod) digestMethods.get(0);
                if (! SignatureConstants.ALGO_ID_DIGEST_SHA1
                        .equals(DatatypeHelper.safeTrimOrNullString(dm.getAlgorithm())) ) {
                    log.error("EncryptedKey/EncryptionMethod/DigestMethod contains unsupported algorithm URI: {}",
                            dm.getAlgorithm());
                    throw new DecryptionException(
                            "EncryptedKey/EncryptionMethod/DigestMethod contains unsupported algorithm URI");
                }
            }
        }
View Full Code Here

Examples of org.opensaml.xml.signature.DigestMethod

        String keyTransportAlgorithm = encryptedKey.getEncryptionMethod().getAlgorithm();
        if (EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP.equals(keyTransportAlgorithm)) {
            List<XMLObject> digestMethods =
                encryptedKey.getEncryptionMethod().getUnknownXMLObjects(DigestMethod.DEFAULT_ELEMENT_NAME);
            if (!digestMethods.isEmpty()) {
                DigestMethod dm = (DigestMethod) digestMethods.get(0);
                if (! SignatureConstants.ALGO_ID_DIGEST_SHA1
                        .equals(DatatypeHelper.safeTrimOrNullString(dm.getAlgorithm())) ) {
                    log.error("EncryptedKey/EncryptionMethod/DigestMethod contains unsupported algorithm URI: {}",
                            dm.getAlgorithm());
                    throw new DecryptionException(
                            "EncryptedKey/EncryptionMethod/DigestMethod contains unsupported algorithm URI");
                }
            }
        }
View Full Code Here

Examples of org.opensaml.xml.signature.DigestMethod

*/
public class DigestMethodUnmarshaller extends AbstractXMLSignatureUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        DigestMethod dm = (DigestMethod) xmlObject;

        if (attribute.getLocalName().equals(DigestMethod.ALGORITHM_ATTRIB_NAME)) {
            dm.setAlgorithm(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.xml.signature.DigestMethod

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        DigestMethod dm = (DigestMethod) parentXMLObject;
        dm.getUnknownXMLObjects().add(childXMLObject);
    }
View Full Code Here

Examples of org.opensaml.xml.signature.DigestMethod

*/
public class DigestMethodMarshaller extends AbstractXMLSignatureMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        DigestMethod dm = (DigestMethod) xmlObject;

        if (dm.getAlgorithm() != null) {
            domElement.setAttributeNS(null, DigestMethod.ALGORITHM_ATTRIB_NAME, dm.getAlgorithm());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.