Browse Source

Preparing a QA_library init, before the integration with openMPI.

Michele Orrù 11 years ago
parent
commit
d6be600166
3 changed files with 13 additions and 2 deletions
  1. 2 2
      src/qa.c
  2. 9 0
      src/questions/allquestions.c
  3. 2 0
      src/questions/include/questions.h

+ 2 - 2
src/qa.c

@@ -124,8 +124,8 @@ qa_init(const struct qa_conf* conf)
   bio_out = BIO_new_fp(stdout, BIO_NOCLOSE);
   bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
 
-  /* Initialize SSL Library by registering algorithms. */
-  SSL_library_init();
+
+  QA_library_init();
 
   if (!conf->attacks) select_all_questions();
   else select_question(conf->attacks);

+ 9 - 0
src/questions/allquestions.c

@@ -11,8 +11,17 @@
 #include <string.h>
 #include <bsd/sys/queue.h>
 
+#include <openssl/ssl.h>
 #include "qa/questions/questions.h"
 
+void QA_library_init(void)
+{
+  /* Initialize SSL Library by registering algorithms. */
+  SSL_library_init();
+  SSL_load_error_strings();
+}
+
+
 /**
  * \brief Select a single question to be used.
  *

+ 2 - 0
src/questions/include/questions.h

@@ -41,6 +41,8 @@ LIST_HEAD(listhead, qa_question) questions;
 void select_question(const char *);
 void select_all_questions(void);
 
+void QA_library_init(void);
+
 #define REGISTER_QUESTION(q)                      \
   do {                                            \
       extern struct qa_question q;                \