2024-11-24 15:03 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002807Buildsystem[All Projects] Generalpublic2021-03-21 19:53
ReporterPICCORO Lenz McKAY 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
StatusnewResolutionopen 
Summary0002807: error: 'X509_V_ERR_HOSTNAME_MISMATCH' undeclared
Description
i try to build in a embebed system and got this error using curl 7.38

[ 168s] content/fetchers/curl.c: In function 'fetch_curl_store_certs_in_cache':
[ 168s] content/fetchers/curl.c:648:8: error: 'X509_V_ERR_HOSTNAME_MISMATCH' undeclared (first use in this function)
Steps To Reproducetry to build the webbrowser
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
Attached Files
  • patch file icon openssl-compat.patch (1,312 bytes) 2021-03-21 19:53 -
    Description: fix bug 0002807: error: 'X509_V_ERR_HOSTNAME_MISMATCH' undeclared
    Author: PICCORO Lenz McKAY <mckaygerhard@gmail.com>
    Origin: other, https://bugs.netsurf-browser.org/mantis/view.php?id=2807
    Bug: https://bugs.netsurf-browser.org/mantis/view.php?id=2807
    
    --- netsurf-3.10.orig/netsurf/content/fetchers/curl.c
    +++ netsurf-3.10/netsurf/content/fetchers/curl.c
    @@ -645,10 +645,11 @@ fetch_curl_store_certs_in_cache(struct c
     			chain.certs[depth].err = SSL_CERT_ERR_REVOKED;
     			break;
     
    +#if OPENSSL_VERSION_NUMBER > 0x10100000L
     		case X509_V_ERR_HOSTNAME_MISMATCH:
     			chain.certs[depth].err = SSL_CERT_ERR_HOSTNAME_MISMATCH;
     			break;
    -
    +#endif
     		default:
     			chain.certs[depth].err = SSL_CERT_ERR_UNKNOWN;
     			break;
    @@ -766,6 +767,7 @@ static int fetch_curl_cert_verify_callba
     {
     	struct curl_fetch_info *f = (struct curl_fetch_info *) parm;
     	int ok;
    +#if OPENSSL_VERSION_NUMBER > 0x10100000L
     	X509_VERIFY_PARAM *vparam;
     
     	/* Configure the verification parameters to include hostname */
    @@ -780,7 +782,9 @@ static int fetch_curl_cert_verify_callba
     	if (ok) {
     		ok = X509_STORE_CTX_set_app_data(x509_ctx, parm);
     	}
    -
    +#else
    +	ok = X509_STORE_CTX_set_app_data(x509_ctx, parm);
    +#endif
     	/* verify the certificate chain using standard call */
     	if (ok) {
     		ok = X509_verify_cert(x509_ctx);
    
    patch file icon openssl-compat.patch (1,312 bytes) 2021-03-21 19:53 +

-Relationships
+Relationships

-Notes
PICCORO Lenz McKAY

~0002322

PICCORO Lenz McKAY (reporter)

wheantime i just removed the case in curl.c to able to build iwth older curl libs:

--- netsurf-3.10.orig/netsurf/content/fetchers/curl.c
+++ netsurf-3.10/netsurf/content/fetchers/curl.c
@@ -645,10 +645,6 @@ fetch_curl_store_certs_in_cache(struct c
             chain.certs[depth].err = SSL_CERT_ERR_REVOKED;
             break;
 
- case X509_V_ERR_HOSTNAME_MISMATCH:
- chain.certs[depth].err = SSL_CERT_ERR_HOSTNAME_MISMATCH;
- break;
-
         default:
             chain.certs[depth].err = SSL_CERT_ERR_UNKNOWN;
             break;
PICCORO Lenz McKAY

~0002324

PICCORO Lenz McKAY (reporter)

fix and patch at https://bugs.netsurf-browser.org/mantis/view.php?id=2807#c2322 in issue 0002808
PICCORO Lenz McKAY

~0002325

PICCORO Lenz McKAY (reporter)

patch added, this fixed 0002807 and 0002807
+Notes

-Issue History
Date Modified Username Field Change
2021-03-21 06:47 PICCORO Lenz McKAY New Issue
2021-03-21 06:55 PICCORO Lenz McKAY Note Added: 0002322
2021-03-21 19:52 PICCORO Lenz McKAY Note Added: 0002324
2021-03-21 19:53 PICCORO Lenz McKAY File Added: openssl-compat.patch
2021-03-21 19:53 PICCORO Lenz McKAY Note Added: 0002325
+Issue History