Changeset 808 for openssl/trunk/test/cms-test.pl
- Timestamp:
- Aug 7, 2014, 8:25:37 PM (11 years ago)
- Location:
- openssl/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
openssl/trunk ¶
- Property svn:mergeinfo changed
/openssl/vendor/1.0.0-current (added) merged: 799-800,804 /openssl/vendor/1.0.0n (added) merged: 807
- Property svn:mergeinfo changed
-
TabularUnified openssl/trunk/test/cms-test.pl ¶
r150 r808 55 55 56 56 my $ossl_path; 57 my $redir = " 2>cms.err 1>cms.out"; 57 my $redir = " 2> cms.err > cms.out"; 58 # Make VMS work 59 if ( $^O eq "VMS" && -f "OSSLX:openssl.exe" ) { 60 $ossl_path = "pipe mcr OSSLX:openssl"; 61 } 58 62 # Make MSYS work 59 if ( $^O eq "MSWin32" && -f "../apps/openssl.exe" ) {63 elsif ( $^O eq "MSWin32" && -f "../apps/openssl.exe" ) { 60 64 $ossl_path = "cmd /c ..\\apps\\openssl"; 61 65 } … … 85 89 [ 86 90 "signed content DER format, RSA key", 87 "-sign -in smcont.txt -outform DER-nodetach"91 "-sign -in smcont.txt -outform \"DER\" -nodetach" 88 92 . " -certfile $smdir/smroot.pem" 89 93 . " -signer $smdir/smrsa1.pem -out test.cms", 90 "-verify -in test.cms -inform DER"91 . " -CAfile$smdir/smroot.pem -out smtst.txt"94 "-verify -in test.cms -inform \"DER\" " 95 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 92 96 ], 93 97 94 98 [ 95 99 "signed detached content DER format, RSA key", 96 "-sign -in smcont.txt -outform DER"100 "-sign -in smcont.txt -outform \"DER\"" 97 101 . " -signer $smdir/smrsa1.pem -out test.cms", 98 "-verify -in test.cms -inform DER"99 . " -CAfile$smdir/smroot.pem -out smtst.txt -content smcont.txt"102 "-verify -in test.cms -inform \"DER\" " 103 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt -content smcont.txt" 100 104 ], 101 105 102 106 [ 103 107 "signed content test streaming BER format, RSA", 104 "-sign -in smcont.txt -outform DER-nodetach"108 "-sign -in smcont.txt -outform \"DER\" -nodetach" 105 109 . " -stream -signer $smdir/smrsa1.pem -out test.cms", 106 "-verify -in test.cms -inform DER"107 . " -CAfile$smdir/smroot.pem -out smtst.txt"110 "-verify -in test.cms -inform \"DER\" " 111 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 108 112 ], 109 113 110 114 [ 111 115 "signed content DER format, DSA key", 112 "-sign -in smcont.txt -outform DER-nodetach"116 "-sign -in smcont.txt -outform \"DER\" -nodetach" 113 117 . " -signer $smdir/smdsa1.pem -out test.cms", 114 "-verify -in test.cms -inform DER"115 . " -CAfile$smdir/smroot.pem -out smtst.txt"118 "-verify -in test.cms -inform \"DER\" " 119 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 116 120 ], 117 121 118 122 [ 119 123 "signed detached content DER format, DSA key", 120 "-sign -in smcont.txt -outform DER"124 "-sign -in smcont.txt -outform \"DER\"" 121 125 . " -signer $smdir/smdsa1.pem -out test.cms", 122 "-verify -in test.cms -inform DER"123 . " -CAfile$smdir/smroot.pem -out smtst.txt -content smcont.txt"126 "-verify -in test.cms -inform \"DER\" " 127 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt -content smcont.txt" 124 128 ], 125 129 126 130 [ 127 131 "signed detached content DER format, add RSA signer", 128 "-resign -inform DER -in test.cms -outform DER"132 "-resign -inform \"DER\" -in test.cms -outform \"DER\"" 129 133 . " -signer $smdir/smrsa1.pem -out test2.cms", 130 "-verify -in test2.cms -inform DER"131 . " -CAfile$smdir/smroot.pem -out smtst.txt -content smcont.txt"134 "-verify -in test2.cms -inform \"DER\" " 135 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt -content smcont.txt" 132 136 ], 133 137 134 138 [ 135 139 "signed content test streaming BER format, DSA key", 136 "-sign -in smcont.txt -outform DER-nodetach"140 "-sign -in smcont.txt -outform \"DER\" -nodetach" 137 141 . " -stream -signer $smdir/smdsa1.pem -out test.cms", 138 "-verify -in test.cms -inform DER"139 . " -CAfile$smdir/smroot.pem -out smtst.txt"142 "-verify -in test.cms -inform \"DER\" " 143 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 140 144 ], 141 145 142 146 [ 143 147 "signed content test streaming BER format, 2 DSA and 2 RSA keys", 144 "-sign -in smcont.txt -outform DER-nodetach"145 . " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem" 146 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 147 . " -stream -out test.cms", 148 "-verify -in test.cms -inform DER"149 . " -CAfile$smdir/smroot.pem -out smtst.txt"148 "-sign -in smcont.txt -outform \"DER\" -nodetach" 149 . " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem" 150 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 151 . " -stream -out test.cms", 152 "-verify -in test.cms -inform \"DER\" " 153 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 150 154 ], 151 155 152 156 [ 153 157 "signed content test streaming BER format, 2 DSA and 2 RSA keys, no attributes", 154 "-sign -in smcont.txt -outform DER-noattr -nodetach"155 . " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem" 156 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 157 . " -stream -out test.cms", 158 "-verify -in test.cms -inform DER"159 . " -CAfile$smdir/smroot.pem -out smtst.txt"158 "-sign -in smcont.txt -outform \"DER\" -noattr -nodetach" 159 . " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem" 160 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 161 . " -stream -out test.cms", 162 "-verify -in test.cms -inform \"DER\" " 163 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 160 164 ], 161 165 … … 166 170 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 167 171 . " -stream -out test.cms", 168 "-verify -in test.cms " . " -CAfile$smdir/smroot.pem -out smtst.txt"172 "-verify -in test.cms " . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 169 173 ], 170 174 … … 175 179 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 176 180 . " -stream -out test.cms", 177 "-verify -in test.cms " . " -CAfile$smdir/smroot.pem -out smtst.txt"181 "-verify -in test.cms " . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 178 182 ], 179 183 … … 216 220 [ 217 221 "signed content test streaming BER format, 2 DSA and 2 RSA keys, keyid", 218 "-sign -in smcont.txt -outform DER-nodetach -keyid"219 . " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem" 220 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 221 . " -stream -out test.cms", 222 "-verify -in test.cms -inform DER"223 . " -CAfile$smdir/smroot.pem -out smtst.txt"222 "-sign -in smcont.txt -outform \"DER\" -nodetach -keyid" 223 . " -signer $smdir/smrsa1.pem -signer $smdir/smrsa2.pem" 224 . " -signer $smdir/smdsa1.pem -signer $smdir/smdsa2.pem" 225 . " -stream -out test.cms", 226 "-verify -in test.cms -inform \"DER\" " 227 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 224 228 ], 225 229 … … 231 235 . " -stream -out test.cms", 232 236 "-verify -in test.cms -inform PEM " 233 . " -CAfile$smdir/smroot.pem -out smtst.txt"237 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 234 238 ], 235 239 … … 240 244 . " -out test.cms", 241 245 "-verify -in test.cms " 242 . " -CAfile$smdir/smroot.pem -out smtst.txt"246 . " \"-CAfile\" $smdir/smroot.pem -out smtst.txt" 243 247 ], 244 248 … … 249 253 . " -out test2.cms", 250 254 "-verify_receipt test2.cms -in test.cms" 251 . " -CAfile$smdir/smroot.pem"255 . " \"-CAfile\" $smdir/smroot.pem" 252 256 ], 253 257 … … 290 294 [ 291 295 "encrypted content test streaming PEM format, 128 bit RC2 key", 292 " -EncryptedData_encrypt-in smcont.txt -outform PEM"296 "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM" 293 297 . " -rc2 -secretkey 000102030405060708090A0B0C0D0E0F" 294 298 . " -stream -out test.cms", 295 " -EncryptedData_decrypt-in test.cms -inform PEM "299 "\"-EncryptedData_decrypt\" -in test.cms -inform PEM " 296 300 . " -secretkey 000102030405060708090A0B0C0D0E0F -out smtst.txt" 297 301 ], … … 299 303 [ 300 304 "encrypted content test streaming PEM format, 40 bit RC2 key", 301 " -EncryptedData_encrypt-in smcont.txt -outform PEM"305 "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM" 302 306 . " -rc2 -secretkey 0001020304" 303 307 . " -stream -out test.cms", 304 " -EncryptedData_decrypt-in test.cms -inform PEM "308 "\"-EncryptedData_decrypt\" -in test.cms -inform PEM " 305 309 . " -secretkey 0001020304 -out smtst.txt" 306 310 ], … … 308 312 [ 309 313 "encrypted content test streaming PEM format, triple DES key", 310 " -EncryptedData_encrypt-in smcont.txt -outform PEM"314 "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM" 311 315 . " -des3 -secretkey 000102030405060708090A0B0C0D0E0F1011121314151617" 312 316 . " -stream -out test.cms", 313 " -EncryptedData_decrypt-in test.cms -inform PEM "317 "\"-EncryptedData_decrypt\" -in test.cms -inform PEM " 314 318 . " -secretkey 000102030405060708090A0B0C0D0E0F1011121314151617" 315 319 . " -out smtst.txt" … … 318 322 [ 319 323 "encrypted content test streaming PEM format, 128 bit AES key", 320 " -EncryptedData_encrypt-in smcont.txt -outform PEM"324 "\"-EncryptedData_encrypt\" -in smcont.txt -outform PEM" 321 325 . " -aes128 -secretkey 000102030405060708090A0B0C0D0E0F" 322 326 . " -stream -out test.cms", 323 " -EncryptedData_decrypt-in test.cms -inform PEM "327 "\"-EncryptedData_decrypt\" -in test.cms -inform PEM " 324 328 . " -secretkey 000102030405060708090A0B0C0D0E0F -out smtst.txt" 325 329 ], … … 412 416 413 417 sub cmp_files { 418 use FileHandle; 414 419 my ( $f1, $f2 ) = @_; 415 my ( $fp1, $fp2 ); 420 my $fp1 = FileHandle->new(); 421 my $fp2 = FileHandle->new(); 416 422 417 423 my ( $rd1, $rd2 );
Note:
See TracChangeset
for help on using the changeset viewer.