mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 13:07:58 +01:00
Pin the trusted APNs CA cert.
This commit is contained in:
committed by
Jon Chambers
parent
2f6105f9bc
commit
6dfd13118d
@@ -35,6 +35,7 @@ import static com.codahale.metrics.MetricRegistry.name;
|
||||
|
||||
public class RetryingApnsClient {
|
||||
|
||||
private static final String APNS_CA_FILENAME = "AAACertificateServices.crt";
|
||||
private static final Logger logger = LoggerFactory.getLogger(RetryingApnsClient.class);
|
||||
|
||||
private final ApnsClient apnsClient;
|
||||
@@ -51,6 +52,7 @@ public class RetryingApnsClient {
|
||||
|
||||
this.apnsClient = new ApnsClientBuilder().setSigningKey(ApnsSigningKey.loadFromInputStream(new ByteArrayInputStream(apnSigningKey.getBytes()), teamId, keyId))
|
||||
.setMetricsListener(metricsListener)
|
||||
.setTrustedServerCertificateChain(getClass().getResourceAsStream(APNS_CA_FILENAME))
|
||||
.setApnsServer(sandbox ? ApnsClientBuilder.DEVELOPMENT_APNS_HOST : ApnsClientBuilder.PRODUCTION_APNS_HOST)
|
||||
.build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user