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

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


        if (!x509DataObjects.isEmpty()) {
            X509Data x509Data = keyInfoFactory.newX509Data(x509DataObjects);
            keyInfoContent.add(x509Data);
        }
        KeyInfo keyInfo = keyInfoFactory.newKeyInfo(keyInfoContent);
        DOMKeyInfo domKeyInfo = (DOMKeyInfo)keyInfo;

        Key key = new Key() {
            private static final long serialVersionUID = 1L;

            public String getAlgorithm() {
                return null;
            }

            public byte[] getEncoded() {
                return null;
            }

            public String getFormat() {
                return null;
            }
        };

        Element n = document.getDocumentElement();
        DOMSignContext domSignContext = new DOMSignContext(key, n, nextSibling);
        for (Map.Entry<String,String> me : signatureConfig.getNamespacePrefixes().entrySet()) {
            domSignContext.putNamespacePrefix(me.getKey(), me.getValue());
        }
       
        DOMStructure domStructure = new DOMStructure(n);
        domKeyInfo.marshal(domStructure, domSignContext);
       
        // move keyinfo into the right place
        if (nextSibling != null) {
            NodeList kiNl = document.getElementsByTagNameNS(XML_DIGSIG_NS, "KeyInfo");
            if (kiNl.getLength() != 1) {
View Full Code Here

TOP

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

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.