Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

CURLSMBS.SetPathCAInfo(path as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 10.0 Yes Yes Yes Yes No
Function: A path holding one or more certificates to verify the peer with.
Example:
dim cacert as FolderItem // your cacert.pem file
dim CURL as new CURLMBS
CURL.OptionSSLVerifyHost = 2 // verify server
CURL.OptionSSLVerifyPeer = 1 // proofs certificate is authentic
CURL.SetPathCAInfo cacert
Notes:
This makes sense only when used in combination with the OptionSSLVerifyPeer option. If OptionSSLVerifyPeer is false, OptionCAINFO need not even indicate an accessible file.

Note that option is by default set to the system path where libCURL's cacert bundle is assumed to be stored, as established at build time.

The Lasterror property is set. 0 for success.
You can set this value and later you can read it, but you cannot read the default value.

Feedback, Comments & Corrections

CURLSMBS.SetPathCAPath(path as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 10.0 Yes Yes Yes Yes No
Function: A path to the directory holding multiple CA certificates to verify the peer with.
Notes:
The certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the CURLOPT_SSL_VERIFYPEER option. If OptionSSLVerifyPeer is zero, OptionCAPath need not even indicate an accessible path. The OptionCAPath function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libCURL is built to use GnuTLS.

The Lasterror property is set. 0 for success.
You can set this value and later you can read it, but you cannot read the default value.

Feedback, Comments & Corrections

CURLSMBS.SetPathCRLFile(path as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 10.0 Yes Yes Yes Yes No
Function: Sets the path with the concatenation of CRL (in PEM format) to use in the certificate validation that occurs during the SSL exchange.
Notes:
When CURL is built to use NSS or GnuTLS, there is no way to influence the use of CRL passed to help in the verification process. When libCURL is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all the elements of the certificate chain if a CRL file is passed.

This option makes sense only when used in combination with the OptionSSLVerifyPeer option.

A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned when the SSL exchange fails because the CRL file cannot be loaded. Note that a failure in certificate verification due to a revocation information found in the CRL does not trigger this specific error. (Added in 7.19.0)

Feedback, Comments & Corrections

CURLSMBS.SetPathIssuerCert(path as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 10.0 Yes Yes Yes Yes No
Function: Sets the path to a CA certificate in PEM format.
Notes:
If the option is set, an additional check against the peer certificate is performed to verify the issuer is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where one needs to enforce that the peer certificate is from a specific branch of the tree.

This option makes sense only when used in combination with the OptionSSLVerifyPeer option. Otherwise, the result of the check is not considered as failure.

A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, which is returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate (OptionSSLVerifyPeer has to be set too for the check to fail). (Added in 7.19.0)

Feedback, Comments & Corrections

CURLSMBS.SetPathNetRCFile(path as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 10.0 Yes Yes Yes Yes No
Function: Sets the path to the file you want libCURL to use as .netrc file.
Notes:
If this option is omitted, and OptionNETRC is set, libCURL will attempt to find the a .netrc file in the current user's home directory. (Added in 7.10.9)

The Lasterror property is set. 0 for success.
You can set this value and later you can read it, but you cannot read the default value.

Feedback, Comments & Corrections

CURLSMBS.SetupEmail(email as Variant) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CURL MBS CURL Plugin 14.3 Yes Yes Yes Yes No
Function: Setups existing CURL session for an email transfer.
Example:
dim e as new CURLEmailMBS

e.SetFrom "test@test.test", "Christian Müller"
e.Subject = "Hello World ☺️"
e.SMTPPassword = "xxx"
e.SMTPUsername = "xxx"
e.SetServer "smtp.test.test", true
e.AddTo "test@test.test", "Test Müller"
e.PlainText = "Hello World," + EndOfLine + "Smilies: ☺️ 😘 😄"

dim c as new CURLSMBS

if c.SetupEmail(e) then

dim er as Integer = c.Perform
if er = 0 then
MsgBox "Email sent"
end if
end if
Notes:
You can set your own settings like proxy after this function call.
If you like you can reuse the email and CURL objects after you sent an email, change values and send another email.
Returns true on success or false on failure.

Feedback, Comments & Corrections

Previous items

The items on this page are in the following plugins: MBS CURL Plugin.




Links
MBS Xojo Plugins