-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We don't want depend on spacing around equal sign
...in DN output
- Loading branch information
Showing
3 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = [email protected] | ||
Issuer: C=RU, L=Moscow, CN=Test CA $ca_alg, O=Cryptocom, OU=OpenSSL CA, emailAddress=[email protected] | ||
$serial_list Signature Algorithm: [hash_with_sign_long_name $ca_alg] | ||
" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
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 = [email protected] | ||
} {subject=C = RU, O = Cryptocom, OU = OpenSSL Team, CN = USER2_$length, emailAddress = [email protected] | ||
} 0 "{subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER1_$length, emailAddress=[email protected] | ||
} {subject=C=RU, O=Cryptocom, OU=OpenSSL Team, CN=USER2_$length, emailAddress=[email protected] | ||
}" | ||
|
||
} | ||
|