Make a test cert with a custom OID in the DN

This commit is contained in:
Matthew McPherrin
2017-01-04 15:39:24 -08:00
parent 8c399e4f1b
commit 65402b26f5
2 changed files with 21 additions and 1 deletions
+9 -1
View File
@@ -1,6 +1,7 @@
TARGETS = \
example-root example-leaf example-sha1 example-md5 example-root-bad-ku \
example-bad-serial example-small-key example-expired example-elliptic-sha1
example-bad-serial example-small-key example-expired example-elliptic-sha1 \
example-custom-oid
all: \
$(addsuffix .crt,$(TARGETS)) \
@@ -72,3 +73,10 @@ example-elliptic-sha1.key:
example-elliptic-sha1.crt: example-elliptic-sha1.csr
openssl x509 -req -in $< -signkey $(@:.crt=.key) -out $@ -days 2500 -extfile openssl.ext -extensions leaf
# Custom OID
example-custom-oid.csr: example-custom-oid.key
openssl req -new -config example-custom-oid.conf -key $< -out $@
example-custom-oid.crt: example-custom-oid.csr
openssl x509 -req -sha256 -in $< -signkey $(@:.crt=.key) -out $@ -days 2500 -extfile openssl.ext -extensions leaf
+12
View File
@@ -0,0 +1,12 @@
oid_section = OIDs
[ req ]
distinguished_name = dn
prompt = no
[ OIDs ]
CustomTestOID=1.3.6.1.4.1.36914
[ dn ]
CN = example-custom-oids
CustomTestOID = example