Comparison

util/openssl.lua @ 6902:d2d7ad2563f9

util.openssl: Separate extension sections into one for self-signed certs and one for requests
author Kim Alvefur <zash@zash.se>
date Sun, 11 Oct 2015 18:49:14 +0200
parent 5544:d911d9fb3929
child 7021:f436446661ca
comparison
equal deleted inserted replaced
6873:6dae43341b44 6902:d2d7ad2563f9
16 16
17 function config.new() 17 function config.new()
18 return setmetatable({ 18 return setmetatable({
19 req = { 19 req = {
20 distinguished_name = "distinguished_name", 20 distinguished_name = "distinguished_name",
21 req_extensions = "v3_extensions", 21 req_extensions = "certrequest",
22 x509_extensions = "v3_extensions", 22 x509_extensions = "selfsigned",
23 prompt = "no", 23 prompt = "no",
24 }, 24 },
25 distinguished_name = { 25 distinguished_name = {
26 countryName = "GB", 26 countryName = "GB",
27 -- stateOrProvinceName = "", 27 -- stateOrProvinceName = "",
29 organizationName = "Your Organisation", 29 organizationName = "Your Organisation",
30 organizationalUnitName = "XMPP Department", 30 organizationalUnitName = "XMPP Department",
31 commonName = "example.com", 31 commonName = "example.com",
32 emailAddress = "xmpp@example.com", 32 emailAddress = "xmpp@example.com",
33 }, 33 },
34 v3_extensions = { 34 certrequest = {
35 basicConstraints = "CA:FALSE", 35 basicConstraints = "CA:FALSE",
36 keyUsage = "digitalSignature,keyEncipherment", 36 keyUsage = "digitalSignature,keyEncipherment",
37 extendedKeyUsage = "serverAuth,clientAuth", 37 extendedKeyUsage = "serverAuth,clientAuth",
38 subjectAltName = "@subject_alternative_name",
39 },
40 selfsigned = {
41 basicConstraints = "CA:TRUE",
38 subjectAltName = "@subject_alternative_name", 42 subjectAltName = "@subject_alternative_name",
39 }, 43 },
40 subject_alternative_name = { 44 subject_alternative_name = {
41 DNS = {}, 45 DNS = {},
42 otherName = {}, 46 otherName = {},