Michael Raeck
New Pleskian
Hey Guys,
I have a strange Problem,
We use a E-Commerce system called Shopware, we updated this system, but now it needs php 5.6, no problem i thougth, but i had a reallly strange problem.
with php 5.6 All encrypted client streams now enable peer verification by default.
see here:
http://php.net/manual/en/migration56.openssl.php
Thatswhy i had to configure the SSL Certificates for the domain, to be used by Dovecot.
I followed this:
test -e /etc/postfix/postfix_default.pem && cp /etc/postfix/postfix_default.pem /etc/postfix/postfix_default.pem.original
test -e /etc/dovecot/private/ssl-cert-and-key.pem && cp /etc/dovecot/private/ssl-cert-and-key.pem /etc/dovecot/private/ssl-cert-and-key.pem.original
cat /root/zertifikat.pem >/etc/postfix/postfix_default.pem
test -e /etc/dovecot/private/ssl-cert-and-key.pem && cat /root/zertifikat.pem >/etc/dovecot/private/ssl-cert-and-key.pem
test -e /etc/init.d/postfix && /etc/init.d/postfix restart
test -e /etc/init.d/dovecot && /etc/init.d/dovecot restart
test -e /sbin/service && service postfix restart
test -e /sbin/service && service dovecot restart
with this pem file:
-----BEGIN RSA PRIVATE KEY-----
MY PRIVATE SSL SERVER KEY
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
THATWE Intermediate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
THATWE Intermediate
-----END CERTIFICATE-----
WHEN I NOW TRY THIS:
openssl s_client -showcerts -connect ****.de:443 -state -debug
IT works, BUT:
i get:
verify return code: 20 (unable to get local issuer certificate)
So he dosnt find the issuer certificate
After searching for hours, I found:
openssl s_client -connect *****.de:443 -CApath /etc/ssl/certs
does the trick. And it works with:
Verify return code: 0 (ok)
Now my question:
How can i tell Plesk or openSSL or PHP where he finds the root certificates?
I also tried to append the thatwe Server root at the end of the .pem file, but it also don't work.
This is my dovecot config:
#ssl_cert = </etc/dovecot/private/ssl-cert-and-key.pem
#ssl_key = </etc/dovecot/private/ssl-cert-and-key.pem
ssl_key = </etc/ssl-certs/****.de.pem
ssl_cert = </etc/ssl-certs/****.de.pem
ssl_ca = </etc/ssl-certs/****.de.ca.pem
I tried the commented and uncommented lines, both give the same results, its like dovecot also not knowing where to find the thatwe Root cerfiticate.
I know this question is really complex, i hope anyone can help me.
Thanks in advance.
I have a strange Problem,
We use a E-Commerce system called Shopware, we updated this system, but now it needs php 5.6, no problem i thougth, but i had a reallly strange problem.
with php 5.6 All encrypted client streams now enable peer verification by default.
see here:
http://php.net/manual/en/migration56.openssl.php
Thatswhy i had to configure the SSL Certificates for the domain, to be used by Dovecot.
I followed this:
test -e /etc/postfix/postfix_default.pem && cp /etc/postfix/postfix_default.pem /etc/postfix/postfix_default.pem.original
test -e /etc/dovecot/private/ssl-cert-and-key.pem && cp /etc/dovecot/private/ssl-cert-and-key.pem /etc/dovecot/private/ssl-cert-and-key.pem.original
cat /root/zertifikat.pem >/etc/postfix/postfix_default.pem
test -e /etc/dovecot/private/ssl-cert-and-key.pem && cat /root/zertifikat.pem >/etc/dovecot/private/ssl-cert-and-key.pem
test -e /etc/init.d/postfix && /etc/init.d/postfix restart
test -e /etc/init.d/dovecot && /etc/init.d/dovecot restart
test -e /sbin/service && service postfix restart
test -e /sbin/service && service dovecot restart
with this pem file:
-----BEGIN RSA PRIVATE KEY-----
MY PRIVATE SSL SERVER KEY
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
THATWE Intermediate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
THATWE Intermediate
-----END CERTIFICATE-----
WHEN I NOW TRY THIS:
openssl s_client -showcerts -connect ****.de:443 -state -debug
IT works, BUT:
i get:
verify return code: 20 (unable to get local issuer certificate)
So he dosnt find the issuer certificate
After searching for hours, I found:
openssl s_client -connect *****.de:443 -CApath /etc/ssl/certs
does the trick. And it works with:
Verify return code: 0 (ok)
Now my question:
How can i tell Plesk or openSSL or PHP where he finds the root certificates?
I also tried to append the thatwe Server root at the end of the .pem file, but it also don't work.
This is my dovecot config:
#ssl_cert = </etc/dovecot/private/ssl-cert-and-key.pem
#ssl_key = </etc/dovecot/private/ssl-cert-and-key.pem
ssl_key = </etc/ssl-certs/****.de.pem
ssl_cert = </etc/ssl-certs/****.de.pem
ssl_ca = </etc/ssl-certs/****.de.ca.pem
I tried the commented and uncommented lines, both give the same results, its like dovecot also not knowing where to find the thatwe Root cerfiticate.
I know this question is really complex, i hope anyone can help me.
Thanks in advance.