diff --git a/pom.xml b/pom.xml
index f217227..cbb86c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.openautonomousconnection
protocol
- 1.0.0-BETA.6
+ 1.0.0-BETA.7
Open Autonomous Connection
https://open-autonomous-connection.org/
diff --git a/src/main/java/org/openautonomousconnection/protocol/side/client/ProtocolClient.java b/src/main/java/org/openautonomousconnection/protocol/side/client/ProtocolClient.java
index 87eb125..8fb9838 100644
--- a/src/main/java/org/openautonomousconnection/protocol/side/client/ProtocolClient.java
+++ b/src/main/java/org/openautonomousconnection/protocol/side/client/ProtocolClient.java
@@ -127,8 +127,7 @@ public abstract class ProtocolClient extends DefaultMethodsOverrider {
// Validate each file in the folder
for (File file : files) {
- if (!file.getName().startsWith(prefix) || !file.getName().endsWith(extension))
- throw new CertificateException(file.getAbsolutePath() + " is not valid");
+ if (!file.getName().startsWith(prefix)) throw new CertificateException(file.getAbsolutePath() + " is not valid");
// Check for specific files
if (!found) found = file.getName().equalsIgnoreCase(prefix + NetworkUtils.getPublicIPAddress() + extension);
diff --git a/src/main/java/org/openautonomousconnection/protocol/side/dns/ProtocolDNSServer.java b/src/main/java/org/openautonomousconnection/protocol/side/dns/ProtocolDNSServer.java
index 7d34158..bace758 100644
--- a/src/main/java/org/openautonomousconnection/protocol/side/dns/ProtocolDNSServer.java
+++ b/src/main/java/org/openautonomousconnection/protocol/side/dns/ProtocolDNSServer.java
@@ -126,8 +126,7 @@ public abstract class ProtocolDNSServer extends DefaultMethodsOverrider {
// Validate each file in the folder
for (File file : files) {
- if (!file.getName().startsWith(prefix) || !file.getName().endsWith(extension))
- throw new CertificateException(file.getAbsolutePath() + " is not valid");
+ if (!file.getName().startsWith(prefix)) throw new CertificateException(file.getAbsolutePath() + " is not valid");
// Check if the file matches the expected naming convention
if (!found) found = file.getName().equalsIgnoreCase(prefix + NetworkUtils.getPublicIPAddress() + extension);
diff --git a/src/main/java/org/openautonomousconnection/protocol/side/web/ProtocolWebServer.java b/src/main/java/org/openautonomousconnection/protocol/side/web/ProtocolWebServer.java
index 22b2239..4a059c3 100644
--- a/src/main/java/org/openautonomousconnection/protocol/side/web/ProtocolWebServer.java
+++ b/src/main/java/org/openautonomousconnection/protocol/side/web/ProtocolWebServer.java
@@ -255,7 +255,7 @@ public final class ProtocolWebServer {
* @throws CertificateException If a required certificate file is missing or invalid.
* @throws IOException If an I/O error occurs while checking the files.
*/
- private void checkFileExists(File folder, String prefix, String extension) throws CertificateException, IOException {
+ private final void checkFileExists(File folder, String prefix, String extension) throws CertificateException, IOException {
boolean found = false;
// Ensure the folder exists
@@ -268,8 +268,7 @@ public final class ProtocolWebServer {
// Check for the required certificate file
for (File file : files) {
- if (!file.getName().startsWith(prefix) || !file.getName().endsWith(extension))
- throw new CertificateException(file.getAbsolutePath() + " is not valid");
+ if (!file.getName().startsWith(prefix)) throw new CertificateException(file.getAbsolutePath() + " is not valid");
// Check for file matching the public IP address
if (!found) found = file.getName().equalsIgnoreCase(prefix + NetworkUtils.getPublicIPAddress() + extension);