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

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


      for (SecurityProcess process : header.getSecurityProcesses())
      {
         // If this list gets much larger it should probably be a hash lookup
         if (process instanceof Signature)
         {
            Signature signature = (Signature)process;
            Collection<String> ids = signatureVerifier.process(message, signature);
            if (ids != null)
               signedIds.addAll(ids);
            if (authenticate != null && authenticate.isSignatureCertAuth())
               new ReceiveX509Certificate(authenticate.getSignatureCertAuth().getCertificatePrincipal()).process(message, signature.getSecurityToken());
         }
         else if (process instanceof EncryptedKey)
         {
            Collection<String> ids = decrypter.process(message, process);
            if (ids != null)
View Full Code Here


      }

      SecurityTokenReference reference = new SecurityTokenReference(new DirectReference(message, token));
      sig.getKeyInfo().addUnknownElement(reference.getElement());

      header.addSecurityProcess(new Signature(sig));
   }
View Full Code Here

      this.store = store;
   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Signature signature = (Signature) process;
      XMLSignature xmlSig = signature.getSignature();

      xmlSig.addResourceResolver(new WsuIdResolver(message));
      STRTransform.setSecurityStore(store);

      try
      {
         if (! xmlSig.checkSignatureValue(signature.getPublicKey()))
            throw new FailedCheckException("Signature is invalid.");
      }
      catch (XMLSignatureException e)
      {
         throw new WSSecurityException("An unexpected error occured while verifying signature", e);
View Full Code Here

      }

      SecurityTokenReference reference = new SecurityTokenReference(new DirectReference(message, token));
      sig.getKeyInfo().addUnknownElement(reference.getElement());

      header.addSecurityProcess(new Signature(sig));
   }
View Full Code Here

      for (SecurityProcess process : header.getSecurityProcesses())
      {
         // If this list gets much larger it should probably be a hash lookup
         if (process instanceof Signature)
         {
            Signature signature = (Signature)process;
            Collection<String> ids = signatureVerifier.process(message, signature);
            if (ids != null)
               signedIds.addAll(ids);
            if (authenticate != null && authenticate.isSignatureCertAuth())
               new ReceiveX509Certificate(authenticate.getSignatureCertAuth().getCertificatePrincipal()).process(message, signature.getSecurityToken());
         }
         else if (process instanceof EncryptedKey)
         {
            Collection<String> ids = decrypter.process(message, process);
            if (ids != null)
View Full Code Here

      }

      SecurityTokenReference reference = new SecurityTokenReference(Reference.getReference(tokenRefType, message, token));
      sig.getKeyInfo().addUnknownElement(reference.getElement());

      header.addSecurityProcess(new Signature(sig));
   }
View Full Code Here

      }

      SecurityTokenReference reference = new SecurityTokenReference(Reference.getReference(tokenRefType, message, token));
      sig.getKeyInfo().addUnknownElement(reference.getElement());

      header.addSecurityProcess(new Signature(sig));
   }
View Full Code Here

      for (SecurityProcess process : header.getSecurityProcesses())
      {
         // If this list gets much larger it should probably be a hash lookup
         if (process instanceof Signature)
         {
            Signature signature = (Signature)process;
            Collection<String> ids = signatureVerifier.process(message, signature);
            if (ids != null)
              signedIds.addAll(ids);
            if (authenticate != null && authenticate.isSignatureCertAuth())
               new ReceiveX509Certificate(authenticate.getSignatureCertAuth().getCertificatePrincipal()).process(message, signature.getSecurityToken());
         }
         else if (process instanceof EncryptedKey)
         {
            Collection<String> ids = decrypter.process(message, process);
            if (ids != null)
View Full Code Here

      this.store = store;
   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Signature signature = (Signature) process;
      XMLSignature xmlSig = signature.getSignature();

      xmlSig.addResourceResolver(new WsuIdResolver(message));
      STRTransform.setSecurityStore(store);

      try
      {
         if (! xmlSig.checkSignatureValue(signature.getPublicKey()))
            throw new FailedCheckException("Signature is invalid.");
        
         SignatureKeysAssociation.saveKey(signature.getPublicKey());
      }
      catch (XMLSignatureException e)
      {
         throw new WSSecurityException("An unexpected error occured while verifying signature", e);
      }
View Full Code Here

      this.store = store;
   }

   public Collection<String> process(Document message, SecurityProcess process) throws WSSecurityException
   {
      Signature signature = (Signature) process;
      XMLSignature xmlSig = signature.getSignature();

      xmlSig.addResourceResolver(new WsuIdResolver(message));
      STRTransform.setSecurityStore(store);

      try
      {
         if (! xmlSig.checkSignatureValue(signature.getPublicKey()))
            throw new FailedCheckException("Signature is invalid.");
        
         SignatureKeysAssociation.saveKey(signature.getPublicKey());
      }
      catch (XMLSignatureException e)
      {
         throw new WSSecurityException("An unexpected error occured while verifying signature", e);
      }
View Full Code Here

TOP

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

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.