Software /
code /
prosody
Comparison
util/openssl.lua @ 7192:18a13a7b4bac
util.openssl: Allow order of distinguished name fields to be included in config
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 25 Feb 2016 15:34:38 +0100 |
parent | 7023:c2ccbfe30113 |
child | 7458:82710f8c1fe6 |
comparison
equal
deleted
inserted
replaced
7190:7a14ea196db3 | 7192:18a13a7b4bac |
---|---|
68 for i = 1, #n do | 68 for i = 1, #n do |
69 s = s .. s_format("%s.%d = %s\n", san, i -1, n[i]); | 69 s = s .. s_format("%s.%d = %s\n", san, i -1, n[i]); |
70 end | 70 end |
71 end | 71 end |
72 elseif k == "distinguished_name" then | 72 elseif k == "distinguished_name" then |
73 for i=1, #DN_order do | 73 for i, k in ipairs(t[1] and t or DN_order) do |
74 local k = DN_order[i] | |
75 local v = t[k]; | 74 local v = t[k]; |
76 if v then | 75 if v then |
77 s = s .. ("%s = %s\n"):format(k, v); | 76 s = s .. ("%s = %s\n"):format(k, v); |
78 end | 77 end |
79 end | 78 end |