Skip to content

Commit 97d7a23

Browse files
committed
handling rejectUnauthorized
1 parent 38f853c commit 97d7a23

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/connection.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { SaslHandshakeResponse } from "./responses/sasl_handshake_response"
3232
import { TuneResponse } from "./responses/tune_response"
3333
import {
3434
DEFAULT_FRAME_MAX,
35+
DEFAULT_SSL_CONFIG,
3536
DEFAULT_UNLIMITED_FRAME_MAX,
3637
REQUIRED_MANAGEMENT_VERSION,
3738
isString,
@@ -640,10 +641,7 @@ function isSameStream({ metadataInfo }: { metadataInfo: MetadataInfo }): (e: Lis
640641
}
641642

642643
function buildSSLParams(ssl: SSLConnectionParams | true) {
643-
if (ssl === true) return {}
644+
if (ssl === true) return DEFAULT_SSL_CONFIG
644645

645-
return {
646-
...ssl,
647-
// rejectUnauthorized: false,
648-
}
646+
return ssl
649647
}

src/util.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export function range(count: number): number[] {
1313
return ret
1414
}
1515

16+
export const DEFAULT_SSL_CONFIG = { rejectUnauthorized: false }
17+
1618
export const DEFAULT_FRAME_MAX = 1048576
1719
export const DEFAULT_UNLIMITED_FRAME_MAX = 0
1820
export const REQUIRED_MANAGEMENT_VERSION = "3.13.0"

0 commit comments

Comments
 (0)