aboutsummaryrefslogtreecommitdiff
path: root/tcl_tests
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2021-09-16 17:15:33 +0200
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2021-09-16 18:40:36 +0300
commit986905842330e4a54e61334eb508fe3147c43e38 (patch)
tree678318cdaf870c15aff3f70f79e47ce6419183e3 /tcl_tests
parent65d9677890ca5eeca45bca0fb09d6cd08238161e (diff)
downloadgost-engine-986905842330e4a54e61334eb508fe3147c43e38.zip
gost-engine-986905842330e4a54e61334eb508fe3147c43e38.tar.gz
gost-engine-986905842330e4a54e61334eb508fe3147c43e38.tar.bz2
We don't want depend on spacing around equal sign
...in DN output
Diffstat (limited to 'tcl_tests')
-rw-r--r--tcl_tests/ca.try4
-rw-r--r--tcl_tests/cms2.try24
-rw-r--r--tcl_tests/smime2.try24
3 files changed, 26 insertions, 26 deletions
diff --git a/tcl_tests/ca.try b/tcl_tests/ca.try
index dd2d8df..3c7b61e 100644
--- a/tcl_tests/ca.try
+++ b/tcl_tests/ca.try
@@ -73,10 +73,10 @@ test -createsfiles test.crl "Generating CRL" {
test -skip {![file exists test.crl]} "Displaying CRL" {
- grep "(Serial|Version|Signature Alg|Issuer)" [openssl "crl -text -noout -in test.crl"]
+ regsub -all " = " [grep "(Serial|Version|Signature Alg|Issuer)" [openssl "crl -text -noout -in test.crl"] ] "="
} 0 " Version 2 (0x1)
Signature Algorithm: [hash_with_sign_long_name $ca_alg]
- Issuer: C = RU, L = Moscow, CN = Test CA $ca_alg, O = Cryptocom, OU = OpenSSL CA, emailAddress = openssl@cryptocom.ru
+ Issuer: C=RU, L=Moscow, CN=Test CA $ca_alg, O=Cryptocom, OU=OpenSSL CA, emailAddress=openssl@cryptocom.ru
$serial_list Signature Algorithm: [hash_with_sign_long_name $ca_alg]
"
diff --git a/tcl_tests/cms2.try b/tcl_tests/cms2.try
index c734a6c..47a5306 100644
--- a/tcl_tests/cms2.try
+++ b/tcl_tests/cms2.try
@@ -45,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" {
@@ -79,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" {
@@ -113,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" {
@@ -146,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
}"
}
diff --git a/tcl_tests/smime2.try b/tcl_tests/smime2.try
index 071ad85..757691a 100644
--- a/tcl_tests/smime2.try
+++ b/tcl_tests/smime2.try
@@ -45,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" {
@@ -79,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" {
@@ -113,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" {
@@ -146,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
}"
}