summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteffen Ritter2024-02-15 18:44:16 +0100
committerSteffen Ritter2024-02-15 18:44:16 +0100
commitd4d91b24f145096c864cbba7fe50ee2ed5bdbf11 (patch)
tree4b77751925751576229fbef6bf4438c84ef4cce5 /src
parent[AptGetUpgradable] Update regex to include packages with no oldVersion (diff)
downloadtmlite-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.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/PortScan.java4
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() );
}