Package org.ejbca.core.model.approval.approvalrequests

Examples of org.ejbca.core.model.approval.approvalrequests.KeyRecoveryApprovalRequest


        final int caid = CertTools.getIssuerDN(certificate).hashCode();
    final CertificateInfo certinfo = certificateStoreSession.getCertificateInfo(admin, CertTools.getFingerprintAsString(certificate));
        // Check if approvals is required.
        int numOfApprovalsRequired = caAdminSession.getNumOfApprovalRequired(admin, CAInfo.REQ_APPROVAL_KEYRECOVER, caid, certinfo.getCertificateProfileId());
        if (numOfApprovalsRequired > 0){   
      KeyRecoveryApprovalRequest ar = new KeyRecoveryApprovalRequest(certificate,username,checkNewest, admin,null,numOfApprovalsRequired,caid,endEntityProfileId);
      if (ApprovalExecutorUtil.requireApproval(ar, NONAPPROVABLECLASSNAMES_KEYRECOVERY)){
        approvalSession.addApprovalRequest(admin, ar, gc);
              String msg = intres.getLocalizedMessage("keyrecovery.addedforapproval");             
        throw new WaitingForApprovalException(msg, ar.generateApprovalId());
      }
        }
    }
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.approval.approvalrequests.KeyRecoveryApprovalRequest

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.