Examples of KeyIdentifier


Examples of org.opensaml.ws.wssecurity.KeyIdentifier

*/
public class KeyIdentifierUnmarshaller extends EncodedStringUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (KeyIdentifier.VALUE_TYPE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            keyIdentifier.setValueType(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.KeyIdentifier

*/
public class KeyIdentifierMarshaller extends EncodedStringMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (!DatatypeHelper.isEmpty(keyIdentifier.getValueType())) {
            domElement.setAttributeNS(null, KeyIdentifier.VALUE_TYPE_ATTRIB_NAME, keyIdentifier.getValueType());
        }
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.KeyIdentifier

*/
public class KeyIdentifierUnmarshaller extends EncodedStringUnmarshaller {

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (KeyIdentifier.VALUE_TYPE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            keyIdentifier.setValueType(attribute.getValue());
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.KeyIdentifier

*/
public class KeyIdentifierMarshaller extends EncodedStringMarshaller {

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
        if (!DatatypeHelper.isEmpty(keyIdentifier.getValueType())) {
            domElement.setAttributeNS(null, KeyIdentifier.VALUE_TYPE_ATTRIB_NAME, keyIdentifier.getValueType());
        }
        super.marshallAttributes(xmlObject, domElement);
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.KeyIdentifier

            throws TrustException {

        SecurityTokenReference securityTokenReference
                = (SecurityTokenReference)SAMLUtils.buildXMLObject(SecurityTokenReference.ELEMENT_NAME);

        KeyIdentifier keyIdentifier = (KeyIdentifier)SAMLUtils.buildXMLObject(KeyIdentifier.ELEMENT_NAME);

        // Encoding type set to http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0
        // #Base64Binary
        keyIdentifier.setEncodingType(KeyIdentifier.ENCODING_TYPE_BASE64_BINARY);
        keyIdentifier.setValueType(WSSecurityConstants.THUMB_PRINT_SHA1);
        keyIdentifier.setValue(getThumbprintSha1(certificate));

        securityTokenReference.getUnknownXMLObjects().add(keyIdentifier);

        KeyInfo keyInfo = SAMLUtils.createKeyInfo();
        keyInfo.getXMLObjects().add(securityTokenReference);
View Full Code Here

Examples of sun.security.x509.KeyIdentifier

  private static CertificateExtensions getCertificateExtensions(
      PublicKey pubKey, PublicKey caPubKey) throws IOException {
    CertificateExtensions ext = new CertificateExtensions();

    ext.set(SubjectKeyIdentifierExtension.NAME,
        new SubjectKeyIdentifierExtension(new KeyIdentifier(pubKey)
        .getIdentifier()));

    ext.set(AuthorityKeyIdentifierExtension.NAME,
        new AuthorityKeyIdentifierExtension(
            new KeyIdentifier(caPubKey), null, null));

    // Basic Constraints
    ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension(
        /* isCritical */true, /* isCA */false, /* pathLen */5));

 
View Full Code Here

Examples of sun.security.x509.KeyIdentifier

  private static CertificateExtensions getCertificateExtensions(
      PublicKey pubKey, PublicKey caPubKey) throws IOException {
    CertificateExtensions ext = new CertificateExtensions();

    ext.set(SubjectKeyIdentifierExtension.NAME,
        new SubjectKeyIdentifierExtension(new KeyIdentifier(pubKey)
            .getIdentifier()));

    ext.set(AuthorityKeyIdentifierExtension.NAME,
        new AuthorityKeyIdentifierExtension(
            new KeyIdentifier(caPubKey), null, null));

    // Basic Constraints
    ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension(
    /* isCritical */Boolean.TRUE, /* isCA */false, /* pathLen */5));

 
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.