Projects tigase _server server-core Issues #1532
Exception when uploading certificate via ad-hoc (ArrayIndexOutOfBoundsException in CertificateUtil.parseCertificate) (#1532)
wojciech.kapcia@tigase.net opened 5 months ago

When uploading certificate via ad-hoc I'm getting: ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0:

[2024-06-06 20:34:43:630] [FINE    ] [   in_8-message-router ] Script13.process()               : Error while processing request
java.security.cert.CertificateParsingException: Problem adding a new certificate (Index 0 out of bounds for length 0)
        at tigase.io.CertificateContainer.addCertificate(CertificateContainer.java:537)
        at tigase.io.CertificateContainer.addCertificates(CertificateContainer.java:144)
        at tigase.admin.Script13.process(Script13.groovy:139)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268)
        at groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:226)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:83)
        at tigase.admin.Script13.run(Script13.groovy:193)
        at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317)
        at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:71)
        at tigase.server.script.Script.runCommand(Script.java:122)
        at tigase.server.BasicComponent.processScriptCommand(BasicComponent.java:903)
        at tigase.server.BasicComponent.processPacket(BasicComponent.java:400)
        at tigase.server.MessageRouter.processPacket(MessageRouter.java:379)
        at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1398)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at tigase.cert.CertificateEntry.setPrivateKey(CertificateEntry.java:70)
        at tigase.cert.CertificateUtil.parseCertificate(CertificateUtil.java:624)
        at tigase.io.CertificateContainer.addCertificate(CertificateContainer.java:522)
        ... 21 more
wojciech.kapcia@tigase.net moved 5 months ago
Previous Value Current Value
tigase/_server/tigase-utils
tigase/_server/server-core
wojciech.kapcia@tigase.net changed state to 'Closed' 5 months ago
Previous Value Current Value
Open
Closed
wojciech.kapcia@tigase.net commented 5 months ago

Issue was caused by incorrect variable used when passing PEM certificate for default alias.

wojciech.kapcia@tigase.net changed fields 5 months ago
Name Previous Value Current Value
Version
empty
tigase-server-8.5.0
Referenced from commit 5 months ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.5.0
Sprints
n/a
Customer
n/a
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/server-core#1532
Please wait...
Page is in error, reload to recover