Feature #101935
openBetter handling of curl error codes in linkvalidator
0%
Description
Unfortunately, one curl error codes may be used for several different problems, e.g.
1. Certificate does not have matching target host name
2. Missing intermediate certificate - incomplete certificate chain
The text which is displayed by command line curl / or using Guzzle with libcurl does contain a different text in this case, but the error code is still the same (60 for the examples above).
A number of error codes were localized and the internal linkvalidator text is displayed, not the full error message supplied by curl.
Solution¶
(preliminary ideas)
- We should find a way to make this configurable, so that the full curl error message will be displayed
- show both (e.g. show shorter, localized message by default and show full message as detail view
Info¶
- curl error codes: https://curl.se/libcurl/c/libcurl-errors.html
- curl source code: https://github.com/curl/curl
Examples¶
curl -LI "https://www.rea.ru" curl: (60) SSL certificate problem: unable to get local issuer certificate
curl -I https://t3coredev13 curl: (60) SSL: no alternative certificate subject name matches target host name 't3coredev13'
Updated by Sybille Peters about 1 year ago
e.g. for curl code 60, Guzzle / curl returns another code in ssl_verify_result:
handlerContext errno=60 error="SSL certificate problem: unable to get local issuer certificate" ssl_verify_result=20 ----- errno=60 "SSL: no alternative certificate subject name matches target host name 't3coredev13'" ssl_verify_result=1 -----
This matches the lists (e.g. for code 20):
- https://github.com/masonke/curl-info/blob/main/curlinfo_ssl_verifyresult_error_codes.txt
- https://github.com/onesignal/openssl/blob/main/include/openssl/x509_vfy.h
see also "Everything curl" by curl author: https://github.com/bagder/everything-curl