Skip to content

Commit d6c147d

Browse files
authored
feat(NODE-6365): pass through allowPartialTrustChain TLS flag (#4228)
1 parent 91ceaf0 commit d6c147d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/cmap/connect.ts

+1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ export async function prepareHandshakeDocument(
249249

250250
/** @public */
251251
export const LEGAL_TLS_SOCKET_OPTIONS = [
252+
'allowPartialTrustChain',
252253
'ALPNProtocols',
253254
'ca',
254255
'cert',

src/connection_string.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,8 @@ export const OPTIONS = {
12281228
// Custom types for modifying core behavior
12291229
connectionType: { type: 'any' },
12301230
srvPoller: { type: 'any' },
1231-
// Accepted NodeJS Options
1231+
// Accepted Node.js Options
1232+
allowPartialTrustChain: { type: 'any' },
12321233
minDHSize: { type: 'any' },
12331234
pskCallback: { type: 'any' },
12341235
secureContext: { type: 'any' },

src/mongo_client.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ export interface PkFactory {
9393

9494
/** @public */
9595
export type SupportedTLSConnectionOptions = Pick<
96-
TLSConnectionOptions,
97-
Extract<keyof TLSConnectionOptions, (typeof LEGAL_TLS_SOCKET_OPTIONS)[number]>
96+
TLSConnectionOptions & {
97+
allowPartialTrustChain?: boolean;
98+
},
99+
(typeof LEGAL_TLS_SOCKET_OPTIONS)[number]
98100
>;
99101

100102
/** @public */

0 commit comments

Comments
 (0)