Class: TTTLS13::SslKeyLogFile::Writer
- Inherits:
-
Object
- Object
- TTTLS13::SslKeyLogFile::Writer
- Defined in:
- lib/tttls1.3/sslkeylogfile.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(path) ⇒ Writer
constructor
A new instance of Writer.
- #write_client_early_traffic_secret(client_random, secret) ⇒ Object
- #write_client_handshake_traffic_secret(client_random, secret) ⇒ Object
- #write_client_traffic_secret_0(client_random, secret) ⇒ Object
- #write_ech_config(client_random, ech_config) ⇒ Object
- #write_ech_secret(client_random, ech_secret) ⇒ Object
- #write_server_handshake_traffic_secret(client_random, secret) ⇒ Object
- #write_server_traffic_secret_0(client_random, secret) ⇒ Object
Constructor Details
#initialize(path) ⇒ Writer
Returns a new instance of Writer.
20 21 22 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 20 def initialize(path) @file = File.new(path, 'a+') end |
Instance Method Details
#close ⇒ Object
94 95 96 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 94 def close @file&.close end |
#write_client_early_traffic_secret(client_random, secret) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 26 def write_client_early_traffic_secret(client_random, secret) write_key_log( Label::CLIENT_EARLY_TRAFFIC_SECRET, client_random, secret ) end |
#write_client_handshake_traffic_secret(client_random, secret) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 36 def write_client_handshake_traffic_secret(client_random, secret) write_key_log( Label::CLIENT_HANDSHAKE_TRAFFIC_SECRET, client_random, secret ) end |
#write_client_traffic_secret_0(client_random, secret) ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 56 def write_client_traffic_secret_0(client_random, secret) write_key_log( Label::CLIENT_TRAFFIC_SECRET_0, client_random, secret ) end |
#write_ech_config(client_random, ech_config) ⇒ Object
86 87 88 89 90 91 92 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 86 def write_ech_config(client_random, ech_config) write_key_log( Label::ECH_CONFIG, client_random, ech_config ) end |
#write_ech_secret(client_random, ech_secret) ⇒ Object
76 77 78 79 80 81 82 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 76 def write_ech_secret(client_random, ech_secret) write_key_log( Label::ECH_SECRET, client_random, ech_secret ) end |
#write_server_handshake_traffic_secret(client_random, secret) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 46 def write_server_handshake_traffic_secret(client_random, secret) write_key_log( Label::SERVER_HANDSHAKE_TRAFFIC_SECRET, client_random, secret ) end |
#write_server_traffic_secret_0(client_random, secret) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/tttls1.3/sslkeylogfile.rb', line 66 def write_server_traffic_secret_0(client_random, secret) write_key_log( Label::SERVER_TRAFFIC_SECRET_0, client_random, secret ) end |