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 {
7272
7373var defaultOptions = options {
7474 keyUsages : []x509.ExtKeyUsage {
75- x509 .ExtKeyUsageServerAuth ,
76- x509 .ExtKeyUsageClientAuth ,
77- x509 .ExtKeyUsageMicrosoftServerGatedCrypto ,
78- x509 .ExtKeyUsageNetscapeServerGatedCrypto ,
75+ x509 .ExtKeyUsageAny ,
7976 },
8077}
8178
8279// An Option sets options such as allowed key usages, etc.
8380type Option func (* options )
8481
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.
8684func WithKeyUsages (usages ... x509.ExtKeyUsage ) Option {
8785 return func (o * options ) {
8886 o .keyUsages = usages
Original file line number Diff line number Diff line change @@ -912,11 +912,7 @@ func TestBundlerWithEmptyRootInfo(t *testing.T) {
912912}
913913
914914func 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" )
920916 if err != nil {
921917 t .Fatal (err )
922918 }
You can’t perform that action at this time.
0 commit comments