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)

Patch

  • src/shrpx_ssl.cc

    old new  
    13711371    return ssl_ctx;
    13721372  }
    13731373
    1374 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
     1374#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10002000L
    13751375  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
    13771378  auto cert = load_certificate(tlsconf.cert_file.c_str());
    13781379  auto cert_deleter = defer(X509_free, cert);
    1379 #endif // OPENSSL_VERSION_NUMBER < 0x10002000L
     1380#endif // defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER <
     1381       // 0x10002000L
    13801382
    13811383  if (ssl::cert_lookup_tree_add_cert_from_x509(
    13821384          cert_tree, all_ssl_ctx.size() - 1, cert) == -1) {
     
    13971399                                );
    13981400    all_ssl_ctx.push_back(ssl_ctx);
    13991401
    1400 #if OPENSSL_VERSION_NUMBER >= 0x10002000L
     1402#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10002000L
    14011403    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
    14031406    auto cert = load_certificate(cert_file.c_str());
    14041407    auto cert_deleter = defer(X509_free, cert);
    1405 #endif // OPENSSL_VERSION_NUMBER < 0x10002000L
     1408#endif // defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER <
     1409       // 0x10002000L
    14061410
    14071411    if (ssl::cert_lookup_tree_add_cert_from_x509(
    14081412            cert_tree, all_ssl_ctx.size() - 1, cert) == -1) {