-
Notifications
You must be signed in to change notification settings - Fork 50
/
certificates_data_test.go
106 lines (101 loc) · 5.68 KB
/
certificates_data_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package gokong
const (
testKey1 = `-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDXi8zFDavAN7fl
RJO2G4oLj6NIT86BJnzM3XqtGl6pvfp0bo9so+h/0HhGtnIh7Je4BL7PGsv5BSdg
6EDDZDXZn/ZDe3jje+Ee1sfn98H+1mjTDlm0U2it/cWaZ+a8GEhPwidWyI1AeS4O
XrM5VcbcmVoIPRr5z0iJBJ2LRY0L/rPVsJOGbT1WPsFjFMZrc7GAixrjjk0jovKr
X7hK/Sj3vRGjZsP6CDEVIeEJQOMDvup9YCbgPTofn3gH9PoKFQdA0CbuGsdKiUOF
bfrp2MFP8933WsCGhUbpsdDd/Vt9JvpFlR0aCShv0wIWhvzv8WQ5MUWFQvKTmXDv
tdnRqXTvAgMBAAECggEARP648zKnEYZEVR0Ycyhpjb3StGjnXyvksucKR7KzLn5j
VzW0rz/gQlmGxovMCNPk1MCgG0cml3Vw33I4mNLQ8fJkL8GsNpUGwIpbvwLtlBcp
wrVLPY+daGRdBknP79GOBAnP8dWMcWDYvzzM/cNZPm/QA+cbZW9WdpWFoHkI5xdw
LIuI4q7jsjbRHEK5Mc055EDC5hwkmZrjVi9hsqk2De5AYaXhX1kqPopOuKvxJjff
H0QGvE285HFi0qdDYcEzpFEgzBUMjU144bqyl+s7VLhuJ302VVsUJZbNq0m1h9xN
/KSqK6Q3d3ZgsP9fWpq/H9N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