aboutsummaryrefslogtreecommitdiffstats
path: root/test/testgen.com
blob: 0e9029371a33683a2e650659169271332530cf6f (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
36
37
38
39
40
$! TETSGEN.COM
$
$	__arch := VAX
$	if f$getsyi("cpu") .ge. 128 then __arch := AXP
$	exe_dir := sys$disk:[-.'__arch'.exe.apps]
$
$	T := testcert
$	KEY = 512
$	CA := [-.certs]testca.pem
$
$	set noon
$	if f$search(T+".1;*") .nes. "" then delete 'T'.1;*
$	if f$search(T+".2;*") .nes. "" then delete 'T'.2;*
$	if f$search(T+".key;*") .nes. "" then delete 'T'.key;*
$	set on
$
$	write sys$output "generating certificate request"
$
$	write sys$output "There should be a 2 sequences of .'s and some +'s."
$	write sys$output "There should not be more that at most 80 per line"
$	write sys$output "This could take some time."
$
$	append/new nl: .rnd
$	open/append random_file .rnd
$	write random_file "string to make the random number generator think it has entropy"
$	close random_file
$
$	mcr 'exe_dir'openssl req -config test.cnf -new -out testreq.pem
$	if $severity .ne. 1
$	then
$	    write sys$output "problems creating request"
$	    exit 3
$	endif
$
$	mcr 'exe_dir'openssl req -verify -in testreq.pem -noout
$	if $severity .ne. 1
$	then
$	    write sys$output "signature on req is wrong"
$	    exit 3
$	endif