Skip to content

Commit

Permalink
somemorefixups
Browse files Browse the repository at this point in the history
Signed-off-by: Pritesh Bandi <[email protected]>
  • Loading branch information
Pritesh Bandi committed Jun 28, 2022
1 parent 36e9558 commit a4a21be
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion signer/jws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"crypto/x509"
"encoding/json"
"errors"
"github.com/notaryproject/notation-core-go/internal/testhelper"
"reflect"
"testing"

"github.com/notaryproject/notation-core-go/internal/testhelper"
)

// Tests various scenarios around newJWSEnvelopeFromBytes method
Expand Down
1 change: 1 addition & 0 deletions signer/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/rsa"
"encoding/base64"
"fmt"

"github.com/golang-jwt/jwt/v4"
)

Expand Down
3 changes: 2 additions & 1 deletion signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package signer
import (
"crypto/x509"
"fmt"
nx509 "github.com/notaryproject/notation-core-go/x509"
"time"

nx509 "github.com/notaryproject/notation-core-go/x509"
)

type SignatureMediaType string
Expand Down
4 changes: 3 additions & 1 deletion signer/signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import (
"encoding/base64"
"encoding/json"
"errors"
"github.com/notaryproject/notation-core-go/internal/testhelper"
"reflect"
"sort"
"strings"
"testing"
"time"

"github.com/notaryproject/notation-core-go/internal/testhelper"
)

const (
Expand All @@ -32,6 +33,7 @@ const (
var (
TestTamperedSig = strings.Replace(TestValidSig, "0fX0", "1fX0=", 1)
)

func TestNewSignatureEnvelopeFromBytesError(t *testing.T) {
_, err := NewSignatureEnvelopeFromBytes([]byte("Malformed"), MediaTypeJWSJson)
if !(err != nil && errors.As(err, new(MalformedArgumentError))) {
Expand Down

0 comments on commit a4a21be

Please sign in to comment.