commit c5627ad62eb2d18ab18aa3a81a04debe86a18223
parent 9a9ff9f2f3cca137198d11515e9e5a48ab1c2989
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Sat, 24 Aug 2019 04:10:12 +0200
build: Add a DNSName in the test server cert
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
@@ -528,7 +528,7 @@ unit/cert-server.csr: unit/cert-server-key.pem unit/gencerts.cnf
-key $< -out $@
unit/cert-server.pem: unit/cert-server.csr unit/cert-ca.pem unit/gencerts.cnf
- $(AM_V_GEN)openssl x509 -req -extensions cert_ext \
+ $(AM_V_GEN)openssl x509 -req -extensions server_ext \
-extfile $(srcdir)/unit/gencerts.cnf \
-in $< -CA $(builddir)/unit/cert-ca.pem \
-CAkey $(builddir)/unit/cert-ca-key.pem \
diff --git a/unit/gencerts.cnf b/unit/gencerts.cnf
@@ -17,3 +17,9 @@ authorityKeyIdentifier = keyid:always,issuer:always
basicConstraints = CA:FALSE
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer:always
+
+[ server_ext ]
+basicConstraints = CA:FALSE
+subjectKeyIdentifier = hash
+authorityKeyIdentifier = keyid:always,issuer:always
+subjectAltName = DNS:foo.example.org