From 0da32da2d8089439316b1ad8f004047dd5d0fe36 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sat, 28 May 2011 23:56:10 -0700 Subject: [PATCH] add ssl init to common --- common/Makefile.am | 1 + common/ssl_calls.c | 18 ++++++++++++++++++ common/ssl_calls.h | 4 ++++ 3 files changed, 23 insertions(+) diff --git a/common/Makefile.am b/common/Makefile.am index a3fd85fb..1bc5eeb6 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -22,4 +22,5 @@ libcommon_la_SOURCES = \ libcommon_la_LIBADD = \ -lcrypto \ + -lssl \ -lpthread diff --git a/common/ssl_calls.c b/common/ssl_calls.c index aa389743..3d37ed6d 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -21,6 +21,8 @@ */ #include /* needed for openssl headers */ +#include +#include #include #include #include @@ -37,6 +39,22 @@ #define OLD_RSA_GEN1 #endif +/*****************************************************************************/ +int +ssl_init(void) +{ + SSL_load_error_strings(); + SSL_library_init(); + return 0; +} + +/*****************************************************************************/ +int +ssl_finish(void) +{ + return 0; +} + /* rc4 stuff */ /*****************************************************************************/ diff --git a/common/ssl_calls.h b/common/ssl_calls.h index 6bbb1672..d78bdb0b 100644 --- a/common/ssl_calls.h +++ b/common/ssl_calls.h @@ -23,6 +23,10 @@ #include "arch.h" +int +ssl_init(void); +int +ssl_finish(void); void* APP_CC ssl_rc4_info_create(void); void APP_CC