Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

CURL.SetOptionSSLVersion

Sets which version of SSL/TLS to attempt to use.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 2.5 Yes Yes Yes Yes Yes
MBS( "CURL.SetOptionSSLVersion"; curl; Value )   More

Parameters

Parameter Description Example value
curl The CURL session handle. $curl
Value Pass number from 0 to 7. 0

Result

Returns "OK" on success.

Description

Sets which version of SSL/TLS to attempt to use.
The available options are:
Default0The default action. This will attempt to figure out the remote SSL protocol version, i.e. either SSLv3 or TLSv1 (but not SSLv2, which became disabled by default with 7.18.1).
TLSv11Force TLSv1.x
SSLv22Force SSLv2
SSLv33Force SSLv3
TLSv1.04Force TLSv1.0
TLSv1.15Force TLSv1.1
TLSv1.26Force TLSv1.2
TLSv1.37Force TLSv1.3

See also SSLVERSION option in CURL manual.

Examples

SMTP via SSL without TLS:

$r = MBS( "CURL.SetOptionSSLVersion"; $curl; 3 )
$r = MBS( "CURL.SetOptionPort"; $curl; 25 )

Set to use TLSv1.2:

Set Variable [$r; MBS( "CURL.SetOptionUseSSL"; $curl; 3 ) ]
Set Variable [$r; MBS( "CURL.SetOptionSSLVersion"; $curl; 6 ) ]

Do FTPS by using FTP and upgrade to TLS:

# 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; "ftp://ftp.christians-software.de/") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUsername"; $curl; "12144-test") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionPassword"; $curl; "qr\"8km3%Eu\"7") ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionConnectionTimeout"; $curl; 10) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionSSLVersion"; $curl; 1) // want TLS v1.0 or better ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUseSSL"; $curl; 3) // require SSL ]
# 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.GetDebugAsText"; $curl) ]
# Cleanup
Set Variable [ $result ; Value: MBS("CURL.Cleanup"; $curl) ]

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 28th October 2018


CURL.SetOptionSSLVerifyStatus   -   CURL.SetOptionServiceName

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins