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

Disable CRL lookup when custom roots are configured for `android-key`

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

+ 1 - 1
acme/challenge.go

@@ -1450,7 +1450,7 @@ EUaYLxwGlT9SLdjkVpz0UUOR5wIxAIoGyxGKRHVTpqpGRFiJtQEOOTp/+s1GcxeY
 uR2zh/80lQyu9vAFCj6E4AXc+osmRg==
 -----END CERTIFICATE-----`
 
-// Attestion OID for Android Key Attestation
+// OID for Android Key Attestation
 // https://source.android.com/docs/security/features/keystore/attestation#id-attestation
 var oidAndroidAttestation = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 11129, 2, 1, 17}
 

+ 6 - 0
authority/provisioner/acme.go

@@ -516,6 +516,12 @@ func (p *ACME) IsAndroidCertificateRevoked(ctx context.Context, cert *x509.Certi
 		return revoked, nil
 	}
 
+	// No CRL check is performed using Google's CRL if custom roots
+	// are configured.
+	if p.attestationRootPool != nil {
+		return false, nil
+	}
+
 	// Fall back to the built-in CRL. A fetch error fails closed: the
 	// certificate is reported as revoked so the attestation is rejected.
 	crl, err := p.androidCRL.snapshot(ctx, p.ctl.GetHTTPClient())