Jump to content
Ralf Junker

OverbyteIcsLIBEAY.pas: EVP_PKEY_paramgen() pkey parameter should be double pointer

Recommended Posts

EVP_PKEY_paramgen() pkey should be a double pointer parameter. OverbyteIcsLIBEAY.pas line 1752, SVN 2063:

f_EVP_PKEY_paramgen: function(pctx: PEVP_PKEY_CTX; pkey: PEVP_PKEY): Integer; cdecl = Nil;

Notice the two ** asterisks in the OpenSSL's evp.h C declaration:

int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);

Possible fixes:

{ More C like: Better if ppkey may be nil. }
f_EVP_PKEY_paramgen: function(pctx: PEVP_PKEY_CTX; ppkey: PPEVP_PKEY): Integer; cdecl = Nil;

{ More Pascal like. Notice that nil cannot be passed this way. }
f_EVP_PKEY_paramgen: function(pctx: PEVP_PKEY_CTX; var pkey: PEVP_PKEY): Integer; cdecl = Nil;

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

Ralf

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
×