Re: Apache2 on 5.7 = certificate error

2015-05-18 Thread Stefan Sperling
On Mon, May 18, 2015 at 10:04:03AM -0400, John Merriam wrote:
 I get the following error in the error_log when I try to start Apache2:
 
 [Mon May 18 09:51:43 2015] [error] Failed to configure CA certificate 
 chain!
 
 The certificate is a wildcard certificate from RapidSSL.
 
 I have their 'intermediate CA bundle' from here:
 
 https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=contentactp=CROSSLINKid=SO26459
 
 in a file that is pointed to with the SSLCertificateChainFile directive in 
 my Apache2 config.

What does this file contain exactly? I believe mod_ssl expects the server
certificate followed by any intermediate CA certificates up to the root
CA cert, all in PEM format, in one file.

It's very odd that the behaviour between 5.6 and 5.7 changed.
None of the upstream changes between 2.2.27 and 2.2.29 seem to apply.
http://www.apache.org/dist/httpd/CHANGES_2.2

Given your error message, the point of failure in mod_ssl is a call to
SSL_CTX_use_certificate_chain(), a function name which exists in mod_ssl
and also existed in LibreSSL for a brief period before 5.7.
During which time mod_ssl's version was renamed in our ports tree.
Before release, LibreSSL's function was renamed and mod_ssl's version
renamed back to its original name. This should not matter at all unless
something unexpected happened during release package builds (unlikely).

Can you make it work by using alternative configuration options, such as
SSLCertificateFile and SSLCACertificateFile or SSLCACertificatePath?



Re: Apache2 on 5.7 = certificate error

2015-05-18 Thread John Merriam
On Mon, 18 May 2015, Stefan Sperling wrote:
 On Mon, May 18, 2015 at 10:04:03AM -0400, John Merriam wrote:
  I get the following error in the error_log when I try to start Apache2:
  
  [Mon May 18 09:51:43 2015] [error] Failed to configure CA certificate 
  chain!
  
  The certificate is a wildcard certificate from RapidSSL.
  
  I have their 'intermediate CA bundle' from here:
  
  https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=contentactp=CROSSLINKid=SO26459
  
  in a file that is pointed to with the SSLCertificateChainFile directive in 
  my Apache2 config.
 
 What does this file contain exactly? I believe mod_ssl expects the server
 certificate followed by any intermediate CA certificates up to the root
 CA cert, all in PEM format, in one file.
 
 It's very odd that the behaviour between 5.6 and 5.7 changed.
 None of the upstream changes between 2.2.27 and 2.2.29 seem to apply.
 http://www.apache.org/dist/httpd/CHANGES_2.2
 
 Given your error message, the point of failure in mod_ssl is a call to
 SSL_CTX_use_certificate_chain(), a function name which exists in mod_ssl
 and also existed in LibreSSL for a brief period before 5.7.
 During which time mod_ssl's version was renamed in our ports tree.
 Before release, LibreSSL's function was renamed and mod_ssl's version
 renamed back to its original name. This should not matter at all unless
 something unexpected happened during release package builds (unlikely).
 
 Can you make it work by using alternative configuration options, such as
 SSLCertificateFile and SSLCACertificateFile or SSLCACertificatePath?
 

Yes, it was very odd to me as well that it didn't work after the upgrade.  
I didn't change a single bit of my Apache2 config.  I checked 
/usr/local/share/examples/apache2/conf/* for changes after the upgrade.  
Since there were none I didn't change anything.

I just changed SSLCertificateChainFile to SSLCACertificateFile in my 
httpd-ssl.conf and it works!  I should have thought of trying something 
like that...

The file pointed to in my SSLCertificateChainFile (and now 
SSLCACertificateFile) directives contains:

-BEGIN CERTIFICATE-
MIIEJTCCAw2gAwIBAgIDAjp3MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTQwODI5MjEzOTMyWhcNMjIwNTIwMjEzOTMyWjBHMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXUmFwaWRTU0wg
U0hBMjU2IENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCv
VJvZWF0eLFbG1eh/9H0WA//Qi1rkjqfdVC7UBMBdmJyNkA+8EGVf2prWRHzAn7Xp
SowLBkMEu/SW4ib2YQGRZjEiwzQ0Xz8/kS9EX9zHFLYDn4ZLDqP/oIACg8PTH2lS
1p1kD8mD5xvEcKyU58Okaiy9uJ5p2L4KjxZjWmhxgHsw3hUEv8zTv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WR74M26x1W
b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S
-END CERTIFICATE-

which is the RapidSSL 'RSA SHA-2 (under SHA-1 Root) intermediate CA 
bundle' which was copied 

Apache2 on 5.7 = certificate error

2015-05-18 Thread John Merriam
Hello.  I have upgraded my home server from OpenBSD 5.6 to 5.7.  It is 
amd64 and it is on -stable with -stable ports.

Everything is working fine after the upgrade except SSL in Apache2 
(apache-httpd package/port).

I get the following error in the error_log when I try to start Apache2:

[Mon May 18 09:51:43 2015] [error] Failed to configure CA certificate 
chain!

The certificate is a wildcard certificate from RapidSSL.

I have their 'intermediate CA bundle' from here:

https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=contentactp=CROSSLINKid=SO26459

in a file that is pointed to with the SSLCertificateChainFile directive in 
my Apache2 config.

This worked fine with the old Apache2 in 5.6.

I've tried several different things to try to convince it to work but 
nothing has done the trick yet.

I use the same certificate in sendmail and dovecot on the same server and 
it is working fine with those two daemons.

Any ideas or suggestions as to what the problem may be or where I should 
start digging?  Thanks!

-- 

John Merriam