aboutsummaryrefslogtreecommitdiff
path: root/tests/data_files/Makefile
diff options
context:
space:
mode:
authorPrzemek Stekiel <przemyslaw.stekiel@mobica.com>2023-01-12 15:30:45 +0100
committerPrzemek Stekiel <przemyslaw.stekiel@mobica.com>2023-01-24 10:57:19 +0100
commite7fbbb3fbd0bffd78cfdc7704df84aaa137f8d46 (patch)
tree8608a7f0c2aeb7baa114fa45868bbbdf89772987 /tests/data_files/Makefile
parentcbaf3167dd30db772834d40e1a456f6d666bca77 (diff)
downloadmbedtls-e7fbbb3fbd0bffd78cfdc7704df84aaa137f8d46.zip
mbedtls-e7fbbb3fbd0bffd78cfdc7704df84aaa137f8d46.tar.gz
mbedtls-e7fbbb3fbd0bffd78cfdc7704df84aaa137f8d46.tar.bz2
Generate csr files to test v3 extensions
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
Diffstat (limited to 'tests/data_files/Makefile')
-rw-r--r--tests/data_files/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/data_files/Makefile b/tests/data_files/Makefile
index 388b0ce..a87e0cc 100644
--- a/tests/data_files/Makefile
+++ b/tests/data_files/Makefile
@@ -93,6 +93,15 @@ cert_example_multi.csr: rsa_pkcs1_1024_clear.pem
cert_example_multi.crt: cert_example_multi.csr
$(OPENSSL) x509 -req -CA $(test_ca_crt) -CAkey $(test_ca_key_file_rsa) -extfile $(test_ca_config_file) -extensions dns_alt_names -passin "pass:$(test_ca_pwd_rsa)" -set_serial 17 -days 3653 -sha256 -in $< > $@
+test_csr_v3_keyUsage.csr: rsa_pkcs1_1024_clear.pem
+ $(OPENSSL) req -new -subj '/CN=etcd' -config $(test_ca_config_file) -key rsa_pkcs1_1024_clear.pem -out $@ -reqexts csr_ext_v3_keyUsage
+test_csr_v3_subjectAltName.csr: rsa_pkcs1_1024_clear.pem
+ $(OPENSSL) req -new -subj '/CN=etcd' -config $(test_ca_config_file) -key rsa_pkcs1_1024_clear.pem -out $@ -reqexts csr_ext_v3_subjectAltName
+test_csr_v3_nsCertType.csr: rsa_pkcs1_1024_clear.pem
+ $(OPENSSL) req -new -subj '/CN=etcd' -config $(test_ca_config_file) -key rsa_pkcs1_1024_clear.pem -out $@ -reqexts csr_ext_v3_nsCertType
+test_csr_v3_all.csr: rsa_pkcs1_1024_clear.pem
+ $(OPENSSL) req -new -subj '/CN=etcd' -config $(test_ca_config_file) -key rsa_pkcs1_1024_clear.pem -out $@ -reqexts csr_ext_v3_all
+
$(test_ca_key_file_rsa_alt):test-ca.opensslconf
$(OPENSSL) genrsa -out $@ 2048
test-ca-alt.csr: $(test_ca_key_file_rsa_alt) $(test_ca_config_file)