Examples of itemX509Data()


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

            KeyInfo keyInfo = new KeyInfo(keyInfoElem, null);
           
            if (keyInfo.containsKeyValue()) {
                return keyInfo.itemKeyValue(0).getPublicKey();
            } else if (keyInfo.containsX509Data()) {
                return resolveX509Data(keyInfo.itemX509Data(0), callbackHandler);
            } else if(keyInfo.length(EncryptionConstants.EncryptionSpecNS, EncryptionConstants._TAG_ENCRYPTEDKEY) > 0){
                return resolveEncryptedKey(keyInfo.itemEncryptedKey(0), callbackHandler);
            }
            else {
                throw new XWSSecurityException("Unsupported Key Information");
View Full Code Here

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

                    X509Certificate[] certs = null;
                    try {
                        KeyInfo ki = new KeyInfo(keyInfoElement, null);

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

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

        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);
                if (false == x509Data.containsCertificate()) {
                    continue;
                }
                int certificateCount = x509Data.lengthCertificate();
                for (int certificateIdx = 0; certificateIdx < certificateCount; certificateIdx++) {
View Full Code Here

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

        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);
                }
                if (certElem != null) {
View Full Code Here

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

        EncryptedData encryptedData = cipher.loadEncryptedData(doc, ee);
       
        KeyInfo ki = encryptedData.getKeyInfo();
        EncryptedKey encryptedKey = ki.itemEncryptedKey(0);
        KeyInfo kiek = encryptedKey.getKeyInfo();
        X509Data certData = kiek.itemX509Data(0);
        XMLX509Certificate xcert = certData.itemCertificate(0);
        X509Certificate cert = xcert.getX509Certificate();
        assertTrue(rsaCert.equals(cert));
       
        XMLCipher cipher2 = XMLCipher.getInstance();
View Full Code Here

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

        KeyName kekKeyName = kiek.itemKeyName(0);
        if (kekKeyName != null) {
            kek = mapKeyName(kekKeyName.getKeyName());
        } else {
            X509Data certData = kiek.itemX509Data(0);
            XMLX509Certificate xcert = certData.itemCertificate(0);
            X509Certificate cert = xcert.getX509Certificate();

            if (cert != null) {
                if (cert.getSerialNumber().toString().equals(rsaCertSerialNumber)) {
View Full Code Here

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

            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);
                    }
                    if (certElem != null) {
View Full Code Here

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

                    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);
                            }
                            if (certElem != null) {
View Full Code Here

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

        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);
                }
                if (certElem != null) {
View Full Code Here

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

            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);
                    }
                    if (certElem != null) {
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.