Package org.apache.xml.security.keys

Examples of org.apache.xml.security.keys.KeyInfo.containsX509Data()


        Element e = samlSubj.getKeyInfo();
        X509Certificate[] certs = null;
        try {
            KeyInfo ki = new KeyInfo(e, null);

            if (ki.containsX509Data()) {
                X509Data data = ki.itemX509Data(0);
                XMLX509Certificate certElem = null;
                if (data != null && data.containsCertificate()) {
                    certElem = data.itemCertificate(0);
                }
View Full Code Here


            }
            Element e = samlSubj.getKeyInfo();
            try {
                KeyInfo ki = new KeyInfo(e, null);

                if (ki.containsX509Data()) {
                    X509Data data = ki.itemX509Data(0);
                    XMLX509Certificate certElem = null;
                    if (data != null && data.containsCertificate()) {
                        certElem = data.itemCertificate(0);
                    }
View Full Code Here

        }
        if (false == signatureValid) {
            throw new SamlSignatureException("invalid");
        }
        List certificateChain = new LinkedList();
        if (false == keyInfo.containsX509Data()) {
            throw new SamlSignatureException("no X509 data in KeyInfo");
        }
        for (int x509DataItemIdx = 0; x509DataItemIdx < keyInfo.lengthX509Data(); x509DataItemIdx++) {
            try {
                X509Data x509Data = keyInfo.itemX509Data(x509DataItemIdx);
View Full Code Here

            if (logger.isTraceEnabled()) {
                logger.trace("sigElement="+sigElement.getTextContent());
            }

            KeyInfo keyInfo = signature.getKeyInfo();
            if (!keyInfo.containsX509Data()) {
                log.error("Cannot find X509Data element");
                throw new LoginException("Cannot find X509Data element");
            }

            X509Certificate certificate = signature.getKeyInfo().getX509Certificate();
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.