Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets the password for the SSL or SSH private key.

Component Version macOS Windows Linux Server iOS SDK
CURL 2.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionKeyPassword"; curl; Value { ; Encoding } )   More

(old name: CURL.SetOptionSSLCertPassword)

(old name: CURL.SetOptionSSLKeyPassword)


Parameter Description Example Flags
curl The CURL session handle. $curl
Value The password text. "hello"
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.
"UTF8" Optional


Returns "OK" on success.


Sets the password for the SSL or SSH private key.
Pass a string as parameter. It will be used as the password required to use the CURL.SetOptionSSLKey private key. You never needed a pass phrase to load a certificate but you need one to load your private key.

See also KEYPASSWD option in CURL manual.


Set a client SSL certificate:

Set Variable [$r; Value:MBS("CURL.SetOptionSSLCert"; $curl; "/some/certfile.pem")]
Set Variable [$r; Value:MBS("CURL.SetOptionSSLCertType"; $curl; "PEM")]
Set Variable [$r; Value:MBS("CURL.SetOptionKeyPassword"; $curl; "secret")]

See also

Blog Entries

Created 18th August 2014, last changed 18th April 2016

CURL.SetOptionKeepSendingOnError - CURL.SetOptionLocalPort