Fix GCC-14 [-Wincompatible-pointer-types] issues. (#546)

* Fix class assignment.

* One more fix.

* Bump bearssl version.
This commit is contained in:
Eugene Kabanov 2024-06-02 18:05:22 +03:00 committed by GitHub
parent 8a306763ce
commit 1b9d9253e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,7 @@ skipDirs = @["tests"]
requires "nim >= 1.6.16",
"results",
"stew",
"bearssl",
"bearssl >= 0.2.3",
"httputils",
"unittest2"

View File

@ -511,7 +511,8 @@ proc newTLSClientAsyncStream*(
if TLSFlags.NoVerifyHost in flags:
sslClientInitFull(res.ccontext, addr res.x509, nil, 0)
x509NoanchorInit(res.xwc, addr res.x509.vtable)
sslEngineSetX509(res.ccontext.eng, addr res.xwc.vtable)
sslEngineSetX509(res.ccontext.eng,
X509ClassPointerConst(addr res.xwc.vtable))
else:
when trustAnchors is TrustAnchorStore:
res.trustAnchors = trustAnchors
@ -611,7 +612,8 @@ proc newTLSServerAsyncStream*(rsource: AsyncStreamReader,
uint16(maxVersion))
if not isNil(cache):
sslServerSetCache(res.scontext, addr cache.context.vtable)
sslServerSetCache(
res.scontext, SslSessionCacheClassPointerConst(addr cache.context.vtable))
if TLSFlags.EnforceServerPref in flags:
sslEngineAddFlags(res.scontext.eng, OPT_ENFORCE_SERVER_PREFERENCES)