Add crypto-inventory: a cryptographic inventory of source code as a CycloneDX 1.6 CBOM, with linear cost on hostile input; PKI DER messages in English

This commit is contained in:
Aere Network committed 2026-09-29 17:42:36 +03:00
1 parent 7d814d1bb8
commit 0f081f0847
49 files changed
+4342 -33

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
// Fixtura: optiuni TLS in Node.
const tls = require('node:tls');
const https = require('https');
const server = tls.createServer({
minVersion: 'TLSv1', // EXPECT: TLSv1.0 | weak-now
ecdhCurve: 'X25519MLKEM768:X25519:prime256v1', // EXPECT: X25519MLKEM768 | quantum-safe ; X25519 | quantum-vulnerable ; ECDH-secp256r1 | quantum-vulnerable
});
const agent = new https.Agent({ minVersion: 'TLSv1.2', maxVersion: 'TLSv1.3' }); // EXPECT: TLSv1.2 | quantum-vulnerable ; TLSv1.3 | unknown
const PQ = 'X25519MLKEM768';
const GRUPURI = { hibrid: 'X25519MLKEM768' };
const a2 = tls.connect({ ecdhCurve: PQ }); // EXPECT: X25519MLKEM768 | quantum-safe
const a3 = tls.connect({ ecdhCurve: `${PQ}:X25519` }); // EXPECT: X25519MLKEM768 | quantum-safe ; X25519 | quantum-vulnerable
const a4 = tls.connect({ ecdhCurve: GRUPURI[process.env.MOD] }); // EXPECT: tls ecdhCurve | unknown
module.exports = { server, agent, a2, a3, a4 };