php - Google o auth login SSL error -
since today google oauth login php application stopped working.
i following error:
stream_socket_client(): peer certificate cn=
*.storage.googleapis.com' did not match expected cn=
www.googleapis.com' stream_socket_client(): failed enable crypto stream_socket_client(): unable connect ssl://www.googleapis.com:443 (unknown error)
i'm using endpoint: https://www.googleapis.com/oauth2/v1/userinfo.
i had similar issue cakephp using http socket.
likely happening if using framework, or http socket library.
the fix in cakephp, disable ssl_verify_host
according documentation: "set false if wish ignore hostname match errors when validating certificates." http://book.cakephp.org/2.0/en/core-utility-libraries/httpsocket.html
e.g.
$this->httpsocket = new httpsocket(array( 'ssl_verify_host' => false ));
this solved issue me. suspect in other frameworks, there similar option, , should solve it!
Comments
Post a Comment