Visitar URL original
feat(gax): export ensurePqcCurvesConfigured and verify TLS secure con… · googleapis/google-cloud-node@b7d3fc3 · GitHub
Skip to content

Commit b7d3fc3

Browse files
committed
feat(gax): export ensurePqcCurvesConfigured and verify TLS secure context
1 parent 718501c commit b7d3fc3

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎core/packages/gax/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export {GoogleError} from './googleError';
6666
export {
6767
ClientStub,
6868
ClientStubOptions,
69+
ensurePqcCurvesConfigured,
6970
GoogleProtoFilesRoot,
7071
GrpcClient,
7172
GrpcClientOptions,

‎core/packages/gax/test/unit/grpc.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,5 +959,18 @@ dvorak
959959
`Expected ClientHello supported_groups (${supportedGroups.map(g => '0x' + g.toString(16)).join(', ')}) to include 0x0202 (MLKEM1024)`,
960960
);
961961
});
962+
963+
it('creates a valid TLS secure context supporting both X25519MLKEM768 (0x11ec) and MLKEM1024 (0x0202)', () => {
964+
tls.DEFAULT_ECDH_CURVE = 'auto';
965+
ensurePqcCurvesConfigured();
966+
const defaultCtx = tls.createSecureContext({
967+
ecdhCurve: tls.DEFAULT_ECDH_CURVE,
968+
});
969+
const mlkem1024Ctx = tls.createSecureContext({
970+
ecdhCurve: 'MLKEM1024',
971+
});
972+
assert.ok(defaultCtx);
973+
assert.ok(mlkem1024Ctx);
974+
});
962975
});
963976
});

0 commit comments

Comments
 (0)