Hey,
On Fri, Nov 4, 2022 at 6:31 PM Bruce Clay <
bcla...@gmail.com> wrote:
>
> Francois & Robert:
>
> Sorry for the delay. I have been rather swamped. Hopefully I updated everything correctly. I believe the error message changed with that update but still does not load with https
>
> Current error message is
>
> libcurl error responseCode = 1, Unsupported protocol
> * Trying 146.75.81.91:443...
> * Connected to
a.tile.openstreetmap.org (146.75.81.91) port 443 (#0)
> * ALPN, offering http/1.1
> * SSL certificate problem: unable to get local issuer certificate
Now that's a slightly more deterministic error message.
That's essentially saying it cannot find the CA bundle (OpenSSL) or
your CA bundle is too old.
The issuer's certificate is very recent (2022 Q3) so any slightly
obsolete bundle will not have it:
"issuer=C = BE, O = GlobalSign nv-sa, CN = GlobalSign Atlas R3 DV TLS
CA 2022 Q3"
I tried on an old Linux system ( ca-certificates-2022.2.54-1.2.fc35.noarch ):
$ openssl s_client -CApath /etc/ssl/certs/ -connect
a.tile.openstreetmap.org:443
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3390 bytes and written 398 bytes
Verification error: unable to get local issuer certificate
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
---
then on an updated Linux system ( ca-certificates-2022.2.54-5.fc37.noarch ):
$ openssl s_client -CApath /etc/ssl/certs/ -connect
a.tile.openstreetmap.org:443
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3390 bytes and written 408 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
Now I don't know why the curl project does not provide Windows
binaries compiled against Schannel, but on the other hand, they do
provide a libcurl built against OpenSSL with a CA bundle.
I therefore tried openssl using curl's CA bundle (note -CAfile vs -CApath):
curl-7.86.0_1-win64-mingw]$ openssl s_client -CAfile
bin/curl-ca-bundle.crt -connect
a.tile.openstreetmap.org:443
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 3390 bytes and written 398 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
Success!
So here is what I suggest:
Step #1:
Download "curl for 64-bit" (Windows) there:
https://curl.se/windows/
Essentially this:
https://curl.se/windows/dl-7.86.0_1/curl-7.86.0_1-win64-mingw.zip
This seems to be an OpenSSL build, complete with a curl-ca-bundle.crt (in bin).
Please rebuild vsgXchange using these downloaded (lib)curl binaries.
Step #2
Add the following (
https://curl.se/libcurl/c/CURLINFO_CAINFO.html ):
curl_easy_getinfo(curl, CURLINFO_CAINFO, &cainfo);
if(cainfo)
printf("default ca info path: %s\n", cainfo);
}
If there is a default path: copy the CA bundle (from curl's bin) to
the default CA path determined above.
Otherwise add (
https://curl.se/libcurl/c/CURLOPT_CAINFO.html ):
curl_easy_setopt(curl, CURLOPT_CAINFO, "C:\path\to\your\bundle");
Step #3
Retry :)
Bruce, thanks for your patience. I'm totally working blind here, I
don't have Windows.
I think that using the curl project provided binaries and their
enclosed CA bundle is the way to go.
IMHO this is not vsgXchange's problem. The system should be setup to
work properly, but it's really hard on Windows...
François
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/vsg-users/CAHemx53er5cUjyWEQdQfcOmoDG5f3hytZ3Cky972xndc0NaJ6A%40mail.gmail.com.