patch-lib_vtls_openssl_c 892 B

1234567891011121314151617181920212223242526272829303132
  1. $OpenBSD: patch-lib_vtls_openssl_c,v 1.3 2018/02/15 22:13:20 sthen Exp $
  2. Index: lib/vtls/openssl.c
  3. --- lib/vtls/openssl.c.orig
  4. +++ lib/vtls/openssl.c
  5. @@ -117,12 +117,7 @@
  6. #define X509_get0_notBefore(x) X509_get_notBefore(x)
  7. #define X509_get0_notAfter(x) X509_get_notAfter(x)
  8. #define CONST_EXTS /* nope */
  9. -#ifdef LIBRESSL_VERSION_NUMBER
  10. -static unsigned long OpenSSL_version_num(void)
  11. -{
  12. - return LIBRESSL_VERSION_NUMBER;
  13. -}
  14. -#else
  15. +#ifndef LIBRESSL_VERSION_NUMBER
  16. #define OpenSSL_version_num() SSLeay()
  17. #endif
  18. #endif
  19. @@ -3527,7 +3522,11 @@ static size_t Curl_ossl_version(char *buffer, size_t s
  20. unsigned long ssleay_value;
  21. sub[2]='\0';
  22. sub[1]='\0';
  23. +#ifdef LIBRESSL_VERSION_NUMBER
  24. + ssleay_value = LIBRESSL_VERSION_NUMBER;
  25. +#else
  26. ssleay_value = OpenSSL_version_num();
  27. +#endif
  28. if(ssleay_value < 0x906000) {
  29. ssleay_value = SSLEAY_VERSION_NUMBER;
  30. sub[0]='\0';