Examples of SignatureVerifier


Examples of org.apache.jdo.tck.util.signature.SignatureVerifier

        // create a SignatureVerifier instance
        final StringWriter sw = new StringWriter();
        final PrintWriter pw = new PrintWriter(sw); //auto-flushes on println
        final boolean quiet = false;
        final boolean verbose = debug;
        final SignatureVerifier verifier
            = new SignatureVerifier(pw, quiet, verbose);

        // run the signature test
        try {
            // fetch name of signature file
            final String signatureFileName
                = System.getProperty("jdo.tck.signaturefile");
            if (signatureFileName == null) {
                fail(ASSERTION_FAILED,
                     "No system property defined: jdo.tck.signaturefile");
                return;
            }

            // run the test
            final List signatureFileNames = new ArrayList();
            signatureFileNames.add(signatureFileName);
            int status = verifier.test(signatureFileNames);
           
            // print test's output in case of problems or debugging
            if (status != 0) {
                fail(ASSERTION_FAILED,
                     ("Found problems or signature descrepancies." + newLine
View Full Code Here

Examples of org.apache.jdo.tck.util.signature.SignatureVerifier

        // create a SignatureVerifier instance
        final StringWriter sw = new StringWriter();
        final PrintWriter pw = new PrintWriter(sw); //auto-flushes on println
        final boolean quiet = false;
        final boolean verbose = debug;
        final SignatureVerifier verifier
            = new SignatureVerifier(pw, quiet, verbose);

        // run the signature test
        try {
            // fetch name of signature file
            final String signatureFileName
                = System.getProperty("jdo.tck.signaturefile");
            if (signatureFileName == null) {
                fail(ASSERTION_FAILED,
                     "No system property defined: jdo.tck.signaturefile");
                return;
            }

            // run the test
            final List signatureFileNames = new ArrayList();
            signatureFileNames.add(signatureFileName);
            int status = verifier.test(signatureFileNames);
           
            // print test's output in case of problems or debugging
            if (status != 0) {
                fail(ASSERTION_FAILED,
                     ("Found problems or signature descrepancies." + newLine
View Full Code Here

Examples of org.springframework.security.jwt.crypto.sign.SignatureVerifier

      throw new InvalidTokenException("Cannot convert access token to JSON", e);
    }
  }

  public void afterPropertiesSet() throws Exception {
    SignatureVerifier verifier = new MacSigner(verifierKey);
    try {
      verifier = new RsaVerifier(verifierKey);
    }
    catch (Exception e) {
      logger.warn("Unable to create an RSA verifier from verifierKey (ignoreable if using MAC)");
    }
    // Check the signing and verification keys match
    if (signer instanceof RsaSigner) {
      byte[] test = "test".getBytes();
      try {
        verifier.verify(test, signer.sign(test));
        logger.info("Signing and verification RSA keys match");
      }
      catch (InvalidSignatureException e) {
        logger.error("Signing and verification RSA keys do not match");
      }
View Full Code Here

Examples of test.javax.management.compliance.signature.support.SignatureVerifier

   protected void checkCompliance(String className) throws Exception
   {
      ClassLoader jmxriLoader = createOptionalRemoteJMXRIWithTestsClassLoader();
      ClassLoader mx4jLoader = createRemoteMX4JWithTestsClassLoader();

      SignatureVerifier verifier = new SignatureVerifier();

      try
      {
         verifier.verifySignature(className, jmxriLoader, mx4jLoader);
      }
      catch (NotCompliantException x)
      {
         fail(x.getMessage());
      }
View Full Code Here

Examples of test.javax.management.compliance.signature.support.SignatureVerifier

   protected void checkCompliance(String className) throws Exception
   {
      ClassLoader jmxriLoader = createJMXRIWithTestsClassLoader();
      ClassLoader mx4jLoader = createMX4JWithTestsClassLoader();

      SignatureVerifier verifier = new SignatureVerifier();

      try
      {
         verifier.verifySignature(className, jmxriLoader, mx4jLoader);
      }
      catch (NotCompliantException x)
      {
         fail(x.getMessage());
      }
View Full Code Here

Examples of test.javax.management.compliance.signature.support.SignatureVerifier

   protected void checkCompliance(String className) throws Exception
   {
      ClassLoader jmxriLoader = createRemoteJMXRIWithTestsClassLoader();
      ClassLoader mx4jLoader = createRemoteMX4JWithTestsClassLoader();

      SignatureVerifier verifier = new SignatureVerifier();

      try
      {
         verifier.verifySignature(className, jmxriLoader, mx4jLoader);
      }
      catch (NotCompliantException x)
      {
         fail(x.getMessage());
      }
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.