Ticket #51791: patch-src-shrpx_ssl.cc.diff
File patch-src-shrpx_ssl.cc.diff, 1.6 KB (added by iamGavinJ (GΛVĪN), 8 years ago) |
---|
-
src/shrpx_ssl.cc
old new 1371 1371 return ssl_ctx; 1372 1372 } 1373 1373 1374 #if OPENSSL_VERSION_NUMBER >= 0x10002000L1374 #if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10002000L 1375 1375 auto cert = SSL_CTX_get0_certificate(ssl_ctx); 1376 #else // OPENSSL_VERSION_NUMBER < 0x10002000L 1376 #else // defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 1377 // 0x10002000L 1377 1378 auto cert = load_certificate(tlsconf.cert_file.c_str()); 1378 1379 auto cert_deleter = defer(X509_free, cert); 1379 #endif // OPENSSL_VERSION_NUMBER < 0x10002000L 1380 #endif // defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 1381 // 0x10002000L 1380 1382 1381 1383 if (ssl::cert_lookup_tree_add_cert_from_x509( 1382 1384 cert_tree, all_ssl_ctx.size() - 1, cert) == -1) { … … 1397 1399 ); 1398 1400 all_ssl_ctx.push_back(ssl_ctx); 1399 1401 1400 #if OPENSSL_VERSION_NUMBER >= 0x10002000L1402 #if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10002000L 1401 1403 auto cert = SSL_CTX_get0_certificate(ssl_ctx); 1402 #else // OPENSSL_VERSION_NUMBER < 0x10002000L 1404 #else // defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 1405 // 0x10002000L 1403 1406 auto cert = load_certificate(cert_file.c_str()); 1404 1407 auto cert_deleter = defer(X509_free, cert); 1405 #endif // OPENSSL_VERSION_NUMBER < 0x10002000L 1408 #endif // defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 1409 // 0x10002000L 1406 1410 1407 1411 if (ssl::cert_lookup_tree_add_cert_from_x509( 1408 1412 cert_tree, all_ssl_ctx.size() - 1, cert) == -1) {