Skip to content

Commit

Permalink
add tls 1.2
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed May 18, 2022
1 parent b382ade commit fad6ba0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package main

import (
"context"
"crypto/tls"
"io/ioutil"
"net/url"
"os"
Expand Down Expand Up @@ -164,6 +165,11 @@ func main() {
}
logger.Infof("SVID: %q", svid.ID)

tlsClientConfig := tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny())
tlsClientConfig.MinVersion = tls.VersionTLS12
tlsServerConfig := tlsconfig.MTLSServerConfig(source, source, tlsconfig.AuthorizeAny())
tlsServerConfig.MinVersion = tls.VersionTLS12

// ********************************************************************************
logger.Infof("executing phase 3: getting kubernetes config and pod description")
// ********************************************************************************
Expand Down Expand Up @@ -202,7 +208,7 @@ func main() {
grpc.Creds(
grpcfd.TransportCredentials(
credentials.NewTLS(
tlsconfig.MTLSServerConfig(source, source, tlsconfig.AuthorizeAny()),
tlsServerConfig,
),
),
),
Expand All @@ -229,7 +235,7 @@ func main() {
grpc.WithTransportCredentials(
grpcfd.TransportCredentials(
credentials.NewTLS(
tlsconfig.MTLSClientConfig(source, source, tlsconfig.AuthorizeAny()),
tlsClientConfig,
),
),
),
Expand Down

0 comments on commit fad6ba0

Please sign in to comment.