我已经在CentOS 7的GitHub上安装了标记为v0.93的TextSecure(Signal)服务器。编译通过了,jar正确了,config正确了,但是当我尝试启动它时:
java -jar /Server/target/TextSecureServer-2.25.jar server /Server/config/server.yml &
它提供输出:
INFO [2019-02-10 19:03:15,113] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
INFO [2019-02-10 19:03:15,116] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
INFO [2019-02-10 19:03:16,401] com.relayrides.pushy.apns.ApnsClientBuilder: Native SSL provider is available and supports ALPN; will use native provider.
com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at com.google.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:89)
at com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:158)
at org.whispersystems.textsecuregcm.entities.MessageProtos$ServerCertificate.<init>(MessageProtos.java:2010)
at org.whispersystems.textsecuregcm.entities.MessageProtos$ServerCertificate.<init>(MessageProtos.java:1974)
at org.whispersystems.textsecuregcm.entities.MessageProtos$ServerCertificate$1.parsePartialFrom(MessageProtos.java:2062)
at org.whispersystems.textsecuregcm.entities.MessageProtos$ServerCertificate$1.parsePartialFrom(MessageProtos.java:2057)
at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:137)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:168)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:180)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:185)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
at org.whispersystems.textsecuregcm.entities.MessageProtos$ServerCertificate.parseFrom(MessageProtos.java:2648)
at org.whispersystems.textsecuregcm.auth.CertificateGenerator.<init>(CertificateGenerator.java:28)
at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:232)
at org.whispersystems.textsecuregcm.WhisperServerService.run(WhisperServerService.java:102)
at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43)
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:93)
at org.whispersystems.textsecuregcm.WhisperServerService.main(WhisperServerService.java:292)
似乎某处的证书存在一些问题。如果我在以下位置添加注释行:
src / main / java / org / whispersystems / textsecuregcm / WhisperServerService.java:232
environment.jersey().register(new CertificateController(new CertificateGenerator(config.getDeliveryCertificate().getCertificate(), config.getDeliveryCertificate().getPrivateKey(), config.getDeliveryCertificate().getExpiresDays())));
开始没有问题。
任何提示或帮助将不胜感激。
谢谢!
答案 0 :(得分:0)
问题可以通过研究代码并更改某些配置来解决。
答案 1 :(得分:0)
以下是我自己确定的证书生成步骤。
配置Signal Server的“身份不明的传递”:
此功能也称为密封发件人。 https://signal.org/blog/sealed-sender/
1。生成CA密钥对: java -jar TextSecureServer-2.92.jar证书--ca
它将打印出CA的公钥和私钥。
2。生成服务器证书: java -jar TextSecureServer-2.92.jar证书--key XXX --id 2020
XXX是CA的私钥。 id必须是数字。 它将打印出服务器的证书和私钥。
3。使用服务器证书和私钥填写以下YAML字段: 交货不明: 证书: privateKey:
注意:Signal Desktop / Android / iOS应用也可能需要CA证书。
用于生成上述CA证书和服务器证书的代码: https://github.com/signalapp/Signal-Server/blob/master/service/src/main/java/org/whispersystems/textsecuregcm/workers/CertificateCommand.java
最后,如果发现任何配置错误,则可以始终在此处参考与配置相关的代码: https://github.com/signalapp/Signal-Server/tree/master/service/src/main/java/org/whispersystems/textsecuregcm/configuration