Jump to content
Ralf Junker

OverbyteIcsLIBEAY.pas f_EVP_DigestSignInit() declaration mismatch

Recommended Posts

OverbyteIcsLIBEAY.pas line 1994 (SVN 1469) declares f_EVP_DigestSignInit() like this:

f_EVP_DigestSignInit: function(ctx: PEVP_MD_CTX; pctx: PEVP_PKEY_CTX; etype: PEVP_MD; impl: PEngine; pkey: PEVP_PKEY): Integer; cdecl = Nil;

In Pascal, pctx is a single pointer, but C declares pctx as a double pointer:

int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
                       const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);

Following nearby declarations, Pascal should probably change pctx to a var parameter.

 

Reference: https://www.openssl.org/docs/man1.1.1/man3/EVP_DigestSignInit.html

 

Ralf

Share this post


Link to post

Many thanks, also fixed EVP_DigestVarifyInit.  That may get be closer to finding an ECDSA signing bug I've been looking for on and off for a couple of years, its shown up another error in code that was bypassed previously.

 

Are you using the signing functions and finding problems, is that why you are finding all my API conversion errors?

 

Angus

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×