From 9e4021141ab518f3f8f58a44557e501f314ebd8f Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sun, 24 Jun 2018 18:34:42 +0200 Subject: [PATCH] [fix] fixing apache conf to use new cert mode + fixing bug in ssl : number of bound variables does not match number of tokens --- bureau/class/m_ssl.php | 4 ++-- etc/alternc/apache2-ssl.conf | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bureau/class/m_ssl.php b/bureau/class/m_ssl.php index 508ba3d2..c3c9fa45 100644 --- a/bureau/class/m_ssl.php +++ b/bureau/class/m_ssl.php @@ -479,8 +479,8 @@ INSTR(CONCAT(sd.sub,IF(sd.sub!='','.',''),sd.domaine),'.')+1))=? // Everything is PERFECT and has been thoroughly checked, let's insert those in the DB ! $db->query( - "INSERT INTO certificates SET uid='?', status=?, shared=0, fqdn=?, altnames=?, validstart=FROM_UNIXTIME(?), validend=FROM_UNIXTIME(?), sslkey=?, sslcrt=?, sslchain=?, provider=?;", - array($cuid,self::STATUS_OK,$fqdn,$altnames,intval($validstart),intval($validend),$key,$crt,$chain,$provider) + "INSERT INTO certificates SET uid=?, status=?, shared=0, fqdn=?, altnames=?, validstart=FROM_UNIXTIME(?), validend=FROM_UNIXTIME(?), sslkey=?, sslcrt=?, sslchain=?, provider=?;", + array($cuid, self::STATUS_OK, $fqdn, $altnames, intval($validstart), intval($validend), $key, $crt, $chain, $provider) ); if (!($id = $db->lastid())) { $msg->raise("ERROR","ssl", _("Can't save the Key/Crt/Chain now. Please try later.")); diff --git a/etc/alternc/apache2-ssl.conf b/etc/alternc/apache2-ssl.conf index f3144bb2..f1ee984a 100644 --- a/etc/alternc/apache2-ssl.conf +++ b/etc/alternc/apache2-ssl.conf @@ -9,7 +9,8 @@ SSLProtocol all -SSLv2 -SSLv3 Include /etc/alternc/bureau.conf SSLEngine on - SSLCertificateFile /etc/alternc/apache.pem + SSLCertificateFile /etc/ssl/certs/alternc-panel.pem + SSLCertificateKeyFile /etc/ssl/private/alternc-panel.key SSLCaCertificatePath /etc/ssl/certs