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

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


         for (Target target : targets)
            processTarget(cipher, message, target, list, secretKey);
      }
     
      X509Certificate cert = getCertificate(store, alias);
      X509Token token = (X509Token) header.getSharedToken(cert);

      // Can we reuse an existing token?
      if (token == null)
      {
         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);
View Full Code Here


   {
      // Support only SKI at the moment
      X509Certificate cert = store.getCertificateBySubjectKeyIdentifier(identifier.getIdentifier());
      if (cert == null)
         throw new SecurityTokenUnavailableException("Could not locate certificate by key identifier");
      return new X509Token(cert, identifier.getDocument());
   }
View Full Code Here

   {
      X509Certificate cert = store.getCertificateByIssuerSerial(issuerSerial.getIssuer(), issuerSerial.getSerial());
     if (cert == null)
        throw new SecurityTokenUnavailableException("Could not locate certificate by issuer and serial number");

     return new X509Token(cert, issuerSerial.getDocument());
   }
View Full Code Here

         for (Target target : targets)
            processTarget(cipher, message, target, list, secretKey);
      }
     
      X509Certificate cert = getCertificate(store, alias);
      X509Token token = (X509Token) header.getSharedToken(cert);

      // Can we reuse an existing token?
      if (token == null)
      {
         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);
View Full Code Here

   {
      // Support only SKI at the moment
      X509Certificate cert = store.getCertificateBySubjectKeyIdentifier(identifier.getIdentifier());
      if (cert == null)
         throw new SecurityTokenUnavailableException("Could not locate certificate by key identifier");
      return new X509Token(cert, identifier.getDocument());
   }
View Full Code Here

   {
      X509Certificate cert = store.getCertificateByIssuerSerial(issuerSerial.getIssuer(), issuerSerial.getSerial());
     if (cert == null)
        throw new SecurityTokenUnavailableException("Could not locate certificate by issuer and serial number");

     return new X509Token(cert, issuerSerial.getDocument());
   }
View Full Code Here

      {
         throw new WSSecurityException("Error signing message: " + e.getMessage(), e);
      }

      X509Certificate cert = store.getCertificate(alias);
      X509Token token = (X509Token) header.getSharedToken(cert);

      // Can we reuse an existing token?
      if (token == null)
      {
         token = new X509Token(cert, message);
         if (tokenRefType == null || Reference.DIRECT_REFERENCE.equals(tokenRefType))
            header.addToken(token);
      }

      SecurityTokenReference reference = new SecurityTokenReference(Reference.getReference(tokenRefType, message, token));
View Full Code Here

         for (Target target : targets)
            processTarget(cipher, message, target, list, secretKey);
      }
     
      X509Certificate cert = getCertificate(store, alias, securityDomainAliasLabel);
      X509Token token = (X509Token) header.getSharedToken(cert);

      // Can we reuse an existing token?
      if (token == null)
      {
         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);
View Full Code Here

/*     */     throws WSSecurityException
/*     */   {
/* 112 */     X509Certificate cert = this.store.getCertificateBySubjectKeyIdentifier(identifier.getIdentifier());
/* 113 */     if (cert == null)
/* 114 */       throw new SecurityTokenUnavailableException("Could not locate certificate by key identifier");
/* 115 */     return new X509Token(cert, identifier.getDocument());
/*     */   }
View Full Code Here

/*     */   {
/* 120 */     X509Certificate cert = this.store.getCertificateByIssuerSerial(issuerSerial.getIssuer(), issuerSerial.getSerial());
/* 121 */     if (cert == null) {
/* 122 */       throw new SecurityTokenUnavailableException("Could not locate certificate by issuer and serial number");
/*     */     }
/* 124 */     return new X509Token(cert, issuerSerial.getDocument());
/*     */   }
View Full Code Here

TOP

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

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.