File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
webauthn-server-core/src/main/java/com/yubico/webauthn Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 30
30
import COSE .CoseException ;
31
31
import com .upokecenter .cbor .CBORObject ;
32
32
import com .yubico .webauthn .attestation .AttestationTrustSource ;
33
+ import com .yubico .webauthn .attestation .AttestationTrustSource .TrustRootsResult ;
33
34
import com .yubico .webauthn .data .AttestationObject ;
34
35
import com .yubico .webauthn .data .AttestationType ;
35
36
import com .yubico .webauthn .data .AuthenticatorAttestationResponse ;
52
53
import java .security .cert .CertificateFactory ;
53
54
import java .security .cert .PKIXCertPathValidatorResult ;
54
55
import java .security .cert .PKIXParameters ;
56
+ import java .security .cert .PKIXReason ;
55
57
import java .security .cert .TrustAnchor ;
56
58
import java .security .cert .X509Certificate ;
57
59
import java .security .spec .InvalidKeySpecException ;
@@ -565,6 +567,12 @@ public boolean attestationTrusted() {
565
567
e .getIndex (),
566
568
e .getMessage (),
567
569
response .getResponse ().getAttestationObject ());
570
+ if (PKIXReason .INVALID_POLICY .equals (e .getReason ())) {
571
+ log .info (
572
+ "You may need to set the policyTreeValidator property on the {} returned by your {}." ,
573
+ TrustRootsResult .class .getSimpleName (),
574
+ AttestationTrustSource .class .getSimpleName ());
575
+ }
568
576
return false ;
569
577
570
578
} catch (CertificateException e ) {
You can’t perform that action at this time.
0 commit comments