Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.SetOptionUseSSL
Sets whether to use SSL for next transfers.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
(old name: CURL.SetOptionFTPSSL)
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | The new SSL setting. | 3 |
Result
Returns "OK" on success.
Description
Sets whether to use SSL for next transfers.Pass a number using one of the values from below, to make libcurl use your desired level of SSL for the FTP transfer.
None | 0 | Don't attempt to use SSL. |
Try | 1 | Try using SSL, proceed as normal otherwise. |
Control | 2 | Require SSL for the control connection or fail with CURLE_USE_SSL_FAILED. |
All | 3 | Require SSL for all communication or fail with CURLE_USE_SSL_FAILED. |
Even as this function used to have FTP in name, we also use it for email sending. So the email upload starts unencrypted and we use TLS to upgrade to an SSL connection.
See also USE_SSL option in CURL manual.
Examples
Set to use SSL:
$r = MBS( "CURL.SetOptionUseSSL"; $curl; 3 )
Set to use TLSv1.2:
Set Variable [$r; MBS( "CURL.SetOptionUseSSL"; $curl; 3 ) ]
Set Variable [$r; MBS( "CURL.SetOptionSSLVersion"; $curl; 6 ) ]
Set URL for Gmail imap server:
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; "imaps://imap.gmail.com/INBOX")]
Set Variable [$r; Value:MBS("CURL.SetOptionUseSSL"; $curl; 3)]
Query emails via POP3 from GMail:
Set Variable [ $curl ; Value: MBS("CURL.New") ]
# use pop3s for SSL ehre
Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; "pop3s://pop.gmail.com/") ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionUserName"; $curl; EmailClient::Username) ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionPassword"; $curl; EmailClient::Password) ]
# set custom port. 995 is default for pop3 over SSL, so no need to set it
// Set Variable [ $r ; Value: MBS("CURL.SetOptionPort"; $curl; 995) ]
# we need TLS v1.2
Set Variable [ $r ; Value: MBS("CURL.SetOptionUseSSL"; $curl; 3) ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionSSLVersion"; $curl; 6) ]
# and 10 second timeout
Set Variable [ $r ; Value: MBS("CURL.SetOptionConnectionTimeout"; $curl; 10) ]
See also
- CURL.New
- CURL.SetOptionConnectionTimeout
- CURL.SetOptionGet
- CURL.SetOptionNetRC
- CURL.SetOptionPassword
- CURL.SetOptionUpload
- CURL.SetOptionURL
- CURL.SetOptionUserName
- SendMail.PrepareCURL
- SendMail.SetSMTPServer
Example Databases
- CURL/Email/Batch Emailer
- CURL/Email/Build and send Email
- CURL/Email/Build and send HTML Email with inline graphics
- CURL/Email/IMAP Email List
- CURL/Email/IMAP Email Upload
- CURL/FTP/CURL FTP Directory Listing
- CURL/FTP/CURL FTP Download all Files in Directory
- CURL/FTP/CURL FTP Upload File
- CURL/FTP/CURL FTP Upload from file with Progress
- CURL/FTP/CURL FTP Upload
Blog Entries
- SFTP Upload with temporary file
- SMTP with OAuth for Office 365 in FileMaker
- Sending email with a huge custom function
- GMail for emails with MBS Plugin
- Translating Insert from URL options for CURL to MBS Plugin calls
- Email Script for FileMaker
- Upload email to Sent folder via IMAP
- Sending emails in FileMaker with MBS Plugin
- Sending Email with FileMaker via MBS Plugin
FileMaker Magazin
Created 18th August 2014, last changed 16th March 2022