Projects tigase _server server-core Issues #1533
Improve JDK version checking for dependencies when jar is multi-release (#1533)
wojciech.kapcia@tigase.net opened 6 months ago

BouncyCastle use multi-release feature of jar packing various variants/versions:

$ ls -lah bc/META-INF/versions/
total 0
drwxr-xr-x 6 wojtek staff 192 Apr 18 04:19 .
drwxr-xr-x 7 wojtek staff 224 Jun  7 18:35 ..
drwxr-xr-x 4 wojtek staff 128 Apr 18 04:19 11
drwxr-xr-x 4 wojtek staff 128 Apr 18 04:19 15
drwxr-xr-x 4 wojtek staff 128 Apr 18 04:19 21
drwxr-xr-x 5 wojtek staff 160 Apr 18 04:19 9

Which results in our checker complaining about version mismatch:

xmpp-1  | [2024-06-07 16:28:15:418] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.NTRU compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:419] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.NTRU$Mappings compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:422] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.NTRUPrime compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:423] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.NTRUPrime$Mappings compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:423] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.Util compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:424] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.ntru.NTRUDecapsulatorSpi compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:424] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.ntru.NTRUEncapsulatorSpi compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:425] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.ntru.NTRUKEMSpi compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:425] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.ntruprime.SNTRUPrimeDecapsulatorSpi compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:426] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.ntruprime.SNTRUPrimeEncapsulatorSpi compiled using newer JDK version. Please upgrade your JDK!
xmpp-1  | [2024-06-07 16:28:15:426] [WARNING ] [                  main ] ClassUtil.getClassesFromNames()  : Class: META-INF.versions.21.org.bouncycastle.pqc.jcajce.provider.ntruprime.SNTRUPrimeKEMSpi compiled using newer JDK version. Please upgrade your JDK!
Referenced from commit 6 months ago
Referenced from commit 6 months ago
wojciech.kapcia@tigase.net changed state to 'In Progress' 6 months ago
Previous Value Current Value
Open
In Progress
wojciech.kapcia@tigase.net changed state to 'In QA' 6 months ago
Previous Value Current Value
In Progress
In QA
wojciech.kapcia@tigase.net commented 6 months ago

Added check when trying to load incompatible Class version.

Referenced from commit 6 months ago
issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Version
none
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/server-core#1533
Please wait...
Page is in error, reload to recover