tttls1.3 0.3.6 → 0.3.8

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile +1 -1
  4. data/lib/tttls1.3/version.rb +1 -1
  5. data/lib/tttls1.3.rb +1 -0
  6. data/tttls1.3.gemspec +6 -3
  7. metadata +11 -115
  8. data/.github/workflows/ci.yml +0 -39
  9. data/.gitignore +0 -17
  10. data/spec/aead_spec.rb +0 -95
  11. data/spec/alert_spec.rb +0 -54
  12. data/spec/alpn_spec.rb +0 -55
  13. data/spec/application_data_spec.rb +0 -26
  14. data/spec/certificate_spec.rb +0 -82
  15. data/spec/certificate_verify_spec.rb +0 -51
  16. data/spec/change_cipher_spec_spec.rb +0 -26
  17. data/spec/cipher_suites_spec.rb +0 -39
  18. data/spec/client_hello_spec.rb +0 -105
  19. data/spec/client_spec.rb +0 -274
  20. data/spec/compress_certificate_spec.rb +0 -54
  21. data/spec/cookie_spec.rb +0 -98
  22. data/spec/early_data_indication_spec.rb +0 -64
  23. data/spec/ech_outer_extensions_spec.rb +0 -42
  24. data/spec/ech_spec.rb +0 -122
  25. data/spec/encrypted_extensions_spec.rb +0 -94
  26. data/spec/end_of_early_data_spec.rb +0 -28
  27. data/spec/endpoint_spec.rb +0 -167
  28. data/spec/error_spec.rb +0 -18
  29. data/spec/extensions_spec.rb +0 -250
  30. data/spec/finished_spec.rb +0 -55
  31. data/spec/fixtures/rsa_ca.crt +0 -18
  32. data/spec/fixtures/rsa_ca.key +0 -27
  33. data/spec/fixtures/rsa_rsa.crt +0 -18
  34. data/spec/fixtures/rsa_rsa.key +0 -27
  35. data/spec/fixtures/rsa_rsa_ocsp.crt +0 -18
  36. data/spec/fixtures/rsa_rsa_ocsp.key +0 -27
  37. data/spec/fixtures/rsa_rsassaPss.crt +0 -20
  38. data/spec/fixtures/rsa_rsassaPss.key +0 -27
  39. data/spec/fixtures/rsa_secp256r1.crt +0 -14
  40. data/spec/fixtures/rsa_secp256r1.key +0 -5
  41. data/spec/fixtures/rsa_secp384r1.crt +0 -14
  42. data/spec/fixtures/rsa_secp384r1.key +0 -6
  43. data/spec/fixtures/rsa_secp521r1.crt +0 -15
  44. data/spec/fixtures/rsa_secp521r1.key +0 -7
  45. data/spec/key_schedule_spec.rb +0 -221
  46. data/spec/key_share_spec.rb +0 -199
  47. data/spec/new_session_ticket_spec.rb +0 -80
  48. data/spec/pre_shared_key_spec.rb +0 -167
  49. data/spec/psk_key_exchange_modes_spec.rb +0 -45
  50. data/spec/record_size_limit_spec.rb +0 -61
  51. data/spec/record_spec.rb +0 -105
  52. data/spec/server_hello_spec.rb +0 -200
  53. data/spec/server_name_spec.rb +0 -110
  54. data/spec/server_spec.rb +0 -232
  55. data/spec/signature_algorithms_cert_spec.rb +0 -77
  56. data/spec/signature_algorithms_spec.rb +0 -104
  57. data/spec/spec_helper.rb +0 -990
  58. data/spec/status_request_spec.rb +0 -140
  59. data/spec/supported_groups_spec.rb +0 -79
  60. data/spec/supported_versions_spec.rb +0 -136
  61. data/spec/transcript_spec.rb +0 -83
  62. data/spec/unknown_extension_spec.rb +0 -90
  63. data/spec/utils_spec.rb +0 -235
@@ -1,104 +0,0 @@
1
- # encoding: ascii-8bit
2
- # frozen_string_literal: true
3
-
4
- require_relative 'spec_helper'
5
- using Refinements
6
-
7
- RSpec.describe SignatureAlgorithms do
8
- context 'valid signature_algorithms' do
9
- let(:supported_signature_algorithms) do
10
- [
11
- SignatureScheme::ECDSA_SECP256R1_SHA256,
12
- SignatureScheme::RSA_PSS_RSAE_SHA256,
13
- SignatureScheme::RSA_PKCS1_SHA256,
14
- SignatureScheme::ECDSA_SECP384R1_SHA384,
15
- SignatureScheme::RSA_PSS_RSAE_SHA384,
16
- SignatureScheme::RSA_PKCS1_SHA384,
17
- SignatureScheme::RSA_PSS_RSAE_SHA512,
18
- SignatureScheme::RSA_PKCS1_SHA512
19
- ]
20
- end
21
-
22
- let(:extension) do
23
- SignatureAlgorithms.new(supported_signature_algorithms)
24
- end
25
-
26
- it 'should be generated' do
27
- expect(extension).to be_a(SignatureAlgorithms)
28
-
29
- expect(extension.extension_type).to eq ExtensionType::SIGNATURE_ALGORITHMS
30
- expect(extension.supported_signature_algorithms)
31
- .to eq supported_signature_algorithms
32
- end
33
-
34
- it 'should be serialized' do
35
- expect(extension.serialize).to eq ExtensionType::SIGNATURE_ALGORITHMS \
36
- + 18.to_uint16 \
37
- + 16.to_uint16 \
38
- + supported_signature_algorithms.join
39
- end
40
- end
41
-
42
- context 'invalid signature_algorithms, empty,' do
43
- let(:extension) do
44
- SignatureAlgorithms.new([])
45
- end
46
-
47
- it 'should not be generated' do
48
- expect { extension }.to raise_error(ErrorAlerts)
49
- end
50
- end
51
-
52
- context 'invalid signature_algorithms, too long,' do
53
- let(:extension) do
54
- SignatureAlgorithms.new((0..2**15 - 2).to_a.map(&:to_uint16))
55
- end
56
-
57
- it 'should not be generated' do
58
- expect { extension }.to raise_error(ErrorAlerts)
59
- end
60
- end
61
-
62
- context 'valid signature_algorithms binary' do
63
- let(:extension) do
64
- SignatureAlgorithms.deserialize(TESTBINARY_SIGNATURE_ALGORITHMS)
65
- end
66
-
67
- let(:supported_signature_algorithms) do
68
- [
69
- SignatureScheme::ECDSA_SECP256R1_SHA256,
70
- SignatureScheme::RSA_PSS_RSAE_SHA256,
71
- SignatureScheme::RSA_PKCS1_SHA256,
72
- SignatureScheme::ECDSA_SECP384R1_SHA384,
73
- SignatureScheme::RSA_PSS_RSAE_SHA384,
74
- SignatureScheme::RSA_PKCS1_SHA384,
75
- SignatureScheme::RSA_PSS_RSAE_SHA512,
76
- SignatureScheme::RSA_PKCS1_SHA512
77
- ]
78
- end
79
-
80
- it 'should generate valid object' do
81
- expect(extension).to be_a(SignatureAlgorithms)
82
-
83
- expect(extension.extension_type).to eq ExtensionType::SIGNATURE_ALGORITHMS
84
- expect(extension.supported_signature_algorithms)
85
- .to eq supported_signature_algorithms
86
- end
87
-
88
- it 'should generate serializable object' do
89
- expect(extension.serialize)
90
- .to eq ExtensionType::SIGNATURE_ALGORITHMS \
91
- + TESTBINARY_SIGNATURE_ALGORITHMS.prefix_uint16_length
92
- end
93
- end
94
-
95
- context 'invalid signature_algorithms binary, malformed binary,' do
96
- let(:extension) do
97
- SignatureAlgorithms.deserialize(TESTBINARY_SIGNATURE_ALGORITHMS[0...-1])
98
- end
99
-
100
- it 'should return nil' do
101
- expect(extension).to be nil
102
- end
103
- end
104
- end