Examples of EnvelopedInput


Examples of org.jboss.resteasy.security.smime.EnvelopedInput

   @Test
   public void testEncryptedGet() throws Exception
   {
      WebTarget target = client.target("http://localhost:9095/smime/encrypted");
      EnvelopedInput input = target.request().get(EnvelopedInput.class);
      Customer cust = (Customer)input.getEntity(Customer.class, privateKey, cert);
      System.out.println("Encrypted Message From Server:");
      System.out.println(cust);
   }
View Full Code Here

Examples of org.jboss.resteasy.security.smime.EnvelopedInput

   @Test
   public void testEncryptedAndSignedGet() throws Exception
   {
      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));
   }
View Full Code Here

Examples of org.jboss.resteasy.security.smime.EnvelopedInput

   @Test
   public void testEncryptedOutput2() throws Exception
   {
      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/smime/encrypted"));
      EnvelopedInput enveloped = request.getTarget(EnvelopedInput.class);
      String output = (String) enveloped.getEntity(String.class, privateKey, cert);
      System.out.println(output);
      Assert.assertEquals("hello world", output);
   }
View Full Code Here

Examples of org.jboss.resteasy.security.smime.EnvelopedInput

   @Test
   public void testEncryptedSignedOutput() throws Exception
   {
      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/smime/encrypted/signed"));
      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);
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.