gpt4 book ai didi

java - RPC CertIOException "malformed data: sequence wrong size for a certificate"

转载 作者:太空宇宙 更新时间:2023-11-04 11:17:22 26 4
gpt4 key购买 nike

我尝试使用 RPC 连接到我的 M12 CordaApp 并调用 nodeIdentity() 方法,我收到 org.bouncycaSTLe.cert.CertIOException。我认为 Java 客户端代码可以工作,我可以看到 RPC 连接,并且当我尝试调用 getProtocolVersion() 时,我看到了正确的协议(protocol)版本。

这是调用nodeIdentity()时的堆栈跟踪:

10:50:25.848 [Thread-0 (ActiveMQ-client-global-threads-1076641925)] ERROR org.apache.activemq.artemis.core.client - AMQ214000: Failed to call onMessageorg.bouncycastle.cert.CertIOException: malformed data: sequence wrong size for a certificate    at org.bouncycastle.cert.X509CertificateHolder.parseBytes(Unknown Source) ~[bcpkix-jdk15on-1.56.jar:1.56.0.0]    at org.bouncycastle.cert.X509CertificateHolder.(Unknown Source) ~[bcpkix-jdk15on-1.56.jar:1.56.0.0]    at net.corda.core.serialization.X509CertificateSerializer.read(Kryo.kt:641) ~[core-0.12.1.jar:?]    at net.corda.core.serialization.X509CertificateSerializer.read(Kryo.kt:639) ~[core-0.12.1.jar:?]    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readObjectOrNull(Kryo.java:782) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:132) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:134) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:134) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?]    at net.corda.core.serialization.KryoKt$deserialize$1$1.execute(Kryo.kt:110) ~[core-0.12.1.jar:?]    at net.corda.core.serialization.KryoPoolWithContext.run(Kryo.kt:653) ~[core-0.12.1.jar:?]    at net.corda.core.serialization.KryoKt.deserialize(Kryo.kt:110) ~[core-0.12.1.jar:?]    at net.corda.nodeapi.RPCApi$ServerToClient$Companion.fromClientMessage(RPCApi.kt:177) ~[node-api-0.12.1.jar:?]    at net.corda.client.rpc.internal.RPCClientProxyHandler.artemisMessageHandler(RPCClientProxyHandler.kt:224) ~[rpc-0.12.1.jar:?]    at net.corda.client.rpc.internal.RPCClientProxyHandler.access$artemisMessageHandler(RPCClientProxyHandler.kt:58) ~[rpc-0.12.1.jar:?]    at net.corda.client.rpc.internal.RPCClientProxyHandler$start$3.invoke(RPCClientProxyHandler.kt:174) ~[rpc-0.12.1.jar:?]    at net.corda.client.rpc.internal.RPCClientProxyHandler$start$3.invoke(RPCClientProxyHandler.kt:58) ~[rpc-0.12.1.jar:?]    at net.corda.client.rpc.internal.RPCClientProxyHandlerKt$sam$MessageHandler$43516406.onMessage(RPCClientProxyHandler.kt) ~[rpc-0.12.1.jar:?]    at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1001) ~[artemis-core-client-1.5.3.jar:1.5.3]    at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:49) ~[artemis-core-client-1.5.3.jar:1.5.3]    at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1124) [artemis-core-client-1.5.3.jar:1.5.3]    at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) [artemis-commons-1.5.3.jar:1.5.3]    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]Caused by: java.lang.IllegalArgumentException: sequence wrong size for a certificate    at org.bouncycastle.asn1.x509.Certificate.(Unknown Source) ~[bcprov-jdk15on-1.56.jar:1.56.0]    at org.bouncycastle.asn1.x509.Certificate.getInstance(Unknown Source) ~[bcprov-jdk15on-1.56.jar:1.56.0]    ... 42 more

X509 证书序列化似乎有问题,我是否遗漏了什么?

最佳答案

我们怀疑这个问题可能会在 M13 中得到解决,但 M14 即将到来,因此可能值得等待并直接更新。

关于java - RPC CertIOException "malformed data: sequence wrong size for a certificate",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45308785/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com