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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9da986ad5207e26d816ebe08d7f8620981836c13d0dd9d695447269276a13453
4
- data.tar.gz: ad7effc41c7349b011fc386ec4195d1d2dd86d51af68317d4034ad9538a9d31f
3
+ metadata.gz: bce9c266ff5ece6660c7adab52de934378be099778a00520e5f758acf3052aae
4
+ data.tar.gz: 5675044be1620e08f228fbb3b8067ababb0764522b462456d7c3534cf974c2a0
5
5
  SHA512:
6
- metadata.gz: 53a725b8f4e8404f579b4b87b7d434c6146fa054f80a67147a2df2477102ecd3f7ca32db9b8827a5f00bfd1c51c0c70ec2c1575747c8a53716f682111a6d1c23
7
- data.tar.gz: a0c8940990d04ff038e1ecdc4f1505a8b27f4ca87232daf08daecc9263f0a34c0cb8f14fee896d254a729102cc01d1cb7bb127f754c3ad9119b6bfb39c1487e7
6
+ metadata.gz: 91cb45ce9eb4672aa3c8352f21969d1cc442cce7cf4ef924e9fd9c038a9b1e29e43880428a7b6539c16eb4a6eda4527ac1b3052b85e69466f710a24e0df1517b
7
+ data.tar.gz: 5fed5c9dc669ad9ea2766097e1f473cbb8bc834d0f8ce5be81cd81428f6b914d5b25b55b10744e77824f03b96c5fc4b0d0dd734148dcdb8fe03b732fa95c97bc
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 4.0.1
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
- You can run it the following:
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. By using the `-f, --file FILE` option, you can specify an ECHConfig pem file. If you need to test the server on localhost, you can run it the following:
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` uses the following HPKE cipher suite
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
- Using the `-n` or `--not-force-compliant-hpke`, you can not enforce the HPKE cipher suite.
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
- If you specify the SECTIONS, you can run only SECTIONS the following:
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 = 'Usage: echspec gen_configs {FILE}'
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)
@@ -63,7 +63,18 @@ module EchSpec
63
63
  sections = v.split(',')
64
64
  end
65
65
 
66
- op.banner = 'Usage: echspec run [OPTIONS...] {HOSTNAME}'
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)
@@ -1,3 +1,3 @@
1
1
  module EchSpec
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
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
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.7
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: []