Examples of KeyName


Examples of org.apache.xml.security.keys.content.KeyName

    boolean isKeyName = XMLUtils.elementIsInSignatureSpace(element,
                     Constants._TAG_KEYNAME);

    try {
      if (isKeyName) {
        _kn = new KeyName(element, "");
        if (_kn.getKeyName().equals("bob")) {
          return true;
        }
      }
    }
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

     *
     * @param keyname
     */
    public void addKeyName(SOAPElement keyname) throws XWSSecurityException {
        try {
            KeyName keynm = new KeyName(keyname,null);
            delegateKeyInfo.add(keynm);
            dirty = true;
        } catch (XMLSecurityException e) {
            log.log(Level.SEVERE, "WSS0319.exception.adding.keyname", e);
            throw new XWSSecurityException(e)
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

     * Method addKeyName
     *
     * @param keynameString
     */
    public void addKeyName(String keynameString) {
        this.add(new KeyName(this.doc, keynameString));
    }
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

        Element e =
            XMLUtils.selectDsNode(
                this.constructionElement.getFirstChild(), Constants._TAG_KEYNAME, i);

        if (e != null) {
            return new KeyName(e, this.baseURI);
        }
        return null;     
    }
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

            "http://www.w3.org/2000/09/xmldsig#hmac-sha1", document, localNames, key
        );
       
        // Add KeyInfo
        KeyInfo keyInfo = sig.getKeyInfo();
        KeyName keyName = new KeyName(document, "SecretKey");
        keyInfo.add(keyName);
       
        // XMLUtils.outputDOM(document, System.out);
       
        // Convert Document to a Stream Reader
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

            "http://www.w3.org/2000/09/xmldsig#hmac-sha1", document, localNames, key
        );
       
        // Add KeyInfo
        KeyInfo keyInfo = sig.getKeyInfo();
        KeyName keyName = new KeyName(document, "SecretKey");
        keyInfo.add(keyName);
       
        // XMLUtils.outputDOM(document, System.out);
       
        // Convert Document to a Stream Reader
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

        if (ki == null) {
            return null;
        }

        // First check for a known key name
        KeyName keyName = ki.itemKeyName(0);
        if (keyName != null) {
            return (mapKeyName(keyName.getKeyName()));
        }

        // Decrypt any encryptedKey structures
        EncryptedKey encryptedKey = ki.itemEncryptedKey(0);
        if (encryptedKey == null) {
            return null;
        }

        KeyInfo kiek = encryptedKey.getKeyInfo();
        if (kiek == null) {
            return null;
        }

        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();
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

        log.debug("Can I resolve " + element.getTagName());

        boolean isKeyName = XMLUtils.elementIsInSignatureSpace(element, Constants._TAG_KEYNAME);
        try {
            if (isKeyName) {
                _kn = new KeyName(element, "");
                if (_kn.getKeyName().equals("bob")) {
                    return true;
                }
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

     * Method addKeyName
     *
     * @param keynameString
     */
    public void addKeyName(String keynameString) {
        this.add(new KeyName(getDocument(), keynameString));
    }
View Full Code Here

Examples of org.apache.xml.security.keys.content.KeyName

        Element e =
            XMLUtils.selectDsNode(
                getFirstChild(), Constants._TAG_KEYNAME, i);

        if (e != null) {
            return new KeyName(e, this.baseURI);
        }
        return 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.