Skip to content
Snippets Groups Projects
Commit d78bcbb8 authored by nimrod's avatar nimrod
Browse files

- Adjust tests to run on both OpenSSL 1.1 and later and earlier versions.

parent 78be8082
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,8 @@ match () { ...@@ -30,8 +30,8 @@ match () {
verify certs/www verify certs/www
match keys/www certs/www match keys/www certs/www
[ "$(openssl rsa -noout -check -in keys/www)" = "RSA key ok" ] [ "$(openssl rsa -noout -check -in keys/www)" = "RSA key ok" ]
[ "$(openssl x509 -in certs/www -issuer -noout)" = "issuer=CN = ssl-ca" ] [ "$(openssl x509 -in certs/www -issuer -noout | sed 's@[ /]@@g')" = "issuer=CN=ssl-ca" ]
[ "$(openssl x509 -in certs/www -subject -noout)" = "subject=CN = www.ssl-ca" ] [ "$(openssl x509 -in certs/www -subject -noout | sed 's@[ /]@@g')" = "subject=CN=www.ssl-ca" ]
} }
...@@ -40,8 +40,8 @@ match () { ...@@ -40,8 +40,8 @@ match () {
./ssl-ca sign ./ssl-ca sign
verify certs/smtp verify certs/smtp
match keys/smtp certs/smtp match keys/smtp certs/smtp
[ "$(openssl x509 -in certs/smtp -issuer -noout)" = "issuer=CN = ssl-ca" ] [ "$(openssl x509 -in certs/smtp -issuer -noout | sed 's@[ /]@@g')" = "issuer=CN=ssl-ca" ]
[ "$(openssl x509 -in certs/smtp -subject -noout)" = "subject=CN = smtp.ssl-ca" ] [ "$(openssl x509 -in certs/smtp -subject -noout | sed 's@[ /]@@g')" = "subject=CN=smtp.ssl-ca" ]
} }
...@@ -53,10 +53,10 @@ match () { ...@@ -53,10 +53,10 @@ match () {
match keys/www certs/www match keys/www certs/www
verify certs/smtp verify certs/smtp
match keys/smtp certs/smtp match keys/smtp certs/smtp
[ "$(openssl x509 -in certs/www -issuer -noout)" = "issuer=CN = ssl-ca" ] [ "$(openssl x509 -in certs/www -issuer -noout | sed 's@[ /]@@g')" = "issuer=CN=ssl-ca" ]
[ "$(openssl x509 -in certs/www -subject -noout)" = "subject=CN = www.ssl-ca" ] [ "$(openssl x509 -in certs/www -subject -noout | sed 's@[ /]@@g')" = "subject=CN=www.ssl-ca" ]
[ "$(openssl x509 -in certs/smtp -issuer -noout)" = "issuer=CN = ssl-ca" ] [ "$(openssl x509 -in certs/smtp -issuer -noout | sed 's@[ /]@@g')" = "issuer=CN=ssl-ca" ]
[ "$(openssl x509 -in certs/smtp -subject -noout)" = "subject=CN = smtp.ssl-ca" ] [ "$(openssl x509 -in certs/smtp -subject -noout | sed 's@[ /]@@g')" = "subject=CN=smtp.ssl-ca" ]
} }
@test "webserver" { @test "webserver" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment