Add new root CA to the signal test (#977)
All measurements collected since 2022-10-19 with previous versions of OONI Probe will wrongly report sfu.voip.signal.org as blocked as it switched to using a different root CA This fixes: https://github.com/ooni/probe/issues/2344
This commit is contained in:
parent
57a3919d2a
commit
fa281f259a
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
testName = "signal"
|
testName = "signal"
|
||||||
testVersion = "0.2.0"
|
testVersion = "0.2.1"
|
||||||
|
|
||||||
signalCA = `-----BEGIN CERTIFICATE-----
|
signalCA = `-----BEGIN CERTIFICATE-----
|
||||||
MIID7zCCAtegAwIBAgIJAIm6LatK5PNiMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYD
|
MIID7zCCAtegAwIBAgIJAIm6LatK5PNiMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYD
|
||||||
|
@ -40,6 +40,34 @@ iOheyv7UzJOefb2pLOc9qsuvI4fnaESh9bhzln+LXxtCrRPGhkxA1IMIo3J/s2WF
|
||||||
/oF4usY5J7LPkxK3LWzMJnb5EIJDmRvyH8pyRwWg6Qm6qiGFaI4nL8QU4La1x2en
|
/oF4usY5J7LPkxK3LWzMJnb5EIJDmRvyH8pyRwWg6Qm6qiGFaI4nL8QU4La1x2en
|
||||||
4DGXRaLMPRwjELNgQPodR38zoCMuA8gHZfZYYoZ7D7Q1wNUiVHcxuFrEeBaYJbLE
|
4DGXRaLMPRwjELNgQPodR38zoCMuA8gHZfZYYoZ7D7Q1wNUiVHcxuFrEeBaYJbLE
|
||||||
rwLV
|
rwLV
|
||||||
|
-----END CERTIFICATE-----`
|
||||||
|
|
||||||
|
signalCANew = `-----BEGIN CERTIFICATE-----
|
||||||
|
MIIEjDCCAnSgAwIBAgITV+dgmSk1+75Wwn/Mjz8f+gQ9qTANBgkqhkiG9w0BAQsF
|
||||||
|
ADB1MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
|
||||||
|
TW91bnRhaW4gVm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
|
7EAJ9HcrgSPirQeuDJKhamaLtQiqIQR8L3H4YG1FDiuOeto6f1LRCIqjH1Mye1BM
|
||||||
|
33Qg/VilLQIWp8+C4GJZ0+LO1cfatNh8tkDbrwMzUeA1nLEZHMlgXE05z00euNlQ
|
||||||
|
0+evTmJzWRKJHugPnA3vvdzy4lbYvYWaXs8pACrVpESui8I+v6jdH814lOxpDwNH
|
||||||
|
bPrxfOxhIxfFiVttCl3AQZBLJM6M0ty6/Q7bYsdNT23jKMl0AmDhj9qn/7dzYcVi
|
||||||
|
vI0XKaaJl4ov3IDbuMe0oZWhoLwzPuWxxkWDjTb8ngDnWZT1o5dAR9fltr38m42N
|
||||||
|
uA/SkxghiAMmvkC8nhEJ7yT2hme+rozPZSp1SSEDViDkA4KnnQpMcNiotCQpNOe7
|
||||||
|
YfA9uSnjHjZloRTPUgtkKQ3u8ZZprFQlS2jDE18BRGdh24V5OsCbMvFPtrEsjG4H
|
||||||
|
5xvkiIV0FpbMk4Gj8I4Hbw==
|
||||||
-----END CERTIFICATE-----`
|
-----END CERTIFICATE-----`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -112,12 +140,17 @@ func (m Measurer) Run(ctx context.Context, sess model.ExperimentSession,
|
||||||
urlgetter.RegisterExtensions(measurement)
|
urlgetter.RegisterExtensions(measurement)
|
||||||
|
|
||||||
certPool := netxlite.NewDefaultCertPool()
|
certPool := netxlite.NewDefaultCertPool()
|
||||||
signalCABytes := []byte(signalCA)
|
signalCAByteSlice := [][]byte{
|
||||||
if m.Config.SignalCA != "" {
|
[]byte(signalCA),
|
||||||
signalCABytes = []byte(m.Config.SignalCA)
|
[]byte(signalCANew),
|
||||||
}
|
}
|
||||||
if !certPool.AppendCertsFromPEM(signalCABytes) {
|
if m.Config.SignalCA != "" {
|
||||||
return errors.New("AppendCertsFromPEM failed")
|
signalCAByteSlice = [][]byte{[]byte(m.Config.SignalCA)}
|
||||||
|
}
|
||||||
|
for _, caBytes := range signalCAByteSlice {
|
||||||
|
if !certPool.AppendCertsFromPEM(caBytes) {
|
||||||
|
return errors.New("AppendCertsFromPEM failed")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inputs := []urlgetter.MultiInput{
|
inputs := []urlgetter.MultiInput{
|
||||||
|
|
|
@ -17,7 +17,7 @@ func TestNewExperimentMeasurer(t *testing.T) {
|
||||||
if measurer.ExperimentName() != "signal" {
|
if measurer.ExperimentName() != "signal" {
|
||||||
t.Fatal("unexpected name")
|
t.Fatal("unexpected name")
|
||||||
}
|
}
|
||||||
if measurer.ExperimentVersion() != "0.2.0" {
|
if measurer.ExperimentVersion() != "0.2.1" {
|
||||||
t.Fatal("unexpected version")
|
t.Fatal("unexpected version")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user