Package com.sun.org.apache.xml.internal.security.exceptions

Examples of com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException


    public static byte[] getSKIBytesFromCert(X509Certificate cert)
        throws XMLSecurityException {

        if (cert.getVersion() < 3) {
            Object exArgs[] = { new Integer(cert.getVersion()) };
            throw new XMLSecurityException("certificate.noSki.lowVersion",
                                           exArgs);
        }

        /*
         * Gets the DER-encoded OCTET string for the extension value
         * (extnValue) identified by the passed-in oid String. The oid
         * string is represented by a set of positive whole numbers
         * separated by periods.
         */
        byte[] extensionValue = cert.getExtensionValue(XMLX509SKI.SKI_OID);
        if (extensionValue == null) {
            throw new XMLSecurityException("certificate.noSki.null");
        }

        /**
         * Strip away first four bytes from the extensionValue
         * The first two bytes are the tag and length of the extensionValue
View Full Code Here


            return new Transforms(transformsElem, this._baseURI);
         }

         return null;
      } catch (XMLSignatureException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

         }
         return;
      }
      /* No Elements found */
      Object exArgs[] = { "Elements", Constants._TAG_X509DATA };
      throw new XMLSecurityException("xml.WrongContent", exArgs);
   }
View Full Code Here

         KeyFactory dsaFactory = KeyFactory.getInstance("DSA");
         PublicKey pk = dsaFactory.generatePublic(pkspec);

         return pk;
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeySpecException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

                     ._TAG_EXPONENT, Constants.SignatureSpecNS));
         PublicKey pk = rsaFactory.generatePublic(rsaKeyspec);

         return pk;
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeySpecException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

         KeyFactory dsaFactory = KeyFactory.getInstance("DSA");
         PublicKey pk = dsaFactory.generatePublic(pkspec);

         return pk;
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeySpecException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

                     ._TAG_EXPONENT, Constants.SignatureSpecNS));
         PublicKey pk = rsaFactory.generatePublic(rsaKeyspec);

         return pk;
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeySpecException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

         this._constructionElement.getParentNode().replaceChild(imported,
                 this._constructionElement);

         this._constructionElement = (Element) imported;
      } catch (ParserConfigurationException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (IOException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (SAXException ex) {
         throw new XMLSecurityException("empty", ex);
      }
      }
      this._signatureAlgorithm =
         new SignatureAlgorithm(this.getSignatureMethodElement(),
                                this.getBaseURI());
View Full Code Here

            return new Transforms(transformsElem, this._baseURI);
         }

         return null;
      } catch (XMLSignatureException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

         }
      }
      if (noElements) {
        Object exArgs[] = { "Elements", Constants._TAG_X509DATA };

        throw new XMLSecurityException("xml.WrongContent", exArgs);
     }

   }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xml.internal.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.