aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/genkey1024.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/openpgp/genkey1024.scm')
-rwxr-xr-xtests/openpgp/genkey1024.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/openpgp/genkey1024.scm b/tests/openpgp/genkey1024.scm
new file mode 100755
index 000000000..b27db4cce
--- /dev/null
+++ b/tests/openpgp/genkey1024.scm
@@ -0,0 +1,35 @@
+#!/usr/bin/env gpgscm
+
+(load (with-path "defs.scm"))
+
+(define (genkey config)
+ (pipe:do
+ (pipe:echo config)
+ (pipe:spawn `(,(tool 'gpg) --quiet --batch --gen-key))))
+
+(info "Checking batch key generation")
+(genkey "Key-Type: DSA
+Key-Length: 1024
+Subkey-Type: ELG
+Subkey-Length: 1024
+Name-Real: Harry H.
+Name-Comment: test key
+Name-Email: hh@@ddorf.de
+Expire-Date: 1
+%no-protection
+%transient-key
+%commit
+")
+
+(if (have-pubkey-algo? "RSA")
+ (genkey "Key-Type: RSA
+Key-Length: 1024
+Key-Usage: sign,encrypt
+Name-Real: Harry A.
+Name-Comment: RSA test key
+Name-Email: hh@@ddorf.de
+Expire-Date: 2
+%no-protection
+%transient-key
+%commit
+"))