blob: 3ac48469017ecba24ba3e9950393b9edfe7ea53c [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
2SPDX-License-Identifier: curl
3Long: pinnedpubkey
4Arg: <hashes>
5Help: FILE/HASHES Public key to verify peer against
6Protocols: TLS
7Category: tls
8Example: --pinnedpubkey keyfile $URL
9Example: --pinnedpubkey 'sha256//ce118b51897f4452dc' $URL
10Added: 7.39.0
11See-also: hostpubsha256
12Multi: single
13---
14Tells curl to use the specified public key file (or hashes) to verify the
15peer. This can be a path to a file which contains a single public key in PEM
16or DER format, or any number of base64 encoded sha256 hashes preceded by
17'sha256//' and separated by ';'.
18
19When negotiating a TLS or SSL connection, the server sends a certificate
20indicating its identity. A public key is extracted from this certificate and
21if it does not exactly match the public key provided to this option, curl will
22abort the connection before sending or receiving any data.
23
24PEM/DER support:
25
267.39.0: OpenSSL, GnuTLS and GSKit
27
287.43.0: NSS and wolfSSL
29
307.47.0: mbedtls
31
32sha256 support:
33
347.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
35
367.47.0: mbedtls
37
38Other SSL backends not supported.