fix: update certificate name generation to use random bytes for uniqueness
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
import { execSync } from 'node:child_process';
|
import { execSync } from 'node:child_process';
|
||||||
import { mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
import { mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
||||||
|
import { randomBytes } from 'node:crypto';
|
||||||
import { tmpdir } from 'node:os';
|
import { tmpdir } from 'node:os';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { DefaultAzureCredential } from '@azure/identity';
|
import { DefaultAzureCredential } from '@azure/identity';
|
||||||
@@ -21,7 +22,7 @@ if (!vaultName) {
|
|||||||
}
|
}
|
||||||
const vaultUrl = `https://${vaultName}.vault.azure.net`;
|
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 PFX_PASSWORD = 'test-password-123';
|
||||||
|
|
||||||
const tmp = mkdtempSync(join(tmpdir(), 'kv-bug-'));
|
const tmp = mkdtempSync(join(tmpdir(), 'kv-bug-'));
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import { execSync } from 'node:child_process';
|
import { execSync } from 'node:child_process';
|
||||||
import { mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
import { mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
||||||
|
import { randomBytes } from 'node:crypto';
|
||||||
import { tmpdir } from 'node:os';
|
import { tmpdir } from 'node:os';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { DefaultAzureCredential } from '@azure/identity';
|
import { DefaultAzureCredential } from '@azure/identity';
|
||||||
@@ -20,7 +21,7 @@ if (!vaultName) {
|
|||||||
}
|
}
|
||||||
const vaultUrl = `https://${vaultName}.vault.azure.net`;
|
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 PFX_PASSWORD = 'test-password-123';
|
||||||
|
|
||||||
const tmp = mkdtempSync(join(tmpdir(), 'kv-workaround-'));
|
const tmp = mkdtempSync(join(tmpdir(), 'kv-workaround-'));
|
||||||
|
|||||||
Reference in New Issue
Block a user