简体   繁体   中英

TextSecure Signal Server - Certificate Error

I was trying to deploy Signal Server according to the guidelines here. Link

Everything was success in the build part. But when i run the service using this command

java -jar service/target/TextSecureServer-3.21.jar server service/config/config.yml

I am getting below errors.

INFO  [2020-09-10 04:52:48,319] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
INFO  [2020-09-10 04:52:48,320] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
org.bouncycastle.openssl.PEMException: problem parsing cert: java.security.cert.CertificateException: java.lang.IllegalArgumentException: unknown object in factory: org.bouncycastle.asn1.DERUnknownTag
    at org.bouncycastle.openssl.PEMReader$X509CertificateParser.parseObject(Unknown Source)
    at org.bouncycastle.openssl.PEMReader.readObject(Unknown Source)
    at org.whispersystems.textsecuregcm.push.RetryingApnsClient.initializeCertificate(RetryingApnsClient.java:76)
    at org.whispersystems.textsecuregcm.push.RetryingApnsClient.<init>(RetryingApnsClient.java:49)
    at org.whispersystems.textsecuregcm.push.APNSender.<init>(APNSender.java:70)
    at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:246)
    at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:151)
    at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:44)
    at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
    at io.dropwizard.cli.Cli.run(Cli.java:78)
    at io.dropwizard.Application.run(Application.java:94)
    at org.whispersystems.textsecuregcm.WhisperServerService.main(WhisperServerService.java:406)
Caused by: java.security.cert.CertificateException: java.lang.IllegalArgumentException: unknown object in factory: org.bouncycastle.asn1.DERUnknownTag
    at org.bouncycastle.jce.provider.JDKX509CertificateFactory.engineGenerateCertificate(Unknown Source)
    at java.base/java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:355)
    ... 12 more
Caused by: java.lang.IllegalArgumentException: unknown object in factory: org.bouncycastle.asn1.DERUnknownTag
    at org.bouncycastle.asn1.x509.AlgorithmIdentifier.getInstance(Unknown Source)
    at org.bouncycastle.asn1.x509.TBSCertificateStructure.<init>(Unknown Source)
    at org.bouncycastle.asn1.x509.TBSCertificateStructure.getInstance(Unknown Source)
    at org.bouncycastle.asn1.x509.X509CertificateStructure.<init>(Unknown Source)
    at org.bouncycastle.asn1.x509.X509CertificateStructure.getInstance(Unknown Source)
    at org.bouncycastle.jce.provider.JDKX509CertificateFactory.readDERCertificate(Unknown Source)
    ... 14 more

Anyone know the exact issue here ?

Also i didnt change serverSecret & serverPublic under zkConfig. (I dont know how to get these). What it does mean by * # zkgroup config, run using your build jar * as in the documentation ?

Problem solved. This exception came due to improper PEM format of reading cerKey file. Anyhow current crtKey form is PEM only, but it need a extended form of PEM.

i used below command to generate it.

openssl rsa -in cert.key -outform PEM -out cert.key   

 

Then all above errors were disappeared.

I did enter the above command but i got this error

Can't open cert.key for reading, No such file or directory 140021811573184:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:72:fopen('cert.key','r') 140021811573184:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:79: unable to load Private Key

and I did everything I could I generated all kind of certificate I could find on Internet but no change in result. could you please tell me what to do it's so important to me. thanks alot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM