summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/validateCertificatePath.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-07-07 14:57:02 -0700
committerMatthew Miller <matthew@millerti.me>2020-07-07 14:57:02 -0700
commit9d98f8b62535afbf5e1c1f5b73ecd03ee7e9d76d (patch)
treebabbe91c2f8e79410ae6bb9f7d2aa95fc4dc47f7 /packages/server/src/helpers/validateCertificatePath.ts
parent1b4e82cabf59ad2710a1097ef7825db2b2de1953 (diff)
Make validateCertificatePath async
Diffstat (limited to 'packages/server/src/helpers/validateCertificatePath.ts')
-rw-r--r--packages/server/src/helpers/validateCertificatePath.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/server/src/helpers/validateCertificatePath.ts b/packages/server/src/helpers/validateCertificatePath.ts
index 39b1009..c2b18a4 100644
--- a/packages/server/src/helpers/validateCertificatePath.ts
+++ b/packages/server/src/helpers/validateCertificatePath.ts
@@ -12,7 +12,7 @@ const { crypto } = KJUR;
* Traverse an array of PEM certificates and ensure they form a proper chain
* @param certificates Typically the result of `x5c.map(convertASN1toPEM)`
*/
-export default function validateCertificatePath(certificates: string[]): boolean {
+export default async function validateCertificatePath(certificates: string[]): Promise<boolean> {
if (new Set(certificates).size !== certificates.length) {
throw new Error('Invalid certificate path: found duplicate certificates');
}