]>
Commit | Line | Data |
---|---|---|
7d7d2cbc UM |
1 | $! TETSGEN.COM |
2 | $ | |
3 | $ __arch := VAX | |
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | |
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | |
6 | $ | |
7 | $ T := testcert | |
8 | $ KEY = 512 | |
9 | $ CA := [-.certs]testca.pem | |
10 | $ | |
11 | $ set noon | |
8c197cc5 UM |
12 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* |
13 | $ if f$search(T+".2;*") .nes. "" then delete 'T'.2;* | |
14 | $ if f$search(T+".key;*") .nes. "" then delete 'T'.key;* | |
7d7d2cbc UM |
15 | $ set on |
16 | $ | |
17 | $ write sys$output "generating certificate request" | |
18 | $ | |
1472f300 RL |
19 | $ append/new nl: .rnd |
20 | $ open/append random_file .rnd | |
21 | $ write random_file "string to make the random number generator think it has entropy" | |
22 | $ close random_file | |
23 | $ | |
c13ee214 RL |
24 | $ set noon |
25 | $ define/user sys$output nla0: | |
26 | $ mcr 'exe_dir'openssl no-rsa | |
27 | $ save_severity=$SEVERITY | |
28 | $ set on | |
29 | $ if save_severity | |
30 | $ then | |
31 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | |
32 | $ else | |
33 | $ req_new="-new" | |
34 | $ write sys$output "There should be a 2 sequences of .'s and some +'s." | |
35 | $ write sys$output "There should not be more that at most 80 per line" | |
36 | $ endif | |
37 | $ | |
38 | $ write sys$output "This could take some time." | |
39 | $ | |
40 | $ mcr 'exe_dir'openssl req -config test.cnf 'req_new' -out testreq.pem | |
7d7d2cbc UM |
41 | $ if $severity .ne. 1 |
42 | $ then | |
43 | $ write sys$output "problems creating request" | |
44 | $ exit 3 | |
45 | $ endif | |
46 | $ | |
c13ee214 | 47 | $ mcr 'exe_dir'openssl req -config test.cnf -verify -in testreq.pem -noout |
7d7d2cbc UM |
48 | $ if $severity .ne. 1 |
49 | $ then | |
50 | $ write sys$output "signature on req is wrong" | |
51 | $ exit 3 | |
52 | $ endif |