Skip to content

PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT still checking CNΒ #8577

@drewwynne0

Description

@drewwynne0

Description

Apologies, may not be a bug but cannot seems to find anything after extensive research.

The following code:

PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,

Resulted in this output:

Peer certificate CN=`*.proxy-~~~.eu-west-2.rds.amazonaws.com' did not match expected CN=`~~~.**endpoint**.proxy-~~~.eu-west-2.rds.amazonaws.com'

~~~ used for masking
But I expected this output instead:

Successful mysql connection

There doesn't seem to be a specific way to force --ssl-mode=VERIFY_CA
mysql cli connection works fine with this flag

Scenario - I am utilising AWS RDS Proxy with a Read/Write endpoint and a Read endpoint. Read/write connects fine, but when trying to connect to the read only endpoint, receive the above error, assuming that the read only is within the subdomain .endpoint.proxy- whereas the read/write is with .proxy-

PHP Version

PHP 8.1.6

Operating System

Windows 11 // Ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions