tttls1.3 0.2.16 → 0.2.17
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/.github/workflows/ci.yml +2 -2
- data/.rubocop.yml +5 -1
- data/README.md +1 -1
- data/lib/tttls1.3/message/end_of_early_data.rb +8 -1
- data/lib/tttls1.3/version.rb +1 -1
- data/spec/end_of_early_data_spec.rb +28 -0
- data/tttls1.3.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2b9bfcfb3b52aaf74864e31adc9f132ab9ce94f4610bcaaefd8c7a5048666e5
|
4
|
+
data.tar.gz: 77ccec36eaeec3d0d569a8428209b14749d0d2d80ce33348ed1cdb6f5cbd6ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29ffa56dd58069ec5096bc0a19d81d79ee71a34f57d2381f91a1039d33b9ec0ca5cd965904a586d2f342957c3a05e92167e2c249fc2aad0ea4bfe2cebf9dc30f
|
7
|
+
data.tar.gz: a1cd0087f0d9ab6a2c7adf5245f9acca5756da7cd3084d1e2b79a601c6606b00680291be5fe7fcf442bdb9d90cdb22dc26a241bcf26ac754ff0476e889c3f092
|
data/.github/workflows/ci.yml
CHANGED
@@ -3,7 +3,7 @@ name: CI
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
-
|
6
|
+
- main
|
7
7
|
pull_request:
|
8
8
|
branches:
|
9
9
|
- '*'
|
@@ -13,7 +13,7 @@ jobs:
|
|
13
13
|
runs-on: ubuntu-latest
|
14
14
|
strategy:
|
15
15
|
matrix:
|
16
|
-
ruby-version: ['2.
|
16
|
+
ruby-version: ['2.7.x', '3.0.x', '3.1.x']
|
17
17
|
steps:
|
18
18
|
- uses: docker://thekuwayama/openssl:latest
|
19
19
|
- name: Set up Ruby
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.7
|
3
3
|
|
4
4
|
Style/ConditionalAssignment:
|
5
5
|
Enabled: false
|
@@ -28,3 +28,7 @@ Metrics/BlockLength:
|
|
28
28
|
Layout/LineLength:
|
29
29
|
Exclude:
|
30
30
|
- 'tttls1.3.gemspec'
|
31
|
+
|
32
|
+
# https://github.com/rubocop/rubocop/issues/10258
|
33
|
+
Layout/BlockAlignment:
|
34
|
+
Enabled: false
|
data/README.md
CHANGED
@@ -74,7 +74,7 @@ server.write(YOUR_MESSAGE)
|
|
74
74
|
server.close
|
75
75
|
```
|
76
76
|
|
77
|
-
[Here](https://github.com/thekuwayama/tttls1.3/tree/
|
77
|
+
[Here](https://github.com/thekuwayama/tttls1.3/tree/main/example) are some examples of HTTPS.
|
78
78
|
|
79
79
|
|
80
80
|
## Settings
|
@@ -2,11 +2,18 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module TTTLS13
|
5
|
+
using Refinements
|
5
6
|
module Message
|
6
7
|
class EndOfEarlyData
|
8
|
+
attr_reader :msg_type
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@msg_type = HandshakeType::END_OF_EARLY_DATA
|
12
|
+
end
|
13
|
+
|
7
14
|
# @return [String]
|
8
15
|
def serialize
|
9
|
-
''
|
16
|
+
@msg_type + ''.prefix_uint24_length
|
10
17
|
end
|
11
18
|
|
12
19
|
# @param binary [String]
|
data/lib/tttls1.3/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require_relative 'spec_helper'
|
5
|
+
using Refinements
|
6
|
+
|
7
|
+
RSpec.describe EndOfEarlyData do
|
8
|
+
context 'end_of_early_data' do
|
9
|
+
let(:message) do
|
10
|
+
EndOfEarlyData.new
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should be serialized' do
|
14
|
+
expect(message.serialize).to eq HandshakeType::END_OF_EARLY_DATA \
|
15
|
+
+ ''.prefix_uint24_length
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'valid end_of_early_data binary' do
|
20
|
+
let(:message) do
|
21
|
+
EndOfEarlyData.deserialize(TESTBINARY_0_RTT_END_OF_EARLY_DATA)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should generate valid serializable object' do
|
25
|
+
expect(message.serialize).to eq TESTBINARY_0_RTT_END_OF_EARLY_DATA
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/tttls1.3.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = spec.summary
|
14
14
|
spec.homepage = 'https://github.com/thekuwayama/tttls1.3'
|
15
15
|
spec.license = 'MIT'
|
16
|
-
spec.required_ruby_version = '>=2.
|
16
|
+
spec.required_ruby_version = '>=2.7'
|
17
17
|
|
18
18
|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tttls1.3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thekuwayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- spec/cookie_spec.rb
|
142
142
|
- spec/early_data_indication_spec.rb
|
143
143
|
- spec/encrypted_extensions_spec.rb
|
144
|
+
- spec/end_of_early_data_spec.rb
|
144
145
|
- spec/error_spec.rb
|
145
146
|
- spec/extensions_spec.rb
|
146
147
|
- spec/finished_spec.rb
|
@@ -190,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
191
|
requirements:
|
191
192
|
- - ">="
|
192
193
|
- !ruby/object:Gem::Version
|
193
|
-
version: 2.
|
194
|
+
version: '2.7'
|
194
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
196
|
requirements:
|
196
197
|
- - ">="
|
@@ -217,6 +218,7 @@ test_files:
|
|
217
218
|
- spec/cookie_spec.rb
|
218
219
|
- spec/early_data_indication_spec.rb
|
219
220
|
- spec/encrypted_extensions_spec.rb
|
221
|
+
- spec/end_of_early_data_spec.rb
|
220
222
|
- spec/error_spec.rb
|
221
223
|
- spec/extensions_spec.rb
|
222
224
|
- spec/finished_spec.rb
|