1f16b36402
* Fix `MatchDomainName` to also check for remaining len on success check. * Enhanced `DNS_entry` to include actual ASN.1 length and use it thoughout (was using XSTRLEN). Added additional tests for matching on domain name: * Check for bad common name with embedded null (CN=localhost\0h, Alt=None) - Note: Trouble creating cert with this criteria * Check for bad alternate name with embedded null (CN=www.nomatch.com, Alt=localhost\0h) * Check for bad common name (CN=www.nomatch.com, Alt=None) * Check for bad alternate name (CN=www.nomatch.com, Alt=www.nomatch.com) * Check for good wildcard common name (CN=*localhost, Alt=None) * Check for good wildcard alternate name (CN=www.nomatch.com, Alt=*localhost)
97 lines
1.8 KiB
Plaintext
97 lines
1.8 KiB
Plaintext
# server bad certificate common name has null
|
|
# DG: Have not found a way to properly encode null in common name
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-k ./certs/server-key.pem
|
|
-c ./certs/test/server-badcnnull.pem
|
|
-d
|
|
|
|
# client bad certificate common name has null
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-h localhost
|
|
-A ./certs/test/server-badcnnull.pem
|
|
-m
|
|
-x
|
|
|
|
# server bad certificate alternate name has null
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-k ./certs/server-key.pem
|
|
-c ./certs/test/server-badaltnull.pem
|
|
-d
|
|
|
|
# client bad certificate alternate name has null
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-h localhost
|
|
-A ./certs/test/server-badaltnull.pem
|
|
-m
|
|
-x
|
|
|
|
# server nomatch common name
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-k ./certs/server-key.pem
|
|
-c ./certs/test/server-badcn.pem
|
|
-d
|
|
|
|
# client nomatch common name
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-h localhost
|
|
-A ./certs/test/server-badcn.pem
|
|
-m
|
|
-x
|
|
|
|
# server nomatch alternate name
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-k ./certs/server-key.pem
|
|
-c ./certs/test/server-badaltname.pem
|
|
-d
|
|
|
|
# client nomatch alternate name
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-h localhost
|
|
-A ./certs/test/server-badaltname.pem
|
|
-m
|
|
-x
|
|
|
|
# server RSA no signer error
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
|
|
# client RSA no signer error
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-A ./certs/client-cert.pem
|
|
|
|
# server ECC no signer error
|
|
-v 3
|
|
-l ECDHE-ECDSA-AES128-GCM-SHA256
|
|
|
|
# client ECC no signer error
|
|
-v 3
|
|
-l ECDHE-ECDSA-AES128-GCM-SHA256
|
|
-A ./certs/client-ecc-cert.pem
|
|
|
|
# server RSA bad sig error
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
-c ./certs/test/server-cert-rsa-badsig.pem
|
|
|
|
# client RSA bad sig error
|
|
-v 3
|
|
-l ECDHE-RSA-AES128-GCM-SHA256
|
|
|
|
# server ECC bad sig error
|
|
-v 3
|
|
-l ECDHE-ECDSA-AES128-GCM-SHA256
|
|
-c ./certs/test/server-cert-ecc-badsig.pem
|
|
|
|
# client ECC bad sig error
|
|
-v 3
|
|
-l ECDHE-ECDSA-AES128-GCM-SHA256
|