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

fix: remove InsecureSkipVerify #3646

Merged
merged 2 commits into from Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions go/pkg/bertyprotocol/api_push.go
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
crand "crypto/rand"
"crypto/tls"
"fmt"
"sync"

Expand All @@ -13,7 +12,6 @@ import (
"go.uber.org/zap"
"golang.org/x/crypto/nacl/box"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"berty.tech/berty/v2/go/internal/cryptoutil"
"berty.tech/berty/v2/go/internal/grpcutil"
Expand Down Expand Up @@ -80,9 +78,6 @@ func (s *service) createAndGetPushClient(ctx context.Context, host string, token

if s.grpcInsecure {
gopts = append(gopts, grpc.WithInsecure())
} else {
tlsconfig := credentials.NewTLS(&tls.Config{InsecureSkipVerify: true}) // nolint:gosec
gopts = append(gopts, grpc.WithTransportCredentials(tlsconfig))
}

cc, err := grpc.DialContext(ctx, host, gopts...)
Expand Down
5 changes: 0 additions & 5 deletions go/pkg/bertyprotocol/api_replication.go
Expand Up @@ -2,13 +2,11 @@ package bertyprotocol

import (
"context"
"crypto/tls"
"encoding/base64"
"fmt"

"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"berty.tech/berty/v2/go/internal/cryptoutil"
"berty.tech/berty/v2/go/internal/grpcutil"
Expand Down Expand Up @@ -86,9 +84,6 @@ func (s *service) ReplicationServiceRegisterGroup(ctx context.Context, request *

if s.grpcInsecure {
gopts = append(gopts, grpc.WithInsecure())
} else {
tlsconfig := credentials.NewTLS(&tls.Config{InsecureSkipVerify: true}) // nolint:gosec
gopts = append(gopts, grpc.WithTransportCredentials(tlsconfig))
}

cc, err := grpc.Dial(endpoint, gopts...)
Expand Down