Package org.picketlink.identity.xmlsec.w3.xmlenc

Examples of org.picketlink.identity.xmlsec.w3.xmlenc.ReferenceList


         */
        keyInfo = (KeyInfoType) confirmation.getSubjectConfirmationData().getAnyType();
        assertEquals("Unexpected key info content size", 1, keyInfo.getContent().size());

        // key info should contain a X509Data section with the encoded certificate.
        X509DataType x509Data = (X509DataType) keyInfo.getContent().get(0);
        assertEquals("Unexpected X509 data content size", 1, x509Data.getDataObjects().size());
        X509CertificateType cert = (X509CertificateType) x509Data.getDataObjects().get(0);

        // certificate should have been encoded to Base64, so we need to decode it first.
        byte[] encodedCert = Base64.decode(new String(cert.getEncodedCertificate()));
        assertTrue("Invalid encoded certificate found", Arrays.equals(certificate.getEncoded(), encodedCert));
    }
View Full Code Here


        if (keyInfo == null)
            throw logger.nullArgumentError("keyInfo");
        KeyDescriptorType keyDescriptor = new KeyDescriptorType();

        if (isNotNull(algorithm)) {
            EncryptionMethodType encryptionMethod = new EncryptionMethodType(algorithm);

            encryptionMethod.setEncryptionMethod(new EncryptionMethod(BigInteger.valueOf(keySize), null));

            keyDescriptor.addEncryptionMethod(encryptionMethod);
        }
        keyDescriptor.setKeyInfo(keyInfo);
View Full Code Here

        keyDescriptor.setKeyInfo(keyInfoElement);
       
        NodeList nl = keyDescriptorElement.getElementsByTagNameNS(JBossSAMLURIConstants.METADATA_NSURI.get(), "EncryptionMethod");
        for (int i = 0; i < nl.getLength(); i++) {
            String algo = ((Element)nl.item(i)).getAttribute("Algorithm");
            keyDescriptor.addEncryptionMethod(new EncryptionMethodType(algo));
        }
       
        return keyDescriptor;
    }
View Full Code Here

            throw logger.shouldNotBeTheSameError("Only one of isSigningKey and isEncryptionKey should be true");

        KeyDescriptorType keyDescriptor = new KeyDescriptorType();

        if (isNotNull(algorithm)) {
            EncryptionMethodType encryptionMethod = new EncryptionMethodType(algorithm);

            encryptionMethod.setEncryptionMethod(new EncryptionMethod(BigInteger.valueOf(keySize), null));

            keyDescriptor.addEncryptionMethod(encryptionMethod);
        }

        if (isSigningKey)
View Full Code Here

        KeyDescriptorType keyDescriptor = new KeyDescriptorType();

        if (isNotNull(algorithm)) {
            EncryptionMethodType encryptionMethod = new EncryptionMethodType(algorithm);

            encryptionMethod.setEncryptionMethod(new EncryptionMethod(BigInteger.valueOf(keySize), null));

            keyDescriptor.addEncryptionMethod(encryptionMethod);
        }

        if (isSigningKey)
View Full Code Here

        KeyDescriptorType keyDescriptor = new KeyDescriptorType();

        if (isNotNull(algorithm)) {
            EncryptionMethodType encryptionMethod = new EncryptionMethodType(algorithm);

            encryptionMethod.setEncryptionMethod(new EncryptionMethod(BigInteger.valueOf(keySize), null));

            keyDescriptor.addEncryptionMethod(encryptionMethod);
        }
        keyDescriptor.setKeyInfo(keyInfo);
View Full Code Here

TOP

Related Classes of org.picketlink.identity.xmlsec.w3.xmlenc.ReferenceList

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.