Skip to content

Commit

Permalink
upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
fritterhoff committed Apr 21, 2024
1 parent 598f4dc commit e523a5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
5 changes: 2 additions & 3 deletions cas/sectigocas/eab/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ func MustFromContext(ctx context.Context) pb.EABServiceClient {

func Connect(host string) (pb.EABServiceClient, error) {

Check failure on line 35 in cas/sectigocas/eab/client.go

View workflow job for this annotation

GitHub Actions / ci / lint / lint

unnecessary leading newline (whitespace)

conn, err := grpc.DialContext(
context.Background(),
conn, err := grpc.NewClient(
host,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
)
if err != nil {
return nil, err
Expand Down
15 changes: 4 additions & 11 deletions cas/sectigocas/sectigocas.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"encoding/pem"
"fmt"
"time"

"github.com/smallstep/certificates/acme"
"github.com/smallstep/certificates/acme/api"
Expand Down Expand Up @@ -38,26 +37,20 @@ func New(ctx context.Context, opts apiv1.Options) (*SectigoCAS, error) {
if err != nil {
return nil, err
}
ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
defer cancel()

conn, err := grpc.DialContext(
ctx,
conn, err := grpc.NewClient(
config.PKIBackend,
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
)
if err != nil {
return nil, err
}
sslServiceClient := pb.NewSSLServiceClient(conn)
conn, err = grpc.DialContext(
ctx,
conn, err = grpc.NewClient(
config.EABBackend,
grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
)
if err != nil {
return nil, err
Expand Down

0 comments on commit e523a5e

Please sign in to comment.