Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
h3rald committed Jan 6, 2024
1 parent bb3eb74 commit c3fe7d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/litestorepkg/lib/jwt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ elif defined(macosx) and defined(amd64):

proc EVP_PKEY_new(): EVP_PKEY {.cdecl, importc.}
proc X509_get_pubkey(cert: PX509): EVP_PKEY {.cdecl, importc.}
proc X509_free(cert: PX509) {.cdecl, importc.}
proc EVP_DigestVerifyInit(ctx: EVP_MD_CTX; pctx: ptr EVP_PKEY_CTX; typ: EVP_MD;
e: ENGINE; pkey: EVP_PKEY): cint {.cdecl, importc.}
proc EVP_DigestVerifyUpdate(ctx: EVP_MD_CTX; data: pointer;
Expand Down Expand Up @@ -125,7 +126,7 @@ proc verifySignature*(jwt: JWT; x5c: string) =
EVP_PKEY_CTX_free(pkeyctx)
if not pubkey.isNil:
EVP_PKEY_free(pubkey)
if not x509.isNil and defined(X509_free):
if not x509.isNil:
X509_free(x509)
raise err

Expand Down

0 comments on commit c3fe7d7

Please sign in to comment.