aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/genkey1024.scm
blob: b27db4cceface71fae541b00189fa77f8d1a0c70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
"))