CURL.SetOptionIssuerCert
------------------------

Sets the file path for the CA certificate in PEM format.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionIssuerCert"; curl; Value { ; Encoding } ) 

**MBS**( **"CURL.SetOptionIssuerCert";** /\* Sets the file path for the CA certificate in PEM format. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The CA certificate file path.e.g. "/tmp/cert.pem" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is UTF-8.e.g. "UTF8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | The CA certificate file path. | "/tmp/cert.pem" |  |
| Encoding | The text encoding for text parameter.    Default is UTF-8.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "UTF8" | Optional |

### Result

Returns "OK" on success.

### Description

Sets the file path for the CA certificate in PEM format.   
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 [CURL.SetOptionSSLVerifyPeer](CURLSetOptionSSLVerifyPeer.md) 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 ([CURL.SetOptionSSLVerifyPeer](CURLSetOptionSSLVerifyPeer.md) has to be set too for the check to fail).  
  
Starting with version 8.0 the plugin will always use UTF-8 encoding for file path on Linux and macOS. For macOS we also do the unicode character normalization for file names for you.  
  
See [CURL.SetOptionIssuerCertBlob](CURLSetOptionIssuerCertBlob.md) to pass certificate as container or text.  
See also [ISSUERCERT](https://curl.haxx.se/libcurl/c/CURLOPT_ISSUERCERT.html) option in CURL manual.

### See also

- [CURL.SetOptionDNSServers](CURLSetOptionDNSServers.md)
- [CURL.SetOptionIssuerCertBlob](CURLSetOptionIssuerCertBlob.md)
- [CURL.SetOptionProxyIssuerCert](CURLSetOptionProxyIssuerCert.md)
- [CURL.SetOptionReferer](CURLSetOptionReferer.md)
- [CURL.SetOptionSSLCert](CURLSetOptionSSLCert.md)
- [CURL.SetOptionSSLVerifyPeer](CURLSetOptionSSLVerifyPeer.md)
- [CURL.SetOptionTransferText](CURLSetOptionTransferText.md)
- [CURL.SetOptionUserAgent](CURLSetOptionUserAgent.md)

### Release notes

- **Version 10.4**
    - Changed [CURL.SetOptionIssuerCertBlob](https://www.mbsplugins.eu/CURLSetOptionIssuerCertBlob.shtml), [CURL.SetOptionProxyIssuerCert](https://www.mbsplugins.eu/CURLSetOptionProxyIssuerCert.shtml), [CURL.SetOptionProxyIssuerCertBlob](https://www.mbsplugins.eu/CURLSetOptionProxyIssuerCertBlob.shtml), [CURL.SetOptionProxySSLCertBlob](https://www.mbsplugins.eu/CURLSetOptionProxySSLCertBlob.shtml), [CURL.SetOptionProxySSLKeyBlob](https://www.mbsplugins.eu/CURLSetOptionProxySSLKeyBlob.shtml), [CURL.SetOptionSSLCertBlob](https://www.mbsplugins.eu/CURLSetOptionSSLCertBlob.shtml) and [CURL.SetOptionSSLKeyBlob](https://www.mbsplugins.eu/CURLSetOptionSSLKeyBlob.shtml) to replace line endings for keys to LF if needed.
- **Version 10.3**
    - Added [CURL.SetOptionIssuerCertBlob](https://www.mbsplugins.eu/CURLSetOptionIssuerCertBlob.shtml), [CURL.SetOptionProxyIssuerCert](https://www.mbsplugins.eu/CURLSetOptionProxyIssuerCert.shtml), [CURL.SetOptionProxyIssuerCertBlob](https://www.mbsplugins.eu/CURLSetOptionProxyIssuerCertBlob.shtml), [CURL.SetOptionProxySSLCertBlob](https://www.mbsplugins.eu/CURLSetOptionProxySSLCertBlob.shtml), [CURL.SetOptionProxySSLKeyBlob](https://www.mbsplugins.eu/CURLSetOptionProxySSLKeyBlob.shtml), [CURL.SetOptionSSLCertBlob](https://www.mbsplugins.eu/CURLSetOptionSSLCertBlob.shtml) and [CURL.SetOptionSSLKeyBlob](https://www.mbsplugins.eu/CURLSetOptionSSLKeyBlob.shtml) functions.
- **Version 8.0**
    - Changed [CURL.SetOptionCAINFO](http://www.mbsplugins.eu/CURLSetOptionCAINFO.shtml), [CURL.SetOptionCAPATH](http://www.mbsplugins.eu/CURLSetOptionCAPATH.shtml), [CURL.SetOptionCookieFile](http://www.mbsplugins.eu/CURLSetOptionCookieFile.shtml), [CURL.SetOptionCookieJar](http://www.mbsplugins.eu/CURLSetOptionCookieJar.shtml), [CURL.SetOptionIssuerCert](http://www.mbsplugins.eu/CURLSetOptionIssuerCert.shtml), [CURL.SetOptionNETRCFile](http://www.mbsplugins.eu/CURLSetOptionNETRCFile.shtml), [CURL.SetOptionRandomFile](http://www.mbsplugins.eu/CURLSetOptionRandomFile.shtml), [CURL.SetOptionSSHPrivateKeyfile](http://www.mbsplugins.eu/CURLSetOptionSSHPrivateKeyfile.shtml), [CURL.SetOptionSSHPublicKeyfile](http://www.mbsplugins.eu/CURLSetOptionSSHPublicKeyfile.shtml), [CURL.SetOptionSSLCert](http://www.mbsplugins.eu/CURLSetOptionSSLCert.shtml), [CURL.SetOptionSSLKey](http://www.mbsplugins.eu/CURLSetOptionSSLKey.shtml) to use always UTF-8 on Mac/Linux and on Mac do the unicode transformation for decomposed characters to avoid trouble with special characters in file paths.

### Blog Entries

- [MBS FileMaker Plugin, version 7.6pr3](https://www.mbsplugins.de/archive/2017-12-13/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 25th June 2020

  
[CURL.SetOptionInterface](CURLSetOptionInterface.md) - [CURL.SetOptionIssuerCertBlob](CURLSetOptionIssuerCertBlob.md)

[HTML Version](CURLSetOptionIssuerCert.shtml)