Jump to content
Ralf Junker

OverbyteIcsSSLEAY.pas f_SSL_set_msg_callback() declaration mismatch

Recommended Posts

OverbyteIcsSSLEAY.pas line 2160 (SVN 1464) declares f_SSL_set_msg_callback() to use a TProto_msg_cb callback. TProto_msg_cb is defined in line 1270 as a function:

TProto_msg_cb = function (write_p, version, content_type: integer; buf: PAnsiChar; size_t: integer; ssl: PSSL; arg: Pointer): Integer; cdecl; { V8.40 handshake protocol message callback }

This is different from the OpenSSL definition. The C header declares the callback as a procedure which does not return a value (void):

void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));

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

 

Ralf

Share this post


Link to post

Technically it's wrong, but the actual callback does not attempt to return anything, it's really just for logging. 

 

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
×