Skip to content

Commit

Permalink
feat(NODE-6365): pass through allowPartialTrustChain TLS flag (#4228)
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Sep 9, 2024
1 parent 91ceaf0 commit d6c147d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/cmap/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export async function prepareHandshakeDocument(

/** @public */
export const LEGAL_TLS_SOCKET_OPTIONS = [
'allowPartialTrustChain',
'ALPNProtocols',
'ca',
'cert',
Expand Down
3 changes: 2 additions & 1 deletion src/connection_string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,8 @@ export const OPTIONS = {
// Custom types for modifying core behavior
connectionType: { type: 'any' },
srvPoller: { type: 'any' },
// Accepted NodeJS Options
// Accepted Node.js Options
allowPartialTrustChain: { type: 'any' },
minDHSize: { type: 'any' },
pskCallback: { type: 'any' },
secureContext: { type: 'any' },
Expand Down
6 changes: 4 additions & 2 deletions src/mongo_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ export interface PkFactory {

/** @public */
export type SupportedTLSConnectionOptions = Pick<
TLSConnectionOptions,
Extract<keyof TLSConnectionOptions, (typeof LEGAL_TLS_SOCKET_OPTIONS)[number]>
TLSConnectionOptions & {
allowPartialTrustChain?: boolean;
},
(typeof LEGAL_TLS_SOCKET_OPTIONS)[number]
>;

/** @public */
Expand Down

0 comments on commit d6c147d

Please sign in to comment.