Package org.jscep.transaction.Transaction

Examples of org.jscep.transaction.Transaction.State


        envDecoder);

    Transport transport = new HttpGetTransport(getURL());
    Transaction t = new NonEnrollmentTransaction(transport, encoder,
        decoder, iasn, MessageType.GET_CRL);
    State s = t.send();

    assertThat(s, is(State.CERT_ISSUED));
  }
View Full Code Here


        envDecoder);

    Transport transport = new HttpGetTransport(getURL());
    Transaction t = new NonEnrollmentTransaction(transport, encoder,
        decoder, iasn, MessageType.GET_CERT);
    State s = t.send();

    assertThat(s, is(State.CERT_NON_EXISTANT));
  }
View Full Code Here

    Transport transport = new HttpGetTransport(getURL());
    Transaction t = new EnrollmentTransaction(transport, encoder, decoder,
        csr);

    State s = t.send();
    assertThat(s, is(State.CERT_ISSUED));
  }
View Full Code Here

    Transport transport = new HttpGetTransport(getURL());
    Transaction t = new EnrollmentTransaction(transport, encoder, decoder,
        csr);

    State s = t.send();
    assertThat(s, is(State.CERT_ISSUED));
  }
View Full Code Here

        envDecoder);

    Transport transport = new HttpGetTransport(getURL());
    EnrollmentTransaction trans = new EnrollmentTransaction(transport,
        encoder, decoder, csr);
    State state = trans.send();
    assertThat(state, is(State.CERT_REQ_PENDING));

    IssuerAndSubject ias = new IssuerAndSubject(X500Utils.toX500Name(sender
        .getIssuerX500Principal()), pollName);
    trans = new EnrollmentTransaction(transport, encoder, decoder, ias,
View Full Code Here

    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 {
      state = t.send();
    } catch (TransactionException e) {
      throw new ClientException(e);
    }
View Full Code Here

    Transport transport = createTransport(profile);
    final Transaction t = new NonEnrollmentTransaction(transport,
        getEncoder(identity, key, profile), getDecoder(identity, key,
            profile), iasn, MessageType.GET_CERT);

    State state;
    try {
      state = t.send();
    } catch (TransactionException e) {
      throw new ClientException(e);
    }
View Full Code Here

    return send(trans);
  }

  private EnrollmentResponse send(final EnrollmentTransaction trans)
      throws TransactionException {
    State s = trans.send();

    if (s == State.CERT_ISSUED) {
      return new EnrollmentResponse(trans.getId(), trans.getCertStore());
    } else if (s == State.CERT_REQ_PENDING) {
      return new EnrollmentResponse(trans.getId());
View Full Code Here

TOP

Related Classes of org.jscep.transaction.Transaction.State

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.