Sfoglia il codice sorgente

Use `IsAttestationFormatEnabled` to check `android-key` format

Herman Slatman 3 mesi fa
parent
commit
d04da87b3f
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      authority/provisioner/acme.go

+ 1 - 2
authority/provisioner/acme.go

@@ -8,7 +8,6 @@ import (
 	"fmt"
 	"net"
 	"net/http"
-	"slices"
 	"strings"
 	"sync/atomic"
 	"time"
@@ -512,7 +511,7 @@ func (p *ACME) GetAttestationRoots() (*x509.CertPool, bool) {
 func (p *ACME) IsAndroidCertificateRevoked(ctx context.Context, cert *x509.Certificate) (bool, error) {
 	// the check only has to be performed when the "android-key" attestation
 	// format is enabled
-	if !slices.Contains(p.AttestationFormats, ANDROIDKEY) {
+	if !p.IsAttestationFormatEnabled(ctx, ANDROIDKEY) {
 		return false, nil
 	}