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