Просмотр исходного кода

Fix missing ACME provisioner option

Herman Slatman 4 лет назад
Родитель
Сommit
0bb15e16f9
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      authority/provisioner/acme.go
  2. 1 1
      authority/provisioner/acme_test.go

+ 1 - 0
authority/provisioner/acme.go

@@ -139,6 +139,7 @@ func (p *ACME) AuthorizeOrderIdentifier(ctx context.Context, identifier ACMEIden
 // on the resulting certificate.
 func (p *ACME) AuthorizeSign(ctx context.Context, token string) ([]SignOption, error) {
 	opts := []SignOption{
+		p,
 		// modifiers / withOptions
 		newProvisionerExtensionOption(TypeACME, p.Name, ""),
 		newForceCNOption(p.ForceCN),

+ 1 - 1
authority/provisioner/acme_test.go

@@ -176,7 +176,7 @@ func TestACME_AuthorizeSign(t *testing.T) {
 				}
 			} else {
 				if assert.Nil(t, tc.err) && assert.NotNil(t, opts) {
-					assert.Len(t, 6, opts) // number of SignOptions returned
+					assert.Equals(t, 7, len(opts)) // number of SignOptions returned
 					for _, o := range opts {
 						switch v := o.(type) {
 						case *ACME: