changeset 712:227d48f927ff

mod_client_certs: Strip x509 data
author Florian Zeitz <florob@babelmonkeys.de>
date Tue, 12 Jun 2012 14:00:57 +0200
parents 53afd87f3612
children 88ef66a65b13
files mod_client_certs/mod_client_certs.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_client_certs/mod_client_certs.lua	Mon Jun 11 16:54:32 2012 +0200
+++ b/mod_client_certs/mod_client_certs.lua	Tue Jun 12 14:00:57 2012 +0200
@@ -106,7 +106,7 @@
 		end
 
 		local can_manage = key_info:get_child("no-cert-management", xmlns_saslcert) ~= nil;
-		local x509cert = key_info:get_child_text("x509cert");
+		local x509cert = key_info:get_child_text("x509cert"):gsub("^%s*(.-)%s*$", "%1");
 
 		local cert = x509.cert_from_pem(
 		"-----BEGIN CERTIFICATE-----\n"