File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
webauthn-server-core/src/main/java/com/yubico/webauthn Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change
1
+ == Version 1.7.0 (unreleased) ==
2
+
3
+ Changes:
4
+
5
+ * Fixed crash on unknown attestation statement formats
6
+ ** Unless `RelyingParty.allowUntrustedAttestation` is set to `false`, unknown
7
+ attestation statements will now pass as untrusted attestations, instead of
8
+ throwing an IllegalArgumentException.
9
+
10
+
1
11
== Version 1.6.4 ==
2
12
3
13
* Changed dependency declarations to version ranges
Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ public AttestationType attestationType() {
463
463
return AttestationType .ECDAA ;
464
464
}
465
465
default :
466
- throw new IllegalArgumentException ( "Failed to resolve attestation type; unknown attestation statement format: " + attestation . getFormat ()) ;
466
+ return AttestationType . UNKNOWN ;
467
467
}
468
468
}
469
469
} catch (IOException | CoseException | CertificateException e ) {
@@ -509,6 +509,7 @@ public Optional<AttestationTrustResolver> trustResolver() {
509
509
switch (attestationType ) {
510
510
case NONE :
511
511
case SELF_ATTESTATION :
512
+ case UNKNOWN :
512
513
return Optional .empty ();
513
514
514
515
case ATTESTATION_CA :
@@ -562,6 +563,10 @@ public void validate() {
562
563
assure (allowUntrustedAttestation , "No attestation is not allowed." );
563
564
break ;
564
565
566
+ case UNKNOWN :
567
+ assure (allowUntrustedAttestation , "Unknown attestation statement formats are not allowed." );
568
+ break ;
569
+
565
570
default :
566
571
throw new UnsupportedOperationException ("Attestation type not implemented: " + attestationType );
567
572
}
@@ -574,8 +579,9 @@ public Step17 nextStep() {
574
579
575
580
public boolean attestationTrusted () {
576
581
switch (attestationType ) {
577
- case SELF_ATTESTATION :
578
582
case NONE :
583
+ case SELF_ATTESTATION :
584
+ case UNKNOWN :
579
585
return false ;
580
586
581
587
case ATTESTATION_CA :
You can’t perform that action at this time.
0 commit comments