Skip to content

Instantly share code, notes, and snippets.

@ahndmal
Created June 18, 2023 16:32
Show Gist options
  • Save ahndmal/bb7e91531561cfa1ca3b4d542a1c9435 to your computer and use it in GitHub Desktop.
Save ahndmal/bb7e91531561cfa1ca3b4d542a1c9435 to your computer and use it in GitHub Desktop.
https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures
######### 1.0
GET / HTTP/1.0
GET /pub/WWW/TheProject.html HTTP/1.0
POST /path HTTP/1.0
Content-Type: application/json
{"name": "Vasyl"}
######### 1.1
GET /path HTTP/1.1
--------- POST
POST /path?param=value HTTP/1.1
Host: www.example.com
some body
-------------
POST /foo?param=Value&Pet=dog HTTP/1.1
Host: example.com
Date: Tue, 20 Apr 2021 02:07:55 GMT
Content-Type: application/json
Content-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\
aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:
Content-Length: 18
{"hello": "world"}
------------
POST /foo?param=Value&Pet=dog HTTP/1.1
Host: example.com
Date: Tue, 20 Apr 2021 02:07:55 GMT
Content-Type: application/json
Content-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\
aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:
Content-Length: 18
Signature-Input: sig1=("@method" "@authority" "@path" "@query" \
"content-digest" "content-type" "content-length")\
;created=1618884475;keyid="test-key-rsa-pss"
Signature: sig1=:mZuBiiKDzg+s8eJiMYc0GwSkyurjSbPX7xSKpYe7EcfolW3DUF\
RjlpneJoDkt5zNZo3N5tjn1e0sZZlBbrhHPhD9aQtE/qJPHrjwLUOY9eYtUWw261F\
Xxpp2Dsqa9jeE1r0or4TGalZnEiNl5cNFv7ze8ox5G6TNNyam/3GeB2N8t8P56XOG\
03g50CsN/4QZGWs4AjJcD5gMzcQhq/9JoKDUJDbcEyIetxEYvQCjWKbSb4yBevGmY\
PWJ2ezfIFiwmUuvrs/Ab9tYzIjEw1hHP70RF67HSazjT+YsI2y5jpzjx8SerihGSN\
Qwr57yQaTt4vK1eRDL2758LnsEYtO8lg==:
{"hello": "world"}
-----------------
----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment