From 17920465474e1c6c3f66304e7fd195b950377259 Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Fri, 30 Sep 2011 15:41:37 +0000 Subject: [PATCH] implemented ssl_error as macro git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@541 96b47cad-a561-4643-ad3b-153ac7d7599c --- npa/src/sslutil.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/npa/src/sslutil.h b/npa/src/sslutil.h index 739f7ff..03514c2 100644 --- a/npa/src/sslutil.h +++ b/npa/src/sslutil.h @@ -20,7 +20,16 @@ #define _CCID_SSLUTIL_H #include +#include +#include -void ssl_error(sc_context_t *ctx); +#define ssl_error(ctx) { \ + unsigned long _r; \ + ERR_load_crypto_strings(); \ + for (_r = ERR_get_error(); _r; _r = ERR_get_error()) { \ + sc_debug(ctx, SC_LOG_DEBUG_VERBOSE, ERR_error_string(_r, NULL)); \ + } \ + ERR_free_strings(); \ +} #endif