CURL.SetOptionSSLKeyBlob
------------------------

Set private key for client cert from memory blob.

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

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

**MBS**( **"CURL.SetOptionSSLKeyBlob";** /\* Set private key for client cert from memory blob. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The blob value.  
Either passed as text or passed as container value.e.g. MyTabel::MyCert \*/   
**$Encoding**) /\* Optional; The text encoding for value parameter when passing text.   
Default is UTF-8.e.g. "UTF8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | The blob value.   Either passed as text or passed as container value. | MyTabel::MyCert |  |
| Encoding | The text encoding for value parameter when passing text.    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 or error.

### Description

Set private key for client cert from memory blob.  
Pass text or container value, which contains a private key. Compatible with OpenSSL. The format (like "PEM") must be specified with [CURL.SetOptionSSLKeyType](CURLSetOptionSSLKeyType.md).  
  
This option is an alternative to [CURL.SetOptionSSLKey](CURLSetOptionSSLKey.md) which instead expects a file name as input.  
See also [SSLKEY\_BLOB](https://curl.haxx.se/libcurl/c/CURLOPT_SSLKEY_BLOB.html) option in CURL manual.

### Examples

Set SSL key with container field:

 Set Variable \[ $result ; Value: MBS ("CURL.SetOptionSSLKeyBlob"; $curl ; CURL Test::sslCert ) \]   
Set Variable \[ $result ; Value: MBS ("[CURL.SetOptionSSLKeyType](CURLSetOptionSSLKeyType.md)"; $curl ; "PEM") \]  
### See also

- [CURL.SetOptionCAInfoBlob](CURLSetOptionCAInfoBlob.md)
- [CURL.SetOptionProxySSLKeyBlob](CURLSetOptionProxySSLKeyBlob.md)
- [CURL.SetOptionSSLCert](CURLSetOptionSSLCert.md)
- [CURL.SetOptionSSLCertBlob](CURLSetOptionSSLCertBlob.md)
- [CURL.SetOptionSSLCertType](CURLSetOptionSSLCertType.md)
- [CURL.SetOptionSSLKey](CURLSetOptionSSLKey.md)
- [CURL.SetOptionSSLKeyType](CURLSetOptionSSLKeyType.md)
- [CURL.SetOptionSSLOptions](CURLSetOptionSSLOptions.md)
- [CURL.SetOptionSSLVersion](CURLSetOptionSSLVersion.md)

### Release notes

- **Version 11.2**
    - Fixed a problem in CURL with [CURL.SetOptionSSLKeyBlob](https://www.mbsplugins.eu/CURLSetOptionSSLKeyBlob.shtml) function not working correctly.
- **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.

### Blog Entries

- [MBS FileMaker Plugin, version 11.2pr1](https://www.mbsplugins.de/archive/2021-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.4pr4](https://www.mbsplugins.de/archive/2020-08-17/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.3pr6](https://www.mbsplugins.de/archive/2020-06-25/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 24th June 2020 , last changed 24th August 2022

  
[CURL.SetOptionSSLKey](CURLSetOptionSSLKey.md) - [CURL.SetOptionSSLKeyType](CURLSetOptionSSLKeyType.md)

[HTML Version](CURLSetOptionSSLKeyBlob.shtml)