Skip to content

Commit 1b9d925

Browse files
authored
Fix GCC-14 [-Wincompatible-pointer-types] issues. (#546)
* Fix class assignment. * One more fix. * Bump bearssl version.
1 parent 8a30676 commit 1b9d925

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

chronos.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ skipDirs = @["tests"]
1010
requires "nim >= 1.6.16",
1111
"results",
1212
"stew",
13-
"bearssl",
13+
"bearssl >= 0.2.3",
1414
"httputils",
1515
"unittest2"
1616

chronos/streams/tlsstream.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ proc newTLSClientAsyncStream*(
511511
if TLSFlags.NoVerifyHost in flags:
512512
sslClientInitFull(res.ccontext, addr res.x509, nil, 0)
513513
x509NoanchorInit(res.xwc, addr res.x509.vtable)
514-
sslEngineSetX509(res.ccontext.eng, addr res.xwc.vtable)
514+
sslEngineSetX509(res.ccontext.eng,
515+
X509ClassPointerConst(addr res.xwc.vtable))
515516
else:
516517
when trustAnchors is TrustAnchorStore:
517518
res.trustAnchors = trustAnchors
@@ -611,7 +612,8 @@ proc newTLSServerAsyncStream*(rsource: AsyncStreamReader,
611612
uint16(maxVersion))
612613

613614
if not isNil(cache):
614-
sslServerSetCache(res.scontext, addr cache.context.vtable)
615+
sslServerSetCache(
616+
res.scontext, SslSessionCacheClassPointerConst(addr cache.context.vtable))
615617

616618
if TLSFlags.EnforceServerPref in flags:
617619
sslEngineAddFlags(res.scontext.eng, OPT_ENFORCE_SERVER_PREFERENCES)

0 commit comments

Comments
 (0)