echspec 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/README.md +30 -6
- data/lib/echspec/cli/gen_configs.rb +9 -1
- data/lib/echspec/cli/run.rb +12 -1
- data/lib/echspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bce9c266ff5ece6660c7adab52de934378be099778a00520e5f758acf3052aae
|
|
4
|
+
data.tar.gz: 5675044be1620e08f228fbb3b8067ababb0764522b462456d7c3534cf974c2a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91cb45ce9eb4672aa3c8352f21969d1cc442cce7cf4ef924e9fd9c038a9b1e29e43880428a7b6539c16eb4a6eda4527ac1b3052b85e69466f710a24e0df1517b
|
|
7
|
+
data.tar.gz: 5fed5c9dc669ad9ea2766097e1f473cbb8bc834d0f8ce5be81cd81428f6b914d5b25b55b10744e77824f03b96c5fc4b0d0dd734148dcdb8fe03b732fa95c97bc
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.2
|
data/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
-
The gem is available at [rubygems.org](https://rubygems.org/gems/echspec). You can install it the following:
|
|
16
|
+
The gem is available at [rubygems.org](https://rubygems.org/gems/echspec). You can install it with the following:
|
|
17
17
|
|
|
18
18
|
```sh-session
|
|
19
19
|
$ gem install echspec
|
|
@@ -31,6 +31,15 @@ Available subcommands: run, gen_configs, version, help.
|
|
|
31
31
|
```sh-session
|
|
32
32
|
$ echspec run --help
|
|
33
33
|
Usage: echspec run [OPTIONS...] {HOSTNAME}
|
|
34
|
+
|
|
35
|
+
Run ECH conformance tests for a server.
|
|
36
|
+
|
|
37
|
+
Examples:
|
|
38
|
+
|
|
39
|
+
$ echspec run localhost
|
|
40
|
+
$ echspec run -f echconfigs.pem -p 4433 localhost
|
|
41
|
+
|
|
42
|
+
Options:
|
|
34
43
|
-f, --file FILE path to ECHConfigs PEM file (default resolve ECHConfigs via DNS)
|
|
35
44
|
-p, --port VALUE server port number (default 443)
|
|
36
45
|
-n, --not-force-compliant-hpke not force compliant ECHConfig HPKE cipher suite
|
|
@@ -38,7 +47,7 @@ Usage: echspec run [OPTIONS...] {HOSTNAME}
|
|
|
38
47
|
-s, --sections SECTIONS sections to test; by the default, test all sections
|
|
39
48
|
```
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
Example output:
|
|
42
51
|
|
|
43
52
|
```sh-session
|
|
44
53
|
$ echspec run research.cloudflare.com
|
|
@@ -66,13 +75,13 @@ Failures:
|
|
|
66
75
|
1 failure
|
|
67
76
|
```
|
|
68
77
|
|
|
69
|
-
By default, `echspec` retrieves ECHConfigs via HTTPS records.
|
|
78
|
+
By default, `echspec` retrieves ECHConfigs via DNS HTTPS records. You can specify a local PEM file using the `-f, --file FILE` option. To test a server on localhost:
|
|
70
79
|
|
|
71
80
|
```sh-session
|
|
72
81
|
$ echspec run -f fixtures/echconfigs.pem -p 4433 localhost
|
|
73
82
|
```
|
|
74
83
|
|
|
75
|
-
By default, `echspec`
|
|
84
|
+
By default, `echspec` enforces the following mandatory HPKE cipher suite:
|
|
76
85
|
|
|
77
86
|
- KEM
|
|
78
87
|
- DHKEM(X25519, HKDF-SHA256)
|
|
@@ -81,13 +90,13 @@ By default, `echspec` uses the following HPKE cipher suite
|
|
|
81
90
|
- AEAD
|
|
82
91
|
- AES-128-GCM
|
|
83
92
|
|
|
84
|
-
|
|
93
|
+
Use the `-n` or `--not-force-compliant-hpke` option to disable this enforcement and use the cipher suite provided in the ECHConfig.
|
|
85
94
|
|
|
86
95
|
```sh-session
|
|
87
96
|
$ echspec run -f fixtures/echconfigs.pem -p 4433 -n localhost
|
|
88
97
|
```
|
|
89
98
|
|
|
90
|
-
|
|
99
|
+
To run only specific test SECTIONS, use the `-s` option:
|
|
91
100
|
|
|
92
101
|
```sh-session
|
|
93
102
|
$ echspec run -f fixtures/echconfigs.pem -p 4433 -n -s 7.1.1-2,7.1.1-5 localhost
|
|
@@ -273,6 +282,21 @@ $ echspec run -s 7-5 -v research.cloudflare.com 2>&1 > /dev/null | jq .
|
|
|
273
282
|
|
|
274
283
|
</details>
|
|
275
284
|
|
|
285
|
+
You can generate an ECHConfig PEM file the following:
|
|
286
|
+
|
|
287
|
+
```sh-session
|
|
288
|
+
$ echspec gen_configs echconfigs.pem
|
|
289
|
+
```
|
|
290
|
+
```
|
|
291
|
+
-----BEGIN PRIVATE KEY-----
|
|
292
|
+
MC4CAQAwBQYDK2VuBCIEICjd4yGRdsoP9gU7YT7My8DHx1Tjme8GYDXrOMCi8v1V
|
|
293
|
+
-----END PRIVATE KEY-----
|
|
294
|
+
-----BEGIN ECHCONFIG-----
|
|
295
|
+
AD7+DQA65wAgACA8wVN2BtscOl3vQheUzHeIkVmKIiydUhDCliA4iyQRCwAEAAEA
|
|
296
|
+
AQALZXhhbXBsZS5jb20AAA==
|
|
297
|
+
-----END ECHCONFIG-----
|
|
298
|
+
```
|
|
299
|
+
|
|
276
300
|
|
|
277
301
|
## Note
|
|
278
302
|
|
|
@@ -9,7 +9,15 @@ module EchSpec
|
|
|
9
9
|
def parse_options(argv)
|
|
10
10
|
op = OptionParser.new
|
|
11
11
|
|
|
12
|
-
op.banner =
|
|
12
|
+
op.banner = <<~USAGE
|
|
13
|
+
Usage: echspec gen_configs {FILE}
|
|
14
|
+
|
|
15
|
+
Generate an ECHConfig PEM file.
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
|
|
19
|
+
$ echspec gen_configs echconfigs.pem
|
|
20
|
+
USAGE
|
|
13
21
|
|
|
14
22
|
begin
|
|
15
23
|
args = op.parse(argv)
|
data/lib/echspec/cli/run.rb
CHANGED
|
@@ -63,7 +63,18 @@ module EchSpec
|
|
|
63
63
|
sections = v.split(',')
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
op.banner =
|
|
66
|
+
op.banner = <<~USAGE
|
|
67
|
+
Usage: echspec run [OPTIONS...] {HOSTNAME}
|
|
68
|
+
|
|
69
|
+
Run ECH conformance tests for a server.
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
72
|
+
|
|
73
|
+
$ echspec run localhost
|
|
74
|
+
$ echspec run -f echconfigs.pem -p 4433 localhost
|
|
75
|
+
|
|
76
|
+
Options:
|
|
77
|
+
USAGE
|
|
67
78
|
|
|
68
79
|
begin
|
|
69
80
|
args = op.parse(argv)
|
data/lib/echspec/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: echspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thekuwayama
|
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
139
|
version: '0'
|
|
140
140
|
requirements: []
|
|
141
|
-
rubygems_version: 4.0.
|
|
141
|
+
rubygems_version: 4.0.8
|
|
142
142
|
specification_version: 4
|
|
143
143
|
summary: A conformance testing tool for ECH implementation
|
|
144
144
|
test_files: []
|