dep-curl/docs/cmdline-opts/httpsig-key.md
Daniel Stenberg 9bcc64c39b
curl: make --httpsig-key take a key OR a file name for key
Verified by test 5022

Closes #22392
2026-07-25 22:10:30 +02:00

1.1 KiB

c SPDX-License-Identifier Long Protocols Arg Help Category Added Multi Experimental See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl httpsig-key HTTP <key/file> Key for HTTP Message Signatures auth http 8.22.0 single yes
httpsig-algo
httpsig-keyid
--httpsig-algo ed25519 --httpsig-key @key.hex --httpsig-keyid "my-key" $URL
--httpsig-key 123a56fb72197633bc --httpsig-keyid "my-key" $URL

--httpsig-key

The key to use for RFC 9421 HTTP Message Signatures. Provide it as-is, or as @filename. If the argument starts with an @, the rest is treated as a file name for the key.

The key is formatted as a series of hexadecimal digits in a single line. For ed25519, this is the 32-byte private seed (64 hex characters). For hmac-sha256, this is the shared secret. PEM files are not supported.

Generating Ed25519 keys

With OpenSSL 3:

openssl genpkey -algorithm ED25519 -out k.pem
openssl pkey -in k.pem -outform RAW -out k.raw
xxd -p -c 64 k.raw | tr -d '\n' > k.hex

Use @k.hex with --httpsig-key.