Package org.jscep.transport

Examples of org.jscep.transport.Transport


      throws ClientException {
    LOGGER.debug("Retrieving current CA certificate");
    // NON-TRANSACTIONAL
    // CA and RA public key distribution
    final GetCaCertRequest req = new GetCaCertRequest(profile);
    final Transport trans = new HttpGetTransport(url);

    CertStore store;
    try {
      store = trans.sendRequest(req, new GetCaCertResponseHandler());
    } catch (TransportException e) {
      throw new ClientException(e);
    }
    CertStoreInspector certs = CertStoreInspector.getInstance(store);
    verifyCA(certs.getIssuer());
View Full Code Here


    final CertStore store = getCaCertificate(profile);
    // 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) {
      throw new ClientException(e);
    }
  }
View Full Code Here

    // CRL query
    checkDistributionPoints(profile);

    X500Name name = new X500Name(issuer.getName());
    IssuerAndSerialNumber iasn = new IssuerAndSerialNumber(name, serial);
    Transport transport = createTransport(profile);
    final Transaction t = new NonEnrollmentTransaction(transport,
        getEncoder(identity, key, profile), getDecoder(identity, key,
            profile), iasn, MessageType.GET_CRL);
    State state;
    try {
View Full Code Here

    CertStoreInspector certs = CertStoreInspector.getInstance(store);
    final X509Certificate ca = certs.getIssuer();

    X500Name name = new X500Name(ca.getIssuerX500Principal().toString());
    IssuerAndSerialNumber iasn = new IssuerAndSerialNumber(name, serial);
    Transport transport = createTransport(profile);
    final Transaction t = new NonEnrollmentTransaction(transport,
        getEncoder(identity, key, profile), getDecoder(identity, key,
            profile), iasn, MessageType.GET_CERT);

    State state;
View Full Code Here

        LOGGER.error("The self-signed certificate MUST use the same subject name as in the PKCS#10 request.");
      }
    }
    // TRANSACTIONAL
    // Certificate enrollment
    final Transport transport = createTransport(profile);
    PkiMessageEncoder encoder = getEncoder(identity, key, profile);
    PkiMessageDecoder decoder = getDecoder(identity, key, profile);
    final EnrollmentTransaction trans = new EnrollmentTransaction(
        transport, encoder, decoder, csr);
View Full Code Here

  public EnrollmentResponse poll(X509Certificate identity,
      PrivateKey identityKey, X500Principal subject,
      TransactionId transId, String profile) throws ClientException,
      TransactionException {
    final Transport transport = createTransport(profile);
    CertStore store = getCaCertificate(profile);
    CertStoreInspector certStore = CertStoreInspector.getInstance(store);
    X509Certificate issuer = certStore.getIssuer();

    PkiMessageEncoder encoder = getEncoder(identity, identityKey, profile);
View Full Code Here

TOP

Related Classes of org.jscep.transport.Transport

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.