Answer the question
In order to leave comments, you need to log in
What should be the certificate for Websocket communication over ssl?
When connecting, an error occurs:
SSL handshake error: stream_socket_enable_crypto(): Unable to set local cert chain file `/var/www/u0119078/data/www/.../cert/certificate.pem'; Check that your cafile/capath settings include details of your certificate and its issuer
$context = array(
'ssl' => array(
'local_cert' => __DIR__ . '/cert/certificate.pem',
'local_pk' => __DIR__ . '/cert/key.key',
'verify_peer' => false,
)
);
-----BEGIN CERTIFICATE-----
MIIFOTCCBCGgAwIBAgISAx210MjRQxRlgvnIQnC0c8FxMA0GCSqGSIb3DQEBCwUA
...
ecUrrujVtwgFAxYLHz8BaooCeIgbphdAU3c9BBl0z7NZ0h6IRoDl+Mkk3OPR
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
...
nLRbwHOoq7hHwg==
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA62gKKWi4QlegmfAnZ6xMhsPElH6PnClEMgTSL7wfymFpAIr1
...
ILXmQaor/Dw//Adk/BYpBtQjAIFP7VTToCHISBZsEKY6/tgHtMBY
-----END RSA PRIVATE KEY-----
Answer the question
In order to leave comments, you need to log in
There was a problem with the PRIVATE KEY file. Error occurred all the time
unable to load Private Key
139633364686736:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question