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

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


         */
        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

    //    }

    // v2 - using the CPC2, this also knows about methods that are being used so is much more precise
    // and never has to guess if something needs a rewrite
    if (!skipReferencesCheck) {
      References refs = ConstantPoolChecker2.getReferences(bytes);
      boolean needsRewriting = false;
      for (String clazz : refs.referencedClasses) {
        if (typeRegistry != null && typeRegistry.isReloadableTypeName(clazz)) {
          needsRewriting = true;
          break;
View Full Code Here

TOP

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

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.