Package org.apache.jcp.xml.dsig.internal.dom

Examples of org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo


    public void testReferenceCount() throws Exception {
        Element signedInfoElement =
            getSignedInfoElement("src/test/resources/interop/c14n/Y4", "signature-manifest.xml");
       
        InternalDOMCryptoContext context = new InternalDOMCryptoContext();
        new DOMSignedInfo(signedInfoElement, context, null);
       
        context.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.TRUE);
        try {
            new DOMSignedInfo(signedInfoElement, context, null);
        } catch (MarshalException ex) {
            String error =
                "A maxiumum of 30 references per Manifest are allowed with secure validation";
            assertTrue(ex.getMessage().contains(error));
        }
View Full Code Here


    public void testReferenceCount() throws Exception {
        Element signedInfoElement =
            getSignedInfoElement("src/test/resources/interop/c14n/Y4", "signature-manifest.xml");
       
        InternalDOMCryptoContext context = new InternalDOMCryptoContext();
        new DOMSignedInfo(signedInfoElement, context, null);
       
        context.setProperty("org.apache.jcp.xml.dsig.secureValidation", Boolean.TRUE);
        try {
            new DOMSignedInfo(signedInfoElement, context, null);
        } catch (MarshalException ex) {
            String error =
                "A maxiumum of 30 references per Manifest are allowed with secure validation";
            assertTrue(ex.getMessage().contains(error));
        }
View Full Code Here

        }

        /*
         * Calculation of XML signature digest value.
         */
        DOMSignedInfo domSignedInfo = (DOMSignedInfo)signedInfo;
        ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
        domSignedInfo.canonicalize(xmlSignContext, dataStream);
        byte[] octets = dataStream.toByteArray();

        /*
         * TODO: we could be using DigestOutputStream here to optimize memory
         * usage.
 
View Full Code Here

TOP

Related Classes of org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo

Copyright © 2018 www.massapicom. 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.