Package org.jscep.transport.response

Examples of org.jscep.transport.response.GetNextCaCertResponseHandler


  @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


  @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

    @Before
    public void setUp() throws Exception {
  KeyPair keyPair = getKeyPair();
  X509Certificate ca = getCertificate(keyPair);
  fixture = new GetNextCaCertResponseHandler(ca);
    }
View Full Code Here

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

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

  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

Related Classes of org.jscep.transport.response.GetNextCaCertResponseHandler

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.