From d373c8a72d981c4340a8273f68356ac17b47f791 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sat, 23 May 2026 09:47:04 +0200 Subject: [PATCH] fix: update certificate name generation to use random bytes for uniqueness --- docs/bug-reproduce-openssl.mjs | 3 ++- docs/bug-workaround-openssl.mjs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/bug-reproduce-openssl.mjs b/docs/bug-reproduce-openssl.mjs index e84ba7a..cd59c60 100644 --- a/docs/bug-reproduce-openssl.mjs +++ b/docs/bug-reproduce-openssl.mjs @@ -9,6 +9,7 @@ import { execSync } from 'node:child_process'; import { mkdtempSync, readFileSync, rmSync } from 'node:fs'; +import { randomBytes } from 'node:crypto'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { DefaultAzureCredential } from '@azure/identity'; @@ -21,7 +22,7 @@ if (!vaultName) { } const vaultUrl = `https://${vaultName}.vault.azure.net`; -const CERT_NAME = 'bug-reproduce-test'; +const CERT_NAME = `bug-reproduce-${randomBytes(4).toString('hex')}`; const PFX_PASSWORD = 'test-password-123'; const tmp = mkdtempSync(join(tmpdir(), 'kv-bug-')); diff --git a/docs/bug-workaround-openssl.mjs b/docs/bug-workaround-openssl.mjs index ad6af08..b59dc15 100644 --- a/docs/bug-workaround-openssl.mjs +++ b/docs/bug-workaround-openssl.mjs @@ -8,6 +8,7 @@ import { execSync } from 'node:child_process'; import { mkdtempSync, readFileSync, rmSync } from 'node:fs'; +import { randomBytes } from 'node:crypto'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { DefaultAzureCredential } from '@azure/identity'; @@ -20,7 +21,7 @@ if (!vaultName) { } const vaultUrl = `https://${vaultName}.vault.azure.net`; -const CERT_NAME = 'bug-workaround-test'; +const CERT_NAME = `bug-workaround-${randomBytes(4).toString('hex')}`; const PFX_PASSWORD = 'test-password-123'; const tmp = mkdtempSync(join(tmpdir(), 'kv-workaround-'));