Skip to content

Commit ba91810

Browse files
committed
Use go.step.sm/crypto/jose
Replace use of github.com/smallstep/cli/crypto with the new package go.step.sm/crypto/jose.
1 parent 32ba80f commit ba91810

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+183
-187
lines changed

acme/account.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"time"
77

88
"github.com/pkg/errors"
9-
"github.com/smallstep/cli/jose"
109
"github.com/smallstep/nosql"
10+
"go.step.sm/crypto/jose"
1111
)
1212

1313
// Account is a subset of the internal account type containing only those

acme/account_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"github.com/smallstep/assert"
1313
"github.com/smallstep/certificates/authority/provisioner"
1414
"github.com/smallstep/certificates/db"
15-
"github.com/smallstep/cli/jose"
1615
"github.com/smallstep/nosql"
1716
"github.com/smallstep/nosql/database"
17+
"go.step.sm/crypto/jose"
1818
)
1919

2020
var (

acme/api/account_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/smallstep/assert"
1717
"github.com/smallstep/certificates/acme"
1818
"github.com/smallstep/certificates/authority/provisioner"
19-
"github.com/smallstep/cli/jose"
19+
"go.step.sm/crypto/jose"
2020
)
2121

2222
var (

acme/api/handler_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/smallstep/certificates/acme"
2020
"github.com/smallstep/certificates/authority/provisioner"
2121
"github.com/smallstep/certificates/db"
22-
"github.com/smallstep/cli/jose"
22+
"go.step.sm/crypto/jose"
2323
"go.step.sm/crypto/pemutil"
2424
)
2525

acme/api/middleware.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/smallstep/certificates/api"
1515
"github.com/smallstep/certificates/authority/provisioner"
1616
"github.com/smallstep/certificates/logging"
17-
"github.com/smallstep/cli/jose"
1817
"github.com/smallstep/nosql"
18+
"go.step.sm/crypto/jose"
1919
"go.step.sm/crypto/keyutil"
2020
)
2121

acme/api/middleware_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"github.com/pkg/errors"
1919
"github.com/smallstep/assert"
2020
"github.com/smallstep/certificates/acme"
21-
"github.com/smallstep/cli/jose"
2221
"github.com/smallstep/nosql/database"
22+
"go.step.sm/crypto/jose"
2323
)
2424

2525
var testBody = []byte("foo")

acme/authority.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/pkg/errors"
1515
"github.com/smallstep/certificates/authority/provisioner"
1616
database "github.com/smallstep/certificates/db"
17-
"github.com/smallstep/cli/jose"
1817
"github.com/smallstep/nosql"
18+
"go.step.sm/crypto/jose"
1919
)
2020

2121
// Interface is the acme authority interface.

acme/authority_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/pkg/errors"
1212
"github.com/smallstep/assert"
1313
"github.com/smallstep/certificates/db"
14-
"github.com/smallstep/cli/jose"
1514
"github.com/smallstep/nosql/database"
15+
"go.step.sm/crypto/jose"
1616
)
1717

1818
func TestAuthorityGetLink(t *testing.T) {

acme/challenge.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"time"
1919

2020
"github.com/pkg/errors"
21-
"github.com/smallstep/cli/jose"
2221
"github.com/smallstep/nosql"
22+
"go.step.sm/crypto/jose"
2323
)
2424

2525
// Challenge is a subset of the challenge type containing only those attributes

acme/challenge_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import (
2828
"github.com/pkg/errors"
2929
"github.com/smallstep/assert"
3030
"github.com/smallstep/certificates/db"
31-
"github.com/smallstep/cli/jose"
3231
"github.com/smallstep/nosql"
3332
"github.com/smallstep/nosql/database"
33+
"go.step.sm/crypto/jose"
3434
)
3535

3636
var testOps = ChallengeOptions{

acme/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/pkg/errors"
1010
"github.com/smallstep/certificates/authority/provisioner"
11-
"github.com/smallstep/cli/jose"
11+
"go.step.sm/crypto/jose"
1212
"go.step.sm/crypto/randutil"
1313
)
1414

api/api_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/smallstep/certificates/errs"
3333
"github.com/smallstep/certificates/logging"
3434
"github.com/smallstep/certificates/templates"
35-
"github.com/smallstep/cli/jose"
35+
"go.step.sm/crypto/jose"
3636
"golang.org/x/crypto/ssh"
3737
)
3838

authority/authority_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ import (
1515
"github.com/smallstep/assert"
1616
"github.com/smallstep/certificates/authority/provisioner"
1717
"github.com/smallstep/certificates/db"
18-
stepJOSE "github.com/smallstep/cli/jose"
18+
"go.step.sm/crypto/jose"
1919
"go.step.sm/crypto/pemutil"
2020
)
2121

2222
func testAuthority(t *testing.T, opts ...Option) *Authority {
23-
maxjwk, err := stepJOSE.ParseKey("testdata/secrets/max_pub.jwk")
23+
maxjwk, err := jose.ReadKey("testdata/secrets/max_pub.jwk")
2424
assert.FatalError(t, err)
25-
clijwk, err := stepJOSE.ParseKey("testdata/secrets/step_cli_key_pub.jwk")
25+
clijwk, err := jose.ReadKey("testdata/secrets/step_cli_key_pub.jwk")
2626
assert.FatalError(t, err)
2727
disableRenewal := true
2828
enableSSHCA := true

authority/authorize.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/smallstep/certificates/authority/provisioner"
1010
"github.com/smallstep/certificates/errs"
11-
"github.com/smallstep/cli/jose"
11+
"go.step.sm/crypto/jose"
1212
"golang.org/x/crypto/ssh"
1313
)
1414

0 commit comments

Comments
 (0)