1 --- a/deps/neverbleed/neverbleed.c
2 +++ b/deps/neverbleed/neverbleed.c
7 +#include <openssl/engine.h>
8 #include <openssl/rand.h>
9 #include <openssl/ssl.h>
10 #include <openssl/rsa.h>
11 --- a/deps/picotls/lib/openssl.c
12 +++ b/deps/picotls/lib/openssl.c
14 #include <openssl/evp.h>
15 #include <openssl/objects.h>
16 #include <openssl/rand.h>
17 +#include <openssl/rsa.h>
18 #include <openssl/x509.h>
19 #include <openssl/x509v3.h>
20 #include <openssl/x509_vfy.h>
21 @@ -941,7 +942,7 @@ int ptls_openssl_encrypt_ticket(ptls_buf
25 - EVP_CIPHER_CTX_cleanup(cctx);
26 + EVP_CIPHER_CTX_reset(cctx);
30 @@ -1011,7 +1012,7 @@ int ptls_openssl_decrypt_ticket(ptls_buf
34 - EVP_CIPHER_CTX_cleanup(cctx);
35 + EVP_CIPHER_CTX_reset(cctx);
42 #include <sys/types.h>
45 +#include <openssl/dh.h>
46 #include <openssl/crypto.h>
47 #include <openssl/err.h>
48 #include <openssl/ssl.h>
49 @@ -1827,7 +1828,7 @@ static h2o_iovec_t on_extra_status(void
50 " \"listeners\": %zu,\n"
51 " \"worker-threads\": %zu,\n"
52 " \"num-sessions\": %lu",
53 - SSLeay_version(SSLEAY_VERSION), current_time, restart_time, (uint64_t)(now - conf.launch_time), generation,
54 + OpenSSL_version(OPENSSL_VERSION), current_time, restart_time, (uint64_t)(now - conf.launch_time), generation,
55 num_connections(0), conf.max_connections, conf.num_listeners, conf.num_threads, num_sessions(0));
56 assert(ret.len < BUFSIZE);
58 @@ -2008,7 +2009,7 @@ int main(int argc, char **argv)
61 printf("h2o version " H2O_VERSION "\n");
62 - printf("OpenSSL: %s\n", SSLeay_version(SSLEAY_VERSION));
63 + printf("OpenSSL: %s\n", OpenSSL_version(OPENSSL_VERSION));
66 "mruby: YES\n"); /* TODO determine the way to obtain the version of mruby (that is being linked dynamically) */
69 @@ -911,6 +911,7 @@ void ssl_setup_session_resumption(SSL_CT
73 +#if OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)
74 static pthread_mutex_t *mutexes;
76 static void lock_callback(int mode, int n, const char *file, int line)
77 @@ -937,9 +938,11 @@ static int add_lock_callback(int *num, i
79 return __sync_add_and_fetch(num, amount);
83 void init_openssl(void)
85 +#if OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)
86 int nlocks = CRYPTO_num_locks(), i;
87 mutexes = h2o_mem_alloc(sizeof(*mutexes) * nlocks);
88 for (i = 0; i != nlocks; ++i)
89 @@ -953,6 +956,7 @@ void init_openssl(void)
90 SSL_load_error_strings();
92 OpenSSL_add_all_algorithms();
95 cache_init_defaults();
96 #if H2O_USE_SESSION_TICKETS