Package org.apache.xml.security.keys.content

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


           throws XMLSecurityException {

      String thisName = this.getCarriedKeyName();

      for (int i = 0; i < ki.lengthKeyName(); i++) {
         KeyName kn = ki.itemKeyName(i);

         if (thisName.equals(kn.getKeyName())) {
            return true;
         }
      }

      return false;
View Full Code Here

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

      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

                List keybindings = locateResult.getUnverifiedKeyBindingList();
                UnverifiedKeyBinding keybinding = (UnverifiedKeyBinding) keybindings
                        .get(0);
                KeyInfo keyInfo = keybinding.getKeyInfo();
                KeyName keyName = keyInfo.itemKeyName(0);
                return keyName.getKeyName();
            }

        } catch (Exception ex) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("", ex);
View Full Code Here

                List keybindings = locateResult.getUnverifiedKeyBindingList();
                UnverifiedKeyBinding keybinding = (UnverifiedKeyBinding) keybindings
                        .get(0);
                KeyInfo keyInfo = keybinding.getKeyInfo();
                KeyName keyName = keyInfo.itemKeyName(0);
                return keyName.getKeyName();
            }

        } catch (Exception ex) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("", ex);
View Full Code Here

            if (identifer == null) {
                KeyInfo keyInfo = keybinding.getKeyInfo();

                if (keyInfo != null) {
                    try {
                        KeyName keyName = keyInfo.itemKeyName(0);
                        if (keyName != null) {
                            aliases = new String[] { keyName.getKeyName() };
                        }
                    } catch (XMLSecurityException xme) {
                        throw new XKMSException(xme);
                    }
                }
View Full Code Here

        KeyInfo keyInfo = abstractType.getKeyInfo();
        if (keyInfo != null) {
            try {

                KeyName itemKeyName = keyInfo.itemKeyName(0);
                if (itemKeyName != null) {
                    abstractType.setKeyName(itemKeyName.getKeyName());
                }

                PublicKey public1 = keyInfo.getPublicKey();
                if (public1 != null) {
                    abstractType.setKeyValue(public1);
View Full Code Here

        for (Iterator iterator = respondWiths.iterator(); iterator.hasNext();) {
            RespondWith respondWith = (RespondWith) iterator.next();

            if (respondWith.equals(RespondWith.KEY_NAME)) {
                KeyName keyName = new KeyName(doc, aliase);
                keyInfo.add(keyName);

            } else if (respondWith.equals(RespondWith.KEY_VALUE)) {
                PublicKey publicKey = certs[0].getPublicKey();
                KeyValue keyValue = new KeyValue(doc, publicKey);
View Full Code Here

                && (keyName != null || keyValue != null || certValue != null)) {
            Document doc = ((Element) container).getOwnerDocument();
            keyInfo = new KeyInfo(doc);

            if (keyName != null) {
                KeyName keyName = new KeyName(doc, this.keyName);
                keyInfo.add(keyName);
            }
           
            if (keyValue != null) {
                keyInfo.addKeyValue(keyValue);
View Full Code Here

TOP

Related Classes of org.apache.xml.security.keys.content.KeyName

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.