- public CertificateRequest(User issuer, String csr) throws IOException, GeneralSecurityException, GigiApiException {
- u = issuer;
+ public CertificateRequest(AuthorizationContext c, String csr) throws IOException, GeneralSecurityException, GigiApiException {
+ this(c, csr, (CertificateProfile) null);
+ }
+
+ public CertificateRequest(AuthorizationContext ctx, String csr, CertificateProfile cp) throws GeneralSecurityException, IOException, IOException {
+ this.ctx = ctx;
+ if (cp != null) {
+ profile = cp;
+ } else if (ctx.getActor().getAssurancePoints() > 50) {
+ profile = CertificateProfile.getByName("client-a");
+ }