summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/becat.c4
-rw-r--r--sample/le-proxy.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sample/becat.c b/sample/becat.c
index c6daf90a..501690da 100644
--- a/sample/becat.c
+++ b/sample/becat.c
@@ -188,7 +188,7 @@ static void ssl_ctx_free(struct ssl_context *ssl)
static int ssl_load_key(struct ssl_context *ssl)
{
int err = 1;
-#if OPENSSL_VERSION_MAJOR >= 3
+#if OPENSSL_VERSION_NUMBER >= 0x30000000
ssl->pkey = EVP_RSA_gen(4096);
err = ssl->pkey == NULL;
#else
@@ -391,7 +391,7 @@ static void be_ssl_errors(struct bufferevent *bev)
while ((err = bufferevent_get_openssl_error(bev))) {
const char *msg = ERR_reason_error_string(err);
const char *lib = ERR_lib_error_string(err);
-#if OPENSSL_VERSION_MAJOR >= 3
+#if OPENSSL_VERSION_NUMBER >= 0x30000000
error("ssl/err=%d/%s in %s\n", err, msg, lib);
#else
const char *func = ERR_func_error_string(err);
diff --git a/sample/le-proxy.c b/sample/le-proxy.c
index 881d3a59..1aa7d648 100644
--- a/sample/le-proxy.c
+++ b/sample/le-proxy.c
@@ -113,7 +113,7 @@ eventcb(struct bufferevent *bev, short what, void *ctx)
ERR_reason_error_string(err);
const char *lib = (const char*)
ERR_lib_error_string(err);
-#if OPENSSL_VERSION_MAJOR >= 3
+#if OPENSSL_VERSION_NUMBER >= 0x30000000
fprintf(stderr,
"%s in %s\n", msg, lib);
#else