Examples of GetNextCaCertRequest


Examples of org.jscep.transport.request.GetNextCaCertRequest

    private String caIdentifier;

    @Before
    public void setUp() {
  caIdentifier = "id";
  fixture = new GetNextCaCertRequest(caIdentifier);
    }
View Full Code Here

Examples of org.jscep.transport.request.GetNextCaCertRequest

    System.out.println(caps);
  }

  @Test
  public void getNextCaCertificateGood() throws Exception {
    GetNextCaCertRequest req = new GetNextCaCertRequest(goodIdentifier);
    Transport transport = new HttpGetTransport(getURL());
    CertStore certs = transport.sendRequest(req,
        new GetNextCaCertResponseHandler(getRecipient()));

    assertThat(certs.getCertificates(null).size(), is(1));
View Full Code Here

Examples of org.jscep.transport.request.GetNextCaCertRequest

    assertThat(certs.getCertificates(null).size(), is(1));
  }

  @Test(expected = TransportException.class)
  public void getNextCaCertificateBad() throws Exception {
    GetNextCaCertRequest req = new GetNextCaCertRequest(badIdentifier);
    Transport transport = new HttpGetTransport(getURL());
    CertStore certs = transport.sendRequest(req,
        new GetNextCaCertResponseHandler(getRecipient()));

    assertThat(certs.getCertificates(null).size(), is(1));
View Full Code Here

Examples of org.jscep.transport.request.GetNextCaCertRequest

    // The CA or RA
    CertStoreInspector certs = CertStoreInspector.getInstance(store);
    final X509Certificate signer = certs.getSigner();

    final Transport trans = new HttpGetTransport(url);
    final GetNextCaCertRequest req = new GetNextCaCertRequest(profile);

    try {
      return trans.sendRequest(req, new GetNextCaCertResponseHandler(
          signer));
    } catch (TransportException e) {
View Full Code Here

Examples of org.jscep.transport.request.GetNextCaCertRequest

  X500Principal subject = new X500Principal("CN=example.org");
  KeyPair keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair();
  X509Certificate cert = X509Certificates.createEphemeral(subject,
    keyPair);

  GetNextCaCertRequest nextCa = new GetNextCaCertRequest();
  transport.sendRequest(nextCa, new GetNextCaCertResponseHandler(cert));
    }
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.