Skip to content

Client SSL certificate #100

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

Closed
lukescott opened this issue Jun 19, 2013 · 4 comments
Closed

Client SSL certificate #100

lukescott opened this issue Jun 19, 2013 · 4 comments
Milestone

Comments

@lukescott
Copy link
Contributor

There doesn't appear to be a way to specify a client SSL certificate.

@julienschmidt
Copy link
Member

This is intended.
The driver currently only supports connection encryption using TLS / SSL. You don't need to specify a client certificate for that.

You would only need it if you want to authenticate the client using the certificate. The driver currently supports no auth plugins and this has currently a low priority. If you want to work on it, we would be happy to accept you pull request 😉

@lukescott
Copy link
Contributor Author

Client certificates are an [optional] part of TLS, but required in my case. The problem is the TLS config object is not exposed because of how database/sql is defined.

I'd be happy to send a pull request. But do you have any ideas on how I might be able to accomplish this? It seems like database/sql does a great job of hiding the underlying interfaces.

@julienschmidt julienschmidt reopened this Jun 19, 2013
@julienschmidt
Copy link
Member

OK, sorry. We didn't notice this case when implementing TLS support.

The only sensible way which comes to my mind right now is to build a map of named certificates like we do here for Readers: https://github.com/go-sql-driver/mysql/blob/master/infile.go
You could specify a comma-separated list of named certificates in the DSN then.

@lukescott
Copy link
Contributor Author

Pull request here: #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants