Examples of containsKeyValue()


Examples of com.sun.org.apache.xml.internal.security.keys.KeyInfo.containsKeyValue()

        try {
            Element keyInfoElem = (Element)nl.item(0);
           
            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);
View Full Code Here

Examples of com.sun.xml.wss.core.KeyInfoHeaderBlock.containsKeyValue()

        KeyInfoHeaderBlock keyInfoHb = new KeyInfoHeaderBlock(keyInfo);
        Key kek = null;
        try{
            if (keyInfoHb.containsSecurityTokenReference()){
                kek = processSecurityTokenReference(keyInfoHb, callbackHandler);
            } else if (keyInfoHb.containsKeyValue()) {
              
                SecurityEnvironment secEnv = new DefaultSecurityEnvironmentImpl(callbackHandler);
                KeyValue keyValue = keyInfoHb.getKeyValue(0);
                keyValue.getElement().normalize();
                kek = secEnv.getPrivateKey(null, keyValue.getPublicKey(), false);
View Full Code Here

Examples of com.sun.xml.wss.core.KeyInfoHeaderBlock.containsKeyValue()

        KeyInfoHeaderBlock keyInfoHb = new KeyInfoHeaderBlock(keyInfo);
        Key kek = null;
        try{
            if (keyInfoHb.containsSecurityTokenReference()){
                kek = processSecurityTokenReference(keyInfoHb, callbackHandler);
            } else if (keyInfoHb.containsKeyValue()) {
              
                SecurityEnvironment secEnv = new DefaultSecurityEnvironmentImpl(callbackHandler);
                KeyValue keyValue = keyInfoHb.getKeyValue(0);
                keyValue.getElement().normalize();
                kek = secEnv.getPrivateKey(null, keyValue.getPublicKey(), false);
View Full Code Here

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

                                        issuerSerial.getIssuerName(), issuerSerial.getSerialNumber()
                                    );
                                certs = crypto.getCertificates(alias);
                                return new SAMLKeyInfo(assertion, certs);
                            }
                        } else if (ki.containsKeyValue()) {
                            PublicKey pk = ki.getPublicKey();
                            return new SAMLKeyInfo(assertion, pk);
                        }
                    } catch (XMLSecurityException e3) {
                        throw new WSSecurityException(WSSecurityException.FAILURE,
View Full Code Here

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

                                X509Certificate cert = certElem.getX509Certificate();
                                certs = new X509Certificate[1];
                                certs[0] = cert;
                                return new SAMLKeyInfo(assertion, certs);
                            }
                        } else if (ki.containsKeyValue()) {
                            PublicKey pk = ki.getPublicKey();
                            return new SAMLKeyInfo(assertion, pk);
                        }
                    } catch (XMLSecurityException e3) {
                        throw new WSSecurityException(WSSecurityException.FAILURE,
View Full Code Here

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

        String customTokenId = null;
        java.security.PublicKey publicKey = null;
        X509Certificate[] certs = null;
        boolean validateCertificateChain = false;
       
        if (info != null && info.containsKeyValue()) {
            try {
                publicKey = info.getPublicKey();
            } catch (Exception ex) {
                throw new WSSecurityException(ex.getMessage(), ex);
            }
View Full Code Here

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

                    if (certElem != null) {
                        X509Certificate cert = certElem.getX509Certificate();
                        certs = new X509Certificate[1];
                        certs[0] = cert;
                    }
                }  else if (ki.containsKeyValue()) {
                    publicKey = ki.getPublicKey();
                }
                // TODO: get alias name for cert, check against username set by
                // caller
            } catch (XMLSecurityException e3) {
View Full Code Here

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

        java.security.PublicKey publicKey = null;
        X509Certificate[] certs = null;
        boolean validateCertificateChain = false;
        boolean kerbThumbPrint = false;
       
        if (info != null && info.containsKeyValue()) {
            try {
                publicKey = info.getPublicKey();
            } catch (Exception ex) {
                throw new WSSecurityException(ex.getMessage(), ex);
            }
View Full Code Here

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

        DerivedKeyToken dkt = null;
        SAMLKeyInfo samlKi = null;
        String customTokenId = null;
        java.security.PublicKey publicKey = null;
       
        if (info != null && info.containsKeyValue()) {
            try {
                publicKey = info.getPublicKey();
            } catch (Exception ex) {
                throw new WSSecurityException(ex.getMessage(), ex);
            }
View Full Code Here

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

        String customTokenId = null;
        java.security.PublicKey publicKey = null;
        X509Certificate[] certs = null;
        boolean validateCertificateChain = false;
       
        if (info != null && info.containsKeyValue()) {
            try {
                publicKey = info.getPublicKey();
            } catch (Exception ex) {
                throw new WSSecurityException(ex.getMessage(), ex);
            }
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.