aboutsummaryrefslogtreecommitdiff
path: root/guix/pki.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-12-30 22:46:21 +0100
committerLudovic Courtès <ludo@gnu.org>2013-12-30 22:57:37 +0100
commit554f26ece3c6e3fb04d8069e6be1095e622a97c5 (patch)
tree4a64678b2f1c34c72a53e84264ca56a09b34c72c /guix/pki.scm
parentdedb5d947ee2890524a5c6fb1343b3299e7731c3 (diff)
downloadgnu-guix-554f26ece3c6e3fb04d8069e6be1095e622a97c5.tar
gnu-guix-554f26ece3c6e3fb04d8069e6be1095e622a97c5.tar.gz
archive: Add '--generate-key'.
* guix/pk-crypto.scm (error-source, error-string): New procedures. * guix/pki.scm (%private-key-file): New variable. * guix/scripts/archive.scm (show-help): Document '--generate-key'. (%options): Add "generate-key". (generate-key-pair): New procedure. (guix-archive): Call 'generate-key' when OPTS contains a 'generate-key' pair. * doc/guix.texi (Setting Up the Daemon): Suggest generating a key pair. (Invoking guix archive): Document '--generate-key'.
Diffstat (limited to 'guix/pki.scm')
-rw-r--r--guix/pki.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/pki.scm b/guix/pki.scm
index 1ed84e55f0..759cd040e9 100644
--- a/guix/pki.scm
+++ b/guix/pki.scm
@@ -23,6 +23,7 @@
#:use-module (ice-9 match)
#:use-module (rnrs io ports)
#:export (%public-key-file
+ %private-key-file
current-acl
public-keys->acl
acl->public-keys
@@ -69,6 +70,9 @@ element in KEYS must be a canonical sexp with type 'public-key'."
(define %public-key-file
(string-append %config-directory "/signing-key.pub"))
+(define %private-key-file
+ (string-append %config-directory "/signing-key.sec"))
+
(define (ensure-acl)
"Make sure the ACL file exists, and create an initialized one if needed."
(unless (file-exists? %acl-file)