TextSecure服务器(信号)配置



我在GitHub上安装了标记为v0.93的TextSecure(Signal)服务器。编译通过了,jar有序,配置有序,但当我尝试启动它时:

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())));

它开始时没有问题。

任何提示或帮助都将不胜感激。

谢谢!

下面是我自己制定的证书生成步骤。

配置信号服务器的"未识别交付":

此功能也称为密封发件人。https://signal.org/blog/sealed-sender/

1.生成CA密钥对:java-jar TextSecureServer-2.92.jar证书--ca

它将打印出CA的公钥和私钥。

2.生成服务器证书:java-jar TextSecureServer-2.92.jar证书-密钥XXX-id 2020

XXX是CA的私钥。id必须是一个数字。它将打印出您的服务器的证书和私钥。

3.使用您的服务器证书和私钥填写以下YAML字段:未识别交付:证书:privateKey:

注意:Signal Desktop/Android/iOS应用程序可能也需要CA证书。

以上服务器证书由以下代码加载:https://github.com/signalapp/Signal-Server/blob/master/service/src/main/java/org/whispersystems/textsecuregcm/configuration/UnidentifiedDeliveryConfiguration.java

生成上述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

最新更新