Skip to content

Commit

Permalink
rever useless changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao committed Jun 7, 2024
1 parent 429043f commit 80845df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/security/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (tls *TLSOption) MakeClientTLSConf() (*libtls.Config, error) {
tlsConf.RootCAs = certPool
}

tlsConf.GetClientCertificate = func(_ *libtls.CertificateRequestInfo) (cert *libtls.Certificate, err error) {
tlsConf.GetClientCertificate = func(unused *libtls.CertificateRequestInfo) (cert *libtls.Certificate, err error) {
c, err := libtls.LoadX509KeyPair(tls.CertFile, tls.KeyFile)
return &c, err
}
Expand All @@ -130,7 +130,7 @@ func (tls *TLSOption) MakeServerTLSConf() (*libtls.Config, error) {
if err != nil {
return nil, err
}
tlsConf.GetCertificate = func(_ *libtls.ClientHelloInfo) (cert *libtls.Certificate, err error) {
tlsConf.GetCertificate = func(clientHello *libtls.ClientHelloInfo) (cert *libtls.Certificate, err error) {
c, err := libtls.LoadX509KeyPair(tls.CertFile, tls.KeyFile)
return &c, err
}
Expand Down

0 comments on commit 80845df

Please sign in to comment.