From 99cee90a446f24ae0b01cb029ec9a3cd241ad306 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 11 Oct 2015 18:49:14 +0200 Subject: util.openssl: Separate extension sections into one for self-signed certs and one for requests --- util/openssl.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'util/openssl.lua') diff --git a/util/openssl.lua b/util/openssl.lua index ef3fba96..39fe99d6 100644 --- a/util/openssl.lua +++ b/util/openssl.lua @@ -18,8 +18,8 @@ function config.new() return setmetatable({ req = { distinguished_name = "distinguished_name", - req_extensions = "v3_extensions", - x509_extensions = "v3_extensions", + req_extensions = "certrequest", + x509_extensions = "selfsigned", prompt = "no", }, distinguished_name = { @@ -31,12 +31,16 @@ function config.new() commonName = "example.com", emailAddress = "xmpp@example.com", }, - v3_extensions = { + certrequest = { basicConstraints = "CA:FALSE", keyUsage = "digitalSignature,keyEncipherment", extendedKeyUsage = "serverAuth,clientAuth", subjectAltName = "@subject_alternative_name", }, + selfsigned = { + basicConstraints = "CA:TRUE", + subjectAltName = "@subject_alternative_name", + }, subject_alternative_name = { DNS = {}, otherName = {}, -- cgit v1.2.3