Package org.ejbca.extra.db

Examples of org.ejbca.extra.db.SubMessages


                    log.info("Error looking for message with transId "+transId+" :", e);
                  }
                  if(msg != null) {
                    if(msg.getStatus().equals(Message.STATUS_PROCESSED)) {
                      log.debug("Request is processed with status: "+msg.getStatus());
                      SubMessages submessagesresp = msg.getSubMessages(null,null,null);
                      Iterator<ISubMessage> iter =  submessagesresp.getSubMessages().iterator();
                      PKCS10Response resp = (PKCS10Response)iter.next();
                      // create proper ScepResponseMessage
                      IResponseMessage ret = reqmsg.createResponseMessage(org.ejbca.core.protocol.scep.ScepResponseMessage.class, reqmsg, racert, rapriv, cryptProvider);
                      ret.setCACert(cacert);
                    X509Certificate respCert = resp.getCertificate();
                      if ( resp.isSuccessful() && (respCert != null) ) {
                        ret.setCertificate(respCert);                         
                      } else {
                        ret.setStatus(ResponseStatus.FAILURE);
                        ret.setFailInfo(FailInfo.BAD_REQUEST);
                        String failText = resp.getFailInfo();
                        ret.setFailText(failText);
                      }
                      ret.create();
                      reply = ret.getResponseMessage();                       
                    } else {
                      log.debug("Request is not yet processed, status: "+msg.getStatus());
                        reply = createPendingResponseMessage(reqmsg, racert, rapriv, cryptProvider).getResponseMessage();
                        log.debug("Responding with pending response, still pending.");                    
                    }                   
                  }else{
                    // User doesn't exist
                  }
                } else {        
                  if(reqmsg.getMessageType() == ScepRequestMessage.SCEP_TYPE_PKCSREQ) { 
                      log.debug("Received a PKCSReq message from host: "+remoteAddr);
                      // Decrypt the Scep message and extract the pkcs10 request
                        if (reqmsg.requireKeyInfo()) {
                            // scep encrypts message with the RAs certificate
                            reqmsg.setKeyInfo(racert, rapriv, cryptProvider);
                        }
                        // Verify the request
                        if (reqmsg.verify() == false) {
                          String msg = "POPO verification failed.";
                            log.error(msg);
                            throw new SignRequestSignatureException(msg);
                        }
                        String username = reqmsg.getUsername();
                        if (username == null) {
                          String msg = "No username in request, request DN: "+reqmsg.getRequestDN();
                            log.error(msg);
                            throw new SignRequestException(msg);
                        }
                        log.info("Received a SCEP/PKCS10 request for user: "+username+", from host: "+remoteAddr);
                        String authPwd = ExtraConfiguration.instance().getString(ExtraConfiguration.SCEPAUTHPWD);
                        if (StringUtils.isNotEmpty(authPwd) && !StringUtils.equals(authPwd, "none")) {
                          log.debug("Requiring authPwd in order to precess SCEP requests");
                          String pwd = reqmsg.getPassword();
                          if (!StringUtils.equals(authPwd, pwd)) {
                            log.error("Wrong auth password received in SCEP request: "+pwd);
                                response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Auth pwd missmatch");
                                return;
                          }
                          log.debug("Request passed authPwd test.");
                        } else {
                          log.debug("Not requiring authPwd in order to precess SCEP requests");                         
                        }
                        // Try to find the CA name from the issuerDN, if we can't find it (i.e. not defined in web.xml) we use the default
                        String issuerDN = CertTools.stringToBCDNString(reqmsg.getIssuerDN());
                        String caName = ExtraConfiguration.instance().getString(issuerDN);
                        if (StringUtils.isEmpty(caName)) {
                          caName = ExtraConfiguration.instance().getString(ExtraConfiguration.SCEPDEFAULTCA);
                          log.info("Did not find a CA name from issuerDN: "+issuerDN+", using the default CA '"+caName+"'");
                        } else {
                          log.debug("Found a CA name '"+caName+"' from issuerDN: "+issuerDN);
                        }
                        // Get altNames if we can find them
                        String altNames = reqmsg.getRequestAltNames();

                        byte[] encoded = reqmsg.getCertificationRequest().getEncoded();
                        String pkcs10 = new String(Base64.encode(encoded, false));
                       
                      // Create a pkcs10 request
                        String certificateProfile = ExtraConfiguration.instance().getString(ExtraConfiguration.SCEPCERTPROFILEKEY);
                        String entityProfile = ExtraConfiguration.instance().getString(ExtraConfiguration.SCEPENTITYPROFILEKEY);
                    boolean createOrEditUser = ExtraConfiguration.instance().getBoolean(ExtraConfiguration.SCEPEDITUSER);
                    PKCS10Request req = new PKCS10Request(100,username, reqmsg.getRequestDN(), altNames, null, null, entityProfile, certificateProfile, caName, pkcs10);
                    req.setCreateOrEditUser(createOrEditUser);
                    SubMessages submessages = new SubMessages();
                    submessages.addSubMessage(req);
                    msgHome.create(transId, submessages);
                    reply = createPendingResponseMessage(reqmsg, racert, rapriv, cryptProvider).getResponseMessage();
                  }
                }
               
View Full Code Here


   */
  private ExtRAResponse getResponseFromCA(ISubMessage subMessage) {
    ExtRAResponse extRAResponse = null;
    // Setup a database interaction and store the request
    MessageHome messageHome = new MessageHome(Persistence.createEntityManagerFactory("ExternalRAGUIMessageDS"), MessageHome.MESSAGETYPE_EXTRA, true);
    SubMessages submessages = new SubMessages(extRaCertificate, extRaKey, racaserviceCert);
    submessages.addSubMessage(subMessage);
    String messageId = GUIDGenerator.generateGUID(this);
    messageHome.create(messageId, submessages);
    // Get response from CA
    Message response = waitForResponse(messageHome, messageId);
    if (response != null) {
      log.debug("Got processed message");
      SubMessages subMessages = response.getSubMessages(extRaKey, caCerts, null);
      if (subMessages.getSubMessages().size() > 0) {
        log.debug("Got submessage message");
        extRAResponse = (ExtRAResponse) subMessages.getSubMessages().get(0);
      } else {
        log.error("No submessages in External RA API response.");
      }
    }
    return extRAResponse;
View Full Code Here

 
  private static MessageHome msghome = new MessageHome(Persistence.createEntityManagerFactory("external-ra-test"), MessageHome.MESSAGETYPE_EXTRA, true);
 
  public void test01GenerateSimplePKCS10Request() throws Exception {

    SubMessages smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10Request(100,"SimplePKCS10Test1", Constants.pkcs10_1));
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10Request(101,"SimplePKCS10Test1", Constants.pkcs10_2));
   
    msghome.create("SimplePKCS10Test1", smgs);
   
        Message msg = waitForUser("SimplePKCS10Test1");
   
    assertNotNull("No response.", msg);
   
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp.getSubMessages().size() == 2);
   
    Iterator iter =  submessagesresp.getSubMessages().iterator();
    PKCS10Response resp = (PKCS10Response) iter.next();
    assertTrue(resp.getRequestId() == 100);
    assertTrue(resp.isSuccessful() == true);   
    assertTrue(resp.getCertificate().getSubjectDN().toString().equals("CN=PKCS10REQ"));
    firstCertificate = resp.getCertificate();
View Full Code Here

  }
 
  public void test02GenerateSimplePKCS10RequestNoCreateUser() throws Exception {

    // First test with a user that does not exist or has status generated, when the user it not created the request will fail
    SubMessages smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10Request(100,"SimplePKCS10Test1", Constants.pkcs10_1, false));
    msghome.create("SimplePKCS10Test1", smgs);
        Message msg = waitForUser("SimplePKCS10Test1");
    assertNotNull("No response", msg);
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
    assertTrue(submessagesresp.getSubMessages().size() == 1);   
    Iterator iter =  submessagesresp.getSubMessages().iterator();
    PKCS10Response resp = (PKCS10Response) iter.next();
    assertTrue(resp.getRequestId() == 100);
    assertTrue(resp.isSuccessful() == false);
   
    // if we create the user first, with correct status, the request should be ok
    smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10UserRequest(101,"SimplePKCS10Test1", "foo123"));
    msghome.create("SimplePKCS10Test1", smgs);   
        msg = waitForUser("SimplePKCS10Test1");
    assertNotNull(msg);
    submessagesresp = msg.getSubMessages(null,null,null);
    assertTrue("Number of submessages " + submessagesresp.getSubMessages().size(), submessagesresp.getSubMessages().size() == 1);
    ExtRAResponse editresp = (ExtRAResponse) submessagesresp.getSubMessages().iterator().next();
    assertTrue("Wrong Request ID" + editresp.getRequestId(), editresp.getRequestId() == 101);
    assertTrue("External RA CA Service was not successful.", editresp.isSuccessful() == true);

    // Create a new request, now it should be ok
    smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10Request(102,"SimplePKCS10Test1", Constants.pkcs10_1, false));
    msghome.create("SimplePKCS10Test1", smgs);   
        msg = waitForUser("SimplePKCS10Test1");
    assertNotNull(msg);
    submessagesresp = msg.getSubMessages(null,null,null);
    assertTrue(submessagesresp.getSubMessages().size() == 1);
    iter =  submessagesresp.getSubMessages().iterator();
    resp = (PKCS10Response) iter.next();
    assertTrue(resp.getRequestId() == 102);
    assertTrue(resp.isSuccessful() == true);   
    assertTrue(resp.getCertificate().getSubjectDN().toString().equals("CN=PKCS10REQ"));
    firstCertificate = resp.getCertificate();
View Full Code Here

  }

 
  public void test03GenerateSimplePKCS12Request() throws Exception {   
    SubMessages smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS12Request(200,"SimplePKCS12Test1", false));
   
    msghome.create("SimplePKCS12Test1", smgs);
   
        Message msg = waitForUser("SimplePKCS12Test1");
    assertNotNull("No response.", msg);
   
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp.getSubMessages().size() == 1);
   
    PKCS12Response resp = (PKCS12Response) submessagesresp.getSubMessages().iterator().next();
    assertTrue(resp.getRequestId() == 200);
    assertTrue(resp.isSuccessful() == true);
    assertNotNull(resp.getKeyStore("foo123"));
    KeyStore ks = resp.getKeyStore("foo123");
    String alias = ks.aliases().nextElement();
View Full Code Here

  }
 
  /** This test requires that keyrecovery is enabled in the EJBCA Admin-GUI */
  public void test04GenerateSimpleKeyRecoveryRequest() throws Exception {
    // First generate keystore
    SubMessages smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS12Request(300,"SimplePKCS12Test1", true));
   
    msghome.create("SimplePKCS12Test1", smgs);
   
        Message msg = waitForUser("SimplePKCS12Test1");
    assertNotNull("No response.", msg);
   
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp.getSubMessages().size() == 1);
   
    PKCS12Response resp = (PKCS12Response) submessagesresp.getSubMessages().iterator().next();
    assertTrue(resp.getRequestId() == 300);
    assertTrue(resp.isSuccessful() == true);
    assertNotNull(resp.getKeyStore("foo123"));
    //KeyStore ks = resp.getKeyStore("foo123");   
   
    X509Certificate orgCert = (X509Certificate) resp.getKeyStore("foo123").getCertificate("PKCS12REQ");
   
    assertTrue(orgCert.getSubjectDN().toString().equals("CN=PKCS12REQ"));
   
    // Generate Key Recovery request with original cert.
   
    smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAKeyRecoveryRequest(301,"SimplePKCS12Test1",true,orgCert));
   
    msghome.create("SimplePKCS12Test1", smgs);
   
        msg = waitForUser("SimplePKCS12Test1");
   
    assertNotNull(msg);
   
    submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp.getSubMessages().size() == 1);
   
    resp = (PKCS12Response) submessagesresp.getSubMessages().iterator().next();
    assertEquals(301, resp.getRequestId());
    assertTrue(resp.isSuccessful());
   
    X509Certificate keyRecCert = (X509Certificate) resp.getKeyStore("foo123").getCertificate("PKCS12REQ");
        assertTrue(keyRecCert.getSerialNumber().equals(orgCert.getSerialNumber()));
       
        // Generate Key Recovery Request with new cert
       
    smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAKeyRecoveryRequest(302,"SimplePKCS12Test1",false,orgCert));
   
    msghome.create("SimplePKCS12Test1", smgs);
   
        msg = waitForUser("SimplePKCS12Test1");
   
    assertNotNull(msg);
   
    submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp.getSubMessages().size() == 1);
   
    resp = (PKCS12Response) submessagesresp.getSubMessages().iterator().next();
    assertTrue(resp.getRequestId() == 302);
    assertTrue(resp.isSuccessful() == true);
   
    keyRecCert = (X509Certificate) resp.getKeyStore("foo123").getCertificate("KEYRECREQ");
        assertFalse(keyRecCert.getSerialNumber().equals(orgCert.getSerialNumber()));
View Full Code Here

        assertFalse(keyRecCert.getSerialNumber().equals(orgCert.getSerialNumber()));
  }
 
  public void test05GenerateSimpleRevokationRequest() throws Exception {
    // revoke first certificate
    SubMessages smgs = new SubMessages(null,null,null);
    assertNotNull("Missing certificate from previous test.", firstCertificate);
    smgs.addSubMessage(new RevocationRequest(10, CertTools.getIssuerDN(firstCertificate), firstCertificate.getSerialNumber(), RevocationRequest.REVOKATION_REASON_UNSPECIFIED));
   
    msghome.create("SimpleRevocationTest", smgs);
   
        Message msg = waitForUser("SimpleRevocationTest");
    assertNotNull("No response.", msg);
   
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue("Number of submessages " + submessagesresp.getSubMessages().size(), submessagesresp.getSubMessages().size() == 1);
   
    ExtRAResponse resp = (ExtRAResponse) submessagesresp.getSubMessages().iterator().next();
    assertTrue("Wrong Request ID" + resp.getRequestId(), resp.getRequestId() == 10);
    assertTrue(resp.isSuccessful() == true);
 
    // revoke second certificate 
    SubMessages smgs2 = new SubMessages(null,null,null);
    assertNotNull("Missing certificate from previous test.", secondCertificate);
    smgs2.addSubMessage(new RevocationRequest(6, CertTools.getIssuerDN(secondCertificate), secondCertificate.getSerialNumber(), RevocationRequest.REVOKATION_REASON_UNSPECIFIED));
   
    msghome.create("SimpleRevocationTest", smgs2);
   
        Message msg2 = waitForUser("SimpleRevocationTest");
   
    assertNotNull(msg2);
   
    SubMessages submessagesresp2 = msg2.getSubMessages(null,null,null);
   
    assertTrue("Number of submessages " + submessagesresp2.getSubMessages().size() ,  submessagesresp2.getSubMessages().size() == 1);
   
    ExtRAResponse resp2 = (ExtRAResponse) submessagesresp2.getSubMessages().iterator().next();
    assertTrue(resp2.getRequestId() == 6);
    assertTrue(resp2.isSuccessful() == true);
   
    // try to revoke nonexisting certificate 
    SubMessages smgs3 = new SubMessages(null,null,null);
    smgs3.addSubMessage(new RevocationRequest(7, CertTools.getIssuerDN(secondCertificate), new BigInteger("1234"), RevocationRequest.REVOKATION_REASON_UNSPECIFIED));
   
    msghome.create("SimpleRevocationTest", smgs3);
   
        Message msg3 = waitForUser("SimpleRevocationTest");
   
    assertNotNull(msg3);
   
    SubMessages submessagesresp3 = msg3.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp3.getSubMessages().size() == 1);
   
    ExtRAResponse resp3 = (ExtRAResponse) submessagesresp3.getSubMessages().iterator().next();
    assertTrue(resp3.getRequestId() == 7);
    assertTrue(resp3.isSuccessful() == false);
       
    // try to revoke a users all certificates
    SubMessages smgs4 = new SubMessages(null,null,null);
    smgs4.addSubMessage(new RevocationRequest(8, CertTools.getIssuerDN(secondCertificate), secondCertificate.getSerialNumber(), RevocationRequest.REVOKATION_REASON_UNSPECIFIED, false, true));
   
    msghome.create("SimpleRevocationTest", smgs4);
   
        Message msg4 = waitForUser("SimpleRevocationTest");
   
    assertNotNull(msg4);
   
    SubMessages submessagesresp4 = msg4.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp4.getSubMessages().size() == 1);
   
    ExtRAResponse resp4 = (ExtRAResponse) submessagesresp4.getSubMessages().iterator().next();
    assertTrue(resp4.getRequestId() == 8);
    assertTrue(resp4.isSuccessful() == true);
   
    // try to revoke a users all certificates by giving the username
    SubMessages smgs5 = new SubMessages(null,null,null);
    smgs5.addSubMessage(new RevocationRequest(9, "SimplePKCS10Test1", RevocationRequest.REVOKATION_REASON_UNSPECIFIED, false));
   
    msghome.create("SimpleRevocationTest", smgs5);
   
        Message msg5 = waitForUser("SimpleRevocationTest");
   
    assertNotNull(msg5);
   
    SubMessages submessagesresp5 = msg5.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp5.getSubMessages().size() == 1);
   
    ExtRAResponse resp5 = (ExtRAResponse) submessagesresp5.getSubMessages().iterator().next();
    assertTrue(resp5.getRequestId() == 9);
    assertTrue(resp5.isSuccessful() == true);
   
    // Try some error cases
        // First a message with null as parameters
    SubMessages smgs6 = new SubMessages(null,null,null);
    smgs6.addSubMessage(new RevocationRequest(10, null, RevocationRequest.REVOKATION_REASON_UNSPECIFIED, false));   
    msghome.create("SimpleRevocationTest", smgs6);
        Message msg6 = waitForUser("SimpleRevocationTest");
    assertNotNull(msg6);
    SubMessages submessagesresp6 = msg6.getSubMessages(null,null,null);
    assertTrue(submessagesresp6.getSubMessages().size() == 1);
    ExtRAResponse resp6 = (ExtRAResponse) submessagesresp6.getSubMessages().iterator().next();
    assertTrue(resp6.getRequestId() == 10);
    assertTrue(resp6.isSuccessful() == false);
        assertEquals(resp6.getFailInfo(), "Either username or issuer/serno is required");
       
        // Then a message with a suername that does not exist
        SubMessages smgs7 = new SubMessages(null,null,null);
        smgs7.addSubMessage(new RevocationRequest(11, "184hjeyyydvv88q", RevocationRequest.REVOKATION_REASON_UNSPECIFIED, false));    
        msghome.create("SimpleRevocationTest", smgs7);
        Message msg7 = waitForUser("SimpleRevocationTest");
        assertNotNull(msg7);
        SubMessages submessagesresp7 = msg7.getSubMessages(null,null,null);
        assertTrue(submessagesresp7.getSubMessages().size() == 1);
        ExtRAResponse resp7 = (ExtRAResponse) submessagesresp7.getSubMessages().iterator().next();
        assertTrue(resp7.getRequestId() == 11);
        assertTrue(resp7.isSuccessful() == false);
        assertEquals(resp7.getFailInfo(), "User not found from username: username=184hjeyyydvv88q");

        // Then a message with a issuer/serno that does not exist
        SubMessages smgs8 = new SubMessages(null,null,null);
        smgs8.addSubMessage(new RevocationRequest(12, "CN=ffo558444,O=338qqwaa,C=qq", new BigInteger("123"), RevocationRequest.REVOKATION_REASON_UNSPECIFIED, false, false));    
        msghome.create("SimpleRevocationTest", smgs8);
        Message msg8 = waitForUser("SimpleRevocationTest");
        assertNotNull(msg8);
        SubMessages submessagesresp8 = msg8.getSubMessages(null,null,null);
        assertTrue(submessagesresp8.getSubMessages().size() == 1);
        ExtRAResponse resp8 = (ExtRAResponse) submessagesresp8.getSubMessages().iterator().next();
        assertTrue(resp8.getRequestId() == 12);
        assertTrue(resp8.isSuccessful() == false);
        assertEquals(resp8.getFailInfo(), "User not found from issuer/serno: issuer='CN=ffo558444,O=338qqwaa,C=qq', serno=123");
  }
View Full Code Here

  }
 
  public void test06GenerateSimpleEditUserRequest() throws Exception {
   
    // edit a user
    SubMessages smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAEditUserRequest(11,"SimpleEditUserTest"));
   
    msghome.create("SimpleEditUserTest", smgs);
   
        Message msg = waitForUser("SimpleEditUserTest");
    assertNotNull("No response.", msg);
   
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue("Number of submessages " + submessagesresp.getSubMessages().size(), submessagesresp.getSubMessages().size() == 1);
   
    ExtRAResponse resp = (ExtRAResponse) submessagesresp.getSubMessages().iterator().next();
    assertTrue("Wrong Request ID" + resp.getRequestId(), resp.getRequestId() == 11);
    assertTrue(resp.isSuccessful() == true);
 
View Full Code Here

    assertTrue(resp.isSuccessful() == true);
 
 
  public void test07GenerateComplexRequest() throws Exception {
   
    SubMessages smgs = new SubMessages(null,null,null);
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10Request(1,"SimplePKCS10Test1", Constants.pkcs10_1));
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS12Request(2,"SimplePKCS12Test1", false));
    smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS12Request(3,"SimplePKCS12Test1", false));
   
    msghome.create("COMPLEXREQ_1", smgs);
   
        Message msg = waitForUser("COMPLEXREQ_1");
    assertNotNull("No response.", msg);
   
    SubMessages submessagesresp = msg.getSubMessages(null,null,null);
   
    assertTrue(submessagesresp.getSubMessages().size() == 3);
   
   
    Iterator iter = submessagesresp.getSubMessages().iterator();
    PKCS10Response resp1 = (PKCS10Response) iter.next();
    PKCS12Response resp2 = (PKCS12Response) iter.next();
    PKCS12Response resp3 = (PKCS12Response) iter.next();
    assertTrue(resp1.getRequestId() == 1);
    assertTrue(resp1.isSuccessful() == true);
View Full Code Here

  public void test08GenerateLotsOfRequest() throws Exception {
   
    int numberOfRequests = 10;
   
    for(int i=0; i< numberOfRequests; i++){
      SubMessages smgs = new SubMessages(null,null,null);
      smgs.addSubMessage(ExtRAMessagesTest.genExtRAPKCS10Request(1,"SimplePKCS10Test1", Constants.pkcs10_1));   
      msghome.create("LotsOfReq" + i, smgs);
    }

    Message[] resps = new Message[numberOfRequests];
    for(int i=0; i < numberOfRequests; i++){
      resps[i] = waitForUser("LotsOfReq"+i);
      assertNotNull("No response.", resps[i]);
      SubMessages submessagesresp = resps[i].getSubMessages(null,null,null);
      PKCS10Response resp = (PKCS10Response) submessagesresp.getSubMessages().iterator().next();
      assertTrue(resp.isSuccessful() == true);
    }               
  }
View Full Code Here

TOP

Related Classes of org.ejbca.extra.db.SubMessages

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.