So, to keep everyone informed, here's an update:
Strict
Const CURLOPT_VERBOSE = 41
Const CURLOPT_POST = 47
Const CURLOPT_URL = 10002
Const CURLOPT_WRITEFUNCTION = 20011
Const CURLOPT_CAINFO = 10065
Global libcurl=LoadLibraryA("libcurl-4.dll")
'CURL_EXTERN CURL *curl_easy_init(void);
Global curl_easy_init:Byte Ptr()"win32" = getProcAddress(libcurl, "curl_easy_init")
'CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
Global curl_easy_setopt_int:Int(curl:Byte Ptr, curlOption:Int, val:Int)"win32" = getProcAddress(libcurl, "curl_easy_setopt")
Global curl_easy_setopt_str:Int(curl:Byte Ptr, curlOption:Int, val:String)"win32" = getProcAddress(libcurl, "curl_easy_setopt")
Global curl_easy_setopt_ptr:Int(curl:Byte Ptr, curlOption:Int, val:Byte Ptr)"win32" = getProcAddress(libcurl, "curl_easy_setopt")
'CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
Global curl_easy_perform:Int(curl:Byte Ptr)"win32" = getProcAddress(libcurl, "curl_easy_perform")
'CURL_EXTERN void curl_easy_cleanup(CURL *curl);
Global curl_easy_cleanup(curl:Byte Ptr)"win32" = getProcAddress(libcurl, "curl_easy_cleanup")
Local easyhandle:Byte Ptr = curl_easy_init()
curl_easy_setopt_int(easyhandle, CURLOPT_VERBOSE, 1)
' put the .crt file in your runtime dir
curl_easy_setopt_ptr(easyhandle, CURLOPT_CAINFO, "curl-ca-bundle.crt".toCString())
curl_easy_setopt_int(easyhandle, CURLOPT_POST, 0)
curl_easy_setopt_ptr(easyhandle, CURLOPT_URL, "url")
Local success:Int = curl_easy_perform(easyhandle)
Using this to connect to an ordinary http:// address seems to work, and the return stuff is put in the console. It is getting sent to stdout or stderr, I guess. I don't know how to capture that back into BMax, but I presume there is a way.
Using this to connect to https:// gives an unhandled memory exception error on curl_easy_perform, and I don't know why.