Skip to content

Commit

Permalink
Set error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
glatzert committed Jul 3, 2020
1 parent 02afbb0 commit fa28c75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ACME.CertProvider.ACDS/CsrValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public CsrValidator(IOptions<ACDSOptions> options, ILogger<CsrValidator> logger)
request.CheckSignature();

if (!SubjectIsValid(request, order))
return Task.FromResult((false, (AcmeError?)new AcmeError("TODO", "CN Invalid")));
return Task.FromResult((false, (AcmeError?)new AcmeError("badCSR", "CN Invalid.")));

if (!SubjectAlternateNamesAreValid(request, order))
return Task.FromResult((false, (AcmeError?)new AcmeError("TODO", "SAN Invalid")));
return Task.FromResult((false, (AcmeError?)new AcmeError("badCSR", "SAN Invalid.")));

return Task.FromResult((true, (AcmeError?)null));
}
Expand All @@ -42,7 +42,7 @@ public CsrValidator(IOptions<ACDSOptions> options, ILogger<CsrValidator> logger)
_logger.LogWarning(ex.ToString());
}

return Task.FromResult((false, (AcmeError?)new AcmeError("TODO", "Generic Error")));
return Task.FromResult((false, (AcmeError?)new AcmeError("badCSR", "CSR could not be read.")));
}

private bool SubjectIsValid(CertEnroll.CX509CertificateRequestPkcs10 request, Order order)
Expand Down

0 comments on commit fa28c75

Please sign in to comment.