From 0ebce1d6088a3a503ab038fd5ab81357ccabe625 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 7 Jun 2009 10:15:12 +0000 Subject: nixio: Add support for DER certificates, PX5G fix Certmaster --- libs/px5g/src/px5g.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libs/px5g/src') diff --git a/libs/px5g/src/px5g.c b/libs/px5g/src/px5g.c index 20ae7957f1..feecd01275 100644 --- a/libs/px5g/src/px5g.c +++ b/libs/px5g/src/px5g.c @@ -85,21 +85,22 @@ static int px5g_rsa_create_selfsigned(lua_State *L) { strftime(tstr, sizeof(tstr), "%F %H:%M:%S", gmtime(&to)), 4, "Invalid Time"); + size_t join = 1; lua_pushliteral(L, ""); for (int i = 0; i < (sizeof(xfields) / sizeof(*xfields)); i++) { lua_pushstring(L, xfields[i]); lua_rawget(L, 2); if (lua_isstring(L, -1)) { const char *val = lua_tostring(L, -1); - luaL_argcheck(L, !strchr(val, '\''), 2, "Invalid Value"); - lua_pushfstring(L, "%s%s='%s';", - lua_tostring(L, -2), xfields[i], val); - lua_remove(L, -2); + luaL_argcheck(L, !strchr(val, ';'), 2, "Invalid Value"); + lua_pushfstring(L, "%s=%s;", xfields[i], val); lua_remove(L, -2); + join++; } else { lua_pop(L, 1); } } + lua_concat(L, join); x509_raw cert; x509write_init_raw(&cert); -- cgit v1.2.3