From 4bd0f6d89188af32e392a668798f9ade286935f1 Mon Sep 17 00:00:00 2001 From: Max Mack Date: Tue, 2 Apr 2013 12:26:41 +0300 Subject: Add newline at cert concat I got an error that haproxy can't load the cert. I looked into it and saw that the two parts are concationated together without a newline. Wrong: -----END CERTIFICATE----------BEGIN RSA PRIVATE KEY----- Correct: -----END CERTIFICATE-----\r\n -----BEGIN RSA PRIVATE KEY----- It works for me now... --- config/haproxy-devel/haproxy.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/haproxy-devel') diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc index f949bf98..427b0418 100644 --- a/config/haproxy-devel/haproxy.inc +++ b/config/haproxy-devel/haproxy.inc @@ -524,7 +524,7 @@ function haproxy_writeconf() { //ssl crt ./server.pem ca-file ./ca.crt verify optional crt-ignore-err all crl-file ./ca_crl.pem $ssl_crt=" crt /var/etc/{$backend['name']}.{$backend['port']}.crt"; $cert = lookup_cert($backend['ssloffloadcert']); - $certcontent = base64_decode($cert['crt']).base64_decode($cert['prv']); + $certcontent = base64_decode($cert['crt'])."\r\n".base64_decode($cert['prv']); file_put_contents("/var/etc/{$backend['name']}.{$backend['port']}.crt", $certcontent); unset($certcontent); }else{ -- cgit v1.2.3