diff options
author | djm <> | 2011-11-03 02:32:24 +0000 |
---|---|---|
committer | djm <> | 2011-11-03 02:32:24 +0000 |
commit | 1e8701dd2507fadf6d232d93eb4299a8b79c66d5 (patch) | |
tree | 4310bd4936061d7695b1c5a1bb1771e9807616c1 | |
parent | fa3384eda96e42a23f6d3208998246abda2535c1 (diff) | |
parent | 027d47f36d5e77b24a925d19c987fc43151baa17 (diff) | |
download | openbsd-1e8701dd2507fadf6d232d93eb4299a8b79c66d5.tar.gz openbsd-1e8701dd2507fadf6d232d93eb4299a8b79c66d5.tar.bz2 openbsd-1e8701dd2507fadf6d232d93eb4299a8b79c66d5.zip |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
20 files changed, 1668 insertions, 133 deletions
diff --git a/src/lib/libcrypto/install-crypto.com b/src/lib/libcrypto/install-crypto.com new file mode 100755 index 0000000000..85b3d583cf --- /dev/null +++ b/src/lib/libcrypto/install-crypto.com | |||
@@ -0,0 +1,196 @@ | |||
1 | $! INSTALL.COM -- Installs the files in a given directory tree | ||
2 | $! | ||
3 | $! Author: Richard Levitte <richard@levitte.org> | ||
4 | $! Time of creation: 22-MAY-1998 10:13 | ||
5 | $! | ||
6 | $! Changes by Zoltan Arpadffy <zoli@polarhome.com> | ||
7 | $! | ||
8 | $! P1 root of the directory tree | ||
9 | $! P2 "64" for 64-bit pointers. | ||
10 | $! | ||
11 | $! | ||
12 | $! Announce/identify. | ||
13 | $! | ||
14 | $ proc = f$environment( "procedure") | ||
15 | $ write sys$output "@@@ "+ - | ||
16 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
17 | $! | ||
18 | $ on error then goto tidy | ||
19 | $ on control_c then goto tidy | ||
20 | $! | ||
21 | $ if (p1 .eqs. "") | ||
22 | $ then | ||
23 | $ write sys$output "First argument missing." | ||
24 | $ write sys$output - | ||
25 | "It should be the directory where you want things installed." | ||
26 | $ exit | ||
27 | $ endif | ||
28 | $! | ||
29 | $ if (f$getsyi( "cpu") .lt. 128) | ||
30 | $ then | ||
31 | $ arch = "VAX" | ||
32 | $ else | ||
33 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
34 | $ if (arch .eqs. "") then arch = "UNK" | ||
35 | $ endif | ||
36 | $! | ||
37 | $ archd = arch | ||
38 | $ lib32 = "32" | ||
39 | $ shr = "_SHR32" | ||
40 | $! | ||
41 | $ if (p2 .nes. "") | ||
42 | $ then | ||
43 | $ if (p2 .eqs. "64") | ||
44 | $ then | ||
45 | $ archd = arch+ "_64" | ||
46 | $ lib32 = "" | ||
47 | $ shr = "_SHR" | ||
48 | $ else | ||
49 | $ if (p2 .nes. "32") | ||
50 | $ then | ||
51 | $ write sys$output "Second argument invalid." | ||
52 | $ write sys$output "It should be "32", "64", or nothing." | ||
53 | $ exit | ||
54 | $ endif | ||
55 | $ endif | ||
56 | $ endif | ||
57 | $! | ||
58 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
59 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
60 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - - | ||
61 | "[000000." - "][" - "[" - "]" | ||
62 | $ root = root_dev + "[" + root_dir | ||
63 | $! | ||
64 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
65 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
66 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] | ||
67 | $! | ||
68 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
69 | create /directory /log wrk_sslroot:[000000] | ||
70 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - | ||
71 | create /directory /log wrk_sslinclude: | ||
72 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - | ||
73 | create /directory /log wrk_sslxlib: | ||
74 | $! | ||
75 | $ sdirs := , - | ||
76 | 'archd', - | ||
77 | objects, - | ||
78 | md2, md4, md5, sha, mdc2, hmac, ripemd, whrlpool, - | ||
79 | des, aes, rc2, rc4, rc5, idea, bf, cast, camellia, seed, - | ||
80 | bn, ec, rsa, dsa, ecdsa, dh, ecdh, dso, engine, - | ||
81 | buffer, bio, stack, lhash, rand, err, - | ||
82 | evp, asn1, pem, x509, x509v3, conf, txt_db, pkcs7, pkcs12, comp, ocsp, - | ||
83 | ui, krb5, - | ||
84 | store, cms, pqueue, ts, jpake | ||
85 | $! | ||
86 | $ exheader_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h | ||
87 | $ exheader_'archd' := opensslconf.h | ||
88 | $ exheader_objects := objects.h, obj_mac.h | ||
89 | $ exheader_md2 := md2.h | ||
90 | $ exheader_md4 := md4.h | ||
91 | $ exheader_md5 := md5.h | ||
92 | $ exheader_sha := sha.h | ||
93 | $ exheader_mdc2 := mdc2.h | ||
94 | $ exheader_hmac := hmac.h | ||
95 | $ exheader_ripemd := ripemd.h | ||
96 | $ exheader_whrlpool := whrlpool.h | ||
97 | $ exheader_des := des.h, des_old.h | ||
98 | $ exheader_aes := aes.h | ||
99 | $ exheader_rc2 := rc2.h | ||
100 | $ exheader_rc4 := rc4.h | ||
101 | $ exheader_rc5 := rc5.h | ||
102 | $ exheader_idea := idea.h | ||
103 | $ exheader_bf := blowfish.h | ||
104 | $ exheader_cast := cast.h | ||
105 | $ exheader_camellia := camellia.h | ||
106 | $ exheader_seed := seed.h | ||
107 | $ exheader_modes := modes.h | ||
108 | $ exheader_bn := bn.h | ||
109 | $ exheader_ec := ec.h | ||
110 | $ exheader_rsa := rsa.h | ||
111 | $ exheader_dsa := dsa.h | ||
112 | $ exheader_ecdsa := ecdsa.h | ||
113 | $ exheader_dh := dh.h | ||
114 | $ exheader_ecdh := ecdh.h | ||
115 | $ exheader_dso := dso.h | ||
116 | $ exheader_engine := engine.h | ||
117 | $ exheader_buffer := buffer.h | ||
118 | $ exheader_bio := bio.h | ||
119 | $ exheader_stack := stack.h, safestack.h | ||
120 | $ exheader_lhash := lhash.h | ||
121 | $ exheader_rand := rand.h | ||
122 | $ exheader_err := err.h | ||
123 | $ exheader_evp := evp.h | ||
124 | $ exheader_asn1 := asn1.h, asn1_mac.h, asn1t.h | ||
125 | $ exheader_pem := pem.h, pem2.h | ||
126 | $ exheader_x509 := x509.h, x509_vfy.h | ||
127 | $ exheader_x509v3 := x509v3.h | ||
128 | $ exheader_conf := conf.h, conf_api.h | ||
129 | $ exheader_txt_db := txt_db.h | ||
130 | $ exheader_pkcs7 := pkcs7.h | ||
131 | $ exheader_pkcs12 := pkcs12.h | ||
132 | $ exheader_comp := comp.h | ||
133 | $ exheader_ocsp := ocsp.h | ||
134 | $ exheader_ui := ui.h, ui_compat.h | ||
135 | $ exheader_krb5 := krb5_asn.h | ||
136 | $! exheader_store := store.h, str_compat.h | ||
137 | $ exheader_store := store.h | ||
138 | $ exheader_cms := cms.h | ||
139 | $ exheader_pqueue := pqueue.h | ||
140 | $ exheader_ts := ts.h | ||
141 | $ exheader_jpake := jpake.h | ||
142 | $ libs := ssl_libcrypto | ||
143 | $! | ||
144 | $ exe_dir := [-.'archd'.exe.crypto] | ||
145 | $! | ||
146 | $! Header files. | ||
147 | $! | ||
148 | $ i = 0 | ||
149 | $ loop_sdirs: | ||
150 | $ d = f$edit( f$element( i, ",", sdirs), "trim") | ||
151 | $ i = i + 1 | ||
152 | $ if d .eqs. "," then goto loop_sdirs_end | ||
153 | $ tmp = exheader_'d' | ||
154 | $ if (d .nes. "") then d = "."+ d | ||
155 | $ copy /protection = w:re ['d']'tmp' wrk_sslinclude: /log | ||
156 | $ goto loop_sdirs | ||
157 | $ loop_sdirs_end: | ||
158 | $! | ||
159 | $! Object libraries, shareable images. | ||
160 | $! | ||
161 | $ i = 0 | ||
162 | $ loop_lib: | ||
163 | $ e = f$edit( f$element( i, ",", libs), "trim") | ||
164 | $ i = i + 1 | ||
165 | $ if e .eqs. "," then goto loop_lib_end | ||
166 | $ set noon | ||
167 | $ file = exe_dir+ e+ lib32+ ".olb" | ||
168 | $ if f$search( file) .nes. "" | ||
169 | $ then | ||
170 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
171 | $ endif | ||
172 | $! | ||
173 | $ file = exe_dir+ e+ shr+ ".exe" | ||
174 | $ if f$search( file) .nes. "" | ||
175 | $ then | ||
176 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
177 | $ endif | ||
178 | $ set on | ||
179 | $ goto loop_lib | ||
180 | $ loop_lib_end: | ||
181 | $! | ||
182 | $ tidy: | ||
183 | $! | ||
184 | $ call deass wrk_sslroot | ||
185 | $ call deass wrk_sslinclude | ||
186 | $ call deass wrk_sslxlib | ||
187 | $! | ||
188 | $ exit | ||
189 | $! | ||
190 | $ deass: subroutine | ||
191 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
192 | $ then | ||
193 | $ deassign /process 'p1' | ||
194 | $ endif | ||
195 | $ endsubroutine | ||
196 | $! | ||
diff --git a/src/lib/libcrypto/rc5/rc5_locl.h b/src/lib/libcrypto/rc5/rc5_locl.h index 282dd38822..d337f73fad 100644 --- a/src/lib/libcrypto/rc5/rc5_locl.h +++ b/src/lib/libcrypto/rc5/rc5_locl.h | |||
@@ -154,14 +154,14 @@ | |||
154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
155 | asm ("roll %%cl,%0" \ | 155 | asm ("roll %%cl,%0" \ |
156 | : "=r"(ret) \ | 156 | : "=r"(ret) \ |
157 | : "c"(n),"0"(a) \ | 157 | : "c"(n),"0"((unsigned int)(a)) \ |
158 | : "cc"); \ | 158 | : "cc"); \ |
159 | ret; \ | 159 | ret; \ |
160 | }) | 160 | }) |
161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ | 161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ |
162 | asm ("rorl %%cl,%0" \ | 162 | asm ("rorl %%cl,%0" \ |
163 | : "=r"(ret) \ | 163 | : "=r"(ret) \ |
164 | : "c"(n),"0"(a) \ | 164 | : "c"(n),"0"((unsigned int)(a)) \ |
165 | : "cc"); \ | 165 | : "cc"); \ |
166 | ret; \ | 166 | ret; \ |
167 | }) | 167 | }) |
diff --git a/src/lib/libssl/src/VMS/install-vms.com b/src/lib/libssl/src/VMS/install-vms.com new file mode 100755 index 0000000000..7da8b2153b --- /dev/null +++ b/src/lib/libssl/src/VMS/install-vms.com | |||
@@ -0,0 +1,67 @@ | |||
1 | $! install-vms.com -- Installs the files in a given directory tree | ||
2 | $! | ||
3 | $! Author: Richard Levitte <richard@levitte.org> | ||
4 | $! Time of creation: 23-MAY-1998 19:22 | ||
5 | $! | ||
6 | $! P1 root of the directory tree | ||
7 | $! | ||
8 | $! | ||
9 | $! Announce/identify. | ||
10 | $! | ||
11 | $ proc = f$environment( "procedure") | ||
12 | $ write sys$output "@@@ "+ - | ||
13 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
14 | $! | ||
15 | $ on error then goto tidy | ||
16 | $ on control_c then goto tidy | ||
17 | $! | ||
18 | $ if p1 .eqs. "" | ||
19 | $ then | ||
20 | $ write sys$output "First argument missing." | ||
21 | $ write sys$output - | ||
22 | "Should be the directory where you want things installed." | ||
23 | $ exit | ||
24 | $ endif | ||
25 | $ | ||
26 | $ if (f$getsyi( "cpu") .lt. 128) | ||
27 | $ then | ||
28 | $ arch = "VAX" | ||
29 | $ else | ||
30 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
31 | $ if (arch .eqs. "") then arch = "UNK" | ||
32 | $ endif | ||
33 | $ | ||
34 | $ root = f$parse( P1, "[]A.;0", , , "SYNTAX_ONLY, NO_CONCEAL")- "A.;0" | ||
35 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
36 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - - | ||
37 | "[000000." - "][" - "[" - "]" | ||
38 | $ root = root_dev + "[" + root_dir | ||
39 | $ | ||
40 | $ define /nolog wrk_sslroot 'root'.] /translation_attributes = concealed | ||
41 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
42 | $ | ||
43 | $ if f$parse( "wrk_sslroot:[000000]") .eqs. "" then - | ||
44 | create /directory /log wrk_sslroot:[000000] | ||
45 | $ if f$parse( "wrk_sslinclude:") .eqs. "" then - | ||
46 | create /directory /log wrk_sslinclude: | ||
47 | $ if f$parse( "wrk_sslroot:[vms]") .eqs. "" then - | ||
48 | create /directory /log wrk_sslroot:[vms] | ||
49 | $! | ||
50 | $ copy /log /protection = world:re openssl_startup.com wrk_sslroot:[vms] | ||
51 | $ copy /log /protection = world:re openssl_undo.com wrk_sslroot:[vms] | ||
52 | $ copy /log /protection = world:re openssl_utils.com wrk_sslroot:[vms] | ||
53 | $! | ||
54 | $ tidy: | ||
55 | $! | ||
56 | $ call deass wrk_sslroot | ||
57 | $ call deass wrk_sslinclude | ||
58 | $! | ||
59 | $ exit | ||
60 | $! | ||
61 | $ deass: subroutine | ||
62 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
63 | $ then | ||
64 | $ deassign /process 'p1' | ||
65 | $ endif | ||
66 | $ endsubroutine | ||
67 | $! | ||
diff --git a/src/lib/libssl/src/VMS/openssl_startup.com b/src/lib/libssl/src/VMS/openssl_startup.com new file mode 100755 index 0000000000..04bbbde886 --- /dev/null +++ b/src/lib/libssl/src/VMS/openssl_startup.com | |||
@@ -0,0 +1,108 @@ | |||
1 | $! | ||
2 | $! Startup file for OpenSSL 1.x. | ||
3 | $! | ||
4 | $! 2011-03-05 SMS. | ||
5 | $! | ||
6 | $! This procedure must reside in the OpenSSL installation directory. | ||
7 | $! It will fail if it is copied to a different location. | ||
8 | $! | ||
9 | $! P1 qualifier(s) for DEFINE. For example, "/SYSTEM" to get the | ||
10 | $! logical names defined in the system logical name table. | ||
11 | $! | ||
12 | $! P2 "64", to use executables which were built with 64-bit pointers. | ||
13 | $! | ||
14 | $! Good (default) and bad status values. | ||
15 | $! | ||
16 | $ status = %x00010001 ! RMS$_NORMAL, normal successful completion. | ||
17 | $ rms_e_fnf = %x00018292 ! RMS$_FNF, file not found. | ||
18 | $! | ||
19 | $! Prepare for problems. | ||
20 | $! | ||
21 | $ orig_dev_dir = f$environment( "DEFAULT") | ||
22 | $ on control_y then goto clean_up | ||
23 | $ on error then goto clean_up | ||
24 | $! | ||
25 | $! Determine hardware architecture. | ||
26 | $! | ||
27 | $ if (f$getsyi( "cpu") .lt. 128) | ||
28 | $ then | ||
29 | $ arch_name = "VAX" | ||
30 | $ else | ||
31 | $ arch_name = f$edit( f$getsyi( "arch_name"), "upcase") | ||
32 | $ if (arch_name .eqs. "") then arch_name = "UNK" | ||
33 | $ endif | ||
34 | $! | ||
35 | $ if (p2 .eqs. "64") | ||
36 | $ then | ||
37 | $ arch_name_exe = arch_name+ "_64" | ||
38 | $ else | ||
39 | $ arch_name_exe = arch_name | ||
40 | $ endif | ||
41 | $! | ||
42 | $! Derive the OpenSSL installation device:[directory] from the location | ||
43 | $! of this command procedure. | ||
44 | $! | ||
45 | $ proc = f$environment( "procedure") | ||
46 | $ proc_dev_dir = f$parse( "A.;", proc, , , "no_conceal") - "A.;" | ||
47 | $ proc_dev = f$parse( proc_dev_dir, , , "device", "syntax_only") | ||
48 | $ proc_dir = f$parse( proc_dev_dir, , , "directory", "syntax_only") - - | ||
49 | ".][000000"- "[000000."- "]["- "["- "]" | ||
50 | $ proc_dev_dir = proc_dev+ "["+ proc_dir+ "]" | ||
51 | $ set default 'proc_dev_dir' | ||
52 | $ set default [-] | ||
53 | $ ossl_dev_dir = f$environment( "default") | ||
54 | $! | ||
55 | $! Check existence of expected directories (to see if this procedure has | ||
56 | $! been moved away from its proper place). | ||
57 | $! | ||
58 | $ if ((f$search( "certs.dir;1") .eqs. "") .or. - | ||
59 | (f$search( "include.dir;1") .eqs. "") .or. - | ||
60 | (f$search( "private.dir;1") .eqs. "") .or. - | ||
61 | (f$search( "vms.dir;1") .eqs. "")) | ||
62 | $ then | ||
63 | $ write sys$output - | ||
64 | " Can't find expected common OpenSSL directories in:" | ||
65 | $ write sys$output " ''ossl_dev_dir'" | ||
66 | $ status = rms_e_fnf | ||
67 | $ goto clean_up | ||
68 | $ endif | ||
69 | $! | ||
70 | $ if ((f$search( "''arch_name_exe'_exe.dir;1") .eqs. "") .or. - | ||
71 | (f$search( "''arch_name'_lib.dir;1") .eqs. "")) | ||
72 | $ then | ||
73 | $ write sys$output - | ||
74 | " Can't find expected architecture-specific OpenSSL directories in:" | ||
75 | $ write sys$output " ''ossl_dev_dir'" | ||
76 | $ status = rms_e_fnf | ||
77 | $ goto clean_up | ||
78 | $ endif | ||
79 | $! | ||
80 | $! All seems well (enough). Define the OpenSSL logical names. | ||
81 | $! | ||
82 | $ ossl_root = ossl_dev_dir- "]"+ ".]" | ||
83 | $ define /translation_attributes = concealed /nolog'p1 SSLROOT 'ossl_root' | ||
84 | $ define /nolog 'p1' SSLCERTS sslroot:[certs] | ||
85 | $ define /nolog 'p1' SSLINCLUDE sslroot:[include] | ||
86 | $ define /nolog 'p1' SSLPRIVATE sslroot:[private] | ||
87 | $ define /nolog 'p1' SSLEXE sslroot:['arch_name_exe'_exe] | ||
88 | $ define /nolog 'p1' SSLLIB sslroot:['arch_name'_lib] | ||
89 | $! | ||
90 | $! Defining OPENSSL lets a C program use "#include <openssl/{foo}.h>": | ||
91 | $ define /nolog 'p1' OPENSSL SSLINCLUDE: | ||
92 | $! | ||
93 | $! Run a site-specific procedure, if it exists. | ||
94 | $! | ||
95 | $ if f$search( "sslroot:[vms]openssl_systartup.com") .nes."" then - | ||
96 | @ sslroot:[vms]openssl_systartup.com | ||
97 | $! | ||
98 | $! Restore the original default dev:[dir] (if known). | ||
99 | $! | ||
100 | $ clean_up: | ||
101 | $! | ||
102 | $ if (f$type( orig_dev_dir) .nes. "") | ||
103 | $ then | ||
104 | $ set default 'orig_dev_dir' | ||
105 | $ endif | ||
106 | $! | ||
107 | $ EXIT 'status' | ||
108 | $! | ||
diff --git a/src/lib/libssl/src/VMS/openssl_undo.com b/src/lib/libssl/src/VMS/openssl_undo.com new file mode 100755 index 0000000000..d1623a3160 --- /dev/null +++ b/src/lib/libssl/src/VMS/openssl_undo.com | |||
@@ -0,0 +1,20 @@ | |||
1 | $! | ||
2 | $! Deassign OpenSSL logical names. | ||
3 | $! | ||
4 | $ call deass "OPENSSL" "''p1'" | ||
5 | $ call deass "SSLCERTS" "''p1'" | ||
6 | $ call deass "SSLEXE" "''p1'" | ||
7 | $ call deass "SSLINCLUDE" "''p1'" | ||
8 | $ call deass "SSLLIB" "''p1'" | ||
9 | $ call deass "SSLPRIVATE" "''p1'" | ||
10 | $ call deass "SSLROOT" "''p1'" | ||
11 | $! | ||
12 | $ exit | ||
13 | $! | ||
14 | $deass: subroutine | ||
15 | $ if (f$trnlnm( p1) .nes. "") | ||
16 | $ then | ||
17 | $ deassign 'p2' 'p1' | ||
18 | $ endif | ||
19 | $ endsubroutine | ||
20 | $! | ||
diff --git a/src/lib/libssl/src/apps/install-apps.com b/src/lib/libssl/src/apps/install-apps.com new file mode 100755 index 0000000000..7a553aa12e --- /dev/null +++ b/src/lib/libssl/src/apps/install-apps.com | |||
@@ -0,0 +1,107 @@ | |||
1 | $! INSTALL.COM -- Installs the files in a given directory tree | ||
2 | $! | ||
3 | $! Author: Richard Levitte <richard@levitte.org> | ||
4 | $! Time of creation: 22-MAY-1998 10:13 | ||
5 | $! | ||
6 | $! P1 root of the directory tree | ||
7 | $! P2 "64" for 64-bit pointers. | ||
8 | $! | ||
9 | $! | ||
10 | $! Announce/identify. | ||
11 | $! | ||
12 | $ proc = f$environment( "procedure") | ||
13 | $ write sys$output "@@@ "+ - | ||
14 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
15 | $! | ||
16 | $ on error then goto tidy | ||
17 | $ on control_c then goto tidy | ||
18 | $! | ||
19 | $ if (p1 .eqs. "") | ||
20 | $ then | ||
21 | $ write sys$output "First argument missing." | ||
22 | $ write sys$output - | ||
23 | "It should be the directory where you want things installed." | ||
24 | $ exit | ||
25 | $ endif | ||
26 | $! | ||
27 | $ if (f$getsyi("cpu") .lt. 128) | ||
28 | $ then | ||
29 | $ arch = "VAX" | ||
30 | $ else | ||
31 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
32 | $ if (arch .eqs. "") then arch = "UNK" | ||
33 | $ endif | ||
34 | $! | ||
35 | $ archd = arch | ||
36 | $! | ||
37 | $ if (p2 .nes. "") | ||
38 | $ then | ||
39 | $ if (p2 .eqs. "64") | ||
40 | $ then | ||
41 | $ archd = arch+ "_64" | ||
42 | $ else | ||
43 | $ if (p2 .nes. "32") | ||
44 | $ then | ||
45 | $ write sys$output "Second argument invalid." | ||
46 | $ write sys$output "It should be "32", "64", or nothing." | ||
47 | $ exit | ||
48 | $ endif | ||
49 | $ endif | ||
50 | $ endif | ||
51 | $! | ||
52 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
53 | $ root_dev = f$parse(root,,,"device","syntax_only") | ||
54 | $ root_dir = f$parse(root,,,"directory","syntax_only") - - | ||
55 | "[000000." - "][" - "[" - "]" | ||
56 | $ root = root_dev + "[" + root_dir | ||
57 | $! | ||
58 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
59 | $ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe] | ||
60 | $! | ||
61 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
62 | create /directory /log wrk_sslroot:[000000] | ||
63 | $ if f$parse("wrk_sslxexe:") .eqs. "" then - | ||
64 | create /directory /log wrk_sslxexe: | ||
65 | $! | ||
66 | $ exe := openssl | ||
67 | $! | ||
68 | $ exe_dir := [-.'archd'.exe.apps] | ||
69 | $! | ||
70 | $! Executables. | ||
71 | $! | ||
72 | $ i = 0 | ||
73 | $ loop_exe: | ||
74 | $ e = f$edit(f$element( i, ",", exe), "trim") | ||
75 | $ i = i + 1 | ||
76 | $ if e .eqs. "," then goto loop_exe_end | ||
77 | $ set noon | ||
78 | $ file = exe_dir+ e+ ".exe" | ||
79 | $ if f$search( file) .nes. "" | ||
80 | $ then | ||
81 | $ copy /protection = w:re 'file' wrk_sslxexe: /log | ||
82 | $ endif | ||
83 | $ set on | ||
84 | $ goto loop_exe | ||
85 | $ loop_exe_end: | ||
86 | $! | ||
87 | $! Miscellaneous. | ||
88 | $! | ||
89 | $ set noon | ||
90 | $ copy /protection = w:re ca.com wrk_sslxexe:ca.com /log | ||
91 | $ copy /protection = w:re openssl-vms.cnf wrk_sslroot:[000000]openssl.cnf /log | ||
92 | $ set on | ||
93 | $! | ||
94 | $ tidy: | ||
95 | $! | ||
96 | $ call deass wrk_sslroot | ||
97 | $ call deass wrk_sslxexe | ||
98 | $! | ||
99 | $ exit | ||
100 | $! | ||
101 | $ deass: subroutine | ||
102 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
103 | $ then | ||
104 | $ deassign /process 'p1' | ||
105 | $ endif | ||
106 | $ endsubroutine | ||
107 | $! | ||
diff --git a/src/lib/libssl/src/crypto/install-crypto.com b/src/lib/libssl/src/crypto/install-crypto.com new file mode 100755 index 0000000000..85b3d583cf --- /dev/null +++ b/src/lib/libssl/src/crypto/install-crypto.com | |||
@@ -0,0 +1,196 @@ | |||
1 | $! INSTALL.COM -- Installs the files in a given directory tree | ||
2 | $! | ||
3 | $! Author: Richard Levitte <richard@levitte.org> | ||
4 | $! Time of creation: 22-MAY-1998 10:13 | ||
5 | $! | ||
6 | $! Changes by Zoltan Arpadffy <zoli@polarhome.com> | ||
7 | $! | ||
8 | $! P1 root of the directory tree | ||
9 | $! P2 "64" for 64-bit pointers. | ||
10 | $! | ||
11 | $! | ||
12 | $! Announce/identify. | ||
13 | $! | ||
14 | $ proc = f$environment( "procedure") | ||
15 | $ write sys$output "@@@ "+ - | ||
16 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
17 | $! | ||
18 | $ on error then goto tidy | ||
19 | $ on control_c then goto tidy | ||
20 | $! | ||
21 | $ if (p1 .eqs. "") | ||
22 | $ then | ||
23 | $ write sys$output "First argument missing." | ||
24 | $ write sys$output - | ||
25 | "It should be the directory where you want things installed." | ||
26 | $ exit | ||
27 | $ endif | ||
28 | $! | ||
29 | $ if (f$getsyi( "cpu") .lt. 128) | ||
30 | $ then | ||
31 | $ arch = "VAX" | ||
32 | $ else | ||
33 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
34 | $ if (arch .eqs. "") then arch = "UNK" | ||
35 | $ endif | ||
36 | $! | ||
37 | $ archd = arch | ||
38 | $ lib32 = "32" | ||
39 | $ shr = "_SHR32" | ||
40 | $! | ||
41 | $ if (p2 .nes. "") | ||
42 | $ then | ||
43 | $ if (p2 .eqs. "64") | ||
44 | $ then | ||
45 | $ archd = arch+ "_64" | ||
46 | $ lib32 = "" | ||
47 | $ shr = "_SHR" | ||
48 | $ else | ||
49 | $ if (p2 .nes. "32") | ||
50 | $ then | ||
51 | $ write sys$output "Second argument invalid." | ||
52 | $ write sys$output "It should be "32", "64", or nothing." | ||
53 | $ exit | ||
54 | $ endif | ||
55 | $ endif | ||
56 | $ endif | ||
57 | $! | ||
58 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
59 | $ root_dev = f$parse( root, , , "device", "syntax_only") | ||
60 | $ root_dir = f$parse( root, , , "directory", "syntax_only") - - | ||
61 | "[000000." - "][" - "[" - "]" | ||
62 | $ root = root_dev + "[" + root_dir | ||
63 | $! | ||
64 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
65 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
66 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] | ||
67 | $! | ||
68 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
69 | create /directory /log wrk_sslroot:[000000] | ||
70 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - | ||
71 | create /directory /log wrk_sslinclude: | ||
72 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - | ||
73 | create /directory /log wrk_sslxlib: | ||
74 | $! | ||
75 | $ sdirs := , - | ||
76 | 'archd', - | ||
77 | objects, - | ||
78 | md2, md4, md5, sha, mdc2, hmac, ripemd, whrlpool, - | ||
79 | des, aes, rc2, rc4, rc5, idea, bf, cast, camellia, seed, - | ||
80 | bn, ec, rsa, dsa, ecdsa, dh, ecdh, dso, engine, - | ||
81 | buffer, bio, stack, lhash, rand, err, - | ||
82 | evp, asn1, pem, x509, x509v3, conf, txt_db, pkcs7, pkcs12, comp, ocsp, - | ||
83 | ui, krb5, - | ||
84 | store, cms, pqueue, ts, jpake | ||
85 | $! | ||
86 | $ exheader_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h | ||
87 | $ exheader_'archd' := opensslconf.h | ||
88 | $ exheader_objects := objects.h, obj_mac.h | ||
89 | $ exheader_md2 := md2.h | ||
90 | $ exheader_md4 := md4.h | ||
91 | $ exheader_md5 := md5.h | ||
92 | $ exheader_sha := sha.h | ||
93 | $ exheader_mdc2 := mdc2.h | ||
94 | $ exheader_hmac := hmac.h | ||
95 | $ exheader_ripemd := ripemd.h | ||
96 | $ exheader_whrlpool := whrlpool.h | ||
97 | $ exheader_des := des.h, des_old.h | ||
98 | $ exheader_aes := aes.h | ||
99 | $ exheader_rc2 := rc2.h | ||
100 | $ exheader_rc4 := rc4.h | ||
101 | $ exheader_rc5 := rc5.h | ||
102 | $ exheader_idea := idea.h | ||
103 | $ exheader_bf := blowfish.h | ||
104 | $ exheader_cast := cast.h | ||
105 | $ exheader_camellia := camellia.h | ||
106 | $ exheader_seed := seed.h | ||
107 | $ exheader_modes := modes.h | ||
108 | $ exheader_bn := bn.h | ||
109 | $ exheader_ec := ec.h | ||
110 | $ exheader_rsa := rsa.h | ||
111 | $ exheader_dsa := dsa.h | ||
112 | $ exheader_ecdsa := ecdsa.h | ||
113 | $ exheader_dh := dh.h | ||
114 | $ exheader_ecdh := ecdh.h | ||
115 | $ exheader_dso := dso.h | ||
116 | $ exheader_engine := engine.h | ||
117 | $ exheader_buffer := buffer.h | ||
118 | $ exheader_bio := bio.h | ||
119 | $ exheader_stack := stack.h, safestack.h | ||
120 | $ exheader_lhash := lhash.h | ||
121 | $ exheader_rand := rand.h | ||
122 | $ exheader_err := err.h | ||
123 | $ exheader_evp := evp.h | ||
124 | $ exheader_asn1 := asn1.h, asn1_mac.h, asn1t.h | ||
125 | $ exheader_pem := pem.h, pem2.h | ||
126 | $ exheader_x509 := x509.h, x509_vfy.h | ||
127 | $ exheader_x509v3 := x509v3.h | ||
128 | $ exheader_conf := conf.h, conf_api.h | ||
129 | $ exheader_txt_db := txt_db.h | ||
130 | $ exheader_pkcs7 := pkcs7.h | ||
131 | $ exheader_pkcs12 := pkcs12.h | ||
132 | $ exheader_comp := comp.h | ||
133 | $ exheader_ocsp := ocsp.h | ||
134 | $ exheader_ui := ui.h, ui_compat.h | ||
135 | $ exheader_krb5 := krb5_asn.h | ||
136 | $! exheader_store := store.h, str_compat.h | ||
137 | $ exheader_store := store.h | ||
138 | $ exheader_cms := cms.h | ||
139 | $ exheader_pqueue := pqueue.h | ||
140 | $ exheader_ts := ts.h | ||
141 | $ exheader_jpake := jpake.h | ||
142 | $ libs := ssl_libcrypto | ||
143 | $! | ||
144 | $ exe_dir := [-.'archd'.exe.crypto] | ||
145 | $! | ||
146 | $! Header files. | ||
147 | $! | ||
148 | $ i = 0 | ||
149 | $ loop_sdirs: | ||
150 | $ d = f$edit( f$element( i, ",", sdirs), "trim") | ||
151 | $ i = i + 1 | ||
152 | $ if d .eqs. "," then goto loop_sdirs_end | ||
153 | $ tmp = exheader_'d' | ||
154 | $ if (d .nes. "") then d = "."+ d | ||
155 | $ copy /protection = w:re ['d']'tmp' wrk_sslinclude: /log | ||
156 | $ goto loop_sdirs | ||
157 | $ loop_sdirs_end: | ||
158 | $! | ||
159 | $! Object libraries, shareable images. | ||
160 | $! | ||
161 | $ i = 0 | ||
162 | $ loop_lib: | ||
163 | $ e = f$edit( f$element( i, ",", libs), "trim") | ||
164 | $ i = i + 1 | ||
165 | $ if e .eqs. "," then goto loop_lib_end | ||
166 | $ set noon | ||
167 | $ file = exe_dir+ e+ lib32+ ".olb" | ||
168 | $ if f$search( file) .nes. "" | ||
169 | $ then | ||
170 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
171 | $ endif | ||
172 | $! | ||
173 | $ file = exe_dir+ e+ shr+ ".exe" | ||
174 | $ if f$search( file) .nes. "" | ||
175 | $ then | ||
176 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
177 | $ endif | ||
178 | $ set on | ||
179 | $ goto loop_lib | ||
180 | $ loop_lib_end: | ||
181 | $! | ||
182 | $ tidy: | ||
183 | $! | ||
184 | $ call deass wrk_sslroot | ||
185 | $ call deass wrk_sslinclude | ||
186 | $ call deass wrk_sslxlib | ||
187 | $! | ||
188 | $ exit | ||
189 | $! | ||
190 | $ deass: subroutine | ||
191 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
192 | $ then | ||
193 | $ deassign /process 'p1' | ||
194 | $ endif | ||
195 | $ endsubroutine | ||
196 | $! | ||
diff --git a/src/lib/libssl/src/crypto/rc5/rc5_locl.h b/src/lib/libssl/src/crypto/rc5/rc5_locl.h index 282dd38822..d337f73fad 100644 --- a/src/lib/libssl/src/crypto/rc5/rc5_locl.h +++ b/src/lib/libssl/src/crypto/rc5/rc5_locl.h | |||
@@ -154,14 +154,14 @@ | |||
154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 154 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
155 | asm ("roll %%cl,%0" \ | 155 | asm ("roll %%cl,%0" \ |
156 | : "=r"(ret) \ | 156 | : "=r"(ret) \ |
157 | : "c"(n),"0"(a) \ | 157 | : "c"(n),"0"((unsigned int)(a)) \ |
158 | : "cc"); \ | 158 | : "cc"); \ |
159 | ret; \ | 159 | ret; \ |
160 | }) | 160 | }) |
161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ | 161 | # define ROTATE_r32(a,n) ({ register unsigned int ret; \ |
162 | asm ("rorl %%cl,%0" \ | 162 | asm ("rorl %%cl,%0" \ |
163 | : "=r"(ret) \ | 163 | : "=r"(ret) \ |
164 | : "c"(n),"0"(a) \ | 164 | : "c"(n),"0"((unsigned int)(a)) \ |
165 | : "cc"); \ | 165 | : "cc"); \ |
166 | ret; \ | 166 | ret; \ |
167 | }) | 167 | }) |
diff --git a/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod b/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod index e2a2a8c6f8..f3605eb826 100644 --- a/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod +++ b/src/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod | |||
@@ -74,7 +74,7 @@ Recover digest originally signed using PKCS#1 and SHA256 digest: | |||
74 | /* Error */ | 74 | /* Error */ |
75 | 75 | ||
76 | /* Determine buffer length */ | 76 | /* Determine buffer length */ |
77 | if (EVP_PKEY_verifyrecover(ctx, rout, &routlen, sig, siglen) <= 0) | 77 | if (EVP_PKEY_verifyrecover(ctx, NULL, &routlen, sig, siglen) <= 0) |
78 | /* Error */ | 78 | /* Error */ |
79 | 79 | ||
80 | rout = OPENSSL_malloc(routlen); | 80 | rout = OPENSSL_malloc(routlen); |
diff --git a/src/lib/libssl/src/engines/makeengines.com b/src/lib/libssl/src/engines/makeengines.com index 6cf4236077..6329fbbf03 100644 --- a/src/lib/libssl/src/engines/makeengines.com +++ b/src/lib/libssl/src/engines/makeengines.com | |||
@@ -28,11 +28,35 @@ $! | |||
28 | $! P6 if defined, denotes which engines to build. If not defined, | 28 | $! P6 if defined, denotes which engines to build. If not defined, |
29 | $! all available engines are built. | 29 | $! all available engines are built. |
30 | $! | 30 | $! |
31 | $! P7, if defined, specifies the C pointer size. Ignored on VAX. | ||
32 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) | ||
33 | $! Supported values are: | ||
34 | $! | ||
35 | $! "" Compile with default (/NOPOINTER_SIZE) | ||
36 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) | ||
37 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) | ||
38 | $! (Automatically select ARGV if compiler supports it.) | ||
39 | $! 64= Compile with /POINTER_SIZE=64 (LONG). | ||
40 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). | ||
41 | $! | ||
42 | $! P8, if defined, specifies a directory where ZLIB files (zlib.h, | ||
43 | $! libz.olb) may be found. Optionally, a non-default object library | ||
44 | $! name may be included ("dev:[dir]libz_64.olb", for example). | ||
45 | $! | ||
31 | $!----------------------------------------------------------------------------- | 46 | $!----------------------------------------------------------------------------- |
32 | $! | 47 | $! |
48 | $! Announce/identify. | ||
49 | $! | ||
50 | $ proc = f$environment( "procedure") | ||
51 | $ write sys$output "@@@ "+ - | ||
52 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
53 | $! | ||
54 | $ on control_c then goto exit | ||
55 | $! | ||
33 | $! Set the default TCP/IP library to link against if needed | 56 | $! Set the default TCP/IP library to link against if needed |
34 | $! | 57 | $! |
35 | $ TCPIP_LIB = "" | 58 | $ TCPIP_LIB = "" |
59 | $ ZLIB_LIB = "" | ||
36 | $! | 60 | $! |
37 | $! Check What Architecture We Are Using. | 61 | $! Check What Architecture We Are Using. |
38 | $! | 62 | $! |
@@ -56,6 +80,11 @@ $! End The Architecture Check. | |||
56 | $! | 80 | $! |
57 | $ ENDIF | 81 | $ ENDIF |
58 | $! | 82 | $! |
83 | $ ARCHD = ARCH | ||
84 | $ LIB32 = "32" | ||
85 | $ OPT_FILE = "" | ||
86 | $ POINTER_SIZE = "" | ||
87 | $! | ||
59 | $! Set the names of the engines we want to build | 88 | $! Set the names of the engines we want to build |
60 | $! NOTE: Some might think this list ugly. However, it's made this way to | 89 | $! NOTE: Some might think this list ugly. However, it's made this way to |
61 | $! reflect the LIBNAMES variable in Makefile as closely as possible, | 90 | $! reflect the LIBNAMES variable in Makefile as closely as possible, |
@@ -72,28 +101,47 @@ $! | |||
72 | $ IF (ARCH .NES. "VAX") THEN - | 101 | $ IF (ARCH .NES. "VAX") THEN - |
73 | ENGINES = ENGINES+ ",ccgost" | 102 | ENGINES = ENGINES+ ",ccgost" |
74 | $! | 103 | $! |
104 | $! Check options. | ||
105 | $! | ||
106 | $ OPT_PHASE = P1 | ||
107 | $ ACCEPT_PHASE = "ALL,ENGINES" | ||
108 | $ OPT_DEBUG = P2 | ||
109 | $ OPT_COMPILER = P3 | ||
110 | $ OPT_TCPIP_LIB = P4 | ||
111 | $ OPT_SPECIAL_THREADS = P5 | ||
112 | $ OPT_POINTER_SIZE = P7 | ||
113 | $ ZLIB = P8 | ||
114 | $ | ||
115 | $ GOSUB CHECK_OPTIONS | ||
116 | $! | ||
75 | $! Set the goal directories, and create them if necessary | 117 | $! Set the goal directories, and create them if necessary |
76 | $! | 118 | $! |
77 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.ENGINES] | 119 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.ENGINES] |
78 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.ENGINES] | 120 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.ENGINES] |
79 | $ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR' | 121 | $ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR' |
80 | $ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR' | 122 | $ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR' |
81 | $! | 123 | $! |
82 | $! Set the goal files, and create them if necessary | 124 | $! Set the goal files, and create them if necessary |
83 | $! | 125 | $! |
84 | $ CRYPTO_LIB :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 126 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
85 | $ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB' | 127 | $ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB' |
86 | $! | 128 | $! |
87 | $! OK, time to check options and initialise | 129 | $! Specify the destination directory in any /MAP option. |
130 | $! | ||
131 | $ if (LINKMAP .eqs. "MAP") | ||
132 | $ then | ||
133 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" | ||
134 | $ endif | ||
135 | $! | ||
136 | $! Add the location prefix to the linker options file name. | ||
137 | $! | ||
138 | $ if (OPT_FILE .nes. "") | ||
139 | $ then | ||
140 | $ OPT_FILE = EXE_DIR+ OPT_FILE | ||
141 | $ endif | ||
142 | $! | ||
143 | $! Initialise. | ||
88 | $! | 144 | $! |
89 | $ OPT_PHASE = P1 | ||
90 | $ ACCEPT_PHASE = "ALL,ENGINES" | ||
91 | $ OPT_DEBUG = P2 | ||
92 | $ OPT_COMPILER = P3 | ||
93 | $ OPT_TCPIP_LIB = P4 | ||
94 | $ OPT_SPECIAL_THREADS = P5 | ||
95 | $ | ||
96 | $ GOSUB CHECK_OPTIONS | ||
97 | $ GOSUB INITIALISE | 145 | $ GOSUB INITIALISE |
98 | $ GOSUB CHECK_OPT_FILE | 146 | $ GOSUB CHECK_OPT_FILE |
99 | $! | 147 | $! |
@@ -172,7 +220,7 @@ $! Create a .OPT file for the object files (for a real engine name). | |||
172 | $! | 220 | $! |
173 | $ IF ENGINE_NAME .NES. "" | 221 | $ IF ENGINE_NAME .NES. "" |
174 | $ THEN | 222 | $ THEN |
175 | $ OPEN/WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT | 223 | $ OPEN /WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT |
176 | $ ENDIF | 224 | $ ENDIF |
177 | $! | 225 | $! |
178 | $! Here's the start of per-engine module loop. | 226 | $! Here's the start of per-engine module loop. |
@@ -257,18 +305,14 @@ $! For shareable libraries, we need to do things a little differently | |||
257 | $! depending on if we link with a TCP/IP library or not. | 305 | $! depending on if we link with a TCP/IP library or not. |
258 | $! | 306 | $! |
259 | $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT | 307 | $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT |
260 | $ IF TCPIP_LIB .NES. "" | 308 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE - |
261 | $ THEN | 309 | 'EXE_DIR''ENGINE_NAME'.OPT /OPTIONS - |
262 | $ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE - | 310 | 'TV_OBJ', - |
263 | 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', - | 311 | 'CRYPTO_LIB' /LIBRARY, - |
264 | 'CRYPTO_LIB'/LIBRARY, - | 312 | 'ENGINE_OPT' /OPTIONS - |
265 | 'ENGINE_OPT'/OPTION,'TCPIP_LIB','OPT_FILE'/OPTION | 313 | 'TCPIP_LIB' - |
266 | $ ELSE | 314 | 'ZLIB_LIB' - |
267 | $ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE - | 315 | ,'OPT_FILE' /OPTIONS |
268 | 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', - | ||
269 | 'CRYPTO_LIB'/LIBRARY, - | ||
270 | 'ENGINE_OPT'/OPTION,'OPT_FILE'/OPTION | ||
271 | $ ENDIF | ||
272 | $! | 316 | $! |
273 | $! Next engine | 317 | $! Next engine |
274 | $! | 318 | $! |
@@ -302,7 +346,7 @@ $! | |||
302 | $ CREATE 'OPT_FILE' | 346 | $ CREATE 'OPT_FILE' |
303 | $DECK | 347 | $DECK |
304 | ! | 348 | ! |
305 | ! Default System Options File To Link Agianst | 349 | ! Default System Options File To Link Against |
306 | ! The Sharable VAX C Runtime Library. | 350 | ! The Sharable VAX C Runtime Library. |
307 | ! | 351 | ! |
308 | SYS$SHARE:VAXCRTL.EXE/SHARE | 352 | SYS$SHARE:VAXCRTL.EXE/SHARE |
@@ -331,7 +375,7 @@ $! | |||
331 | $ CREATE 'OPT_FILE' | 375 | $ CREATE 'OPT_FILE' |
332 | $DECK | 376 | $DECK |
333 | ! | 377 | ! |
334 | ! Default System Options File To Link Agianst | 378 | ! Default System Options File To Link Against |
335 | ! The Sharable C Runtime Library. | 379 | ! The Sharable C Runtime Library. |
336 | ! | 380 | ! |
337 | GNU_CC:[000000]GCCLIB/LIBRARY | 381 | GNU_CC:[000000]GCCLIB/LIBRARY |
@@ -366,7 +410,7 @@ $! | |||
366 | $ CREATE 'OPT_FILE' | 410 | $ CREATE 'OPT_FILE' |
367 | $DECK | 411 | $DECK |
368 | ! | 412 | ! |
369 | ! Default System Options File To Link Agianst | 413 | ! Default System Options File To Link Against |
370 | ! The Sharable DEC C Runtime Library. | 414 | ! The Sharable DEC C Runtime Library. |
371 | ! | 415 | ! |
372 | SYS$SHARE:DECC$SHR.EXE/SHARE | 416 | SYS$SHARE:DECC$SHR.EXE/SHARE |
@@ -381,7 +425,7 @@ $! | |||
381 | $ CREATE 'OPT_FILE' | 425 | $ CREATE 'OPT_FILE' |
382 | $DECK | 426 | $DECK |
383 | ! | 427 | ! |
384 | ! Default System Options File For non-VAX To Link Agianst | 428 | ! Default System Options File For non-VAX To Link Against |
385 | ! The Sharable C Runtime Library. | 429 | ! The Sharable C Runtime Library. |
386 | ! | 430 | ! |
387 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | 431 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
@@ -453,8 +497,8 @@ $ IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," - | |||
453 | $ WRITE SYS$OUTPUT "" | 497 | $ WRITE SYS$OUTPUT "" |
454 | $ WRITE SYS$OUTPUT " where 'xxx' stands for:" | 498 | $ WRITE SYS$OUTPUT " where 'xxx' stands for:" |
455 | $ WRITE SYS$OUTPUT "" | 499 | $ WRITE SYS$OUTPUT "" |
456 | $ WRITE SYS$OUTPUT " ALPHA : Alpha architecture." | 500 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha architecture." |
457 | $ WRITE SYS$OUTPUT " IA64 : IA64 architecture." | 501 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 architecture." |
458 | $ WRITE SYS$OUTPUT " VAX : VAX architecture." | 502 | $ WRITE SYS$OUTPUT " VAX : VAX architecture." |
459 | $ WRITE SYS$OUTPUT "" | 503 | $ WRITE SYS$OUTPUT "" |
460 | $! | 504 | $! |
@@ -475,15 +519,16 @@ $! | |||
475 | $ IF (OPT_DEBUG.EQS."NODEBUG") | 519 | $ IF (OPT_DEBUG.EQS."NODEBUG") |
476 | $ THEN | 520 | $ THEN |
477 | $! | 521 | $! |
478 | $! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information. | 522 | $! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information. |
479 | $! | 523 | $! |
480 | $ DEBUGGER = "NODEBUG" | 524 | $ DEBUGGER = "NODEBUG" |
481 | $ TRACEBACK = "NOTRACEBACK" | 525 | $ LINKMAP = "NOMAP" |
482 | $ GCC_OPTIMIZE = "OPTIMIZE" | 526 | $ TRACEBACK = "NOTRACEBACK" |
483 | $ CC_OPTIMIZE = "OPTIMIZE" | 527 | $ GCC_OPTIMIZE = "OPTIMIZE" |
484 | $ MACRO_OPTIMIZE = "OPTIMIZE" | 528 | $ CC_OPTIMIZE = "OPTIMIZE" |
485 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 529 | $ MACRO_OPTIMIZE = "OPTIMIZE" |
486 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 530 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
531 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
487 | $ ELSE | 532 | $ ELSE |
488 | $! | 533 | $! |
489 | $! Check To See If We Are To Compile With Debugger Information. | 534 | $! Check To See If We Are To Compile With Debugger Information. |
@@ -494,6 +539,7 @@ $! | |||
494 | $! Compile With Debugger Information. | 539 | $! Compile With Debugger Information. |
495 | $! | 540 | $! |
496 | $ DEBUGGER = "DEBUG" | 541 | $ DEBUGGER = "DEBUG" |
542 | $ LINKMAP = "MAP" | ||
497 | $ TRACEBACK = "TRACEBACK" | 543 | $ TRACEBACK = "TRACEBACK" |
498 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 544 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
499 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 545 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
@@ -502,7 +548,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | |||
502 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | 548 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
503 | $ ELSE | 549 | $ ELSE |
504 | $! | 550 | $! |
505 | $! They Entered An Invalid Option.. | 551 | $! They Entered An Invalid Option. |
506 | $! | 552 | $! |
507 | $ WRITE SYS$OUTPUT "" | 553 | $ WRITE SYS$OUTPUT "" |
508 | $ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:" | 554 | $ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:" |
@@ -557,6 +603,59 @@ $! End The OPT_SPECIAL_THREADS Check. | |||
557 | $! | 603 | $! |
558 | $ ENDIF | 604 | $ ENDIF |
559 | $! | 605 | $! |
606 | $! Check OPT_POINTER_SIZE (P7). | ||
607 | $! | ||
608 | $ IF (OPT_POINTER_SIZE .NES. "") .AND. (ARCH .NES. "VAX") | ||
609 | $ THEN | ||
610 | $! | ||
611 | $ IF (OPT_POINTER_SIZE .EQS. "32") | ||
612 | $ THEN | ||
613 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
614 | $ ELSE | ||
615 | $ POINTER_SIZE = F$EDIT( OPT_POINTER_SIZE, "COLLAPSE, UPCASE") | ||
616 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
617 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
618 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
619 | $ THEN | ||
620 | $ ARCHD = ARCH+ "_64" | ||
621 | $ LIB32 = "" | ||
622 | $ POINTER_SIZE = " /POINTER_SIZE=64" | ||
623 | $ ELSE | ||
624 | $! | ||
625 | $! Tell The User Entered An Invalid Option. | ||
626 | $! | ||
627 | $ WRITE SYS$OUTPUT "" | ||
628 | $ WRITE SYS$OUTPUT "The Option ", OPT_POINTER_SIZE, - | ||
629 | " Is Invalid. The Valid Options Are:" | ||
630 | $ WRITE SYS$OUTPUT "" | ||
631 | $ WRITE SYS$OUTPUT - | ||
632 | " """" : Compile with default (short) pointers." | ||
633 | $ WRITE SYS$OUTPUT - | ||
634 | " 32 : Compile with 32-bit (short) pointers." | ||
635 | $ WRITE SYS$OUTPUT - | ||
636 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
637 | $ WRITE SYS$OUTPUT - | ||
638 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
639 | $ WRITE SYS$OUTPUT - | ||
640 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
641 | $ WRITE SYS$OUTPUT "" | ||
642 | $! | ||
643 | $! Time To EXIT. | ||
644 | $! | ||
645 | $ EXIT | ||
646 | $! | ||
647 | $ ENDIF | ||
648 | $! | ||
649 | $ ENDIF | ||
650 | $! | ||
651 | $! End The OPT_POINTER_SIZE Check. | ||
652 | $! | ||
653 | $ ENDIF | ||
654 | $! | ||
655 | $! Set basic C compiler /INCLUDE directories. | ||
656 | $! | ||
657 | $ CC_INCLUDES = "SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS]" | ||
658 | $! | ||
560 | $! Check To See If OPT_COMPILER Is Blank. | 659 | $! Check To See If OPT_COMPILER Is Blank. |
561 | $! | 660 | $! |
562 | $ IF (OPT_COMPILER.EQS."") | 661 | $ IF (OPT_COMPILER.EQS."") |
@@ -657,11 +756,63 @@ $ CCDEFS = "TCPIP_TYPE_''OPT_TCPIP_LIB',DSO_VMS" | |||
657 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 756 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
658 | $ CCEXTRAFLAGS = "" | 757 | $ CCEXTRAFLAGS = "" |
659 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 758 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
660 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX" | 759 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX" |
661 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 760 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
662 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 761 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
663 | $! | 762 | $! |
664 | $! Check To See If The User Entered A Valid Paramter. | 763 | $! Check To See If We Have A ZLIB Option. |
764 | $! | ||
765 | $ IF (ZLIB .NES. "") | ||
766 | $ THEN | ||
767 | $! | ||
768 | $! Check for expected ZLIB files. | ||
769 | $! | ||
770 | $ err = 0 | ||
771 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
772 | $ if (f$search( file1) .eqs. "") | ||
773 | $ then | ||
774 | $ WRITE SYS$OUTPUT "" | ||
775 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
776 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
777 | $ err = 1 | ||
778 | $ endif | ||
779 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
780 | $! | ||
781 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
782 | $ if (f$search( file2) .eqs. "") | ||
783 | $ then | ||
784 | $ if (err .eq. 0) | ||
785 | $ then | ||
786 | $ WRITE SYS$OUTPUT "" | ||
787 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
788 | $ endif | ||
789 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
790 | $ WRITE SYS$OUTPUT "" | ||
791 | $ err = err+ 2 | ||
792 | $ endif | ||
793 | $ if (err .eq. 1) | ||
794 | $ then | ||
795 | $ WRITE SYS$OUTPUT "" | ||
796 | $ endif | ||
797 | $! | ||
798 | $ if (err .ne. 0) | ||
799 | $ then | ||
800 | $ EXIT | ||
801 | $ endif | ||
802 | $! | ||
803 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
804 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
805 | $ ZLIB_LIB = ", ''file2' /library" | ||
806 | $! | ||
807 | $! Print info | ||
808 | $! | ||
809 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
810 | $! | ||
811 | $! End The ZLIB Check. | ||
812 | $! | ||
813 | $ ENDIF | ||
814 | $! | ||
815 | $! Check To See If The User Entered A Valid Parameter. | ||
665 | $! | 816 | $! |
666 | $ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC") | 817 | $ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC") |
667 | $ THEN | 818 | $ THEN |
@@ -684,14 +835,14 @@ $! | |||
684 | $ CC = "CC" | 835 | $ CC = "CC" |
685 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 836 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
686 | THEN CC = "CC/DECC" | 837 | THEN CC = "CC/DECC" |
687 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 838 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
688 | "/NOLIST/PREFIX=ALL" + - | 839 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
689 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS])" + - | 840 | " /INCLUDE=(''CC_INCLUDES') " + - |
690 | CCEXTRAFLAGS | 841 | CCEXTRAFLAGS |
691 | $! | 842 | $! |
692 | $! Define The Linker Options File Name. | 843 | $! Define The Linker Options File Name. |
693 | $! | 844 | $! |
694 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 845 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
695 | $! | 846 | $! |
696 | $! End DECC Check. | 847 | $! End DECC Check. |
697 | $! | 848 | $! |
@@ -720,7 +871,7 @@ $ EXIT | |||
720 | $ ENDIF | 871 | $ ENDIF |
721 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 872 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
722 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 873 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
723 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | 874 | "/INCLUDE=(''CC_INCLUDES')" + - |
724 | CCEXTRAFLAGS | 875 | CCEXTRAFLAGS |
725 | $ CCDEFS = """VAXC""," + CCDEFS | 876 | $ CCDEFS = """VAXC""," + CCDEFS |
726 | $! | 877 | $! |
@@ -730,7 +881,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | |||
730 | $! | 881 | $! |
731 | $! Define The Linker Options File Name. | 882 | $! Define The Linker Options File Name. |
732 | $! | 883 | $! |
733 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 884 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
734 | $! | 885 | $! |
735 | $! End VAXC Check | 886 | $! End VAXC Check |
736 | $! | 887 | $! |
@@ -752,12 +903,12 @@ $! | |||
752 | $! Use GNU C... | 903 | $! Use GNU C... |
753 | $! | 904 | $! |
754 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 905 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
755 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | 906 | "/INCLUDE=(''CC_INCLUDES')" + - |
756 | CCEXTRAFLAGS | 907 | CCEXTRAFLAGS |
757 | $! | 908 | $! |
758 | $! Define The Linker Options File Name. | 909 | $! Define The Linker Options File Name. |
759 | $! | 910 | $! |
760 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 911 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
761 | $! | 912 | $! |
762 | $! End The GNU C Check. | 913 | $! End The GNU C Check. |
763 | $! | 914 | $! |
@@ -773,12 +924,12 @@ $ IF COMPILER .EQS. "DECC" | |||
773 | $ THEN | 924 | $ THEN |
774 | $ IF CCDISABLEWARNINGS .NES. "" | 925 | $ IF CCDISABLEWARNINGS .NES. "" |
775 | $ THEN | 926 | $ THEN |
776 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 927 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
777 | $ ENDIF | 928 | $ ENDIF |
778 | $ ELSE | 929 | $ ELSE |
779 | $ CCDISABLEWARNINGS = "" | 930 | $ CCDISABLEWARNINGS = "" |
780 | $ ENDIF | 931 | $ ENDIF |
781 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 932 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
782 | $! | 933 | $! |
783 | $! Show user the result | 934 | $! Show user the result |
784 | $! | 935 | $! |
@@ -808,8 +959,12 @@ $ ENDIF | |||
808 | $! | 959 | $! |
809 | $! Build a MACRO command for the architecture at hand | 960 | $! Build a MACRO command for the architecture at hand |
810 | $! | 961 | $! |
811 | $ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'" | 962 | $ IF ARCH .EQS. "VAX" |
812 | $ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'" | 963 | $ THEN |
964 | $ MACRO = "MACRO/''DEBUGGER'" | ||
965 | $ ELSE | ||
966 | $ MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'" | ||
967 | $ ENDIF | ||
813 | $! | 968 | $! |
814 | $! Show user the result | 969 | $! Show user the result |
815 | $! | 970 | $! |
@@ -829,7 +984,7 @@ $ THEN | |||
829 | $! | 984 | $! |
830 | $! Set the library to use SOCKETSHR | 985 | $! Set the library to use SOCKETSHR |
831 | $! | 986 | $! |
832 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 987 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
833 | $! | 988 | $! |
834 | $! Done with SOCKETSHR | 989 | $! Done with SOCKETSHR |
835 | $! | 990 | $! |
@@ -855,13 +1010,13 @@ $ THEN | |||
855 | $! | 1010 | $! |
856 | $! Set the library to use UCX. | 1011 | $! Set the library to use UCX. |
857 | $! | 1012 | $! |
858 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1013 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
859 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 1014 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
860 | $ THEN | 1015 | $ THEN |
861 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 1016 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
862 | $ ELSE | 1017 | $ ELSE |
863 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 1018 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
864 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1019 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
865 | $ ENDIF | 1020 | $ ENDIF |
866 | $! | 1021 | $! |
867 | $! Done with UCX | 1022 | $! Done with UCX |
@@ -875,7 +1030,7 @@ $ THEN | |||
875 | $! | 1030 | $! |
876 | $! Set the library to use TCPIP (post UCX). | 1031 | $! Set the library to use TCPIP (post UCX). |
877 | $! | 1032 | $! |
878 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | 1033 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
879 | $! | 1034 | $! |
880 | $! Done with TCPIP | 1035 | $! Done with TCPIP |
881 | $! | 1036 | $! |
@@ -896,7 +1051,7 @@ $ ENDIF | |||
896 | $! | 1051 | $! |
897 | $! Print info | 1052 | $! Print info |
898 | $! | 1053 | $! |
899 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1054 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
900 | $! | 1055 | $! |
901 | $! Else The User Entered An Invalid Argument. | 1056 | $! Else The User Entered An Invalid Argument. |
902 | $! | 1057 | $! |
@@ -939,7 +1094,7 @@ $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" | |||
939 | $! | 1094 | $! |
940 | $! Set up the logical name OPENSSL to point at the include directory | 1095 | $! Set up the logical name OPENSSL to point at the include directory |
941 | $! | 1096 | $! |
942 | $ DEFINE OPENSSL/NOLOG '__INCLUDE' | 1097 | $ DEFINE OPENSSL /NOLOG '__INCLUDE' |
943 | $! | 1098 | $! |
944 | $! Done | 1099 | $! Done |
945 | $! | 1100 | $! |
@@ -947,15 +1102,24 @@ $ RETURN | |||
947 | $! | 1102 | $! |
948 | $ CLEANUP: | 1103 | $ CLEANUP: |
949 | $! | 1104 | $! |
950 | $! Restore the logical name OPENSSL if it had a value | 1105 | $! Restore the saved logical name OPENSSL, if it had a value. |
951 | $! | 1106 | $! |
952 | $ IF __SAVE_OPENSSL .EQS. "" | 1107 | $ if (f$type( __SAVE_OPENSSL) .nes. "") |
953 | $ THEN | 1108 | $ then |
954 | $ DEASSIGN OPENSSL | 1109 | $ IF __SAVE_OPENSSL .EQS. "" |
955 | $ ELSE | 1110 | $ THEN |
956 | $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' | 1111 | $ DEASSIGN OPENSSL |
957 | $ ENDIF | 1112 | $ ELSE |
1113 | $ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL' | ||
1114 | $ ENDIF | ||
1115 | $ endif | ||
1116 | $! | ||
1117 | $! Close any open files. | ||
1118 | $! | ||
1119 | $ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - | ||
1120 | close objects | ||
958 | $! | 1121 | $! |
959 | $! Done | 1122 | $! Done |
960 | $! | 1123 | $! |
961 | $ RETURN | 1124 | $ RETURN |
1125 | $! | ||
diff --git a/src/lib/libssl/src/ms/uplink.c b/src/lib/libssl/src/ms/uplink.c index 7b7da08d47..6d59cb1f87 100644 --- a/src/lib/libssl/src/ms/uplink.c +++ b/src/lib/libssl/src/ms/uplink.c | |||
@@ -40,7 +40,8 @@ void OPENSSL_Uplink (volatile void **table, int index) | |||
40 | * should be sufficient [it prohibits compiler to reorder memory | 40 | * should be sufficient [it prohibits compiler to reorder memory |
41 | * access instructions]. */ | 41 | * access instructions]. */ |
42 | do { | 42 | do { |
43 | len = _stprintf (msg,_T("OPENSSL_Uplink(%p,%02X): "),table,index); | 43 | len = _sntprintf (msg,sizeof(msg)/sizeof(TCHAR), |
44 | _T("OPENSSL_Uplink(%p,%02X): "),table,index); | ||
44 | _tcscpy (msg+len,_T("unimplemented function")); | 45 | _tcscpy (msg+len,_T("unimplemented function")); |
45 | 46 | ||
46 | if ((h=apphandle)==NULL) | 47 | if ((h=apphandle)==NULL) |
diff --git a/src/lib/libssl/src/ssl/install-ssl.com b/src/lib/libssl/src/ssl/install-ssl.com new file mode 100755 index 0000000000..1bd6ccaa7a --- /dev/null +++ b/src/lib/libssl/src/ssl/install-ssl.com | |||
@@ -0,0 +1,136 @@ | |||
1 | $! INSTALL-SSL.COM -- Installs the files in a given directory tree | ||
2 | $! | ||
3 | $! Author: Richard Levitte <richard@levitte.org> | ||
4 | $! Time of creation: 22-MAY-1998 10:13 | ||
5 | $! | ||
6 | $! P1 root of the directory tree | ||
7 | $! P2 "64" for 64-bit pointers. | ||
8 | $! | ||
9 | $! | ||
10 | $! Announce/identify. | ||
11 | $! | ||
12 | $ proc = f$environment( "procedure") | ||
13 | $ write sys$output "@@@ "+ - | ||
14 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") | ||
15 | $! | ||
16 | $ on error then goto tidy | ||
17 | $ on control_c then goto tidy | ||
18 | $! | ||
19 | $ if p1 .eqs. "" | ||
20 | $ then | ||
21 | $ write sys$output "First argument missing." | ||
22 | $ write sys$output - | ||
23 | "It should be the directory where you want things installed." | ||
24 | $ exit | ||
25 | $ endif | ||
26 | $! | ||
27 | $ if (f$getsyi( "cpu") .lt. 128) | ||
28 | $ then | ||
29 | $ arch = "VAX" | ||
30 | $ else | ||
31 | $ arch = f$edit( f$getsyi( "arch_name"), "upcase") | ||
32 | $ if (arch .eqs. "") then arch = "UNK" | ||
33 | $ endif | ||
34 | $! | ||
35 | $ archd = arch | ||
36 | $ lib32 = "32" | ||
37 | $ shr = "_SHR32" | ||
38 | $! | ||
39 | $ if (p2 .nes. "") | ||
40 | $ then | ||
41 | $ if (p2 .eqs. "64") | ||
42 | $ then | ||
43 | $ archd = arch+ "_64" | ||
44 | $ lib32 = "" | ||
45 | $ shr = "_SHR" | ||
46 | $ else | ||
47 | $ if (p2 .nes. "32") | ||
48 | $ then | ||
49 | $ write sys$output "Second argument invalid." | ||
50 | $ write sys$output "It should be "32", "64", or nothing." | ||
51 | $ exit | ||
52 | $ endif | ||
53 | $ endif | ||
54 | $ endif | ||
55 | $! | ||
56 | $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0" | ||
57 | $ root_dev = f$parse(root,,,"device","syntax_only") | ||
58 | $ root_dir = f$parse(root,,,"directory","syntax_only") - - | ||
59 | "[000000." - "][" - "[" - "]" | ||
60 | $ root = root_dev + "[" + root_dir | ||
61 | $! | ||
62 | $ define /nolog wrk_sslroot 'root'.] /trans=conc | ||
63 | $ define /nolog wrk_sslinclude wrk_sslroot:[include] | ||
64 | $ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe] | ||
65 | $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib] | ||
66 | $! | ||
67 | $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then - | ||
68 | create /directory /log wrk_sslroot:[000000] | ||
69 | $ if f$parse("wrk_sslinclude:") .eqs. "" then - | ||
70 | create /directory /log wrk_sslinclude: | ||
71 | $ if f$parse("wrk_sslxexe:") .eqs. "" then - | ||
72 | create /directory /log wrk_sslxexe: | ||
73 | $ if f$parse("wrk_sslxlib:") .eqs. "" then - | ||
74 | create /directory /log wrk_sslxlib: | ||
75 | $! | ||
76 | $ exheader := ssl.h, ssl2.h, ssl3.h, ssl23.h, tls1.h, dtls1.h, kssl.h | ||
77 | $ e_exe := ssl_task | ||
78 | $ libs := ssl_libssl | ||
79 | $! | ||
80 | $ xexe_dir := [-.'archd'.exe.ssl] | ||
81 | $! | ||
82 | $ copy /protection = w:re 'exheader' wrk_sslinclude: /log | ||
83 | $! | ||
84 | $ i = 0 | ||
85 | $ loop_exe: | ||
86 | $ e = f$edit( f$element( i, ",", e_exe), "trim") | ||
87 | $ i = i + 1 | ||
88 | $ if e .eqs. "," then goto loop_exe_end | ||
89 | $ set noon | ||
90 | $ file = xexe_dir+ e+ ".exe" | ||
91 | $ if f$search( file) .nes. "" | ||
92 | $ then | ||
93 | $ copy /protection = w:re 'file' wrk_sslxexe: /log | ||
94 | $ endif | ||
95 | $ set on | ||
96 | $ goto loop_exe | ||
97 | $ loop_exe_end: | ||
98 | $! | ||
99 | $ i = 0 | ||
100 | $ loop_lib: | ||
101 | $ e = f$edit(f$element(i, ",", libs),"trim") | ||
102 | $ i = i + 1 | ||
103 | $ if e .eqs. "," then goto loop_lib_end | ||
104 | $ set noon | ||
105 | $! Object library. | ||
106 | $ file = xexe_dir+ e+ lib32+ ".olb" | ||
107 | $ if f$search( file) .nes. "" | ||
108 | $ then | ||
109 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
110 | $ endif | ||
111 | $! Shareable image. | ||
112 | $ file = xexe_dir+ e+ shr+ ".exe" | ||
113 | $ if f$search( file) .nes. "" | ||
114 | $ then | ||
115 | $ copy /protection = w:re 'file' wrk_sslxlib: /log | ||
116 | $ endif | ||
117 | $ set on | ||
118 | $ goto loop_lib | ||
119 | $ loop_lib_end: | ||
120 | $! | ||
121 | $ tidy: | ||
122 | $! | ||
123 | $ call deass wrk_sslroot | ||
124 | $ call deass wrk_sslinclude | ||
125 | $ call deass wrk_sslxexe | ||
126 | $ call deass wrk_sslxlib | ||
127 | $! | ||
128 | $ exit | ||
129 | $! | ||
130 | $ deass: subroutine | ||
131 | $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "") | ||
132 | $ then | ||
133 | $ deassign /process 'p1' | ||
134 | $ endif | ||
135 | $ endsubroutine | ||
136 | $! | ||
diff --git a/src/lib/libssl/src/test/bctest.com b/src/lib/libssl/src/test/bctest.com new file mode 100644 index 0000000000..d7e5ec139e --- /dev/null +++ b/src/lib/libssl/src/test/bctest.com | |||
@@ -0,0 +1,152 @@ | |||
1 | $! | ||
2 | $! Check operation of "bc". | ||
3 | $! | ||
4 | $! 2010-04-05 SMS. New. Based (loosely) on "bctest". | ||
5 | $! | ||
6 | $! | ||
7 | $ tmp_file_name = "tmp.bctest" | ||
8 | $ failure = "" | ||
9 | $! | ||
10 | $! Basic command test. | ||
11 | $! | ||
12 | $ on warning then goto bc_fail | ||
13 | $ bc | ||
14 | $ on error then exit | ||
15 | $! | ||
16 | $! Test for SunOS 5.[78] bc bug. | ||
17 | $! | ||
18 | $ if (failure .eqs. "") | ||
19 | $ then | ||
20 | $! | ||
21 | $ define /user_mode sys$output 'tmp_file_name' | ||
22 | $ bc | ||
23 | obase=16 | ||
24 | ibase=16 | ||
25 | a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\ | ||
26 | CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\ | ||
27 | 10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\ | ||
28 | C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\ | ||
29 | 3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\ | ||
30 | 4FC3CADF855448B24A9D7640BCF473E | ||
31 | b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\ | ||
32 | 9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\ | ||
33 | 8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\ | ||
34 | 3ED0E2017D60A68775B75481449 | ||
35 | (a/b)*b + (a%b) - a | ||
36 | $ status = $status | ||
37 | $ output_expected = "0" | ||
38 | $ gosub check_output | ||
39 | $ if (output .ne. 1) | ||
40 | $ then | ||
41 | $ failure = "SunOStest" | ||
42 | $ else | ||
43 | $ delete 'f$parse( tmp_file_name)' | ||
44 | $ endif | ||
45 | $ endif | ||
46 | $! | ||
47 | $! Test for SCO bc bug. | ||
48 | $! | ||
49 | $ if (failure .eqs. "") | ||
50 | $ then | ||
51 | $! | ||
52 | $ define /user_mode sys$output 'tmp_file_name' | ||
53 | $ bc | ||
54 | obase=16 | ||
55 | ibase=16 | ||
56 | -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\ | ||
57 | 9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\ | ||
58 | 11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\ | ||
59 | 1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\ | ||
60 | AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\ | ||
61 | F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\ | ||
62 | B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\ | ||
63 | 02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\ | ||
64 | 85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\ | ||
65 | A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\ | ||
66 | E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\ | ||
67 | 8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\ | ||
68 | 04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\ | ||
69 | 89C8D71 | ||
70 | AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\ | ||
71 | 928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\ | ||
72 | 8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\ | ||
73 | 37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\ | ||
74 | E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\ | ||
75 | F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\ | ||
76 | 9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\ | ||
77 | D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\ | ||
78 | 5296964 | ||
79 | $ status = $status | ||
80 | $ output_expected = "0\0" | ||
81 | $ gosub check_output | ||
82 | $ if (output .ne. 1) | ||
83 | $ then | ||
84 | $ failure = "SCOtest" | ||
85 | $ else | ||
86 | $ delete 'f$parse( tmp_file_name)' | ||
87 | $ endif | ||
88 | $ endif | ||
89 | $! | ||
90 | $! Test for working 'print' command. | ||
91 | $! | ||
92 | $ if (failure .eqs. "") | ||
93 | $ then | ||
94 | $! | ||
95 | $ define /user_mode sys$output 'tmp_file_name' | ||
96 | $ bc | ||
97 | print "OK" | ||
98 | $ status = $status | ||
99 | $ output_expected = "OK" | ||
100 | $ gosub check_output | ||
101 | $ if (output .ne. 1) | ||
102 | $ then | ||
103 | $ failure = "printtest" | ||
104 | $ else | ||
105 | $ delete 'f$parse( tmp_file_name)' | ||
106 | $ endif | ||
107 | $ endif | ||
108 | $! | ||
109 | $ if (failure .nes. "") | ||
110 | $ then | ||
111 | $ write sys$output - | ||
112 | "No working bc found. Consider installing GNU bc." | ||
113 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
114 | $ endif | ||
115 | $! | ||
116 | $ exit | ||
117 | $! | ||
118 | $! | ||
119 | $! Complete "bc" command failure. | ||
120 | $! | ||
121 | $ bc_fail: | ||
122 | $ write sys$output - | ||
123 | "No ""bc"" program/symbol found. Consider installing GNU bc." | ||
124 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
125 | $! | ||
126 | $! | ||
127 | $! Output check subroutine. | ||
128 | $! | ||
129 | $ check_output: | ||
130 | $ eof = 0 | ||
131 | $ line_nr = 0 | ||
132 | $ open /read tmp_file 'tmp_file_name' | ||
133 | $ c_o_loop: | ||
134 | $ read /error = error_read tmp_file line | ||
135 | $ goto ok_read | ||
136 | $ error_read: | ||
137 | $ eof = 1 | ||
138 | $ ok_read: | ||
139 | $ line_expected = f$element( line_nr, "\", output_expected) | ||
140 | $ line_nr = line_nr+ 1 | ||
141 | $ if ((line_expected .nes. "\") .and. (.not. eof) .and. - | ||
142 | (line_expected .eqs. line)) then goto c_o_loop | ||
143 | $! | ||
144 | $ if ((line_expected .eqs. "\") .and. eof) | ||
145 | $ then | ||
146 | $ output = 1 | ||
147 | $ else | ||
148 | $ output = 0 | ||
149 | $ endif | ||
150 | $ close tmp_file | ||
151 | $ return | ||
152 | $! | ||
diff --git a/src/lib/libssl/src/test/bntest.com b/src/lib/libssl/src/test/bntest.com new file mode 100644 index 0000000000..6545d2e5a5 --- /dev/null +++ b/src/lib/libssl/src/test/bntest.com | |||
@@ -0,0 +1,76 @@ | |||
1 | $! | ||
2 | $! Analyze bntest output file. | ||
3 | $! | ||
4 | $! Exit status = 1 (success) if all tests passed, | ||
5 | $! 0 (warning) if any test failed. | ||
6 | $! | ||
7 | $! 2011-02-20 SMS. Added code to skip "#" comments in the input file. | ||
8 | $! | ||
9 | $! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh. | ||
10 | $! | ||
11 | $! Expect data like: | ||
12 | $! test test_name1 | ||
13 | $! 0 | ||
14 | $! [...] | ||
15 | $! test test_name2 | ||
16 | $! 0 | ||
17 | $! [...] | ||
18 | $! [...] | ||
19 | $! | ||
20 | $! Some tests have no following "0" lines. | ||
21 | $! | ||
22 | $ result_file_name = f$edit( p1, "TRIM") | ||
23 | $ if (result_file_name .eqs. "") | ||
24 | $ then | ||
25 | $ result_file_name = "bntest-vms.out" | ||
26 | $ endif | ||
27 | $! | ||
28 | $ fail = 0 | ||
29 | $ passed = 0 | ||
30 | $ tests = 0 | ||
31 | $! | ||
32 | $ on control_c then goto tidy | ||
33 | $ on error then goto tidy | ||
34 | $! | ||
35 | $ open /read result_file 'result_file_name' | ||
36 | $! | ||
37 | $ read_loop: | ||
38 | $ read /end = read_loop_end /error = tidy result_file line | ||
39 | $ t1 = f$element( 0, " ", line) | ||
40 | $! | ||
41 | $! Skip "#" comment lines. | ||
42 | $ if (f$extract( 0, 1, f$edit( line, "TRIM")) .eqs. "#") then - | ||
43 | goto read_loop | ||
44 | $! | ||
45 | $ if (t1 .eqs. "test") | ||
46 | $ then | ||
47 | $ passed = passed+ 1 | ||
48 | $ tests = tests+ 1 | ||
49 | $ fail = 1 | ||
50 | $ t2 = f$extract( 5, 1000, line) | ||
51 | $ write sys$output "verify ''t2'" | ||
52 | $ else | ||
53 | $ if (t1 .nes. "0") | ||
54 | $ then | ||
55 | $ write sys$output "Failed! bc: ''line'" | ||
56 | $ passed = passed- fail | ||
57 | $ fail = 0 | ||
58 | $ endif | ||
59 | $ endif | ||
60 | $ goto read_loop | ||
61 | $ read_loop_end: | ||
62 | $ write sys$output "''passed'/''tests' tests passed" | ||
63 | $! | ||
64 | $ tidy: | ||
65 | $ if f$trnlnm( "result_file", "LNM$PROCESS_TABLE", , "SUPERVISOR", , "CONFINE") | ||
66 | $ then | ||
67 | $ close result_file | ||
68 | $ endif | ||
69 | $! | ||
70 | $ if ((tests .gt. 0) .and. (tests .eq. passed)) | ||
71 | $ then | ||
72 | $ exit 1 | ||
73 | $ else | ||
74 | $ exit 0 | ||
75 | $ endif | ||
76 | $! | ||
diff --git a/src/lib/libssl/src/test/clean_test.com b/src/lib/libssl/src/test/clean_test.com new file mode 100755 index 0000000000..7df633fbef --- /dev/null +++ b/src/lib/libssl/src/test/clean_test.com | |||
@@ -0,0 +1,35 @@ | |||
1 | $! | ||
2 | $! Delete various test results files. | ||
3 | $! | ||
4 | $ def_orig = f$environment( "default") | ||
5 | $ proc = f$environment( "procedure") | ||
6 | $ proc_dev_dir = f$parse( "A.;", proc) - "A.;" | ||
7 | $! | ||
8 | $ on control_c then goto tidy | ||
9 | $ on error then goto tidy | ||
10 | $! | ||
11 | $ set default 'proc_dev_dir' | ||
12 | $! | ||
13 | $ files := *.cms;*, *.srl;*, *.ss;*, - | ||
14 | cms.err;*, cms.out;*, newreq.pem;*, - | ||
15 | p.txt-zlib-cipher;*, - | ||
16 | smtst.txt;*, testkey.pem;*, testreq.pem;*, - | ||
17 | test_*.err;*, test_*.out;*, - | ||
18 | .rnd;* | ||
19 | $! | ||
20 | $ delim = "," | ||
21 | $ i = 0 | ||
22 | $ loop: | ||
23 | $ file = f$edit( f$element( i, delim, files), "trim") | ||
24 | $ if (file .eqs. delim) then goto loop_end | ||
25 | $ if (f$search( file) .nes. "") then - | ||
26 | delete 'p1' 'file' | ||
27 | $ i = i+ 1 | ||
28 | $ goto loop | ||
29 | $ loop_end: | ||
30 | $! | ||
31 | $ tidy: | ||
32 | $ | ||
33 | $ if (f$type( def_orig) .nes. "") then - | ||
34 | set default 'def_orig' | ||
35 | $! | ||
diff --git a/src/lib/libssl/src/test/testtsa.com b/src/lib/libssl/src/test/testtsa.com index e3c586f14a..29fb1d0e63 100644 --- a/src/lib/libssl/src/test/testtsa.com +++ b/src/lib/libssl/src/test/testtsa.com | |||
@@ -2,14 +2,17 @@ $! | |||
2 | $! A few very basic tests for the 'ts' time stamping authority command. | 2 | $! A few very basic tests for the 'ts' time stamping authority command. |
3 | $! | 3 | $! |
4 | $ | 4 | $ |
5 | $ __arch := VAX | 5 | $ __arch = "VAX" |
6 | $ if f$getsyi("cpu") .ge. 128 then - | 6 | $ if f$getsyi("cpu") .ge. 128 then - |
7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
8 | $ if __arch .eqs. "" then __arch := UNK | 8 | $ if __arch .eqs. "" then __arch = "UNK" |
9 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 9 | $! |
10 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" | ||
11 | $! | ||
12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
10 | $ | 13 | $ |
11 | $ openssl := mcr 'f$parse(exe_dir+"openssl.exe")' | 14 | $ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'" |
12 | $ OPENSSL_CONF := [-]CAtsa.cnf | 15 | $ OPENSSL_CONF = "[-]CAtsa.cnf" |
13 | $ ! Because that's what ../apps/CA.sh really looks at | 16 | $ ! Because that's what ../apps/CA.sh really looks at |
14 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF | 17 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF |
15 | $ | 18 | $ |
@@ -114,8 +117,8 @@ $ | |||
114 | $ time_stamp_response_token_test: | 117 | $ time_stamp_response_token_test: |
115 | $ subroutine | 118 | $ subroutine |
116 | $ | 119 | $ |
117 | $ RESPONSE2:='p2'.copy_tsr | 120 | $ RESPONSE2 = p2+ "-copy_tsr" |
118 | $ TOKEN_DER:='p2'.token_der | 121 | $ TOKEN_DER = p2+ "-token_der" |
119 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out | 122 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out |
120 | $ if $severity .ne. 1 then call error | 123 | $ if $severity .ne. 1 then call error |
121 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' | 124 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' |
@@ -145,13 +148,13 @@ $ verify_time_stamp_token: | |||
145 | $ subroutine | 148 | $ subroutine |
146 | $ | 149 | $ |
147 | $ ! create the token from the response first | 150 | $ ! create the token from the response first |
148 | $ openssl ts -reply -in 'p2' -out 'p2'.token -token_out | 151 | $ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out |
149 | $ if $severity .ne. 1 then call error | 152 | $ if $severity .ne. 1 then call error |
150 | $ openssl ts -verify -queryfile 'p1' -in 'p2'.token -token_in - | 153 | $ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" - |
151 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 154 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
152 | $ if $severity .ne. 1 then call error | 155 | $ if $severity .ne. 1 then call error |
153 | $ openssl ts -verify -data 'p3' -in 'p2'.token -token_in - | 156 | $ openssl ts -verify -data "''p3'" -in "''p2'-token" - |
154 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 157 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
155 | $ if $severity .ne. 1 then call error | 158 | $ if $severity .ne. 1 then call error |
156 | $ endsubroutine | 159 | $ endsubroutine |
157 | $ | 160 | $ |
@@ -167,6 +170,8 @@ $ endsubroutine | |||
167 | $ | 170 | $ |
168 | $ ! Main body ---------------------------------------------------------- | 171 | $ ! Main body ---------------------------------------------------------- |
169 | $ | 172 | $ |
173 | $ set noon | ||
174 | $ | ||
170 | $ write sys$output "Setting up TSA test directory..." | 175 | $ write sys$output "Setting up TSA test directory..." |
171 | $ call setup_dir | 176 | $ call setup_dir |
172 | $ | 177 | $ |
@@ -183,66 +188,68 @@ $ write sys$output "Creating req1.req time stamp request for file testtsa..." | |||
183 | $ call create_time_stamp_request1 | 188 | $ call create_time_stamp_request1 |
184 | $ | 189 | $ |
185 | $ write sys$output "Printing req1.req..." | 190 | $ write sys$output "Printing req1.req..." |
186 | $ call print_request req1.tsq | 191 | $ call print_request "req1.tsq" |
187 | $ | 192 | $ |
188 | $ write sys$output "Generating valid response for req1.req..." | 193 | $ write sys$output "Generating valid response for req1.req..." |
189 | $ call create_time_stamp_response req1.tsq resp1.tsr tsa_config1 | 194 | $ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1" |
190 | $ | 195 | $ |
191 | $ write sys$output "Printing response..." | 196 | $ write sys$output "Printing response..." |
192 | $ call print_response resp1.tsr | 197 | $ call print_response "resp1.tsr" |
193 | $ | 198 | $ |
194 | $ write sys$output "Verifying valid response..." | 199 | $ write sys$output "Verifying valid response..." |
195 | $ call verify_time_stamp_response req1.tsq resp1.tsr [-]testtsa.com | 200 | $ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
196 | $ | 201 | $ |
197 | $ write sys$output "Verifying valid token..." | 202 | $ write sys$output "Verifying valid token..." |
198 | $ call verify_time_stamp_token req1.tsq resp1.tsr [-]testtsa.com | 203 | $ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
199 | $ | 204 | $ |
200 | $ ! The tests below are commented out, because invalid signer certificates | 205 | $ ! The tests below are commented out, because invalid signer certificates |
201 | $ ! can no longer be specified in the config file. | 206 | $ ! can no longer be specified in the config file. |
202 | $ | 207 | $ |
203 | $ ! write sys$output "Generating _invalid_ response for req1.req..." | 208 | $ ! write sys$output "Generating _invalid_ response for req1.req..." |
204 | $ ! call create_time_stamp_response req1.tsq resp1_bad.tsr tsa_config2 | 209 | $ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2" |
205 | $ | 210 | $ |
206 | $ ! write sys$output "Printing response..." | 211 | $ ! write sys$output "Printing response..." |
207 | $ ! call print_response resp1_bad.tsr | 212 | $ ! call print_response "resp1_bad.tsr" |
208 | $ | 213 | $ |
209 | $ ! write sys$output "Verifying invalid response, it should fail..." | 214 | $ ! write sys$output "Verifying invalid response, it should fail..." |
210 | $ ! call verify_time_stamp_response_fail req1.tsq resp1_bad.tsr | 215 | $ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr" |
211 | $ | 216 | $ |
212 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." | 217 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." |
213 | $ call create_time_stamp_request2 | 218 | $ call create_time_stamp_request2 |
214 | $ | 219 | $ |
215 | $ write sys$output "Printing req2.req..." | 220 | $ write sys$output "Printing req2.req..." |
216 | $ call print_request req2.tsq | 221 | $ call print_request "req2.tsq" |
217 | $ | 222 | $ |
218 | $ write sys$output "Generating valid response for req2.req..." | 223 | $ write sys$output "Generating valid response for req2.req..." |
219 | $ call create_time_stamp_response req2.tsq resp2.tsr tsa_config1 | 224 | $ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1" |
220 | $ | 225 | $ |
221 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." | 226 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." |
222 | $ call time_stamp_response_token_test req2.tsq resp2.tsr | 227 | $ call time_stamp_response_token_test "req2.tsq" "resp2.tsr" |
223 | $ | 228 | $ |
224 | $ write sys$output "Printing response..." | 229 | $ write sys$output "Printing response..." |
225 | $ call print_response resp2.tsr | 230 | $ call print_response "resp2.tsr" |
226 | $ | 231 | $ |
227 | $ write sys$output "Verifying valid response..." | 232 | $ write sys$output "Verifying valid response..." |
228 | $ call verify_time_stamp_response req2.tsq resp2.tsr [-]testtsa.com | 233 | $ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com" |
229 | $ | 234 | $ |
230 | $ write sys$output "Verifying response against wrong request, it should fail..." | 235 | $ write sys$output "Verifying response against wrong request, it should fail..." |
231 | $ call verify_time_stamp_response_fail req1.tsq resp2.tsr | 236 | $ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr" |
232 | $ | 237 | $ |
233 | $ write sys$output "Verifying response against wrong request, it should fail..." | 238 | $ write sys$output "Verifying response against wrong request, it should fail..." |
234 | $ call verify_time_stamp_response_fail req2.tsq resp1.tsr | 239 | $ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr" |
235 | $ | 240 | $ |
236 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." | 241 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." |
237 | $ call create_time_stamp_request3 | 242 | $ call create_time_stamp_request3 |
238 | $ | 243 | $ |
239 | $ write sys$output "Printing req3.req..." | 244 | $ write sys$output "Printing req3.req..." |
240 | $ call print_request req3.tsq | 245 | $ call print_request "req3.tsq" |
241 | $ | 246 | $ |
242 | $ write sys$output "Verifying response against wrong request, it should fail..." | 247 | $ write sys$output "Verifying response against wrong request, it should fail..." |
243 | $ call verify_time_stamp_response_fail req3.tsq resp1.tsr | 248 | $ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr" |
244 | $ | 249 | $ |
245 | $ write sys$output "Cleaning up..." | 250 | $ write sys$output "Cleaning up..." |
246 | $ call clean_up_dir | 251 | $ call clean_up_dir |
247 | $ | 252 | $ |
253 | $ set on | ||
254 | $ | ||
248 | $ exit | 255 | $ exit |
diff --git a/src/lib/libssl/test/bctest.com b/src/lib/libssl/test/bctest.com new file mode 100644 index 0000000000..d7e5ec139e --- /dev/null +++ b/src/lib/libssl/test/bctest.com | |||
@@ -0,0 +1,152 @@ | |||
1 | $! | ||
2 | $! Check operation of "bc". | ||
3 | $! | ||
4 | $! 2010-04-05 SMS. New. Based (loosely) on "bctest". | ||
5 | $! | ||
6 | $! | ||
7 | $ tmp_file_name = "tmp.bctest" | ||
8 | $ failure = "" | ||
9 | $! | ||
10 | $! Basic command test. | ||
11 | $! | ||
12 | $ on warning then goto bc_fail | ||
13 | $ bc | ||
14 | $ on error then exit | ||
15 | $! | ||
16 | $! Test for SunOS 5.[78] bc bug. | ||
17 | $! | ||
18 | $ if (failure .eqs. "") | ||
19 | $ then | ||
20 | $! | ||
21 | $ define /user_mode sys$output 'tmp_file_name' | ||
22 | $ bc | ||
23 | obase=16 | ||
24 | ibase=16 | ||
25 | a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\ | ||
26 | CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\ | ||
27 | 10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\ | ||
28 | C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\ | ||
29 | 3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\ | ||
30 | 4FC3CADF855448B24A9D7640BCF473E | ||
31 | b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\ | ||
32 | 9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\ | ||
33 | 8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\ | ||
34 | 3ED0E2017D60A68775B75481449 | ||
35 | (a/b)*b + (a%b) - a | ||
36 | $ status = $status | ||
37 | $ output_expected = "0" | ||
38 | $ gosub check_output | ||
39 | $ if (output .ne. 1) | ||
40 | $ then | ||
41 | $ failure = "SunOStest" | ||
42 | $ else | ||
43 | $ delete 'f$parse( tmp_file_name)' | ||
44 | $ endif | ||
45 | $ endif | ||
46 | $! | ||
47 | $! Test for SCO bc bug. | ||
48 | $! | ||
49 | $ if (failure .eqs. "") | ||
50 | $ then | ||
51 | $! | ||
52 | $ define /user_mode sys$output 'tmp_file_name' | ||
53 | $ bc | ||
54 | obase=16 | ||
55 | ibase=16 | ||
56 | -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\ | ||
57 | 9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\ | ||
58 | 11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\ | ||
59 | 1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\ | ||
60 | AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\ | ||
61 | F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\ | ||
62 | B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\ | ||
63 | 02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\ | ||
64 | 85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\ | ||
65 | A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\ | ||
66 | E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\ | ||
67 | 8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\ | ||
68 | 04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\ | ||
69 | 89C8D71 | ||
70 | AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\ | ||
71 | 928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\ | ||
72 | 8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\ | ||
73 | 37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\ | ||
74 | E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\ | ||
75 | F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\ | ||
76 | 9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\ | ||
77 | D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\ | ||
78 | 5296964 | ||
79 | $ status = $status | ||
80 | $ output_expected = "0\0" | ||
81 | $ gosub check_output | ||
82 | $ if (output .ne. 1) | ||
83 | $ then | ||
84 | $ failure = "SCOtest" | ||
85 | $ else | ||
86 | $ delete 'f$parse( tmp_file_name)' | ||
87 | $ endif | ||
88 | $ endif | ||
89 | $! | ||
90 | $! Test for working 'print' command. | ||
91 | $! | ||
92 | $ if (failure .eqs. "") | ||
93 | $ then | ||
94 | $! | ||
95 | $ define /user_mode sys$output 'tmp_file_name' | ||
96 | $ bc | ||
97 | print "OK" | ||
98 | $ status = $status | ||
99 | $ output_expected = "OK" | ||
100 | $ gosub check_output | ||
101 | $ if (output .ne. 1) | ||
102 | $ then | ||
103 | $ failure = "printtest" | ||
104 | $ else | ||
105 | $ delete 'f$parse( tmp_file_name)' | ||
106 | $ endif | ||
107 | $ endif | ||
108 | $! | ||
109 | $ if (failure .nes. "") | ||
110 | $ then | ||
111 | $ write sys$output - | ||
112 | "No working bc found. Consider installing GNU bc." | ||
113 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
114 | $ endif | ||
115 | $! | ||
116 | $ exit | ||
117 | $! | ||
118 | $! | ||
119 | $! Complete "bc" command failure. | ||
120 | $! | ||
121 | $ bc_fail: | ||
122 | $ write sys$output - | ||
123 | "No ""bc"" program/symbol found. Consider installing GNU bc." | ||
124 | $ exit %X00030000 ! %DCL-W-NORMAL | ||
125 | $! | ||
126 | $! | ||
127 | $! Output check subroutine. | ||
128 | $! | ||
129 | $ check_output: | ||
130 | $ eof = 0 | ||
131 | $ line_nr = 0 | ||
132 | $ open /read tmp_file 'tmp_file_name' | ||
133 | $ c_o_loop: | ||
134 | $ read /error = error_read tmp_file line | ||
135 | $ goto ok_read | ||
136 | $ error_read: | ||
137 | $ eof = 1 | ||
138 | $ ok_read: | ||
139 | $ line_expected = f$element( line_nr, "\", output_expected) | ||
140 | $ line_nr = line_nr+ 1 | ||
141 | $ if ((line_expected .nes. "\") .and. (.not. eof) .and. - | ||
142 | (line_expected .eqs. line)) then goto c_o_loop | ||
143 | $! | ||
144 | $ if ((line_expected .eqs. "\") .and. eof) | ||
145 | $ then | ||
146 | $ output = 1 | ||
147 | $ else | ||
148 | $ output = 0 | ||
149 | $ endif | ||
150 | $ close tmp_file | ||
151 | $ return | ||
152 | $! | ||
diff --git a/src/lib/libssl/test/bntest.com b/src/lib/libssl/test/bntest.com new file mode 100644 index 0000000000..6545d2e5a5 --- /dev/null +++ b/src/lib/libssl/test/bntest.com | |||
@@ -0,0 +1,76 @@ | |||
1 | $! | ||
2 | $! Analyze bntest output file. | ||
3 | $! | ||
4 | $! Exit status = 1 (success) if all tests passed, | ||
5 | $! 0 (warning) if any test failed. | ||
6 | $! | ||
7 | $! 2011-02-20 SMS. Added code to skip "#" comments in the input file. | ||
8 | $! | ||
9 | $! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh. | ||
10 | $! | ||
11 | $! Expect data like: | ||
12 | $! test test_name1 | ||
13 | $! 0 | ||
14 | $! [...] | ||
15 | $! test test_name2 | ||
16 | $! 0 | ||
17 | $! [...] | ||
18 | $! [...] | ||
19 | $! | ||
20 | $! Some tests have no following "0" lines. | ||
21 | $! | ||
22 | $ result_file_name = f$edit( p1, "TRIM") | ||
23 | $ if (result_file_name .eqs. "") | ||
24 | $ then | ||
25 | $ result_file_name = "bntest-vms.out" | ||
26 | $ endif | ||
27 | $! | ||
28 | $ fail = 0 | ||
29 | $ passed = 0 | ||
30 | $ tests = 0 | ||
31 | $! | ||
32 | $ on control_c then goto tidy | ||
33 | $ on error then goto tidy | ||
34 | $! | ||
35 | $ open /read result_file 'result_file_name' | ||
36 | $! | ||
37 | $ read_loop: | ||
38 | $ read /end = read_loop_end /error = tidy result_file line | ||
39 | $ t1 = f$element( 0, " ", line) | ||
40 | $! | ||
41 | $! Skip "#" comment lines. | ||
42 | $ if (f$extract( 0, 1, f$edit( line, "TRIM")) .eqs. "#") then - | ||
43 | goto read_loop | ||
44 | $! | ||
45 | $ if (t1 .eqs. "test") | ||
46 | $ then | ||
47 | $ passed = passed+ 1 | ||
48 | $ tests = tests+ 1 | ||
49 | $ fail = 1 | ||
50 | $ t2 = f$extract( 5, 1000, line) | ||
51 | $ write sys$output "verify ''t2'" | ||
52 | $ else | ||
53 | $ if (t1 .nes. "0") | ||
54 | $ then | ||
55 | $ write sys$output "Failed! bc: ''line'" | ||
56 | $ passed = passed- fail | ||
57 | $ fail = 0 | ||
58 | $ endif | ||
59 | $ endif | ||
60 | $ goto read_loop | ||
61 | $ read_loop_end: | ||
62 | $ write sys$output "''passed'/''tests' tests passed" | ||
63 | $! | ||
64 | $ tidy: | ||
65 | $ if f$trnlnm( "result_file", "LNM$PROCESS_TABLE", , "SUPERVISOR", , "CONFINE") | ||
66 | $ then | ||
67 | $ close result_file | ||
68 | $ endif | ||
69 | $! | ||
70 | $ if ((tests .gt. 0) .and. (tests .eq. passed)) | ||
71 | $ then | ||
72 | $ exit 1 | ||
73 | $ else | ||
74 | $ exit 0 | ||
75 | $ endif | ||
76 | $! | ||
diff --git a/src/lib/libssl/test/clean_test.com b/src/lib/libssl/test/clean_test.com new file mode 100755 index 0000000000..7df633fbef --- /dev/null +++ b/src/lib/libssl/test/clean_test.com | |||
@@ -0,0 +1,35 @@ | |||
1 | $! | ||
2 | $! Delete various test results files. | ||
3 | $! | ||
4 | $ def_orig = f$environment( "default") | ||
5 | $ proc = f$environment( "procedure") | ||
6 | $ proc_dev_dir = f$parse( "A.;", proc) - "A.;" | ||
7 | $! | ||
8 | $ on control_c then goto tidy | ||
9 | $ on error then goto tidy | ||
10 | $! | ||
11 | $ set default 'proc_dev_dir' | ||
12 | $! | ||
13 | $ files := *.cms;*, *.srl;*, *.ss;*, - | ||
14 | cms.err;*, cms.out;*, newreq.pem;*, - | ||
15 | p.txt-zlib-cipher;*, - | ||
16 | smtst.txt;*, testkey.pem;*, testreq.pem;*, - | ||
17 | test_*.err;*, test_*.out;*, - | ||
18 | .rnd;* | ||
19 | $! | ||
20 | $ delim = "," | ||
21 | $ i = 0 | ||
22 | $ loop: | ||
23 | $ file = f$edit( f$element( i, delim, files), "trim") | ||
24 | $ if (file .eqs. delim) then goto loop_end | ||
25 | $ if (f$search( file) .nes. "") then - | ||
26 | delete 'p1' 'file' | ||
27 | $ i = i+ 1 | ||
28 | $ goto loop | ||
29 | $ loop_end: | ||
30 | $! | ||
31 | $ tidy: | ||
32 | $ | ||
33 | $ if (f$type( def_orig) .nes. "") then - | ||
34 | set default 'def_orig' | ||
35 | $! | ||
diff --git a/src/lib/libssl/test/testtsa.com b/src/lib/libssl/test/testtsa.com index e3c586f14a..29fb1d0e63 100644 --- a/src/lib/libssl/test/testtsa.com +++ b/src/lib/libssl/test/testtsa.com | |||
@@ -2,14 +2,17 @@ $! | |||
2 | $! A few very basic tests for the 'ts' time stamping authority command. | 2 | $! A few very basic tests for the 'ts' time stamping authority command. |
3 | $! | 3 | $! |
4 | $ | 4 | $ |
5 | $ __arch := VAX | 5 | $ __arch = "VAX" |
6 | $ if f$getsyi("cpu") .ge. 128 then - | 6 | $ if f$getsyi("cpu") .ge. 128 then - |
7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
8 | $ if __arch .eqs. "" then __arch := UNK | 8 | $ if __arch .eqs. "" then __arch = "UNK" |
9 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 9 | $! |
10 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" | ||
11 | $! | ||
12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
10 | $ | 13 | $ |
11 | $ openssl := mcr 'f$parse(exe_dir+"openssl.exe")' | 14 | $ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'" |
12 | $ OPENSSL_CONF := [-]CAtsa.cnf | 15 | $ OPENSSL_CONF = "[-]CAtsa.cnf" |
13 | $ ! Because that's what ../apps/CA.sh really looks at | 16 | $ ! Because that's what ../apps/CA.sh really looks at |
14 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF | 17 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF |
15 | $ | 18 | $ |
@@ -114,8 +117,8 @@ $ | |||
114 | $ time_stamp_response_token_test: | 117 | $ time_stamp_response_token_test: |
115 | $ subroutine | 118 | $ subroutine |
116 | $ | 119 | $ |
117 | $ RESPONSE2:='p2'.copy_tsr | 120 | $ RESPONSE2 = p2+ "-copy_tsr" |
118 | $ TOKEN_DER:='p2'.token_der | 121 | $ TOKEN_DER = p2+ "-token_der" |
119 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out | 122 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out |
120 | $ if $severity .ne. 1 then call error | 123 | $ if $severity .ne. 1 then call error |
121 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' | 124 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' |
@@ -145,13 +148,13 @@ $ verify_time_stamp_token: | |||
145 | $ subroutine | 148 | $ subroutine |
146 | $ | 149 | $ |
147 | $ ! create the token from the response first | 150 | $ ! create the token from the response first |
148 | $ openssl ts -reply -in 'p2' -out 'p2'.token -token_out | 151 | $ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out |
149 | $ if $severity .ne. 1 then call error | 152 | $ if $severity .ne. 1 then call error |
150 | $ openssl ts -verify -queryfile 'p1' -in 'p2'.token -token_in - | 153 | $ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" - |
151 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 154 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
152 | $ if $severity .ne. 1 then call error | 155 | $ if $severity .ne. 1 then call error |
153 | $ openssl ts -verify -data 'p3' -in 'p2'.token -token_in - | 156 | $ openssl ts -verify -data "''p3'" -in "''p2'-token" - |
154 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 157 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
155 | $ if $severity .ne. 1 then call error | 158 | $ if $severity .ne. 1 then call error |
156 | $ endsubroutine | 159 | $ endsubroutine |
157 | $ | 160 | $ |
@@ -167,6 +170,8 @@ $ endsubroutine | |||
167 | $ | 170 | $ |
168 | $ ! Main body ---------------------------------------------------------- | 171 | $ ! Main body ---------------------------------------------------------- |
169 | $ | 172 | $ |
173 | $ set noon | ||
174 | $ | ||
170 | $ write sys$output "Setting up TSA test directory..." | 175 | $ write sys$output "Setting up TSA test directory..." |
171 | $ call setup_dir | 176 | $ call setup_dir |
172 | $ | 177 | $ |
@@ -183,66 +188,68 @@ $ write sys$output "Creating req1.req time stamp request for file testtsa..." | |||
183 | $ call create_time_stamp_request1 | 188 | $ call create_time_stamp_request1 |
184 | $ | 189 | $ |
185 | $ write sys$output "Printing req1.req..." | 190 | $ write sys$output "Printing req1.req..." |
186 | $ call print_request req1.tsq | 191 | $ call print_request "req1.tsq" |
187 | $ | 192 | $ |
188 | $ write sys$output "Generating valid response for req1.req..." | 193 | $ write sys$output "Generating valid response for req1.req..." |
189 | $ call create_time_stamp_response req1.tsq resp1.tsr tsa_config1 | 194 | $ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1" |
190 | $ | 195 | $ |
191 | $ write sys$output "Printing response..." | 196 | $ write sys$output "Printing response..." |
192 | $ call print_response resp1.tsr | 197 | $ call print_response "resp1.tsr" |
193 | $ | 198 | $ |
194 | $ write sys$output "Verifying valid response..." | 199 | $ write sys$output "Verifying valid response..." |
195 | $ call verify_time_stamp_response req1.tsq resp1.tsr [-]testtsa.com | 200 | $ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
196 | $ | 201 | $ |
197 | $ write sys$output "Verifying valid token..." | 202 | $ write sys$output "Verifying valid token..." |
198 | $ call verify_time_stamp_token req1.tsq resp1.tsr [-]testtsa.com | 203 | $ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
199 | $ | 204 | $ |
200 | $ ! The tests below are commented out, because invalid signer certificates | 205 | $ ! The tests below are commented out, because invalid signer certificates |
201 | $ ! can no longer be specified in the config file. | 206 | $ ! can no longer be specified in the config file. |
202 | $ | 207 | $ |
203 | $ ! write sys$output "Generating _invalid_ response for req1.req..." | 208 | $ ! write sys$output "Generating _invalid_ response for req1.req..." |
204 | $ ! call create_time_stamp_response req1.tsq resp1_bad.tsr tsa_config2 | 209 | $ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2" |
205 | $ | 210 | $ |
206 | $ ! write sys$output "Printing response..." | 211 | $ ! write sys$output "Printing response..." |
207 | $ ! call print_response resp1_bad.tsr | 212 | $ ! call print_response "resp1_bad.tsr" |
208 | $ | 213 | $ |
209 | $ ! write sys$output "Verifying invalid response, it should fail..." | 214 | $ ! write sys$output "Verifying invalid response, it should fail..." |
210 | $ ! call verify_time_stamp_response_fail req1.tsq resp1_bad.tsr | 215 | $ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr" |
211 | $ | 216 | $ |
212 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." | 217 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." |
213 | $ call create_time_stamp_request2 | 218 | $ call create_time_stamp_request2 |
214 | $ | 219 | $ |
215 | $ write sys$output "Printing req2.req..." | 220 | $ write sys$output "Printing req2.req..." |
216 | $ call print_request req2.tsq | 221 | $ call print_request "req2.tsq" |
217 | $ | 222 | $ |
218 | $ write sys$output "Generating valid response for req2.req..." | 223 | $ write sys$output "Generating valid response for req2.req..." |
219 | $ call create_time_stamp_response req2.tsq resp2.tsr tsa_config1 | 224 | $ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1" |
220 | $ | 225 | $ |
221 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." | 226 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." |
222 | $ call time_stamp_response_token_test req2.tsq resp2.tsr | 227 | $ call time_stamp_response_token_test "req2.tsq" "resp2.tsr" |
223 | $ | 228 | $ |
224 | $ write sys$output "Printing response..." | 229 | $ write sys$output "Printing response..." |
225 | $ call print_response resp2.tsr | 230 | $ call print_response "resp2.tsr" |
226 | $ | 231 | $ |
227 | $ write sys$output "Verifying valid response..." | 232 | $ write sys$output "Verifying valid response..." |
228 | $ call verify_time_stamp_response req2.tsq resp2.tsr [-]testtsa.com | 233 | $ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com" |
229 | $ | 234 | $ |
230 | $ write sys$output "Verifying response against wrong request, it should fail..." | 235 | $ write sys$output "Verifying response against wrong request, it should fail..." |
231 | $ call verify_time_stamp_response_fail req1.tsq resp2.tsr | 236 | $ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr" |
232 | $ | 237 | $ |
233 | $ write sys$output "Verifying response against wrong request, it should fail..." | 238 | $ write sys$output "Verifying response against wrong request, it should fail..." |
234 | $ call verify_time_stamp_response_fail req2.tsq resp1.tsr | 239 | $ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr" |
235 | $ | 240 | $ |
236 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." | 241 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." |
237 | $ call create_time_stamp_request3 | 242 | $ call create_time_stamp_request3 |
238 | $ | 243 | $ |
239 | $ write sys$output "Printing req3.req..." | 244 | $ write sys$output "Printing req3.req..." |
240 | $ call print_request req3.tsq | 245 | $ call print_request "req3.tsq" |
241 | $ | 246 | $ |
242 | $ write sys$output "Verifying response against wrong request, it should fail..." | 247 | $ write sys$output "Verifying response against wrong request, it should fail..." |
243 | $ call verify_time_stamp_response_fail req3.tsq resp1.tsr | 248 | $ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr" |
244 | $ | 249 | $ |
245 | $ write sys$output "Cleaning up..." | 250 | $ write sys$output "Cleaning up..." |
246 | $ call clean_up_dir | 251 | $ call clean_up_dir |
247 | $ | 252 | $ |
253 | $ set on | ||
254 | $ | ||
248 | $ exit | 255 | $ exit |