Package org.apache.xml.security.exceptions

Examples of org.apache.xml.security.exceptions.XMLSecurityException


                                       EncryptionConstants._TAG_REFERENCELIST);

      if (noOfReferences > 1) {
         Object exArgs[] = { "More then one xenc:ReferenceList found" };

         throw new XMLSecurityException("empty", exArgs);
      } else if (noOfReferences == 1) {
         Element referenceListElem = this.getChildElementLocalName(0,
                                        EncryptionConstants.EncryptionSpecNS,
                                        EncryptionConstants._TAG_REFERENCELIST);
View Full Code Here


      if (encryptionMethod != null) {
         if (!encryptionMethod.getUsableInEncryptedData()) {
            Object exArgs[] = { encryptionMethod.getAlgorithmURI() };

            throw new XMLSecurityException(
               "encryption.algorithmCannotBeUsedForEncryptedData", exArgs);
         }

         this._constructionElement.appendChild(encryptionMethod.getElement());
         XMLUtils.addReturnToElement(this._constructionElement);
View Full Code Here

            newContent.appendChild(doc.getChildNodes().item(i));
         }

         return replace(oldElement, newContent);
      } catch (javax.xml.parsers.ParserConfigurationException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (java.io.IOException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (org.xml.sax.SAXException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

            }
         }

         plaintext = baos.toByteArray();
      } catch (Exception ex) {
         throw new XMLSecurityException("empty", ex);
      }

      byte ciphertext[] = em.encrypt(plaintext, contentEncryptionKey);

      this.getCipherData().setCipherValue(new CipherValue(this._doc,
View Full Code Here

         parent.insertBefore(this._constructionElement, insertBeforeNode);
      } catch (XMLSecurityException ex) {
         throw ex;
      } catch (Exception ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

            newContent.appendChild(doc2Elem.getChildNodes().item(i));
         }

         replace(this._constructionElement, newContent);
      } catch (javax.xml.parsers.ParserConfigurationException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (java.io.IOException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (org.xml.sax.SAXException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

      boolean verify = true;

      if (this.length(Constants.SignatureSpecNS, Constants._TAG_REFERENCE)
              == 0) {
         throw new XMLSecurityException("empty");
      }

      this.verificationResults =
         new boolean[this.length(Constants.SignatureSpecNS, Constants._TAG_REFERENCE)];
View Full Code Here

                             Integer.toString(this.getLength()) };
         Exception e =
            new IndexOutOfBoundsException(I18n
               .translate("signature.Verification.IndexOutOfBounds", exArgs));

         throw new XMLSecurityException("generic.EmptyMessage", e);
      }

      if (this.verificationResults == null) {
         try {
            boolean discard = this.verifyReferences();
         } catch (Exception ex) {
            throw new XMLSecurityException("generic.EmptyMessage", ex);
         }
      }

      return this.verificationResults[index];
   }
View Full Code Here

                           + Constants.configurationFileNew;
         InputStream is = new FileInputStream(filename);

         Init.readUserConfiguration(is);
      } catch (IOException ex) {
         throw new XMLSecurityException("generic.EmptyMessage", ex);
      }
   }
View Full Code Here

            is = new java.net.URL(fileURI).openStream();
         }

         Init.readUserConfiguration(is);
      } catch (IOException ex) {
         throw new XMLSecurityException("generic.EmptyMessage", ex);
      }
   }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.exceptions.XMLSecurityException

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.