mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
Fix #1301 - use correct openssl version conditional for SSL_use_certificate_chain_file()
This commit is contained in:
1 parent
d9680df510
commit
4788db7e00
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -3701,7 +3701,7 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
||||
} else if ((rc = SSL_use_PrivateKey_file(tls->ssl, key, 1)) != 1) {
|
||||
mg_error(c, "Invalid SSL key, err %d", mg_tls_err(tls, rc));
|
||||
goto fail;
|
||||
#if OPENSSL_VERSION_NUMBER > 0x10002000L
|
||||
#if OPENSSL_VERSION_NUMBER > 0x10100000L
|
||||
} else if ((rc = SSL_use_certificate_chain_file(tls->ssl, opts->cert)) !=
|
||||
1) {
|
||||
mg_error(c, "Invalid CA, err %d", mg_tls_err(tls, rc));
|
||||
|
||||
@@ -287,7 +287,7 @@ void mg_tls_init(struct mg_connection *c, struct mg_tls_opts *opts) {
|
||||
} else if ((rc = SSL_use_PrivateKey_file(tls->ssl, key, 1)) != 1) {
|
||||
mg_error(c, "Invalid SSL key, err %d", mg_tls_err(tls, rc));
|
||||
goto fail;
|
||||
#if OPENSSL_VERSION_NUMBER > 0x10002000L
|
||||
#if OPENSSL_VERSION_NUMBER > 0x10100000L
|
||||
} else if ((rc = SSL_use_certificate_chain_file(tls->ssl, opts->cert)) !=
|
||||
1) {
|
||||
mg_error(c, "Invalid CA, err %d", mg_tls_err(tls, rc));
|
||||
|
||||
Reference in new issue
Block a user