SyntaxBomb - Indie Coders
Languages & Coding => BlitzMax / BlitzMax NG => Brucey's Modules => Topic started by: nokkusuu on June 02, 2018, 18:48:05
When using libcurl (newest version, should support TLS) I get an error saying BADCERT_NOT_TRUSTED.
Executing:test.debug.exe
* Rebuilt URL to: https://www.google.com/
* Trying 172.217.4.196...
* TCP_NODELAY set
* Connected to www.google.com (172.217.4.196) port 443 (#0)
* mbedTLS: Connecting to www.google.com:443
* mbedTLS: Set min SSL version to TLS 1.0
* mbedTLS: Handshake complete, cipher is TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
* Cert verify failed: BADCERT_NOT_TRUSTED
* Closing connection 0
Process complete
I'm no expert with this stuff, so I'm very confused. Any help is appreciated.
Hi,
You need to provide libcurl with certificates it can validate against. Have a look at ex_08.bmx in the examples folder, which shows how to connect to google.com over https.
The other option is not to validate, but you'd typically not want to do that.
I don't see an ex_08.bmx. I'm using the latest version from GitHub; is there a newer version elsewhere?
EDIT: Nevermind, I found an example in an older version of libcurlssl, with the name ex_08.bmx. I assume that's the file you were referring to. Works well now, thanks!
nokkusuu is right, ex_08.bmx is no longer in the repository.
bye
Ron
Apologies, the example was missing from the current module.