File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -72,17 +72,15 @@ type options struct {
72
72
73
73
var defaultOptions = options {
74
74
keyUsages : []x509.ExtKeyUsage {
75
- x509 .ExtKeyUsageServerAuth ,
76
- x509 .ExtKeyUsageClientAuth ,
77
- x509 .ExtKeyUsageMicrosoftServerGatedCrypto ,
78
- x509 .ExtKeyUsageNetscapeServerGatedCrypto ,
75
+ x509 .ExtKeyUsageAny ,
79
76
},
80
77
}
81
78
82
79
// An Option sets options such as allowed key usages, etc.
83
80
type Option func (* options )
84
81
85
- // WithKeyUsages lets you set which Extended Key Usage values are acceptable.
82
+ // WithKeyUsages lets you set which Extended Key Usage values are acceptable. By
83
+ // default x509.ExtKeyUsageAny will be used.
86
84
func WithKeyUsages (usages ... x509.ExtKeyUsage ) Option {
87
85
return func (o * options ) {
88
86
o .keyUsages = usages
Original file line number Diff line number Diff line change @@ -912,11 +912,7 @@ func TestBundlerWithEmptyRootInfo(t *testing.T) {
912
912
}
913
913
914
914
func TestBundlerClientAuth (t * testing.T ) {
915
- b , err := NewBundler (
916
- "testdata/client-auth/root.pem" ,
917
- "testdata/client-auth/int.pem" ,
918
- WithKeyUsages (x509 .ExtKeyUsageClientAuth ),
919
- )
915
+ b , err := NewBundler ("testdata/client-auth/root.pem" , "testdata/client-auth/int.pem" )
920
916
if err != nil {
921
917
t .Fatal (err )
922
918
}
You can’t perform that action at this time.
0 commit comments