Specify minimum version of TLS 1.2
This commit is contained in:
parent
d5d491e9c2
commit
d604e8c337
|
@ -179,6 +179,7 @@ func (c *Client) Send(req *Request) (*Response, error) {
|
||||||
// Connect to the host
|
// Connect to the host
|
||||||
config := &tls.Config{
|
config := &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
|
MinVersion: tls.VersionTLS12,
|
||||||
Certificates: []tls.Certificate{req.Certificate},
|
Certificates: []tls.Certificate{req.Certificate},
|
||||||
VerifyPeerCertificate: func(rawCerts [][]byte, _ [][]*x509.Certificate) error {
|
VerifyPeerCertificate: func(rawCerts [][]byte, _ [][]*x509.Certificate) error {
|
||||||
// Parse the certificate
|
// Parse the certificate
|
||||||
|
|
|
@ -49,6 +49,7 @@ func (s *Server) ListenAndServe() error {
|
||||||
|
|
||||||
config := &tls.Config{
|
config := &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
|
MinVersion: tls.VersionTLS12,
|
||||||
Certificates: []tls.Certificate{s.Certificate},
|
Certificates: []tls.Certificate{s.Certificate},
|
||||||
ClientAuth: tls.RequestClientCert,
|
ClientAuth: tls.RequestClientCert,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user