Examples of InvalidSecurityHeaderException


Examples of org.jboss.ws.extensions.security.InvalidSecurityHeaderException

   private String getEncryptionAlgorithm(Element element) throws WSSecurityException
   {
      element = Util.findElement(element, "EncryptionMethod", Constants.XML_ENCRYPTION_NS);
      if (element == null)
         throw new InvalidSecurityHeaderException("Encrypted element corrupted, no encryption method");

      String alg = element.getAttribute("Algorithm");
      if (alg == null || alg.length() == 0)
         throw new InvalidSecurityHeaderException("Encrypted element corrupted, no algorithm specified");

      return alg;
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.InvalidSecurityHeaderException

   public X509IssuerSerial(Element element) throws WSSecurityException
   {
      this.doc = element.getOwnerDocument();

      if (! "X509Data".equals(element.getLocalName()))
         throw new InvalidSecurityHeaderException("Invalid message, invalid local name on a X509Data element");

      element = Util.getFirstChildElement(element);
      if (element == null)
         throw new InvalidSecurityHeaderException("X509DataElement empty");

      if (! element.getLocalName().equals("X509IssuerSerial"))
         throw new InvalidSecurityHeaderException("Only X509IssuerSerial is supported for an X509Data element");

      element = Util.getFirstChildElement(element);
      if (element == null)
         throw new InvalidSecurityHeaderException("X509IssuerSerial empty");


      while (element != null)
      {
         String name = element.getLocalName();
         if (name.equals("X509IssuerName"))
            issuer = XMLUtils.getFullTextChildrenFromElement(element);
         else if (name.equals("X509SerialNumber"))
            serial = XMLUtils.getFullTextChildrenFromElement(element);

         element = Util.getNextSiblingElement(element);
      }

      if (serial == null)
         throw new InvalidSecurityHeaderException("X509SerialNumber missing from X509IssuerSerial");

      if (issuer == null)
         throw new InvalidSecurityHeaderException("X509IssuerName missing from X509IssuerSerial");
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.InvalidSecurityHeaderException

/*     */   public X509IssuerSerial(Element element) throws WSSecurityException
/*     */   {
/*  63 */     this.doc = element.getOwnerDocument();
/*     */
/*  65 */     if (!"X509Data".equals(element.getLocalName())) {
/*  66 */       throw new InvalidSecurityHeaderException("Invalid message, invalid local name on a X509Data element");
/*     */     }
/*  68 */     element = Util.getFirstChildElement(element);
/*  69 */     if (element == null) {
/*  70 */       throw new InvalidSecurityHeaderException("X509DataElement empty");
/*     */     }
/*  72 */     if (!element.getLocalName().equals("X509IssuerSerial")) {
/*  73 */       throw new InvalidSecurityHeaderException("Only X509IssuerSerial is supported for an X509Data element");
/*     */     }
/*  75 */     element = Util.getFirstChildElement(element);
/*  76 */     if (element == null) {
/*  77 */       throw new InvalidSecurityHeaderException("X509IssuerSerial empty");
/*     */     }
/*     */
/*  80 */     while (element != null)
/*     */     {
/*  82 */       String name = element.getLocalName();
/*  83 */       if (name.equals("X509IssuerName"))
/*  84 */         this.issuer = XMLUtils.getFullTextChildrenFromElement(element);
/*  85 */       else if (name.equals("X509SerialNumber")) {
/*  86 */         this.serial = XMLUtils.getFullTextChildrenFromElement(element);
/*     */       }
/*  88 */       element = Util.getNextSiblingElement(element);
/*     */     }
/*     */
/*  91 */     if (this.serial == null) {
/*  92 */       throw new InvalidSecurityHeaderException("X509SerialNumber missing from X509IssuerSerial");
/*     */     }
/*  94 */     if (this.issuer == null)
/*  95 */       throw new InvalidSecurityHeaderException("X509IssuerName missing from X509IssuerSerial");
/*     */   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.InvalidSecurityHeaderException

/*     */
/*     */   private String getEncryptionAlgorithm(Element element) throws WSSecurityException
/*     */   {
/* 136 */     element = Util.findElement(element, "EncryptionMethod", "http://www.w3.org/2001/04/xmlenc#");
/* 137 */     if (element == null) {
/* 138 */       throw new InvalidSecurityHeaderException("Encrypted element corrupted, no encryption method");
/*     */     }
/* 140 */     String alg = element.getAttribute("Algorithm");
/* 141 */     if ((alg == null) || (alg.length() == 0)) {
/* 142 */       throw new InvalidSecurityHeaderException("Encrypted element corrupted, no algorithm specified");
/*     */     }
/* 144 */     return alg;
/*     */   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException

      boolean fault = message.getSOAPBody().getFault() != null;
      if (secHeaderElement == null)
      {
         if (hasRequirements(config, fault))
            throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));
      }

      try
      {
         if (secHeaderElement != null)
View Full Code Here

Examples of org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException

         // This is ok, we always allow faults to be received because WS-Security does not encrypt faults
         if (message.getSOAPBody().getFault() != null)
            return;

         if (hasRequirements(config))
            throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));
      }

      try
      {
         if (secHeaderElement != null)
View Full Code Here

Examples of org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException

   private String getEncryptionAlgorithm(Element element) throws WSSecurityException
   {
      element = Util.findElement(element, "EncryptionMethod", Constants.XML_ENCRYPTION_NS);
      if (element == null)
         throw new InvalidSecurityHeaderException("Encrypted element corrupted, no encryption method");

      String alg = element.getAttribute("Algorithm");
      if (alg == null || alg.length() == 0)
         throw new InvalidSecurityHeaderException("Encrypted element corrupted, no algorithm specified");

      return alg;
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException

   private String getEncryptionAlgorithm(Element element) throws WSSecurityException
   {
      element = Util.findElement(element, "EncryptionMethod", Constants.XML_ENCRYPTION_NS);
      if (element == null)
         throw new InvalidSecurityHeaderException("Encrypted element corrupted, no encryption method");

      String alg = element.getAttribute("Algorithm");
      if (alg == null || alg.length() == 0)
         throw new InvalidSecurityHeaderException("Encrypted element corrupted, no algorithm specified");

      return alg;
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException

   public X509IssuerSerial(Element element) throws WSSecurityException
   {
      this.doc = element.getOwnerDocument();

      if (! "X509Data".equals(element.getLocalName()))
         throw new InvalidSecurityHeaderException("Invalid message, invalid local name on a X509Data element");

      element = Util.getFirstChildElement(element);
      if (element == null)
         throw new InvalidSecurityHeaderException("X509DataElement empty");

      if (! element.getLocalName().equals("X509IssuerSerial"))
         throw new InvalidSecurityHeaderException("Only X509IssuerSerial is supported for an X509Data element");

      element = Util.getFirstChildElement(element);
      if (element == null)
         throw new InvalidSecurityHeaderException("X509IssuerSerial empty");


      while (element != null)
      {
         String name = element.getLocalName();
         if (name.equals("X509IssuerName"))
            issuer = XMLUtils.getFullTextChildrenFromElement(element);
         else if (name.equals("X509SerialNumber"))
            serial = XMLUtils.getFullTextChildrenFromElement(element);

         element = Util.getNextSiblingElement(element);
      }

      if (serial == null)
         throw new InvalidSecurityHeaderException("X509SerialNumber missing from X509IssuerSerial");

      if (issuer == null)
         throw new InvalidSecurityHeaderException("X509IssuerName missing from X509IssuerSerial");
   }
View Full Code Here

Examples of org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException

         // This is ok, we always allow faults to be received because WS-Security does not encrypt faults
         if (message.getSOAPBody().getFault() != null)
            return;

         if (hasRequirements(config))
            throw convertToFault(new InvalidSecurityHeaderException("This service requires <wsse:Security>, which is missing."));
      }

      try
      {
         if (secHeaderElement != 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.