aboutsummaryrefslogtreecommitdiff
path: root/openssl/test
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/test')
-rw-r--r--openssl/test/bctest.com152
-rw-r--r--openssl/test/bntest.com69
-rw-r--r--openssl/test/cms-test.pl94
-rw-r--r--openssl/test/maketests.com5
-rw-r--r--openssl/test/tests.com78
-rw-r--r--openssl/test/testssl.com6
-rw-r--r--openssl/test/testtsa.com4
7 files changed, 338 insertions, 70 deletions
diff --git a/openssl/test/bctest.com b/openssl/test/bctest.com
new file mode 100644
index 000000000..d7e5ec139
--- /dev/null
+++ b/openssl/test/bctest.com
@@ -0,0 +1,152 @@
+$!
+$! Check operation of "bc".
+$!
+$! 2010-04-05 SMS. New. Based (loosely) on "bctest".
+$!
+$!
+$ tmp_file_name = "tmp.bctest"
+$ failure = ""
+$!
+$! Basic command test.
+$!
+$ on warning then goto bc_fail
+$ bc
+$ on error then exit
+$!
+$! Test for SunOS 5.[78] bc bug.
+$!
+$ if (failure .eqs. "")
+$ then
+$!
+$ define /user_mode sys$output 'tmp_file_name'
+$ bc
+obase=16
+ibase=16
+a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\
+CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\
+10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\
+C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\
+3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\
+4FC3CADF855448B24A9D7640BCF473E
+b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\
+9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\
+8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\
+3ED0E2017D60A68775B75481449
+(a/b)*b + (a%b) - a
+$ status = $status
+$ output_expected = "0"
+$ gosub check_output
+$ if (output .ne. 1)
+$ then
+$ failure = "SunOStest"
+$ else
+$ delete 'f$parse( tmp_file_name)'
+$ endif
+$ endif
+$!
+$! Test for SCO bc bug.
+$!
+$ if (failure .eqs. "")
+$ then
+$!
+$ define /user_mode sys$output 'tmp_file_name'
+$ bc
+obase=16
+ibase=16
+-FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\
+9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\
+11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\
+1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\
+AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\
+F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\
+B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\
+02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\
+85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\
+A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\
+E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\
+8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\
+04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\
+89C8D71
+AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\
+928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\
+8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\
+37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\
+E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\
+F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\
+9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\
+D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\
+5296964
+$ status = $status
+$ output_expected = "0\0"
+$ gosub check_output
+$ if (output .ne. 1)
+$ then
+$ failure = "SCOtest"
+$ else
+$ delete 'f$parse( tmp_file_name)'
+$ endif
+$ endif
+$!
+$! Test for working 'print' command.
+$!
+$ if (failure .eqs. "")
+$ then
+$!
+$ define /user_mode sys$output 'tmp_file_name'
+$ bc
+print "OK"
+$ status = $status
+$ output_expected = "OK"
+$ gosub check_output
+$ if (output .ne. 1)
+$ then
+$ failure = "printtest"
+$ else
+$ delete 'f$parse( tmp_file_name)'
+$ endif
+$ endif
+$!
+$ if (failure .nes. "")
+$ then
+$ write sys$output -
+ "No working bc found. Consider installing GNU bc."
+$ exit %X00030000 ! %DCL-W-NORMAL
+$ endif
+$!
+$ exit
+$!
+$!
+$! Complete "bc" command failure.
+$!
+$ bc_fail:
+$ write sys$output -
+ "No ""bc"" program/symbol found. Consider installing GNU bc."
+$ exit %X00030000 ! %DCL-W-NORMAL
+$!
+$!
+$! Output check subroutine.
+$!
+$ check_output:
+$ eof = 0
+$ line_nr = 0
+$ open /read tmp_file 'tmp_file_name'
+$ c_o_loop:
+$ read /error = error_read tmp_file line
+$ goto ok_read
+$ error_read:
+$ eof = 1
+$ ok_read:
+$ line_expected = f$element( line_nr, "\", output_expected)
+$ line_nr = line_nr+ 1
+$ if ((line_expected .nes. "\") .and. (.not. eof) .and. -
+ (line_expected .eqs. line)) then goto c_o_loop
+$!
+$ if ((line_expected .eqs. "\") .and. eof)
+$ then
+$ output = 1
+$ else
+$ output = 0
+$ endif
+$ close tmp_file
+$ return
+$!
diff --git a/openssl/test/bntest.com b/openssl/test/bntest.com
new file mode 100644
index 000000000..cb6d3abd7
--- /dev/null
+++ b/openssl/test/bntest.com
@@ -0,0 +1,69 @@
+$!
+$! Analyze bntest output file.
+$!
+$! Exit status = 1 (success) if all tests passed,
+$! 0 (warning) if any test failed.
+$!
+$! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh.
+$!
+$! Expect data like:
+$! test test_name1
+$! 0
+$! [...]
+$! test test_name2
+$! 0
+$! [...]
+$! [...]
+$!
+$! Some tests have no following "0" lines.
+$!
+$ result_file_name = f$edit( p1, "TRIM")
+$ if (result_file_name .eqs. "")
+$ then
+$ result_file_name = "bntest-vms.out"
+$ endif
+$!
+$ fail = 0
+$ passed = 0
+$ tests = 0
+$!
+$ on control_c then goto tidy
+$ on error then goto tidy
+$!
+$ open /read result_file 'result_file_name'
+$!
+$ read_loop:
+$ read /end = read_loop_end /error = tidy result_file line
+$ t1 = f$element( 0, " ", line)
+$ if (t1 .eqs. "test")
+$ then
+$ passed = passed+ 1
+$ tests = tests+ 1
+$ fail = 1
+$ t2 = f$extract( 5, 1000, line)
+$ write sys$output "verify ''t2'"
+$ else
+$ if (t1 .nes. "0")
+$ then
+$ write sys$output "Failed! bc: ''line'"
+$ passed = passed- fail
+$ fail = 0
+$ endif
+$ endif
+$ goto read_loop
+$ read_loop_end:
+$ write sys$output "''passed'/''tests' tests passed"
+$!
+$ tidy:
+$ if f$trnlnm( "result_file", "LNM$PROCESS_TABLE", , "SUPERVISOR", , "CONFINE")
+$ then
+$ close result_file
+$ endif
+$!
+$ if ((tests .gt. 0) .and. (tests .eq. passed))
+$ then
+$ exit 1
+$ else
+$ exit 0
+$ endif
+$!
diff --git a/openssl/test/cms-test.pl b/openssl/test/cms-test.pl
index 9c50dff3e..31b84707a 100644
--- a/openssl/test/cms-test.pl
+++ b/openssl/test/cms-test.pl
@@ -54,9 +54,13 @@
# OpenSSL PKCS#7 and CMS implementations.
my $ossl_path;
-my $redir = " 2>cms.err 1>cms.out";
+my $redir = " 2> cms.err > cms.out";
+# Make VMS work
+if ( $^O eq "VMS" && -f "$ENV{EXE_DIR}openssl.exe" ) {
+ $ossl_path = "pipe mcr $ENV{EXE_DIR}openssl.exe";
+}
# Make MSYS work
-if ( $^O eq "MSWin32" && -f "../apps/openssl.exe" ) {
+elsif ( $^O eq "MSWin32" && -f "../apps/openssl.exe" ) {
$ossl_path = "cmd /c ..\\apps\\openssl";
}
elsif ( -f "../apps/openssl$ENV{EXE_EXT}" ) {
@@ -84,79 +88,79 @@ my @smime_pkcs7_tests = (
[
"signed content DER format, RSA key",
- "-sign -in smcont.txt -outform DER -nodetach"
+ "-sign -in smcont.txt -outform \"DER\" -nodetach"
. " -certfile $smdir/smroot.pem"
. " -signer $smdir/smrsa1.pem -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
"signed detached content DER format, RSA key",
- "-sign -in smcont.txt -outform DER"
+ "-sign -in smcont.txt -outform \"DER\""
. " -signer $smdir/smrsa1.pem -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt -content smcont.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt -content smcont.txt"
],
[
"signed content test streaming BER format, RSA",
- "-sign -in smcont.txt -outform DER -nodetach"
+ "-sign -in smcont.txt -outform \"DER\" -nodetach"
. " -stream -signer $smdir/smrsa1.pem -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
"signed content DER format, DSA key",
- "-sign -in smcont.txt -outform DER -nodetach"
+ "-sign -in smcont.txt -outform \"DER\" -nodetach"
. " -signer $smdir/smdsa1.pem -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
"signed detached content DER format, DSA key",
- "-sign -in smcont.txt -outform DER"
+ "-sign -in smcont.txt -outform \"DER\""
. " -signer $smdir/smdsa1.pem -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt -content smcont.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt -content smcont.txt"
],
[
"signed detached content DER format, add RSA signer",
- "-resign -inform DER -in test.cms -outform DER"
+ "-resign -inform \"DER\" -in test.cms -outform \"DER\""
. " -signer $smdir/smrsa1.pem -out test2.cms",
- "-verify -in test2.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt -content smcont.txt"
+ "-verify -in test2.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt -content smcont.txt"
],
[
"signed content test streaming BER format, DSA key",
- "-sign -in smcont.txt -outform DER -nodetach"
+ "-sign -in smcont.txt -outform \"DER\" -nodetach"
. " -stream -signer $smdir/smdsa1.pem -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
"signed content test streaming BER format, 2 DSA and 2 RSA keys",
- "-sign -in smcont.txt -outform DER -nodetach"
+ "-sign -in smcont.txt -outform \"DER\" -nodetach"
. " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem"
. " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem"
. " -stream -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
"signed content test streaming BER format, 2 DSA and 2 RSA keys, no attributes",
- "-sign -in smcont.txt -outform DER -noattr -nodetach"
+ "-sign -in smcont.txt -outform \"DER\" -noattr -nodetach"
. " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem"
. " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem"
. " -stream -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
@@ -165,7 +169,7 @@ my @smime_pkcs7_tests = (
. " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem"
. " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem"
. " -stream -out test.cms",
- "-verify -in test.cms " . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms " . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
@@ -174,7 +178,7 @@ my @smime_pkcs7_tests = (
. " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem"
. " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem"
. " -stream -out test.cms",
- "-verify -in test.cms " . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms " . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
@@ -215,12 +219,12 @@ my @smime_cms_tests = (
[
"signed content test streaming BER format, 2 DSA and 2 RSA keys, keyid",
- "-sign -in smcont.txt -outform DER -nodetach -keyid"
+ "-sign -in smcont.txt -outform \"DER\" -nodetach -keyid"
. " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem"
. " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem"
. " -stream -out test.cms",
- "-verify -in test.cms -inform DER "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ "-verify -in test.cms -inform \"DER\" "
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
@@ -230,7 +234,7 @@ my @smime_cms_tests = (
. " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem"
. " -stream -out test.cms",
"-verify -in test.cms -inform PEM "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
@@ -239,7 +243,7 @@ my @smime_cms_tests = (
. " -receipt_request_to test\@openssl.org -receipt_request_all"
. " -out test.cms",
"-verify -in test.cms "
- . " -CAfile $smdir/smroot.pem -out smtst.txt"
+ . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt"
],
[
@@ -248,7 +252,7 @@ my @smime_cms_tests = (
. " -signer $smdir/smrsa2.pem"
. " -out test2.cms",
"-verify_receipt test2.cms -in test.cms"
- . " -CAfile $smdir/smroot.pem"
+ . " \"-CAfile\" $smdir/smroot.pem"
],
[
@@ -289,38 +293,38 @@ my @smime_cms_tests = (
[
"encrypted content test streaming PEM format, 128 bit RC2 key",
- "-EncryptedData_encrypt -in smcont.txt -outform PEM"
+ "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM"
. " -rc2 -secretkey 000102030405060708090A0B0C0D0E0F"
. " -stream -out test.cms",
- "-EncryptedData_decrypt -in test.cms -inform PEM "
+ "\"-EncryptedData_decrypt\" -in test.cms -inform PEM "
. " -secretkey 000102030405060708090A0B0C0D0E0F -out smtst.txt"
],
[
"encrypted content test streaming PEM format, 40 bit RC2 key",
- "-EncryptedData_encrypt -in smcont.txt -outform PEM"
+ "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM"
. " -rc2 -secretkey 0001020304"
. " -stream -out test.cms",
- "-EncryptedData_decrypt -in test.cms -inform PEM "
+ "\"-EncryptedData_decrypt\" -in test.cms -inform PEM "
. " -secretkey 0001020304 -out smtst.txt"
],
[
"encrypted content test streaming PEM format, triple DES key",
- "-EncryptedData_encrypt -in smcont.txt -outform PEM"
+ "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM"
. " -des3 -secretkey 000102030405060708090A0B0C0D0E0F1011121314151617"
. " -stream -out test.cms",
- "-EncryptedData_decrypt -in test.cms -inform PEM "
+ "\"-EncryptedData_decrypt\" -in test.cms -inform PEM "
. " -secretkey 000102030405060708090A0B0C0D0E0F1011121314151617"
. " -out smtst.txt"
],
[
"encrypted content test streaming PEM format, 128 bit AES key",
- "-EncryptedData_encrypt -in smcont.txt -outform PEM"
+ "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM"
. " -aes128 -secretkey 000102030405060708090A0B0C0D0E0F"
. " -stream -out test.cms",
- "-EncryptedData_decrypt -in test.cms -inform PEM "
+ "\"-EncryptedData_decrypt\" -in test.cms -inform PEM "
. " -secretkey 000102030405060708090A0B0C0D0E0F -out smtst.txt"
],
diff --git a/openssl/test/maketests.com b/openssl/test/maketests.com
index ca072f1d1..3d8129bf2 100644
--- a/openssl/test/maketests.com
+++ b/openssl/test/maketests.com
@@ -105,7 +105,7 @@ $ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ -
"MDC2TEST,RMDTEST,"+ -
"RANDTEST,DHTEST,ENGINETEST,"+ -
"BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ -
- "EVP_TEST,JPAKETEST"
+ "EVP_TEST,IGETEST,JPAKETEST,ASN1TEST"
$! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well?
$!
$! Additional directory information.
@@ -139,8 +139,9 @@ $ T_D_EXPTEST := [-.crypto.bn]
$ T_D_DSATEST := [-.crypto.dsa]
$ T_D_RSA_TEST := [-.crypto.rsa]
$ T_D_EVP_TEST := [-.crypto.evp]
-$ T_D_JPAKETEST := [-.crypto.jpake]
$ T_D_IGETEST := [-.test]
+$ T_D_JPAKETEST := [-.crypto.jpake]
+$ T_D_ASN1TEST := [-.test]
$!
$ TCPIP_PROGRAMS = ",,"
$ IF COMPILER .EQS. "VAXC" THEN -
diff --git a/openssl/test/tests.com b/openssl/test/tests.com
index d151cd395..f3193d026 100644
--- a/openssl/test/tests.com
+++ b/openssl/test/tests.com
@@ -12,11 +12,16 @@ $ if __arch .eqs. "" then __arch := UNK
$ texe_dir := sys$disk:[-.'__arch'.exe.test]
$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
$
-$ sslroot = f$parse("sys$disk:[-.apps];",,,,"syntax_only") - "].;"+ ".]"
-$ define /translation_attributes = concealed sslroot 'sslroot'
-$
$ set default '__here'
$
+$ ROOT = F$PARSE("sys$disk:[-]A.;0",,,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
+$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
+$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
+ - ".][000000" - "[000000." - "][" - "[" - "]"
+$ ROOT = ROOT_DEV + "[" + ROOT_DIR
+$ DEFINE/NOLOG SSLROOT 'ROOT'.APPS.] /TRANS=CONC
+$ openssl_conf := sslroot:[000000]openssl-vms.cnf
+$
$ on control_y then goto exit
$ on error then goto exit
$
@@ -70,17 +75,19 @@ $ ENGINETEST := enginetest
$ EVPTEST := evp_test
$ IGETEST := igetest
$ JPAKETEST := jpaketest
+$ ASN1TEST := asn1test
$
$ tests_i = 0
$ loop_tests:
$ tests_e = f$element(tests_i,",",tests)
$ tests_i = tests_i + 1
$ if tests_e .eqs. "," then goto exit
+$ write sys$output "---> ''tests_e'"
$ gosub 'tests_e'
$ goto loop_tests
$
$ test_evp:
-$ mcr 'texe_dir''evptest' evptests.txt
+$ mcr 'texe_dir''evptest' 'ROOT'.CRYPTO.EVP]evptests.txt
$ return
$ test_des:
$ mcr 'texe_dir''destest'
@@ -173,27 +180,57 @@ $ @tpkcs7d.com
$ deassign sys$error
$ return
$ test_bn:
-$ write sys$output "starting big number library test, could take a while..."
-$ create bntest-vms.fdl
+$ write sys$output -
+ "starting big number library test, could take a while..."
+$ set noon
+$ define sys$error nl:
+$ define sys$output nl:
+$ @ bctest.com
+$ status = $status
+$ deassign sys$error
+$ deassign sys$output
+$ on control_y then goto exit
+$ on error then goto exit
+$ if (status)
+$ then
+$ create /fdl = sys$input bntest-vms.tmp
FILE
ORGANIZATION sequential
RECORD
FORMAT stream_lf
-$ create/fdl=bntest-vms.fdl bntest-vms.sh
-$ open/append foo bntest-vms.sh
-$ type/output=foo: sys$input:
+$ define /user_mode sys$output bntest-vms.tmp
+$ mcr 'texe_dir''bntest'
+$ define /user_mode sys$input bntest-vms.tmp
+$ define /user_mode sys$output bntest-vms.out
+$ bc
+$ @ bntest.com bntest-vms.out
+$ status = $status
+$ if (status)
+$ then
+$ delete bntest-vms.out;*
+$ delete bntest-vms.tmp;*
+$ endif
+$ else
+$ create /fdl = sys$input bntest-vms.sh
+FILE
+ ORGANIZATION sequential
+RECORD
+ FORMAT stream_lf
+$ open /append bntest_file bntest-vms.sh
+$ type /output = bntest_file sys$input:
<< __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"'
-$ define/user sys$output bntest-vms.tmp
-$ mcr 'texe_dir''bntest'
-$ copy bntest-vms.tmp foo:
-$ delete bntest-vms.tmp;*
-$ type/output=foo: sys$input:
+$ define/user sys$output bntest-vms.tmp
+$ mcr 'texe_dir''bntest'
+$ copy bntest-vms.tmp bntest_file
+$ delete bntest-vms.tmp;*
+$ type /output = bntest_file sys$input:
__FOO__
-$ close foo
-$ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
-$ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
-$ write sys$output "-- went well."
-$ write sys$output ""
+$ close bntest_file
+$ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
+$ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
+$ write sys$output "-- went well."
+$ write sys$output ""
+$ endif
$ write sys$output "test a^b%c implementations"
$ mcr 'texe_dir''exptest'
$ return
@@ -289,11 +326,14 @@ $ mcr 'texe_dir''jpaketest'
$ return
$ test_cms:
$ write sys$output "CMS consistency test"
+$ ! The following makes perl include the DCL symbol table in the env.
+$ define/user perl_env_tables clisym_local,lnm$file_dev,ctrl_env
$ perl CMS-TEST.PL
$ return
$
$
$ exit:
+$ mcr 'exe_dir'openssl version -a
$ set default '__save_default'
$ deassign sslroot
$ exit
diff --git a/openssl/test/testssl.com b/openssl/test/testssl.com
index 9c83afba0..88580291f 100644
--- a/openssl/test/testssl.com
+++ b/openssl/test/testssl.com
@@ -21,10 +21,10 @@ $ cert=p2
$ endif
$ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert'
$
+$ set noon
$ define/user sys$output testssl-x509-output.
$ define/user sys$error nla0:
$ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout
-$ set noon
$ define/user sys$error nla0:
$ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact
$ if $severity .eq. 1
@@ -33,7 +33,6 @@ $ dsa_cert := YES
$ else
$ dsa_cert := NO
$ endif
-$ set on
$ delete testssl-x509-output.;*
$
$ if p3 .eqs. ""
@@ -161,14 +160,12 @@ $ if $severity .ne. 1 then goto exit3
$
$!###########################################################################
$
-$ set noon
$ define/user sys$output nla0:
$ mcr 'exe_dir'openssl no-rsa
$ no_rsa=$SEVERITY
$ define/user sys$output nla0:
$ mcr 'exe_dir'openssl no-dh
$ no_dh=$SEVERITY
-$ set on
$
$ if no_dh
$ then
@@ -203,4 +200,5 @@ $ exit3:
$ RET = 3
$ exit:
$ if p3 .eqs. "" then delete certs.tmp;*
+$ set on
$ exit 'RET'
diff --git a/openssl/test/testtsa.com b/openssl/test/testtsa.com
index e3c586f14..2ca1adac5 100644
--- a/openssl/test/testtsa.com
+++ b/openssl/test/testtsa.com
@@ -167,6 +167,8 @@ $ endsubroutine
$
$ ! Main body ----------------------------------------------------------
$
+$ set noon
+$
$ write sys$output "Setting up TSA test directory..."
$ call setup_dir
$
@@ -245,4 +247,6 @@ $
$ write sys$output "Cleaning up..."
$ call clean_up_dir
$
+$ set on
+$
$ exit