From d3442bc780473f0cd4f378bc31130d4579da640b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 20 Feb 2000 23:43:02 +0000 Subject: Move the registration of callback functions to special functions designed for that. This removes the potential error to mix data and function pointers. Please note that I'm a little unsure how incorrect calls to the old ctrl functions should be handled, in som cases. I currently return 0 and that's it, but it may be more correct to generate a genuine error in those cases. --- ssl/s2_lib.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ssl/s2_lib.c') diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index 47713ec9f9..5ddba23a06 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -230,6 +230,9 @@ static SSL_METHOD SSLv2_data= { ssl_bad_method, ssl2_default_timeout, &ssl3_undef_enc_method, + ssl_undefined_function, + ssl2_callback_ctrl, /* local */ + ssl2_ctx_callback_ctrl, /* local */ }; static long ssl2_default_timeout(void) @@ -335,11 +338,21 @@ long ssl2_ctrl(SSL *s, int cmd, long larg, char *parg) return(ret); } +long ssl2_callback_ctrl(SSL *s, int cmd, void (*fp)()) + { + return(0); + } + long ssl2_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg) { return(0); } +long ssl2_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)()) + { + return(0); + } + /* This function needs to check if the ciphers required are actually * available */ SSL_CIPHER *ssl2_get_cipher_by_char(const unsigned char *p) -- cgit v1.2.3