From d4d91b24f145096c864cbba7fe50ee2ed5bdbf11 Mon Sep 17 00:00:00 2001 From: Steffen Ritter Date: Thu, 15 Feb 2024 18:44:16 +0100 Subject: [PortScan] Check for fingerprint attribute case-insensitive For idiotic reasons older openssl versions return "SHA1 Fingerprint..." whereas newer versions return "sha1 Fingerprint...". Because our check was case-sensitive the taskmanager couldn't extract the fingerprint and the whole ldap/ad wizzard stopped when using ssl. --- src/main/java/org/openslx/taskmanager/tasks/PortScan.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openslx/taskmanager/tasks/PortScan.java b/src/main/java/org/openslx/taskmanager/tasks/PortScan.java index dab97f8..bf41479 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/PortScan.java +++ b/src/main/java/org/openslx/taskmanager/tasks/PortScan.java @@ -132,11 +132,11 @@ public class PortScan extends AbstractTask @Override public void processStdOut( String line ) { - if ( line.startsWith( "notAfter=" ) ) { + if ( line.toLowerCase().startsWith( "notafter=" ) ) { notAfter.set( line.substring( 9 ) ); messages.append( "\nCertificate valid until " + notAfter.get() ); } - if ( line.startsWith( "SHA1 Fingerprint=" ) ) { + if ( line.toLowerCase().startsWith( "sha1 fingerprint=" ) ) { fingerprint.set( line.substring( 17 ) ); messages.append( "\nCertificate fingerprint: " + fingerprint.get() ); } -- cgit v1.2.3-55-g7522