summaryrefslogtreecommitdiff
path: root/sample/le-proxy.c
diff options
context:
space:
mode:
authorAzat Khuzhin <azat@libevent.org>2019-02-10 16:23:11 +0300
committerAzat Khuzhin <azat@libevent.org>2019-02-10 16:23:58 +0300
commit9c75c24caa7689c010864579e27b159665c8dd63 (patch)
treef1927df666ed30684005191765cb07da857984b3 /sample/le-proxy.c
parente7ff4ef2b4fc950a765008c18e74281cdb5e7668 (diff)
parent900f5c4503208c654c0e9ef64ac196c0deac5c18 (diff)
downloadlibevent-release-2.1.9-beta.tar.gz
Merge branch 'release-2.1.9-beta-pull' into patches-2.1release-2.1.9-beta
* release-2.1.9-beta-pull: Bump version to 2.1.9-beta everywhere Bump ChangeLog Bump AUTHORS section ... Tested on (cmake/autotools): - ubuntu - freebsd - osx - windows - netbsd - solaris - centos Closes: #744
Diffstat (limited to 'sample/le-proxy.c')
-rw-r--r--sample/le-proxy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sample/le-proxy.c b/sample/le-proxy.c
index 8d9b529e..73c48881 100644
--- a/sample/le-proxy.c
+++ b/sample/le-proxy.c
@@ -30,6 +30,7 @@
#include <event2/listener.h>
#include <event2/util.h>
+#include "util-internal.h"
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
@@ -194,6 +195,7 @@ accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
perror("Bufferevent_openssl_new");
bufferevent_free(b_out);
bufferevent_free(b_in);
+ return;
}
b_out = b_ssl;
}
@@ -259,7 +261,8 @@ main(int argc, char **argv)
if (use_ssl) {
int r;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
SSL_library_init();
ERR_load_crypto_strings();
SSL_load_error_strings();