Compatability fixes for OpenSSL 1.1

This commit is contained in:
Iwan Timmer
2017-04-26 20:00:09 +02:00
parent 415c2efe87
commit d46fe49c57
4 changed files with 8 additions and 5 deletions

View File

@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <openssl/crypto.h>
#include <openssl/pem.h>
#include <openssl/conf.h>
#include <openssl/pkcs12.h>
@@ -42,7 +43,7 @@ CERT_KEY_PAIR mkcert_generate() {
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
SSLeay_add_all_algorithms();
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
mkcert(&x509, &pkey, NUM_BITS, SERIAL, NUM_YEARS);
@@ -54,7 +55,6 @@ CERT_KEY_PAIR mkcert_generate() {
#endif
CRYPTO_cleanup_all_ex_data();
CRYPTO_mem_leaks(bio_err);
BIO_free(bio_err);
return (CERT_KEY_PAIR) {x509, pkey, p12};