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

CURL.SetOptionPinnedPublicKey

Set the public key in DER form used to validate the peer public key.

Component Version macOS Windows Linux Server iOS SDK
CURL 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionPinnedPublicKey"; curl; Value; TextView )   More

Parameters

Parameter Description Example
curl The CURL session handle. $curl
Value The option value.
TextView The reference number to the text view. $textview

Result

Returns OK or error.

Description

Set the public key in DER form used to validate the peer public key.
Native path to key file.
This option is used only if SSLVerifyPeer is true.

The string can be the file name of your pinned public key. The file format expected is "PEM" or "DER". The string can also be any number of base64 encoded sha256 hashes preceded by "sha256//" and separated by ";"
When negotiating a TLS or SSL connection, the server sends a certificate indicating its identity. A public key is extracted from this certificate and if it does not exactly match the public key provided to this option, curl will abort the connection before sending or receiving any data.

See also PINNEDPUBLICKEY option in CURL manual.

See also

Example Databases

Created 15th April 2018, last changed 21st July 2020


CURL.SetOptionPathAsIs - CURL.SetOptionPipeWait