# HG changeset patch # User Kim Alvefur # Date 1456410878 -3600 # Node ID 18a13a7b4bace55eff10ebe0e550f52f6f4545f3 # Parent 7a14ea196db306a5e9bacab3b5b402ace61ebaf2 util.openssl: Allow order of distinguished name fields to be included in config diff -r 7a14ea196db3 -r 18a13a7b4bac util/openssl.lua --- a/util/openssl.lua Wed Feb 24 11:15:27 2016 +0100 +++ b/util/openssl.lua Thu Feb 25 15:34:38 2016 +0100 @@ -70,8 +70,7 @@ 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);