diff options
author | Steffen Ritter | 2024-02-15 18:44:16 +0100 |
---|---|---|
committer | Steffen Ritter | 2024-02-15 18:44:16 +0100 |
commit | d4d91b24f145096c864cbba7fe50ee2ed5bdbf11 (patch) | |
tree | 4b77751925751576229fbef6bf4438c84ef4cce5 | |
parent | [AptGetUpgradable] Update regex to include packages with no oldVersion (diff) | |
download | tmlite-bwlp-d4d91b24f145096c864cbba7fe50ee2ed5bdbf11.tar.gz tmlite-bwlp-d4d91b24f145096c864cbba7fe50ee2ed5bdbf11.tar.xz tmlite-bwlp-d4d91b24f145096c864cbba7fe50ee2ed5bdbf11.zip |
[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.
-rw-r--r-- | src/main/java/org/openslx/taskmanager/tasks/PortScan.java | 4 |
1 files 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() ); } |