Skip to content

Commit 191d9e8

Browse files
marainodopey
authored andcommitted
Use go.step.sm/crypto to set the permanent identifier
1 parent 2b3b2c2 commit 191d9e8

File tree

4 files changed

+8
-497
lines changed

4 files changed

+8
-497
lines changed

acme/order.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package acme
1+
cpackage acme
22

33
import (
44
"bytes"

authority/admin/api/provisioner_test.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -973,11 +973,7 @@ func TestHandler_UpdateProvisioner(t *testing.T) {
973973
CreatedAt: timestamppb.New(createdAt),
974974
DeletedAt: timestamppb.New(deletedAt),
975975
X509Template: &linkedca.Template{
976-
<<<<<<< HEAD
977976
Template: []byte("{ {{ missingFunction }} }"),
978-
=======
979-
Template: []byte("{!?}"),
980-
>>>>>>> 440ac4b2 (Add provisioner template validation)
981977
},
982978
}
983979
body, err := protojson.Marshal(prov)
@@ -1014,11 +1010,7 @@ func TestHandler_UpdateProvisioner(t *testing.T) {
10141010
Type: "badRequest",
10151011
Status: 400,
10161012
Detail: "bad request",
1017-
<<<<<<< HEAD
10181013
Message: "invalid template: invalid X.509 template: error parsing template: template: template:1: function \"missingFunction\" not defined",
1019-
=======
1020-
Message: "invalid template: invalid X.509 template: invalid JSON: invalid character '!' looking for beginning of object key string",
1021-
>>>>>>> 440ac4b2 (Add provisioner template validation)
10221014
},
10231015
}
10241016
},
@@ -1228,23 +1220,13 @@ func Test_validateTemplates(t *testing.T) {
12281220
err: nil,
12291221
},
12301222
{
1231-
<<<<<<< HEAD
12321223
name: "fail/x509-template-missing-quote",
12331224
args: args{
12341225
x509: &linkedca.Template{
12351226
Template: []byte(`{ {{printf "%q" "quoted}} }`),
12361227
},
12371228
},
12381229
err: errors.New("invalid X.509 template: error parsing template: template: template:1: unterminated quoted string"),
1239-
=======
1240-
name: "fail/x509-template-trailing-comma",
1241-
args: args{
1242-
x509: &linkedca.Template{
1243-
Template: []byte(`{"x": 1,}`),
1244-
},
1245-
},
1246-
err: errors.New("invalid X.509 template: invalid JSON: invalid character '}' looking for beginning of object key string"),
1247-
>>>>>>> 440ac4b2 (Add provisioner template validation)
12481230
},
12491231
{
12501232
name: "fail/x509-template-data",
@@ -1253,7 +1235,6 @@ func Test_validateTemplates(t *testing.T) {
12531235
Data: []byte(`{!?}`),
12541236
},
12551237
},
1256-
<<<<<<< HEAD
12571238
err: errors.New("invalid X.509 template data: error validating json template data"),
12581239
},
12591240
{
@@ -1264,18 +1245,6 @@ func Test_validateTemplates(t *testing.T) {
12641245
},
12651246
},
12661247
err: errors.New("invalid SSH template: error parsing template: template: template:1: function \"unknownFunction\" not defined"),
1267-
=======
1268-
err: errors.New("invalid X.509 template data: invalid JSON: invalid character '!' looking for beginning of object key string"),
1269-
},
1270-
{
1271-
name: "fail/ssh-template-trailing-comma",
1272-
args: args{
1273-
ssh: &linkedca.Template{
1274-
Template: []byte(`{"x": 1,}`),
1275-
},
1276-
},
1277-
err: errors.New("invalid SSH template: invalid JSON: invalid character '}' looking for beginning of object key string"),
1278-
>>>>>>> 440ac4b2 (Add provisioner template validation)
12791248
},
12801249
{
12811250
name: "fail/ssh-template-data",
@@ -1284,11 +1253,7 @@ func Test_validateTemplates(t *testing.T) {
12841253
Data: []byte(`{!?}`),
12851254
},
12861255
},
1287-
<<<<<<< HEAD
12881256
err: errors.New("invalid SSH template data: error validating json template data"),
1289-
=======
1290-
err: errors.New("invalid SSH template data: invalid JSON: invalid character '!' looking for beginning of object key string"),
1291-
>>>>>>> 440ac4b2 (Add provisioner template validation)
12921257
},
12931258
}
12941259
for _, tt := range tests {

go.mod

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ require (
1515
github.com/dgraph-io/ristretto v0.0.4-0.20200906165740-41ebdbffecfd // indirect
1616
github.com/fatih/color v1.9.0 // indirect
1717
github.com/fxamacker/cbor/v2 v2.4.0
18-
github.com/go-chi/chi v4.0.2+incompatible
1918
github.com/go-chi/chi v4.1.2+incompatible
2019
github.com/go-kit/kit v0.10.0 // indirect
2120
github.com/go-piv/piv-go v1.10.0 // indirect
2221
github.com/go-sql-driver/mysql v1.6.0 // indirect
2322
github.com/golang/mock v1.6.0
24-
github.com/google/go-attestation v0.4.4-0.20220404204839-8820d49b18d9
2523
github.com/google/go-cmp v0.5.8
26-
github.com/google/go-tpm v0.3.3
2724
github.com/google/uuid v1.3.0
2825
github.com/googleapis/gax-go/v2 v2.4.0
2926
github.com/hashicorp/vault/api v1.3.1
@@ -34,8 +31,6 @@ require (
3431
github.com/mattn/go-colorable v0.1.8 // indirect
3532
github.com/mattn/go-isatty v0.0.13 // indirect
3633
github.com/micromdm/scep/v2 v2.1.0
37-
github.com/micromdm/scep/v2 v2.1.0
38-
github.com/newrelic/go-agent v2.15.0+incompatible
3934
github.com/newrelic/go-agent/v3 v3.18.0
4035
github.com/pkg/errors v0.9.1
4136
github.com/rs/xid v1.2.1
@@ -46,13 +41,12 @@ require (
4641
github.com/stretchr/testify v1.7.1
4742
github.com/urfave/cli v1.22.4
4843
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
49-
go.step.sm/cli-utils v0.7.0
5044
go.step.sm/cli-utils v0.7.4
5145
go.step.sm/crypto v0.19.0
5246
go.step.sm/linkedca v0.19.0-rc.1
5347
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
5448
golang.org/x/net v0.0.0-20220909164309-bea034e7d591
55-
golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64 // indirect
49+
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
5650
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
5751
google.golang.org/api v0.84.0
5852
google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad
@@ -146,7 +140,6 @@ require (
146140
go.opencensus.io v0.23.0 // indirect
147141
go.uber.org/atomic v1.9.0 // indirect
148142
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
149-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
150143
golang.org/x/text v0.3.8-0.20211004125949-5bd84dd9b33b // indirect
151144
google.golang.org/appengine v1.6.7 // indirect
152145
gopkg.in/yaml.v3 v3.0.0 // indirect
@@ -159,7 +152,3 @@ require (
159152

160153
// use github.com/smallstep/pkcs7 fork with patches applied
161154
replace go.mozilla.org/pkcs7 => github.com/smallstep/pkcs7 v0.0.0-20211016004704-52592125d6f6
162-
163-
replace go.step.sm/crypto => github.com/brandonweeks/crypto v0.16.2-0.20220531234114-45e4f06ca16b
164-
165-
replace github.com/google/go-attestation => github.com/brandonweeks/go-attestation v0.0.0-20220602235615-164122a1d59b

0 commit comments

Comments
 (0)