Package org.jboss.resteasy.security.smime

Examples of org.jboss.resteasy.security.smime.SignedInput.verify()


      WebTarget target = client.target("http://localhost:9095/smime/signed");
      SignedInput input = target.request().get(SignedInput.class);
      Customer cust = (Customer)input.getEntity(Customer.class);
      System.out.println("Signed Message From Server: ");
      System.out.println(cust);
      input.verify(cert);

   }

   @Test
   public void testSignedPost() throws Exception
View Full Code Here


      WebTarget target = client.target("http://localhost:9095/smime/encrypted/signed");
      EnvelopedInput enveloped = target.request().get(EnvelopedInput.class);
      SignedInput signed = (SignedInput)enveloped.getEntity(SignedInput.class, privateKey, cert);
      Customer cust = (Customer)signed.getEntity(Customer.class);
      System.out.println(cust);
      Assert.assertTrue(signed.verify(cert));
   }

   @Test
   public void testEncryptedSignedPost() throws Exception
   {
View Full Code Here

      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/smime/signed"));
      SignedInput signed = request.getTarget(SignedInput.class);
      String output = (String) signed.getEntity(String.class);
      System.out.println(output);
      Assert.assertEquals("hello world", output);
      Assert.assertTrue(signed.verify(cert));
   }

   @Test
   public void testPKCS7SignedOutput() throws Exception
   {
View Full Code Here

      EnvelopedInput enveloped = request.getTarget(EnvelopedInput.class);
      SignedInput signed = (SignedInput) enveloped.getEntity(SignedInput.class, privateKey, cert);
      String output = (String) signed.getEntity(String.class);
      System.out.println(output);
      Assert.assertEquals("hello world", output);
      Assert.assertTrue(signed.verify(cert));
      Assert.assertEquals("hello world", output);
   }

   @Test
   public void testEncryptedInput() throws Exception
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.