pinnedpubkey.md (1320B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Long: pinnedpubkey 5 Arg: <hashes> 6 Help: Public key to verify peer against 7 Protocols: TLS 8 Category: tls 9 Added: 7.39.0 10 Multi: single 11 See-also: 12 - hostpubsha256 13 Example: 14 - --pinnedpubkey keyfile $URL 15 - --pinnedpubkey 'sha256//ce118b51897f4452dc' $URL 16 --- 17 18 # `--pinnedpubkey` 19 20 Use the specified public key file (or hashes) to verify the peer. This can be 21 a path to a file which contains a single public key in PEM or DER format, or 22 any number of base64 encoded sha256 hashes preceded by 'sha256//' and 23 separated by ';'. 24 25 When negotiating a TLS or SSL connection, the server sends a certificate 26 indicating its identity. A public key is extracted from this certificate and 27 if it does not exactly match the public key provided to this option, curl 28 aborts the connection before sending or receiving any data. 29 30 This option is independent of option --insecure. If you use both options 31 together then the peer is still verified by public key. 32 33 PEM/DER support: 34 35 OpenSSL and GnuTLS (added in 7.39.0), wolfSSL (added in 7.43.0), 36 mbedTLS (added in 7.47.0), Schannel (added in 7.58.1) 37 38 sha256 support: 39 40 OpenSSL, GnuTLS and wolfSSL (added in 7.44.0), mbedTLS (added in 7.47.0), 41 Schannel (added in 7.58.1) 42 43 Other SSL backends not supported.