Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17 ]
java: [ 21 ]
name: Java ${{ matrix.java }}
steps:
- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FDSM is _the_ developer's Swiss Army Knife for working with a [Fidesmo device](h
# Getting started

You will need the following:
- Latest [Java 11](https://adoptopenjdk.net/) for running the app
- Latest [Java 21](https://adoptopenjdk.net/) for running the app
- a [Fidesmo Developer account](https://fidesmo.com/book-demo/) for your `$FIDESMO_AUTH` token and `$FIDESMO_APPID`
- a Fidesmo device (get one from the [shop](http://shop.fidesmo.com))
- a [PC/SC NFC reader](https://github.com/fidesmo/fdsm/wiki/Choosing-a-desktop-reader)
Expand Down
2 changes: 1 addition & 1 deletion library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.fidesmo</groupId>
<artifactId>fdsm-toolbox</artifactId>
<version>25.02.15-SNAPSHOT</version>
<version>25.11.25-SNAPSHOT</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: where did you get this new version number from?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the steps in the readme, and I made make release, which did that changes to the versions. But I think there were/are some problems with releasing and versioning so maybe I should put 02.15 again?

</parent>

<artifactId>fdsm</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public class ClientAuthentication {
private final String authentication;

private ClientAuthentication(String auth) {
if (auth.split(":").length > 2) {
throw new IllegalArgumentException("Wrong authentication format");
}
this.authentication = auth;
}

Expand All @@ -47,6 +44,9 @@ public Optional<String> getUsername() {
}

public static ClientAuthentication forToken(String token) {
if (token.split(":").length > 2) {
throw new IllegalArgumentException("Wrong authentication format");
}
return new ClientAuthentication(token);
}

Expand Down
4 changes: 2 additions & 2 deletions library/src/main/java/com/fidesmo/fdsm/ClientInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ public static String stringify(Capability c) {
private Set<Capability> capabilities;
private Locale locale;

public ClientInfo(String name, String version, Set<Capability> capabilities, Locale locale) {
private ClientInfo(String name, String version, Set<Capability> capabilities, Locale locale) {
this.name = name;
this.version = version;
this.capabilities = Collections.unmodifiableSet(capabilities);
this.locale = locale;
}

public ClientInfo(String name, String version) {
private ClientInfo(String name, String version) {
this(name, version, DEFAULT_CAPABILITIES, Locale.getDefault());
}

Expand Down
6 changes: 3 additions & 3 deletions library/src/main/java/com/fidesmo/fdsm/FidesmoCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ public static Optional<ChipPlatform> detectPlatform(byte[] cplc) {
/** Indicates that device is fully batched or requires batching operation otherwise */
private final boolean batched;

public FidesmoCard(byte[] fid, byte[] cplc, int batchId, boolean batched, Optional<byte[]> uid) {
if (fid == null) throw new NullPointerException("fid can't be null");
private FidesmoCard(byte[] fid, byte[] cplc, int batchId, boolean batched, Optional<byte[]> uid) {
this.cin = fid.clone();
this.cplc = cplc == null ? null : cplc.clone();
this.batchId = batchId;
Expand Down Expand Up @@ -295,7 +294,8 @@ public static Optional<FidesmoCard> detect(Map<HexBytes, byte[]> commands, Fides
return Optional.empty();
}
}


if (cin == null) throw new NullPointerException("fid can't be null");
return Optional.of(new FidesmoCard(cin, cplc, new BigInteger(1, batch).intValue(), true, uid));
}

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.fidesmo</groupId>
<artifactId>fdsm-toolbox</artifactId>
<version>25.02.15-SNAPSHOT</version>
<version>25.11.25-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -145,8 +145,8 @@
<version>3.8.6</version>
</requireMavenVersion>
<requireJavaVersion>
<version>11</version>
<message>ATTENTION: please use JDK11 or later</message>
<version>21</version>
<message>ATTENTION: please use JDK21 or later</message>
</requireJavaVersion>
</rules>
</configuration>
Expand All @@ -159,7 +159,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>11</release>
<release>21</release>
<compilerArgs>
<arg>-Xlint</arg>
<arg>-Werror</arg>
Expand All @@ -170,7 +170,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.3.0</version>
<version>4.9.8.0</version>
<configuration>
<excludeFilterFile>spotbugs.xml</excludeFilterFile>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.fidesmo</groupId>
<artifactId>fdsm-toolbox</artifactId>
<version>25.02.15-SNAPSHOT</version>
<version>25.11.25-SNAPSHOT</version>
</parent>

<artifactId>fdsm-tool</artifactId>
Expand Down Expand Up @@ -83,7 +83,7 @@
</classPath>
<jre>
<path>%JAVA_HOME%;%PATH%</path>
<minVersion>11.0</minVersion>
<minVersion>21.0</minVersion>
</jre>
<versionInfo>
<fileVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.${parsedVersion.buildNumber}</fileVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
import java.io.IOException;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
Expand Down Expand Up @@ -114,8 +115,8 @@ protected static void inspectEnvironment(OptionSet args) {

// API URL
try {
apiurl = new URL(System.getenv().getOrDefault(ENV_FIDESMO_API_URL, FidesmoApiClient.APIv3)).toString();
} catch (MalformedURLException e) {
apiurl = new URI(System.getenv().getOrDefault(ENV_FIDESMO_API_URL, FidesmoApiClient.APIv3)).toURL().toString();
} catch (MalformedURLException | URISyntaxException e) {
System.err.printf("Invalid $%s: %s%n", ENV_FIDESMO_API_URL, System.getenv(ENV_FIDESMO_API_URL));
}
}
Expand Down