Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP1
qpid-proton
qpid-proton-openssl-3.0.0.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qpid-proton-openssl-3.0.0.patch of Package qpid-proton
Index: qpid-proton-0.31.0/c/src/ssl/openssl.c =================================================================== --- qpid-proton-0.31.0.orig/c/src/ssl/openssl.c 2020-06-03 18:25:09.020577060 +0200 +++ qpid-proton-0.31.0/c/src/ssl/openssl.c 2020-06-03 18:26:10.217016007 +0200 @@ -702,7 +702,7 @@ int pn_ssl_domain_set_trusted_ca_db(pn_s if (!domain) return -1; // certificates can be either a file or a directory, which determines how it is passed - // to SSL_CTX_load_verify_locations() + // to SSL_CTX_load_verify_*() struct stat sbuf; if (stat( certificate_db, &sbuf ) != 0) { ssl_log(NULL, PN_LEVEL_ERROR, "stat(%s) failed: %s", certificate_db, strerror(errno)); @@ -719,10 +719,24 @@ int pn_ssl_domain_set_trusted_ca_db(pn_s file = certificate_db; } +#if defined(OPENSSL_VERSION_MAJOR) && OPENSSL_VERSION_MAJOR >= 3 + if (dir) { + if (SSL_CTX_load_verify_dir( domain->ctx, dir ) != 1) { + ssl_log_error("SSL_CTX_load_verify_dir( %s ) failed", certificate_db); + return -1; + } + } else { + if (SSL_CTX_load_verify_file( domain->ctx, file ) != 1) { + ssl_log_error("SSL_CTX_load_verify_file( %s ) failed", certificate_db); + return -1; + } + } +#else if (SSL_CTX_load_verify_locations( domain->ctx, file, dir ) != 1) { ssl_log_error("SSL_CTX_load_verify_locations( %s ) failed", certificate_db); return -1; } +#endif return 0; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor