X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=tcl_tests%2Fsmime2.try;h=757691a9f3ed1517c63abedeec31a39205ba8783;hb=bd6c4f8c5c8a087ce0ea65c3dc5ee38b38b8802c;hp=c3bdd129f7a54e14eae6d12b374f66b64b0839fc;hpb=3b8ddfe2f303b8931842e52bdb5c07c97042f651;p=openssl-gost%2Fengine.git diff --git a/tcl_tests/smime2.try b/tcl_tests/smime2.try index c3bdd12..757691a 100644 --- a/tcl_tests/smime2.try +++ b/tcl_tests/smime2.try @@ -1,5 +1,4 @@ #!/usr/bin/tclsh -# -*- coding: cp1251 -*- lappend auto_path [file dirname [info script]] package require ossltest cd $::test::dir @@ -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 signed2_1_$length\_op.msg "Signing opaque in S/MIME format with 1st signature" { @@ -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 signed2_1_$length\_det.asn "Signing detached in DER format with 1st signature" { @@ -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 signed2_1_$length.msg "Signing in S/MIME format with 1st signature" { @@ -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_smime[incr i].pem $cert - lappend subjs [grep subject [openssl "x509 -in cert_smime$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 }" }