Skip to content
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

For http client side, how to use tls.Config GetClientCertificate() #40185

Closed
xqzhang2015 opened this issue Jul 13, 2020 · 1 comment
Closed

For http client side, how to use tls.Config GetClientCertificate() #40185

xqzhang2015 opened this issue Jul 13, 2020 · 1 comment

Comments

@xqzhang2015
Copy link

@xqzhang2015 xqzhang2015 commented Jul 13, 2020

I'm using the http client to do mutual tls verify for different endpoints(or different client cert for different servers).

Not sure if GetClientCertificate() could be used for it. I'm a little confused about it. Because CertificateRequestInfo doesn't have server endpoint or host info.

  • crypto/tls
    GetClientCertificate func(*CertificateRequestInfo) (*Certificate, error) // Go 1.8

It would be great if someone could give such an example? or maybe any other method to meet this requirement?

What version of Go are you using (go version)?

go version go1.13.3 linux/amd64
@andybons
Copy link
Member

@andybons andybons commented Jul 13, 2020

Hi there,

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

Please ask the question on one of the above forums.

(Quoted from https://golang.org/wiki/Questions)

@andybons andybons closed this Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.