aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-02-25 15:34:38 +0100
committerKim Alvefur <zash@zash.se>2016-02-25 15:34:38 +0100
commita73851746b2efeb00e8ba29e241ba06f783b729e (patch)
treef4938d0c622e362bf67d207523b9e6d4ce33bb9b /util
parentbdabf32dc62bc1d62fe9954c82be48a60ea7232a (diff)
downloadprosody-a73851746b2efeb00e8ba29e241ba06f783b729e.tar.gz
prosody-a73851746b2efeb00e8ba29e241ba06f783b729e.zip
util.openssl: Allow order of distinguished name fields to be included in config
Diffstat (limited to 'util')
-rw-r--r--util/openssl.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/openssl.lua b/util/openssl.lua
index 12e49eac..757259f6 100644
--- a/util/openssl.lua
+++ b/util/openssl.lua
@@ -70,8 +70,7 @@ function ssl_config:serialize()
end
end
elseif k == "distinguished_name" then
- for i=1, #DN_order do
- local k = DN_order[i]
+ for i, k in ipairs(t[1] and t or DN_order) do
local v = t[k];
if v then
s = s .. ("%s = %s\n"):format(k, v);