-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow non-standard Common Name (CN) for SSL verification of connections with provided certificates. #704
Comments
@jsimonweb I appreciate the PR. I think you would need to replace the I don't think I would want to do exactly as you have it, but let's discuss what would work. |
The error happens upon calling sql.Open() as in the following code snippet:
The error message is: Using
My PR is the approach I found to resolve this issue while still ensuring a verified certificate based encrypted connection. Feel free to treat it as a proof of concept and re-implement it in a way that's best for the Let me know if you need any more details or have any follow-up questions. Thank you! |
Proposal approved. I left comments on PR. |
Issue:
Google Cloud SQL for SQL Server generated SSL server certificates include a Common Name (CN) formatted as:
project-id:instance-id
Example snippet from a generated SSL server certificate:
CN = my-project:test-sqlserver
The
:
character in the CN currently causes a connection formatted as the following snippet to fail:dbURI += fmt.Sprintf("encrypt=true;hostnameincertificate=my-project:test-sqlserver;certificate=%s;", dbRootCert)
Feature request:
Provide an option to allow verification of SSL certificates that include a custom non-standard Common Name (CN).
For more information on this issue see:
golang/go#40748
The text was updated successfully, but these errors were encountered: