Add test for bad signature with longer chain

This is one line that wasn't covered in verify_child()
This commit is contained in:
Manuel Pégourié-Gonnard
2017-06-05 11:12:13 +02:00
parent 29d60fb85f
commit 4dfc04a66f
3 changed files with 54 additions and 2 deletions

View File

@@ -76,8 +76,9 @@ all_final += server7-expired.crt
server7-future.crt: server7.csr $(test_ca_int_rsa1)
$(FAKETIME) -f +3653d $(OPENSSL) x509 -req -extfile $(cli_crt_extensions_file) -extensions cli-rsa -CA $(test_ca_int_rsa1) -CAkey test-int-ca.key -set_serial 16 -days 3653 -sha256 -in server7.csr | cat - $(test_ca_int_rsa1) > $@
all_final += server7-future.crt
server7-badsign.crt: server7.crt $(test_ca_int_rsa1)
{ head -n-2 server7.crt; tail -n-2 server7.crt | sed -e '1s/0\(=*\)$$/_\1/' -e '1s/[^_=]\(=*\)$$/0\1/' -e '1s/_/1/'; cat test-int-ca.crt; } > server7-badsign.crt
all_final += server7-badsign.crt
################################################################
#### Meta targets