Package org.jboss.ws.extensions.security.element

Examples of org.jboss.ws.extensions.security.element.EncryptedKey


      {
         token = new X509Token(cert, message);
         header.addToken(token);
      }

      EncryptedKey eKey = new EncryptedKey(message, secretKey, token, list);
      header.addSecurityProcess(eKey);
   }
View Full Code Here


      {
         token = new X509Token(cert, message);
         header.addToken(token);
      }

      EncryptedKey eKey = new EncryptedKey(message, secretKey, token, list);
      header.addSecurityProcess(eKey);
   }
View Full Code Here

   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Collection<String> ids = new HashSet<String>();
      EncryptedKey key = (EncryptedKey) process;
      ReferenceList list = key.getReferenceList();
      for (String uri : list.getAllReferences())
      {
         Element element = Util.findElementByWsuId(message.getDocumentElement(), uri);
         if (element == null)
            throw new WSSecurityException("A reference list refered to an element that was not found: " + uri);

         if (!isEncryptedData(element))
            throw new WSSecurityException("Malformed reference list, a non encrypted data element was referenced: " + uri);

         ids.add(decryptElement(element, key.getSecretKey()));
      }

      return ids;
   }
View Full Code Here

         token = new X509Token(cert, message);
         if (tokenRefType == null || Reference.DIRECT_REFERENCE.equals(tokenRefType))
            header.addToken(token);
      }

      EncryptedKey eKey = new EncryptedKey(message, secretKey, token, list, wrap, tokenRefType);
      header.addSecurityProcess(eKey);
   }
View Full Code Here

         token = new X509Token(cert, message);
         if (tokenRefType == null || Reference.DIRECT_REFERENCE.equals(tokenRefType))
            header.addToken(token);
      }

      EncryptedKey eKey = new EncryptedKey(message, secretKey, token, list, wrap, tokenRefType);
      header.addSecurityProcess(eKey);
   }
View Full Code Here

   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Collection<String> ids = new HashSet<String>();
      EncryptedKey key = (EncryptedKey) process;
      ReferenceList list = key.getReferenceList();
      for (String uri : list.getAllReferences())
      {
         Element element = Util.findElementByWsuId(message.getDocumentElement(), uri);
         if (element == null)
            throw new WSSecurityException("A reference list refered to an element that was not found: " + uri);

         if (!isEncryptedData(element))
            throw new WSSecurityException("Malformed reference list, a non encrypted data element was referenced: " + uri);

         ids.add(decryptElement(element, key.getSecretKey()));
      }

      return ids;
   }
View Full Code Here

   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Collection<String> ids = new HashSet<String>();
      EncryptedKey key = (EncryptedKey) process;
      ReferenceList list = key.getReferenceList();
      for (String uri : list.getAllReferences())
      {
         Element element = Util.findElementByWsuId(message.getDocumentElement(), uri);
         if (element == null)
            throw new WSSecurityException("A reference list refered to an element that was not found: " + uri);

         if (!isEncryptedData(element))
            throw new WSSecurityException("Malformed reference list, a non encrypted data element was referenced: " + uri);

         ids.add(decryptElement(element, key.getSecretKey()));
      }

      return ids;
   }
View Full Code Here

         token = new X509Token(cert, message);
         if (tokenRefType == null || Reference.DIRECT_REFERENCE.equals(tokenRefType))
            header.addToken(token);
      }

      EncryptedKey eKey = new EncryptedKey(message, secretKey, token, list, wrap, tokenRefType);
      header.addSecurityProcess(eKey);
   }
View Full Code Here

         token = new X509Token(cert, message);
         if (tokenRefType == null || Reference.DIRECT_REFERENCE.equals(tokenRefType))
            header.addToken(token);
      }

      EncryptedKey eKey = new EncryptedKey(message, secretKey, token, list, wrap, tokenRefType);
      header.addSecurityProcess(eKey);
   }
View Full Code Here

   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Collection<String> ids = new HashSet<String>();
      EncryptedKey key = (EncryptedKey) process;
      ReferenceList list = key.getReferenceList();
      for (String uri : list.getAllReferences())
      {
         Element element = Util.findElementByWsuId(message.getDocumentElement(), uri);
         if (element == null)
            throw new WSSecurityException("A reference list refered to an element that was not found: " + uri);

         if (!isEncryptedData(element))
            throw new WSSecurityException("Malformed reference list, a non encrypted data element was referenced: " + uri);

         ids.add(decryptElement(element, key.getSecretKey()));
      }

      return ids;
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.security.element.EncryptedKey

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.