Add ssl certificate chain support for an pem bundle file

The PEM file could contain certificate, key and a CA certificate chain. The server should be able to send the full chain to the client. This allow the client to only have the root certificate installed.