Skip to content

Commit

Permalink
lint about the encoding of qcstatements for PSD2
Browse files Browse the repository at this point in the history
  • Loading branch information
mtg committed Feb 4, 2020
1 parent 8a37cc7 commit 6c23670
Show file tree
Hide file tree
Showing 30 changed files with 1,225 additions and 104 deletions.
54 changes: 54 additions & 0 deletions lints/etsi/lint_qcstatem_psd2_psd2statem_encoding.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package etsi

/*
* ZLint Copyright 2020 Regents of the University of Michigan
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

import (
"github.com/zmap/zcrypto/x509"
"github.com/zmap/zlint/lint"
"github.com/zmap/zlint/util"
)

type qcStatemPsd2Pd2StatemEnc struct{}

func (l *qcStatemPsd2Pd2StatemEnc) Initialize() error {
return nil
}

func (l *qcStatemPsd2Pd2StatemEnc) CheckApplies(c *x509.Certificate) bool {
if !util.IsExtInCert(c, util.QcStateOid) {
return false
}
_, isPresent := util.IsQcStatemPresent(c, &util.IdEtsiPsd2Statem)
return isPresent
}

func (l *qcStatemPsd2Pd2StatemEnc) Execute(c *x509.Certificate) *lint.LintResult {
qcs := util.ParseQcStatem(util.GetExtFromCert(c, util.QcStateOid).Value, util.IdEtsiPsd2Statem)
if qcs.GetErrorInfo() != "" {
return &lint.LintResult{Status: lint.Error, Details: qcs.GetErrorInfo()}
}
return &lint.LintResult{Status: lint.Pass}
}

func init() {
lint.RegisterLint(&lint.Lint{
Name: "e_qcstatem_psd2_psd2statem_encoding",
Description: "This test checks that a PSD2 QcStatement has the correct encoding.",
Citation: "ETSI TS 119 495, 'Annex A (normative): ASN.1 Declaration'",
Source: lint.EtsiEsi,
EffectiveDate: util.EtsiEn319_412_5_V2_2_1_Date,
Lint: &qcStatemPsd2Pd2StatemEnc{},
})
}
57 changes: 57 additions & 0 deletions lints/etsi/lint_qcstatem_psd2_psd2statem_encoding_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package etsi

/*
* ZLint Copyright 2020 Regents of the University of Michigan
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

import (
"github.com/zmap/zlint/lint"
"github.com/zmap/zlint/test"
"testing"
)

func TestQcStatemPsd2Encoding(t *testing.T) {
m := map[string]lint.LintStatus{
"QcStmtPsd2Cert01InvalidRoles.pem": lint.Pass,
"QcStmtPsd2Cert03MissingRolesOid.pem": lint.Error,
"QcStmtPsd2Cert05Valid.pem": lint.Pass,
"QcStmtPsd2Cert07MissingRoleName.pem": lint.Error,
"QcStmtPsd2Cert08NcaNameMissing.pem": lint.Error,
"QcStmtPsd2Cert09NcaNameZeroLength.pem": lint.Error,
"QcStmtPsd2Cert10RoleNameMissing.pem": lint.Error,
"QcStmtPsd2Cert11RoleNameZeroLenght.pem": lint.Error,
"QcStmtPsd2Cert13Psd2ExtNcaIdZeroLength.pem": lint.Error,
"QcStmtPsd2Cert14Valid.pem": lint.Pass,
"QcStmtPsd2Cert15NcaIdInconsistent.pem": lint.Pass,
"QcStmtPsd2Cert17NcaIdInconsistent.pem": lint.Pass,
"QcStmtPsd2Cert22NcaNameWrongStringType.pem": lint.Error,
"QcStmtPsd2Cert23Psd2ExtNcaIdWrongStringType.pem": lint.Error,
"QcStmtPsd2Cert24RoleNameIllegalChars.pem": lint.Error,
"QcStmtPsd2Cert26RoleOidAsUtf8Str.pem": lint.Error,
"QcStmtPsd2Cert27RoleNameNull.pem": lint.Error,
"QcStmtPsd2Cert28NcaNameIa5Str.pem": lint.Error,
"QcStmtPsd2Cert30Valid.pem": lint.Pass,
"QcStmtPsd2Cert31Valid.pem": lint.Pass,
"QcStmtPsd2Cert39Valid.pem": lint.Pass,
"QcStmtPsd2Cert40Valid.pem": lint.Pass,
"EvAltRegNumCert56JurContryNotMatching.pem": lint.NA,
"EvAltRegNumCert57NtrJurSopMissing.pem": lint.NA,
}
for inputPath, expected := range m {
out := test.TestLint("e_qcstatem_psd2_psd2statem_encoding", inputPath)

if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
}
}
28 changes: 28 additions & 0 deletions testdata/EvAltRegNumCert56JurContryNotMatching.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIIExzCCA6+gAwIBAgINAmI1p32s9ypT5AANZzANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjCB
oDEMMAoGA1UECgwDTVRHMRIwEAYDVQQHDAlEYXJtc3RhZHQxDzANBgNVBAgMBkhl
c3NlbjELMAkGA1UEBhMCREUxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9u
MRcwFQYDVQRhDA5OVFJERS0xMjM0NTY3ODERMA8GA1UEBRMIMTIzNDU2NzgxEzAR
BgsrBgEEAYI3PAIBAwwCR0IwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDCDYFxtJQFvM+ZiqpiCPIuY7IeRvkrhZjDg9DOJq12j1znWwUgJSYyGcIkirpp
o+vKEKTzz7XGHvZwWJZbiFJqiEIzhbjGFkhPAUU5P+FquQa17zfbeZ5QkFdDW4vD
NQ2zQfQbwkp/GDw5LU+/K6VxB3MzAOWNNp7+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0 deletions testdata/EvAltRegNumCert57NtrJurSopMissing.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIIEyjCCA7KgAwIBAgINAlEr+EzD49s1YT1+/jANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjCB
ozEMMAoGA1UECgwDTVRHMRIwEAYDVQQHDAlEYXJtc3RhZHQxDzANBgNVBAgMBkhl
c3NlbjELMAkGA1UEBhMCREUxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9u
MRowGAYDVQRhDBFOVFJERStIRS0xMjM0NTY3ODERMA8GA1UEBRMIMTIzNDU2Nzgx
EzARBgsrBgEEAYI3PAIBAwwCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQDCDYFxtJQFvM+ZiqpiCPIuY7IeRvkrhZjDg9DOJq12j1znWwUgJSYyGcIk
irppo+vKEKTzz7XGHvZwWJZbiFJqiEIzhbjGFkhPAUU5P+FquQa17zfbeZ5QkFdD
W4vDNQ2zQfQbwkp/GDw5LU+/K6VxB3MzAOWNNp7+j3LFclYIzIa277ri/Ztcxi2U
7S1kJHfmZ01i25QuKY7dHXrKvGj7FSyAVtPd5zqPmBgUSxHZxAEfuXrQ2a1pEQX2
Dq5f/M3Gs8tNro5FGAqowEARKNzNn3omZ1pHgJvZTPfaX20TgxqRktG5RPdya5dH
dHFwgNPWc792M1xwuG+HNz5+jnXlAgMBAAGjggFcMIIBWDAfBgNVHSMEGDAWgBQM
Xpz+ukshbAQdwlq344hfWd5MEjAdBgNVHQ4EFgQUDmuqg6myTVyFzbHSL4f3IMs2
QzswDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAwGgYDVR0RBBMwEYIPd3d3
LmV4YW1wbGUuY29tMGIGCCsGAQUFBwEBBFYwVDAoBggrBgEFBQcwAoYcaHR0cDov
L2NhLmV4YW1wbGUuY29tL2NhLmNydDAoBggrBgEFBQcwAYYcaHR0cDovL29jc3Au
ZXhhbXBsZS5jb20vb2NzcDBZBgNVHSAEUjBQMAcGBWeBDAEBMEUGCisGAQQBvUcN
GAEwNzA1BggrBgEFBQcCARYpaHR0cDovL3d3dy50ZWxlc2VjLmRlL3NlcnZlcnBh
c3MvY3BzLmh0bWwwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqG
SIb3DQEBCwUAA4IBAQBmq3MNz+GEqMIqOC1IB06DEjtAFHmbqr9uhxSpUM3VuK9y
jm+upuoZCwXFmEeyRXgjKbVFi6aLcMvyhLKfqntQKP517y/baEOeAV+GHUOYg+Gl
ihXze5o/nZAokPm9/b8D0hciqbxte7UlGaTu9wWKscVpDdjsuClNhaM7QD07LbTG
biAk5cbnQNTKqW0VCCU0LgEPBpbugydWDHkv8a5h0r13jiab3U7sfiX/Zq0rDP+i
MPNIYi/a9b/lxZ+TbFbZ1Q1PSW1dmhLvnXWcCVQ6VW2XwcbNkJyVvbJF3KJXMu7S
djvSAK3WrQazO/XhXQluDOMosMZYJZH4CuLLrHxe
-----END CERTIFICATE-----
29 changes: 29 additions & 0 deletions testdata/QcStmtPsd2Cert01InvalidRoles.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE+TCCA+GgAwIBAgINDAL9Kp25SRT/zD2oHzANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjBw
MQ0wCwYDVQQLDARUZXN0MQwwCgYDVQQKDANNVEcxEjAQBgNVBAcMCURhcm1zdGFk
dD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EF1dGhvcml0eQwIREUtQkFGSU4wDQYJKoZI
hvcNAQELBQADggEBACBOt6QdjgWK2amsIFmmf9t7cnwtpigTe3BLnEmsPAPw0TBU
5G0pg1Utep7dvr0k++lMMqAHyxGZ8eUxjxXn/VUFTRisvwuk0GcDiYh7j9D/uyTH
sgD5IOvuADWcxHQ6kRyAWVqu5eLrUIy0l21SfpU1WGLiqCG14RzzljDe7jgWR4vu
KUbk4/LWavRCEXPejDJ7MvQ6Q8Jwj4tzdFZXUdwxQUJ/yp6pwNO3+qka7qi5rHD8
8tNBPyUevV37humsLjfDzHFINs9D1BMDqZixdGAfOr/rMdw6pUlAUM0nFciYEK6z
sOJ9fnJcGTKWjJeC8XKoOPWyB0Ie0pPy21M5hxQ=
-----END CERTIFICATE-----
29 changes: 29 additions & 0 deletions testdata/QcStmtPsd2Cert03MissingRolesOid.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE8DCCA9igAwIBAgINCtgGQhhiIWmoUdvtzDANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjBw
MQ0wCwYDVQQLDARUZXN0MQwwCgYDVQQKDANNVEcxEjAQBgNVBAcMCURhcm1zdGFk
dDEPMA0GA1UECAwGSGVzc2VuMQswCQYDVQQGEwJERTEfMB0GA1UEYQwWUFNEREUt
QkFGSU4tMTIzNDU2Nzg5MDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMINgXG0lAW8z5mKqmII8i5jsh5G+SuFmMOD0M4mrXaPXOdbBSAlJjIZwiSKummj
68oQpPPPtcYe9nBYlluIUmqIQjOFuMYWSE8BRTk/4Wq5BrXvN9t5nlCQV0Nbi8M1
DbNB9BvCSn8YPDktT78rpXEHczMA5Y02n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P3SXAyRQ
S0TalMJ6wkEz+qBxao9+M4E64Q7jgVJbGKvoCgKiTKCbvd24AQDZPgGJspz+3NQR
0DINDw9My5opjNMyB+x4K+Hxtl0=
-----END CERTIFICATE-----
29 changes: 29 additions & 0 deletions testdata/QcStmtPsd2Cert05Valid.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE+TCCA+GgAwIBAgINCqVMvI3ItM3g3XV2cDANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjBw
MQ0wCwYDVQQLDARUZXN0MQwwCgYDVQQKDANNVEcxEjAQBgNVBAcMCURhcm1zdGFk
dDEPMA0GA1UECAwGSGVzc2VuMQswCQYDVQQGEwJERTEfMB0GA1UEYQwWUFNEREUt
QkFGSU4tMTIzNDU2Nzg5MDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMINgXG0lAW8z5mKqmII8i5jsh5G+SuFmMOD0M4mrXaPXOdbBSAlJjIZwiSKummj
68oQpPPPtcYe9nBYlluIUmqIQjOFuMYWSE8BRTk/4Wq5BrXvN9t5nlCQV0Nbi8M1
DbNB9BvCSn8YPDktT78rpXEHczMA5Y02nv6PcsVyVgjMhrbvuuL9m1zGLZTtLWQk
d+ZnTWLblC4pjt0desq8aPsVLIBW093nOo+YGBRLEdnEAR+5etDZrWkRBfYOrl/8
zcazy02ujkUYCqjAQBEo3M2feiZnWkeAm9lM99pfbRODGpGS0blE93Jrl0d0cXCA
09Zzv3YzXHC4b4c3Pn6OdeUCAwEAAaOCAb8wggG7MB8GA1UdIwQYMBaAFAxenP66
SyFsBB3CWrfjiF9Z3kwSMB0GA1UdDgQWBBQOa6qDqbJNXIXNsdIvh/cgyzZDOzAO
BgNVHQ8BAf8EBAMCBaAwDAYDVR0TAQH/BAIwADAaBgNVHREEEzARgg93d3cuZXhh
bXBsZS5jb20wYgYIKwYBBQUHAQEEVjBUMCgGCCsGAQUFBzAChhxodHRwOi8vY2Eu
ZXhhbXBsZS5jb20vY2EuY3J0MCgGCCsGAQUFBzABhhxodHRwOi8vb2NzcC5leGFt
cGxlLmNvbS9vY3NwMB8GA1UdIAQYMBYwCQYHBACL7EABBDAJBgcEAIGYJwMBMB0G
A1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjCBmgYIKwYBBQUHAQMEgY0wgYow
CAYGBACORgEBMBMGBgQAjkYBBjAJBgcEAI5GAQYDMBUGCCsGAQUFBwsCMAkGBwQA
i+xJAQIwUgYGBACBmCcCMEgwEzARBgcEAIGYJwEBDAZQU1BfQVMMJ0ZlZGVyYWwg
RmluYW5jaWFsIFN1cGVydmlzb3J5IEF1dGhvcml0eQwIREUtQkFGSU4wDQYJKoZI
hvcNAQELBQADggEBABmbFutzBZssZnMzUDMYf0bYgStey6CMddV4rKhhUDBqxG9s
xg+xLbXNmEHdJ6lScRK3h2mQ222vPsebLguitcisaqAMIDInYfRS657yEXmSedjy
WIVSrtCaAACYoCwOPEymnjra7WsRu2WZZ+5zk7floDx6o5QXLd73DOJrqr/r6pL9
NPf5e7g+vlVqAGQhC6Z0s7ri5XInPBeZEMox2Au2ZF/UWNRf00MnRvnYAl2TkDSw
HcbU6L8BtzLxJlZmKw33BfTmi++QOmSPZjpELpnpUamrDmKuFlxu5/QBVz6RS/sX
5tZkQTPg6UtFlkStg9LLJEkEvdT0xMkRvczzTPM=
-----END CERTIFICATE-----
29 changes: 29 additions & 0 deletions testdata/QcStmtPsd2Cert07MissingRoleName.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIE8TCCA9mgAwIBAgINAn34kicX+AdEJqPEXDANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIx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gYUwgYIw
CAYGBACORgEBMBMGBgQAjkYBBjAJBgcEAI5GAQYDMBUGCCsGAQUFBwsCMAkGBwQA
i+xJAQIwSgYGBACBmCcCMEAwCzAJBgcEAIGYJwEEDCdGZWRlcmFsIEZpbmFuY2lh
bCBTdXBlcnZpc29yeSBBdXRob3JpdHkMCERFLWJhZmluMA0GCSqGSIb3DQEBCwUA
A4IBAQAHzTrdqGrwO0YNlzUBybkgaiaRR+iTfpe1gBHwOoL3hE6u1xowj3WozX6b
dXi+wT4jiy6ipsSCUE2sMwhBCIGRnuuJzlD6tIqJ88tAL0E13TvL2iW6IvH9pUM6
ZMfEh7ejIXe2KRPX0lCuaiTwGXZy6B4EEt/vB5kdoqoDDLx7zDYUKyoUetN9bl75
X5EjnpmZ1b+vgVCui261HFmwCg+ZxEFmbsmx3+CndOvFUygih9bdhIEj6Y6tlZS+
S958XsWQwdwWnPIICt68yCxjYZfQ5fOiQa4OfoZ82uekJTr7pM63JwAk97GPt+MH
AFexiknCl6FRVuyRQHXkQkQMSfdG
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions testdata/QcStmtPsd2Cert08NcaNameMissing.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIIEzTCCA7WgAwIBAgINBgcQn55ngMeNmOZhpzANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjBw
MQ0wCwYDVQQLDARUZXN0MQwwCgYDVQQKDANNVEcxEjAQBgNVBAcMCURhcm1zdGFk
dDEPMA0GA1UECAwGSGVzc2VuMQswCQYDVQQGEwJERTEfMB0GA1UEYQwWUFNEREUt
QkFGSU4tMTIzNDU2Nzg5MDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMINgXG0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po0Qqn8+sW53tfTORsXmqaCzmlnDl
LiVJIY4eJYb1iuEucQdJ3KUWduJsJFJHOO+CoJKsoan+1g2cK/3NZC+eLR/e9aC/
s8SnyGIBf2JxXXDQUY1Nx6Gb7b39Za/Ta6Hzu7Ue1FG/YY3vOwHnESAzmNYV1XiR
QLtIJbag45xPMWzQV5afp0gXRRX4hNE+DkZ52zWBMFTs
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions testdata/QcStmtPsd2Cert09NcaNameZeroLength.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIIEzzCCA7egAwIBAgINDsKzMgts5dOILcyZyzANBgkqhkiG9w0BAQsFADBBMRUw
EwYDVQQDDAxUZXN0IFN1YkNBIDIxDTALBgNVBAsMBFRlc3QxDDAKBgNVBAoMA01U
RzELMAkGA1UEBhMCREUwHhcNMTkxMTAxMDgwMzAxWhcNMjAxMTAxMDgwMzAxWjBw
MQ0wCwYDVQQLDARUZXN0MQwwCgYDVQQKDANNVEcxEjAQBgNVBAcMCURhcm1zdGFk
dDEPMA0GA1UECAwGSGVzc2VuMQswCQYDVQQGEwJERTEfMB0GA1UEYQwWUFNEREUt
QkFGSU4tMTIzNDU2Nzg5MDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMINgXG0lAW8z5mKqmII8i5jsh5G+SuFmMOD0M4mrXaPXOdbBSAlJjIZwiSKummj
68oQpPPPtcYe9nBYlluIUmqIQjOFuMYWSE8BRTk/4Wq5BrXvN9t5nlCQV0Nbi8M1
DbNB9BvCSn8YPDktT78rpXEHczMA5Y02nv6PcsVyVgjMhrbvuuL9m1zGLZTtLWQk
d+ZnTWLblC4pjt0desq8aPsVLIBW093nOo+YGBRLEdnEAR+5etDZrWkRBfYOrl/8
zcazy02ujkUYCqjAQBEo3M2feiZnWkeAm9lM99pfbRODGpGS0blE93Jrl0d0cXCA
09Zzv3YzXHC4b4c3Pn6OdeUCAwEAAaOCA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