]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - tcl_tests/cms2.try
Explicitly provide SECLEVEL for TLS tests
[openssl-gost/engine.git] / tcl_tests / cms2.try
index 1233d55980d76caed1712321ca0ace297048e3fa..47a530627b9bb0fc26c2d3e877ef6acc751ab0c9 100644 (file)
@@ -1,5 +1,4 @@
 #!/usr/bin/tclsh
-# -*- coding: cp1251 -*-
 lappend auto_path [file dirname [info script]]
 package require ossltest
 cd $::test::dir
@@ -31,7 +30,7 @@ test -createsfiles cms_signed2_2_$length.asn "Signing in DER format with 2nd sig
 
 test -createsfiles {was_signed.dat signer.certs} "Verifying signature in DER format" {
        grep "Verif" [openssl "cms -verify -inform der -in cms_signed2_2_$length.asn -noverify -signer signer.certs -out was_signed.dat"]
-} 0 {Verification successful
+} 0 {CMS Verification successful
 }
 
 test "Signed data is extracted correctly" {
@@ -46,11 +45,11 @@ test "Extracting signer certificates" {
        set certs [regexp -all -inline -- {-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----} [getFile signer.certs]]
        foreach cert $certs {
                makeFile cert[incr i].pem $cert
-               lappend subjs [grep subject [openssl "x509 -in cert$i.pem -subject -noout"]]
+               lappend subjs [regsub -all " = " [grep subject [openssl "x509 -in cert$i.pem -subject -noout"]] "=" ]
        }
        lsort $subjs
-} 0  "{subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER1_$length, emailAddress = test@cryptocom.ru
-} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = test@cryptocom.ru
+} 0  "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=test@cryptocom.ru
+} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=test@cryptocom.ru
 }"
 
 test -createsfiles cms_signed2_1_$length\_op.msg "Signing opaque in S/MIME format with 1st signature" {
@@ -65,7 +64,7 @@ test -createsfiles cms_signed2_2_$length\_op.msg "Signing opaque in S/MIME forma
 
 test -createsfiles {was_signed.dat signer.certs} "Verifying opaque signature in S/MIME format" {
        grep "Verif" [openssl "cms -verify -in cms_signed2_2_$length\_op.msg -noverify -signer signer.certs -out was_signed.dat"]
-} 0 {Verification successful
+} 0 {CMS Verification successful
 }
 
 test "Signed data is extracted correctly" {
@@ -80,11 +79,11 @@ test "Extracting signer certificates" {
        set certs [regexp -all -inline -- {-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----} [getFile signer.certs]]
        foreach cert $certs {
                makeFile cert[incr i].pem $cert
-               lappend subjs [grep subject [openssl "x509 -in cert$i.pem -subject -noout"]]
+               lappend subjs [regsub -all " = " [grep subject [openssl "x509 -in cert$i.pem -subject -noout"]] "=" ]
        }
        lsort $subjs
-} 0 "{subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER1_$length, emailAddress = test@cryptocom.ru
-} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = test@cryptocom.ru
+} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=test@cryptocom.ru
+} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=test@cryptocom.ru
 }"
 
 test -createsfiles cms_signed2_1_$length\_det.asn "Signing detached in DER format with 1st signature" {
@@ -99,7 +98,7 @@ test -createsfiles cms_signed2_2_$length\_det.asn "Signing detached in DER forma
 
 test -createsfiles {was_signed.dat signer.certs} "Verifying detached signature in DER format" {
        grep "Verif" [openssl "cms -verify -in cms_signed2_2_$length\_det.asn -noverify -signer signer.certs -out was_signed.dat -content signed2.dat -inform der"]
-} 0 {Verification successful
+} 0 {CMS Verification successful
 }
 
 test "Signed data is extracted correctly" {
@@ -114,11 +113,11 @@ test "Extracting signer certificates" {
        set certs [regexp -all -inline -- {-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----} [getFile signer.certs]]
        foreach cert $certs {
                makeFile cert_asn[incr i].pem $cert
-               lappend subjs [grep subject [openssl "x509 -in cert_asn$i.pem -subject -noout"]]
+               lappend subjs [regsub -all " = " [grep subject [openssl "x509 -in cert$i.pem -subject -noout"]] "=" ]
        }
        lsort  $subjs
-} 0  "{subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER1_$length, emailAddress = test@cryptocom.ru
-} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = test@cryptocom.ru
+} 0  "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=test@cryptocom.ru
+} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=test@cryptocom.ru
 }"
 
 test -createsfiles cms_signed2_1_$length.msg "Signing in S/MIME format with 1st signature" {
@@ -132,7 +131,7 @@ test -createsfiles cms_signed2_2_$length.msg "Signing in S/MIME format with 2nd
 
 test -createsfiles {was_signed.dat  signer.certs} "Verifying signature in S/MIME format" {
        grep "Verif" [openssl "cms -verify -in cms_signed2_2_$length.msg -noverify -signer signer.certs -out was_signed.dat -inform smime"]
-} 0 {Verification successful
+} 0 {CMS Verification successful
 }
 
 test "Signed data is extracted correctly" {
@@ -147,11 +146,11 @@ test "Extracting signer certificates" {
        set certs [regexp -all -inline -- {-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----} [getFile signer.certs]]
        foreach cert $certs {
                makeFile cert_cms[incr i].pem $cert
-               lappend subjs [grep subject [openssl "x509 -in cert_cms$i.pem -subject -noout"]]
+               lappend subjs [regsub -all " = " [grep subject [openssl "x509 -in cert$i.pem -subject -noout"]] "=" ]
        }
        lsort $subjs
-} 0  "{subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER1_$length, emailAddress = test@cryptocom.ru
-} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = test@cryptocom.ru
+} 0  "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=test@cryptocom.ru
+} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=test@cryptocom.ru
 }"
 
 }