Skip to content

Commit e8f2935

Browse files
committed
Version 0.19.0
Breaking changes: - Overhauled exception hierarchy - New exception class: `U2fCeremonyException` - New exception class: `U2fRegistrationException extends U2fCeremonyException` - New exception class: `U2fAuthenticationException extends U2fCeremonyException` - The following exception classes now extend `U2fAuthenticationException`: - `DeviceCompromisedException` - `InvalidDeviceCounterException` - `NoEligableDevicesException` - `NoEligibleDevicesException` - `U2fBadConfigurationException` is now a checked exception - `U2fBadInputException` is now a checked exception, and is no longer thrown directly by the methods of `U2F`. - Methods of `U2F` now catch this exception and wrap it in a `U2fRegistrationException` or ``U2fAuthenticationException`. - `DeviceRegistration.getAttestationCertificate()` now returns `null` instead of throwing `NoSuchFieldException` - `static ClientData.getString(JsonNode, String)` now throws `U2fBadInputException` instead of `NullPointerException`, or if the returned field is not a `String` value - Some `AssertionError`s and `IllegalArgumentException`s are now `U2fBadInputException`s instead Improvements: - `BouncyCastleCrypto` now throws more descriptive exceptions Bug fixes: - Improved error handling in client data input validation - Thanks to Nicholas Wilson for the contribution, see Yubico/java-u2flib-server#25
2 parents 54a4dc3 + e041bd7 commit e8f2935

38 files changed

+678
-432
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# Intellij
77
.idea/
8+
out/
89
*.iml
910
*.iws
1011

@@ -14,3 +15,8 @@
1415
# Maven
1516
log/
1617
target/
18+
19+
# Gradle
20+
.gradle/
21+
/build/
22+
/*/build/

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: java
22
jdk:
3-
- openjdk7
4-
- oraclejdk7
3+
- openjdk8
54
- oraclejdk8
65
after_success:
76
- ./gradlew coveralls

NEWS

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
== Version 0.19.0 ==
2+
3+
Breaking changes:
4+
5+
* Overhauled exception hierarchy
6+
** New exception class: `U2fCeremonyException`
7+
** New exception class: `U2fRegistrationException extends U2fCeremonyException`
8+
** New exception class: `U2fAuthenticationException extends U2fCeremonyException`
9+
** The following exception classes now extend `U2fAuthenticationException`:
10+
*** `DeviceCompromisedException`
11+
*** `InvalidDeviceCounterException`
12+
*** `NoEligableDevicesException`
13+
*** `NoEligibleDevicesException`
14+
** `U2fBadConfigurationException` is now a checked exception
15+
** `U2fBadInputException` is now a checked exception, and is no longer thrown directly by the methods of `U2F`.
16+
*** Methods of `U2F` now catch this exception and wrap it in a `U2fRegistrationException` or ``U2fAuthenticationException`.
17+
* `DeviceRegistration.getAttestationCertificate()` now returns `null` instead of throwing `NoSuchFieldException`
18+
* `static ClientData.getString(JsonNode, String)` now throws `U2fBadInputException` instead of `NullPointerException`, or if the returned field is not a `String` value
19+
* Some `AssertionError`s and `IllegalArgumentException`s are now `U2fBadInputException`s instead
20+
21+
22+
Improvements:
23+
24+
* `BouncyCastleCrypto` now throws more descriptive exceptions
25+
26+
27+
Bug fixes:
28+
29+
* Improved error handling in client data input validation
30+
** Thanks to Nicholas Wilson for the contribution, see https://github.com/Yubico/java-u2flib-server/pull/25
31+
32+
133
== Version 0.18.1 ==
234

335
* Lombok now longer leaks into runtime dependencies

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Maven:
1313
<dependency>
1414
<groupId>com.yubico</groupId>
1515
<artifactId>u2flib-server-core</artifactId>
16-
<version>0.18.1</version>
16+
<version>0.19.0</version>
1717
</dependency>
1818

1919
Gradle:
2020
[source, groovy]
2121
repositories{ mavenCentral() }
2222
dependencies {
23-
compile 'com.yubico:u2flib-server-core:0.18.1'
23+
compile 'com.yubico:u2flib-server-core:0.19.0'
2424
}
2525

2626
=== Example Usage

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414

1515
import com.yubico.gradle.plugins.signing.GpgSigningPlugin
1616

17-
project.ext.publishEnabled = System.env.CI != 'true'
17+
project.ext.publishEnabled = System.env.CI != 'true' && project.hasProperty('ossrhUsername')
1818

1919
if (publishEnabled) {
2020
nexusStaging {
@@ -41,7 +41,7 @@ allprojects {
4141
}
4242

4343
group = 'com.yubico'
44-
version = '0.18.1'
44+
version = '0.19.0'
4545

4646
sourceCompatibility = 1.6
4747
targetCompatibility = 1.6

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.yubico</groupId>
55
<artifactId>u2flib-server-parent</artifactId>
66
<packaging>pom</packaging>
7-
<version>0.8.1</version>
7+
<version>0.19.0</version>
88
<name>U2F parent</name>
99
<description>Java server-side library for U2F</description>
1010
<properties>

u2flib-server-attestation/README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Maven:
1616
<dependency>
1717
<groupId>com.yubico</groupId>
1818
<artifactId>u2flib-server-attestation</artifactId>
19-
<version>0.18.1</version>
19+
<version>0.19.0</version>
2020
</dependency>
2121

2222
Gradle:
2323
[source, groovy]
2424
repositories{ mavenCentral() }
2525
dependencies {
26-
compile 'com.yubico:u2flib-server-attestation:0.18.1'
26+
compile 'com.yubico:u2flib-server-attestation:0.19.0'
2727
}
2828

2929

u2flib-server-attestation/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>u2flib-server-parent</artifactId>
55
<groupId>com.yubico</groupId>
6-
<version>0.8.1</version>
6+
<version>0.19.0</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

@@ -14,7 +14,7 @@
1414
<dependency>
1515
<groupId>com.yubico</groupId>
1616
<artifactId>u2flib-server-core</artifactId>
17-
<version>0.8.1</version>
17+
<version>0.19.0</version>
1818
</dependency>
1919
</dependencies>
2020

u2flib-server-attestation/src/main/java/com/yubico/u2f/attestation/MetadataService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ public Attestation getCachedAttestation(String attestationCertificateFingerprint
114114
}
115115

116116
public Attestation getAttestation(final X509Certificate attestationCertificate) {
117+
if (attestationCertificate == null) {
118+
return unknownAttestation;
119+
}
117120
try {
118121
String fingerprint = Hashing.sha1().hashBytes(attestationCertificate.getEncoded()).toString();
119122
return cache.get(fingerprint, new Callable<Attestation>() {

u2flib-server-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>u2flib-server-parent</artifactId>
55
<groupId>com.yubico</groupId>
6-
<version>0.8.1</version>
6+
<version>0.19.0</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

0 commit comments

Comments
 (0)