rots-util: properly initialise OpenSSL using SSL_init_library()

master
S.J.R. van Schaik 7 years ago
parent 59a532c6f6
commit 0e8bfb51c9
  1. 3
      source/sign.c
  2. 3
      source/verify.c

@ -7,6 +7,7 @@
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
@ -168,6 +169,8 @@ int do_sign(int argc, char *argv[])
return -1;
}
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_algorithms();
if (!(key = open_priv_key(args.key))) {

@ -9,6 +9,7 @@
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
@ -229,6 +230,8 @@ int do_verify(int argc, char *argv[])
return -1;
}
SSL_load_error_strings();
SSL_library_init();
OpenSSL_add_all_algorithms();
if (verify_all(&count, &total, args.certs, args.image) < 0) {

Loading…
Cancel
Save