Address review feedbacks

This commit is contained in:
Fang-Pen Lin
2025-11-07 09:16:27 -08:00
parent 136d755577
commit d2c8904e8f
2 changed files with 10 additions and 7 deletions

View File

@@ -14,13 +14,13 @@ export enum AcmeErrorType {
BadPublicKey = "badPublicKey",
BadRevocationReason = "badRevocationReason",
BadSignatureAlgorithm = "badSignatureAlgorithm",
CAA = "CAA",
CAA = "caa",
Compound = "compound",
Connection = "connection",
DNS = "DNS",
DNS = "dns",
ExternalAccountRequired = "externalAccountRequired",
IncorrectResponse = "incorrectResponse",
IncorrectContact = "incorrectContact",
InvalidContact = "invalidContact",
Malformed = "malformed",
OrderNotReady = "orderNotReady",
RateLimited = "rateLimited",

View File

@@ -614,10 +614,13 @@ export const pkiAcmeServiceFactory = ({
csr,
notBefore: finalizingOrder.notBefore ? new Date(finalizingOrder.notBefore) : undefined,
notAfter: finalizingOrder.notAfter ? new Date(finalizingOrder.notAfter) : undefined,
validity: {
// TODO: read config from the profile to get the expiration time instead
ttl: (24 * 60 * 60 * 1000).toString()
},
validity: !finalizingOrder.notAfter
? {
// TODO: read config from the profile to get the expiration time instead
ttl: (24 * 60 * 60 * 1000).toString()
}
: // ttl is not used if notAfter is provided
({ ttl: "0" } as const),
enrollmentType: EnrollmentType.ACME
});
// TODO: associate the certificate with the order