diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-01-16 10:43:29 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-01-16 18:30:57 +0100 |
commit | 4fe01b09ea0b304b963b7fd9f168439ddfb515c1 (patch) | |
tree | b695400de7e4dec42df4d20bfee1b28c484ffa4b /guix | |
parent | a2548a3b5efb1ff17b19bc86e86940875c0a9f40 (diff) |
publish: Export 'signed-string'.
* guix/scripts/publish.scm (signed-string): Export and improve docstring.
* tests/publish.scm ("/*.narinfo")
("/*.narinfo with properly encoded '+' sign"): Adjust accordingly.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/publish.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 71a349d2fe..f5b2f5fd4e 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -64,6 +64,7 @@ #:use-module ((guix build syscalls) #:select (set-thread-name)) #:export (%public-key %private-key + signed-string guix-publish)) @@ -237,7 +238,8 @@ if ITEM is already compressed." ("Priority" . 100))) (define (signed-string s) - "Sign the hash of the string S with the daemon's key." + "Sign the hash of the string S with the daemon's key. Return a canonical +sexp for the signature." (let* ((public-key (%public-key)) (hash (bytevector->hash-data (sha256 (string->utf8 s)) #:key-type (key-type public-key)))) |