Package org.jboss.resteasy.security.smime

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


      {
         SignedOutput signed = new SignedOutput("hello world", "text/plain");
         signed.setCertificate(cert);
         signed.setPrivateKey(privateKey);

         EnvelopedOutput output = new EnvelopedOutput(signed, "multipart/signed");
         output.setCertificate(cert);
         return output;
      }
View Full Code Here


   public void testEncryptedPost() throws Exception
   {
      WebTarget target = client.target("http://localhost:9095/smime/encrypted");
      Customer cust = new Customer();
      cust.setName("Bill");
      EnvelopedOutput output = new EnvelopedOutput(cust, "application/xml");
      output.setCertificate(cert);
      Response res = target.request().post(Entity.entity(output, "application/pkcs7-mime"));
      Assert.assertEquals(204, res.getStatus());
      res.close();

   }
View Full Code Here

      Customer cust = new Customer();
      cust.setName("Bill");
      SignedOutput signed = new SignedOutput(cust, "application/xml");
      signed.setPrivateKey(privateKey);
      signed.setCertificate(cert);
      EnvelopedOutput output = new EnvelopedOutput(signed, "multipart/signed");
      output.setCertificate(cert);
      Response res = target.request().post(Entity.entity(output, "application/pkcs7-mime"));
      Assert.assertEquals(204, res.getStatus());
      res.close();
   }
View Full Code Here

   @Test
   public void testEncryptedInput() throws Exception
   {
      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/smime/encrypted"));
      EnvelopedOutput output = new EnvelopedOutput("input", "text/plain");
      output.setCertificate(cert);
      ClientResponse res = request.body("*/*", output).post();
      Assert.assertEquals(204, res.getStatus());
   }
View Full Code Here

   {
      ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/smime/encrypted/signed"));
      SignedOutput signed = new SignedOutput("input", "text/plain");
      signed.setPrivateKey(privateKey);
      signed.setCertificate(cert);
      EnvelopedOutput output = new EnvelopedOutput(signed, "multipart/signed");
      output.setCertificate(cert);
      ClientResponse res = request.body("*/*", output).post();
      Assert.assertEquals(204, res.getStatus());
   }
View Full Code Here

   public static class EncryptedResource
   {
      @GET
      public EnvelopedOutput get()
      {
         EnvelopedOutput output = new EnvelopedOutput("hello world", "text/plain");
         output.setCertificate(cert);
         return output;
      }
View Full Code Here

   {
      System.out.println("HERE!!!!!");
      Customer cust = new Customer();
      cust.setName("Bill");

      EnvelopedOutput output = new EnvelopedOutput(cust, MediaType.APPLICATION_XML_TYPE);
      output.setCertificate(certificate);
      return output;
   }
View Full Code Here

      SignedOutput signed = new SignedOutput(cust, MediaType.APPLICATION_XML_TYPE);
      signed.setCertificate(certificate);
      signed.setPrivateKey(privateKey);

      EnvelopedOutput output = new EnvelopedOutput(signed, "multipart/signed");
      output.setCertificate(certificate);
      return output;
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.security.smime.EnvelopedOutput

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.