From 39d21210c4b2096c17b3f2d2be66bc8ec0e21bbb Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 25 Feb 2016 15:34:38 +0100 Subject: util.openssl: Allow order of distinguished name fields to be included in config --- util/openssl.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util') 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); -- cgit v1.2.3