Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sujankota committed Nov 15, 2024
1 parent f9726e3 commit 3f2144c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
3 changes: 2 additions & 1 deletion examples/cmd/decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"bytes"
"errors"
"fmt"
"github.com/spf13/cobra"
"io"
"os"
"path/filepath"

"github.com/spf13/cobra"
)

func init() {
Expand Down
10 changes: 1 addition & 9 deletions sdk/nanotdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -988,15 +988,7 @@ func (s SDK) getNanoRewrapKey(ctx context.Context, header []byte, kasURL string)
}
encodedHeader := ocrypto.Base64Encode(header)

rsaKeyPair, err := ocrypto.NewRSAKeyPair(tdf3KeySize)
if err != nil {
return nil, fmt.Errorf("ocrypto.NewRSAKeyPair failed: %w", err)
}

client, err := newKASClient(s.dialOptions, s.tokenSource, rsaKeyPair)
if err != nil {
return nil, fmt.Errorf("newKASClient failed: %w", err)
}
client := newKASClient(s.dialOptions, s.tokenSource, nil)

symmetricKey, err := client.unwrapNanoTDF(ctx, string(encodedHeader), kasURL)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ require (
github.com/go-chi/cors v1.2.1
github.com/go-playground/validator/v10 v10.22.0
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
github.com/jackc/pgx/v5 v5.5.5
Expand Down
2 changes: 0 additions & 2 deletions service/kas/access/publicKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
"github.com/opentdf/platform/service/internal/security"
"github.com/opentdf/platform/service/tracing"
"go.opentelemetry.io/otel"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)

Expand Down

0 comments on commit 3f2144c

Please sign in to comment.