Skip to content

Commit 3b6b08d

Browse files
committed
fix: require certverifier in client context
1 parent b57ea88 commit 3b6b08d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lsquic/context/client.nim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ const Cubic = 1
118118
const Adaptive = 3
119119

120120
proc new*(T: typedesc[ClientContext], tlsConfig: TLSConfig): Result[T, string] =
121+
if tlsConfig.certVerifier.isNone:
122+
return err("client TLSConfig requires a certificate verifier")
123+
121124
var ctx = ClientContext()
122125
ctx.tlsConfig = tlsConfig
123126
ctx.running = true

0 commit comments

Comments
 (0)