summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-07-07 16:16:23 -0700
committerMatthew Miller <matthew@millerti.me>2020-07-07 16:16:23 -0700
commitcd09be38a18f5ab0491ce708d135bd963aad3bb9 (patch)
tree7f25e5cdcdbc9677b062283b839f70dc15059ec2 /packages/server/src
parent24955f56d61871531bee2d4c9618a305550bc963 (diff)
Add revocation check to validateCertificatePath
Diffstat (limited to 'packages/server/src')
-rw-r--r--packages/server/src/helpers/validateCertificatePath.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/server/src/helpers/validateCertificatePath.ts b/packages/server/src/helpers/validateCertificatePath.ts
index 1dd8c04..1023ff7 100644
--- a/packages/server/src/helpers/validateCertificatePath.ts
+++ b/packages/server/src/helpers/validateCertificatePath.ts
@@ -34,6 +34,10 @@ export default async function validateCertificatePath(certificates: string[]): P
const issuerCert = new X509();
issuerCert.readCertPEM(issuerPem);
+ if (subjectCertRevoked) {
+ throw new Error(`Found revoked certificate in certificate path`);
+ }
+
// Check that intermediate certificate is within its valid time window
const notBefore = zulutodate(issuerCert.getNotBefore());
const notAfter = zulutodate(issuerCert.getNotAfter());