Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Read certificate from system and installs them in CURL session,.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 7.2 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Returns number or error.
Enable system certificates:
Set Variable [$result; Value:MBS("CURL.UseSystemCertificates"; $curl)]
Set Variable [$result; Value:MBS("CURL.SetOptionSSLVerifyPeer"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionSSLVerifyHost"; $curl; 2 )]
Do download with TLS and system certificates:
# Start new session
Set Variable [ $curl ; Value: MBS("CURL.New") ]
# Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
Set Variable [ $result ; Value: MBS("CURL.SetOptionURL"; $curl; CURL Test::URL) ]
# Use system certificate store for TLS
Set Variable [ $result ; Value: MBS( "CURL.UseSystemCertificates"; $curl ) ]
# RUN now
Set Field [ CURL Test::Result ; MBS("CURL.Perform"; $curl) ]
# Check result
Set Field [ CURL Test::Text ; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
Set Field [ CURL Test::debug ; MBS("CURL.GetDebugMessages"; $curl) ]
# Cleanup
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]
This function checks for a license.
Created 19th March 2017, last changed 3th January 2023