From: Adriaan de Jong Date: Thu, 23 Jun 2011 09:07:12 +0000 (+0200) Subject: Refactored SSL_clear_error() X-Git-Tag: v2.3-alpha1~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=330715f0abec92dad434f3ca38557e5cff03f2a3;p=thirdparty%2Fopenvpn.git Refactored SSL_clear_error() Signed-off-by: Adriaan de Jong Acked-by: David Sommerseth Signed-off-by: David Sommerseth --- diff --git a/crypto.c b/crypto.c index 409c298b9..bdb3b1dee 100644 --- a/crypto.c +++ b/crypto.c @@ -191,8 +191,8 @@ openvpn_encrypt (struct buffer *buf, struct buffer work, gc_free (&gc); return; - err: - ERR_clear_error (); +err: + crypto_clear_error(); buf->len = 0; gc_free (&gc); return; @@ -363,7 +363,7 @@ openvpn_decrypt (struct buffer *buf, struct buffer work, return true; error_exit: - ERR_clear_error (); + crypto_clear_error(); buf->len = 0; gc_free (&gc); return false; diff --git a/crypto_backend.h b/crypto_backend.h index b099f475e..50eef7b9a 100644 --- a/crypto_backend.h +++ b/crypto_backend.h @@ -38,6 +38,8 @@ #include "basic.h" +void crypto_clear_error (void); + void show_available_ciphers (void); void show_available_digests (void); diff --git a/crypto_openssl.c b/crypto_openssl.c index 9edcf40b5..8e228eef0 100644 --- a/crypto_openssl.c +++ b/crypto_openssl.c @@ -86,6 +86,12 @@ cipher_ok (const char* name) #endif +void +crypto_clear_error (void) +{ + ERR_clear_error (); +} + void show_available_ciphers () {