sofia 0.1.0

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 (99) hide show
  1. checksums.yaml +7 -0
  2. data/.byebug_history +6 -0
  3. data/.rubocop.yml +179 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +5 -0
  6. data/CODE_OF_CONDUCT.md +132 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +21 -0
  9. data/Rakefile +16 -0
  10. data/lib/sofia/adapter/net_http.rb +67 -0
  11. data/lib/sofia/adapter.rb +20 -0
  12. data/lib/sofia/client.rb +55 -0
  13. data/lib/sofia/error/argument_error.rb +8 -0
  14. data/lib/sofia/error/connection_failed.rb +8 -0
  15. data/lib/sofia/error/invalid_json.rb +8 -0
  16. data/lib/sofia/error/ssl_error.rb +8 -0
  17. data/lib/sofia/error/timeout_error.rb +8 -0
  18. data/lib/sofia/error.rb +14 -0
  19. data/lib/sofia/helper.rb +9 -0
  20. data/lib/sofia/request.rb +56 -0
  21. data/lib/sofia/response.rb +57 -0
  22. data/lib/sofia/sorbet_types.rb +19 -0
  23. data/lib/sofia/types/adapter.rb +39 -0
  24. data/lib/sofia/types/base_url.rb +33 -0
  25. data/lib/sofia/types/body.rb +60 -0
  26. data/lib/sofia/types/headers.rb +56 -0
  27. data/lib/sofia/types/params.rb +56 -0
  28. data/lib/sofia/types/path.rb +28 -0
  29. data/lib/sofia/types.rb +13 -0
  30. data/lib/sofia/version.rb +5 -0
  31. data/lib/sofia.rb +25 -0
  32. data/sig/sofia.rbs +4 -0
  33. data/sorbet/config +6 -0
  34. data/sorbet/rbi/annotations/.gitattributes +1 -0
  35. data/sorbet/rbi/annotations/activesupport.rbi +495 -0
  36. data/sorbet/rbi/annotations/minitest.rbi +120 -0
  37. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  38. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  39. data/sorbet/rbi/dsl/.gitattributes +1 -0
  40. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  41. data/sorbet/rbi/gems/.gitattributes +1 -0
  42. data/sorbet/rbi/gems/activesupport@8.1.2.rbi +20360 -0
  43. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  44. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  45. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  46. data/sorbet/rbi/gems/bigdecimal@4.0.1.rbi +239 -0
  47. data/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi +11674 -0
  48. data/sorbet/rbi/gems/connection_pool@3.0.2.rbi +9 -0
  49. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  50. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  51. data/sorbet/rbi/gems/erb@5.0.2.rbi +878 -0
  52. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  53. data/sorbet/rbi/gems/factory_bot@6.5.6.rbi +2748 -0
  54. data/sorbet/rbi/gems/i18n@1.14.8.rbi +2359 -0
  55. data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
  56. data/sorbet/rbi/gems/json@2.12.2.rbi +2051 -0
  57. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  58. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +86 -0
  59. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  60. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1547 -0
  61. data/sorbet/rbi/gems/mocha@3.0.1.rbi +28 -0
  62. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  63. data/sorbet/rbi/gems/openssl@4.0.0.rbi +1908 -0
  64. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  65. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +5535 -0
  66. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  67. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  68. data/sorbet/rbi/gems/prism@1.5.1.rbi +42049 -0
  69. data/sorbet/rbi/gems/psych@5.2.6.rbi +2469 -0
  70. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  71. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  72. data/sorbet/rbi/gems/rake@13.2.1.rbi +3033 -0
  73. data/sorbet/rbi/gems/rbi@0.3.3.rbi +6742 -0
  74. data/sorbet/rbi/gems/rbs@3.9.5.rbi +6978 -0
  75. data/sorbet/rbi/gems/rdoc@6.14.2.rbi +12688 -0
  76. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3795 -0
  77. data/sorbet/rbi/gems/reline@0.6.2.rbi +2441 -0
  78. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5240 -0
  79. data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +7721 -0
  80. data/sorbet/rbi/gems/rubocop@1.76.1.rbi +62517 -0
  81. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  82. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  83. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  84. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  85. data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
  86. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  87. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  88. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  89. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  90. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  91. data/sorbet/rbi/gems/uri@1.1.1.rbi +2405 -0
  92. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  93. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  94. data/sorbet/rbi/shims/byebug.rbi +6 -0
  95. data/sorbet/rbi/shims/client.rbi +22 -0
  96. data/sorbet/rbi/todo.rbi +7 -0
  97. data/sorbet/tapioca/config.yml +13 -0
  98. data/sorbet/tapioca/require.rb +4 -0
  99. metadata +137 -0
@@ -0,0 +1,1908 @@
1
+ # typed: false
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `openssl` gem.
5
+ # Please instead update this file by running `bin/tapioca gem openssl`.
6
+
7
+
8
+ # --
9
+ # Add double dispatch to Integer
10
+ # ++
11
+ #
12
+ # source://openssl//lib/openssl/bn.rb#33
13
+ class Integer < ::Numeric
14
+ # Casts an Integer as an OpenSSL::BN
15
+ #
16
+ # See `man bn` for more info.
17
+ #
18
+ # source://openssl//lib/openssl/bn.rb#37
19
+ def to_bn; end
20
+ end
21
+
22
+ Integer::GMP_VERSION = T.let(T.unsafe(nil), String)
23
+
24
+ # source://openssl//lib/openssl/bn.rb#16
25
+ module OpenSSL
26
+ private
27
+
28
+ # Returns a Digest subclass by _name_
29
+ #
30
+ # require 'openssl'
31
+ #
32
+ # OpenSSL::Digest("MD5")
33
+ # # => OpenSSL::Digest::MD5
34
+ #
35
+ # OpenSSL::Digest("Foo")
36
+ # # => NameError: wrong constant name Foo
37
+ #
38
+ # source://openssl//lib/openssl/digest.rb#63
39
+ def Digest(name); end
40
+
41
+ class << self
42
+ # Returns a Digest subclass by _name_
43
+ #
44
+ # require 'openssl'
45
+ #
46
+ # OpenSSL::Digest("MD5")
47
+ # # => OpenSSL::Digest::MD5
48
+ #
49
+ # OpenSSL::Digest("Foo")
50
+ # # => NameError: wrong constant name Foo
51
+ #
52
+ # source://openssl//lib/openssl/digest.rb#63
53
+ def Digest(name); end
54
+
55
+ # :call-seq:
56
+ # OpenSSL.secure_compare(string, string) -> true or false
57
+ #
58
+ # Constant time memory comparison. Inputs are hashed using SHA-256 to mask
59
+ # the length of the secret. Returns +true+ if the strings are identical,
60
+ # +false+ otherwise.
61
+ #
62
+ # This method is expensive due to the SHA-256 hashing. In most cases, where
63
+ # the input lengths are known to be equal or are not sensitive,
64
+ # OpenSSL.fixed_length_secure_compare should be used instead.
65
+ #
66
+ # source://openssl//lib/openssl.rb#36
67
+ def secure_compare(a, b); end
68
+ end
69
+ end
70
+
71
+ class OpenSSL::ASN1::Constructive < ::OpenSSL::ASN1::ASN1Data
72
+ include ::Enumerable
73
+ end
74
+
75
+ # source://openssl//lib/openssl/bn.rb#17
76
+ class OpenSSL::BN
77
+ include ::Comparable
78
+
79
+ # source://openssl//lib/openssl/bn.rb#20
80
+ def pretty_print(q); end
81
+ end
82
+
83
+ OpenSSL::BN::CONSTTIME = T.let(T.unsafe(nil), Integer)
84
+
85
+ # OpenSSL IO buffering mix-in module.
86
+ #
87
+ # This module allows an OpenSSL::SSL::SSLSocket to behave like an IO.
88
+ #
89
+ # You typically won't use this module directly, you can see it implemented in
90
+ # OpenSSL::SSL::SSLSocket.
91
+ #
92
+ # source://openssl//lib/openssl/buffering.rb#22
93
+ module OpenSSL::Buffering
94
+ include ::ActiveSupport::ToJsonWithActiveSupportEncoder
95
+ include ::Enumerable
96
+
97
+ # Creates an instance of OpenSSL's buffering IO module.
98
+ #
99
+ # source://openssl//lib/openssl/buffering.rb#59
100
+ def initialize(*_arg0); end
101
+
102
+ # Writes _s_ to the stream. _s_ will be converted to a String using
103
+ # +.to_s+ method.
104
+ #
105
+ # source://openssl//lib/openssl/buffering.rb#440
106
+ def <<(s); end
107
+
108
+ # Closes the SSLSocket and flushes any unwritten data.
109
+ #
110
+ # source://openssl//lib/openssl/buffering.rb#501
111
+ def close; end
112
+
113
+ # Executes the block for every line in the stream where lines are separated
114
+ # by _eol_.
115
+ #
116
+ # See also #gets
117
+ #
118
+ # source://openssl//lib/openssl/buffering.rb#262
119
+ def each(eol = T.unsafe(nil)); end
120
+
121
+ # Calls the given block once for each byte in the stream.
122
+ #
123
+ # source://openssl//lib/openssl/buffering.rb#303
124
+ def each_byte; end
125
+
126
+ # Executes the block for every line in the stream where lines are separated
127
+ # by _eol_.
128
+ #
129
+ # See also #gets
130
+ #
131
+ # source://openssl//lib/openssl/buffering.rb#262
132
+ def each_line(eol = T.unsafe(nil)); end
133
+
134
+ # Returns true if the stream is at file which means there is no more data to
135
+ # be read.
136
+ #
137
+ # @return [Boolean]
138
+ #
139
+ # source://openssl//lib/openssl/buffering.rb#334
140
+ def eof; end
141
+
142
+ # Returns true if the stream is at file which means there is no more data to
143
+ # be read.
144
+ #
145
+ # @return [Boolean]
146
+ #
147
+ # source://openssl//lib/openssl/buffering.rb#334
148
+ def eof?; end
149
+
150
+ # Flushes buffered data to the SSLSocket.
151
+ #
152
+ # source://openssl//lib/openssl/buffering.rb#489
153
+ def flush; end
154
+
155
+ # call-seq:
156
+ # ssl.getbyte => 81
157
+ #
158
+ # Get the next 8bit byte from `ssl`. Returns `nil` on EOF
159
+ #
160
+ # source://openssl//lib/openssl/buffering.rb#102
161
+ def getbyte; end
162
+
163
+ # Reads one character from the stream. Returns nil if called at end of
164
+ # file.
165
+ #
166
+ # source://openssl//lib/openssl/buffering.rb#296
167
+ def getc; end
168
+
169
+ # Reads the next "line" from the stream. Lines are separated by _eol_. If
170
+ # _limit_ is provided the result will not be longer than the given number of
171
+ # bytes.
172
+ #
173
+ # _eol_ may be a String or Regexp.
174
+ #
175
+ # Unlike IO#gets the line read will not be assigned to +$_+.
176
+ #
177
+ # Unlike IO#gets the separator must be provided if a limit is provided.
178
+ #
179
+ # source://openssl//lib/openssl/buffering.rb#234
180
+ def gets(eol = T.unsafe(nil), limit = T.unsafe(nil), chomp: T.unsafe(nil)); end
181
+
182
+ # Writes _args_ to the stream.
183
+ #
184
+ # See IO#print for full details.
185
+ #
186
+ # source://openssl//lib/openssl/buffering.rb#468
187
+ def print(*args); end
188
+
189
+ # Formats and writes to the stream converting parameters under control of
190
+ # the format string.
191
+ #
192
+ # See Kernel#sprintf for format string details.
193
+ #
194
+ # source://openssl//lib/openssl/buffering.rb#481
195
+ def printf(s, *args); end
196
+
197
+ # Writes _args_ to the stream along with a record separator.
198
+ #
199
+ # See IO#puts for full details.
200
+ #
201
+ # source://openssl//lib/openssl/buffering.rb#450
202
+ def puts(*args); end
203
+
204
+ # Reads _size_ bytes from the stream. If _buf_ is provided it must
205
+ # reference a string which will receive the data.
206
+ #
207
+ # See IO#read for full details.
208
+ #
209
+ # source://openssl//lib/openssl/buffering.rb#118
210
+ def read(size = T.unsafe(nil), buf = T.unsafe(nil)); end
211
+
212
+ # Reads at most _maxlen_ bytes in the non-blocking manner.
213
+ #
214
+ # When no data can be read without blocking it raises
215
+ # OpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable.
216
+ #
217
+ # IO::WaitReadable means SSL needs to read internally so read_nonblock
218
+ # should be called again when the underlying IO is readable.
219
+ #
220
+ # IO::WaitWritable means SSL needs to write internally so read_nonblock
221
+ # should be called again after the underlying IO is writable.
222
+ #
223
+ # OpenSSL::Buffering#read_nonblock needs two rescue clause as follows:
224
+ #
225
+ # # emulates blocking read (readpartial).
226
+ # begin
227
+ # result = ssl.read_nonblock(maxlen)
228
+ # rescue IO::WaitReadable
229
+ # IO.select([io])
230
+ # retry
231
+ # rescue IO::WaitWritable
232
+ # IO.select(nil, [io])
233
+ # retry
234
+ # end
235
+ #
236
+ # Note that one reason that read_nonblock writes to the underlying IO is
237
+ # when the peer requests a new TLS/SSL handshake. See openssl the FAQ for
238
+ # more details. http://www.openssl.org/support/faq.html
239
+ #
240
+ # By specifying a keyword argument _exception_ to +false+, you can indicate
241
+ # that read_nonblock should not raise an IO::Wait*able exception, but
242
+ # return the symbol +:wait_writable+ or +:wait_readable+ instead. At EOF,
243
+ # it will return +nil+ instead of raising EOFError.
244
+ #
245
+ # source://openssl//lib/openssl/buffering.rb#203
246
+ def read_nonblock(maxlen, buf = T.unsafe(nil), exception: T.unsafe(nil)); end
247
+
248
+ # Get the next 8bit byte. Raises EOFError on EOF
249
+ #
250
+ # @raise [EOFError]
251
+ #
252
+ # source://openssl//lib/openssl/buffering.rb#107
253
+ def readbyte; end
254
+
255
+ # Reads a one-character string from the stream. Raises an EOFError at end
256
+ # of file.
257
+ #
258
+ # @raise [EOFError]
259
+ #
260
+ # source://openssl//lib/openssl/buffering.rb#313
261
+ def readchar; end
262
+
263
+ # Reads a line from the stream which is separated by _eol_.
264
+ #
265
+ # Raises EOFError if at end of file.
266
+ #
267
+ # @raise [EOFError]
268
+ #
269
+ # source://openssl//lib/openssl/buffering.rb#287
270
+ def readline(eol = T.unsafe(nil)); end
271
+
272
+ # Reads lines from the stream which are separated by _eol_.
273
+ #
274
+ # See also #gets
275
+ #
276
+ # source://openssl//lib/openssl/buffering.rb#274
277
+ def readlines(eol = T.unsafe(nil)); end
278
+
279
+ # Reads at most _maxlen_ bytes from the stream. If _buf_ is provided it
280
+ # must reference a string which will receive the data.
281
+ #
282
+ # See IO#readpartial for full details.
283
+ #
284
+ # source://openssl//lib/openssl/buffering.rb#145
285
+ def readpartial(maxlen, buf = T.unsafe(nil)); end
286
+
287
+ # The "sync mode" of the SSLSocket.
288
+ #
289
+ # See IO#sync for full details.
290
+ #
291
+ # source://openssl//lib/openssl/buffering.rb#49
292
+ def sync; end
293
+
294
+ # The "sync mode" of the SSLSocket.
295
+ #
296
+ # See IO#sync for full details.
297
+ #
298
+ # source://openssl//lib/openssl/buffering.rb#49
299
+ def sync=(_arg0); end
300
+
301
+ # Pushes character _c_ back onto the stream such that a subsequent buffered
302
+ # character read will return it.
303
+ #
304
+ # Unlike IO#getc multiple bytes may be pushed back onto the stream.
305
+ #
306
+ # Has no effect on unbuffered reads (such as #sysread).
307
+ #
308
+ # source://openssl//lib/openssl/buffering.rb#326
309
+ def ungetc(c); end
310
+
311
+ # Writes _s_ to the stream. If the argument is not a String it will be
312
+ # converted using +.to_s+ method. Returns the number of bytes written.
313
+ #
314
+ # source://openssl//lib/openssl/buffering.rb#387
315
+ def write(*s); end
316
+
317
+ # Writes _s_ in the non-blocking manner.
318
+ #
319
+ # If there is buffered data, it is flushed first. This may block.
320
+ #
321
+ # write_nonblock returns number of bytes written to the SSL connection.
322
+ #
323
+ # When no data can be written without blocking it raises
324
+ # OpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable.
325
+ #
326
+ # IO::WaitReadable means SSL needs to read internally so write_nonblock
327
+ # should be called again after the underlying IO is readable.
328
+ #
329
+ # IO::WaitWritable means SSL needs to write internally so write_nonblock
330
+ # should be called again after underlying IO is writable.
331
+ #
332
+ # So OpenSSL::Buffering#write_nonblock needs two rescue clause as follows.
333
+ #
334
+ # # emulates blocking write.
335
+ # begin
336
+ # result = ssl.write_nonblock(str)
337
+ # rescue IO::WaitReadable
338
+ # IO.select([io])
339
+ # retry
340
+ # rescue IO::WaitWritable
341
+ # IO.select(nil, [io])
342
+ # retry
343
+ # end
344
+ #
345
+ # Note that one reason that write_nonblock reads from the underlying IO
346
+ # is when the peer requests a new TLS/SSL handshake. See the openssl FAQ
347
+ # for more details. http://www.openssl.org/support/faq.html
348
+ #
349
+ # By specifying a keyword argument _exception_ to +false+, you can indicate
350
+ # that write_nonblock should not raise an IO::Wait*able exception, but
351
+ # return the symbol +:wait_writable+ or +:wait_readable+ instead.
352
+ #
353
+ # source://openssl//lib/openssl/buffering.rb#431
354
+ def write_nonblock(s, exception: T.unsafe(nil)); end
355
+
356
+ private
357
+
358
+ # Consumes _size_ bytes from the buffer
359
+ #
360
+ # source://openssl//lib/openssl/buffering.rb#87
361
+ def consume_rbuff(size = T.unsafe(nil)); end
362
+
363
+ # Writes _s_ to the buffer. When the buffer is full or #sync is true the
364
+ # buffer is flushed to the underlying socket.
365
+ #
366
+ # source://openssl//lib/openssl/buffering.rb#349
367
+ def do_write(s); end
368
+
369
+ # Fills the buffer from the underlying SSLSocket
370
+ #
371
+ # source://openssl//lib/openssl/buffering.rb#74
372
+ def fill_rbuff; end
373
+ end
374
+
375
+ # A buffer which will retain binary encoding.
376
+ #
377
+ # source://openssl//lib/openssl/buffering.rb#26
378
+ class OpenSSL::Buffering::Buffer < ::String; end
379
+
380
+ # source://openssl//lib/openssl/cipher.rb#16
381
+ class OpenSSL::Cipher
382
+ # call-seq:
383
+ # cipher.random_iv -> iv
384
+ #
385
+ # Generate a random IV with OpenSSL::Random.random_bytes and sets it to the
386
+ # cipher, and returns it.
387
+ #
388
+ # You must call #encrypt or #decrypt before calling this method.
389
+ #
390
+ # source://openssl//lib/openssl/cipher.rb#55
391
+ def random_iv; end
392
+
393
+ # call-seq:
394
+ # cipher.random_key -> key
395
+ #
396
+ # Generate a random key with OpenSSL::Random.random_bytes and sets it to
397
+ # the cipher, and returns it.
398
+ #
399
+ # You must call #encrypt or #decrypt before calling this method.
400
+ #
401
+ # source://openssl//lib/openssl/cipher.rb#43
402
+ def random_key; end
403
+ end
404
+
405
+ # source://openssl//lib/openssl/cipher.rb#18
406
+ class OpenSSL::Cipher::AES < ::OpenSSL::Cipher
407
+ # source://openssl//lib/openssl/cipher.rb#19
408
+ def initialize(*args); end
409
+ end
410
+
411
+ # source://openssl//lib/openssl/cipher.rb#28
412
+ class OpenSSL::Cipher::AES128 < ::OpenSSL::Cipher
413
+ # source://openssl//lib/openssl/cipher.rb#29
414
+ def initialize(mode = T.unsafe(nil)); end
415
+ end
416
+
417
+ # source://openssl//lib/openssl/cipher.rb#28
418
+ class OpenSSL::Cipher::AES192 < ::OpenSSL::Cipher
419
+ # source://openssl//lib/openssl/cipher.rb#29
420
+ def initialize(mode = T.unsafe(nil)); end
421
+ end
422
+
423
+ # source://openssl//lib/openssl/cipher.rb#28
424
+ class OpenSSL::Cipher::AES256 < ::OpenSSL::Cipher
425
+ # source://openssl//lib/openssl/cipher.rb#29
426
+ def initialize(mode = T.unsafe(nil)); end
427
+ end
428
+
429
+ class OpenSSL::Cipher::AuthTagError < ::OpenSSL::Cipher::CipherError; end
430
+
431
+ # source://openssl//lib/openssl/cipher.rb#18
432
+ class OpenSSL::Cipher::BF < ::OpenSSL::Cipher
433
+ # source://openssl//lib/openssl/cipher.rb#19
434
+ def initialize(*args); end
435
+ end
436
+
437
+ # source://openssl//lib/openssl/cipher.rb#18
438
+ class OpenSSL::Cipher::CAST5 < ::OpenSSL::Cipher
439
+ # source://openssl//lib/openssl/cipher.rb#19
440
+ def initialize(*args); end
441
+ end
442
+
443
+ # Deprecated.
444
+ #
445
+ # This class is only provided for backwards compatibility.
446
+ # Use OpenSSL::Cipher.
447
+ #
448
+ # source://openssl//lib/openssl/cipher.rb#64
449
+ class OpenSSL::Cipher::Cipher < ::OpenSSL::Cipher; end
450
+
451
+ # source://openssl//lib/openssl/cipher.rb#18
452
+ class OpenSSL::Cipher::DES < ::OpenSSL::Cipher
453
+ # source://openssl//lib/openssl/cipher.rb#19
454
+ def initialize(*args); end
455
+ end
456
+
457
+ # source://openssl//lib/openssl/cipher.rb#18
458
+ class OpenSSL::Cipher::IDEA < ::OpenSSL::Cipher
459
+ # source://openssl//lib/openssl/cipher.rb#19
460
+ def initialize(*args); end
461
+ end
462
+
463
+ # source://openssl//lib/openssl/cipher.rb#18
464
+ class OpenSSL::Cipher::RC2 < ::OpenSSL::Cipher
465
+ # source://openssl//lib/openssl/cipher.rb#19
466
+ def initialize(*args); end
467
+ end
468
+
469
+ # source://openssl//lib/openssl/cipher.rb#18
470
+ class OpenSSL::Cipher::RC4 < ::OpenSSL::Cipher
471
+ # source://openssl//lib/openssl/cipher.rb#19
472
+ def initialize(*args); end
473
+ end
474
+
475
+ # source://openssl//lib/openssl/cipher.rb#18
476
+ class OpenSSL::Cipher::RC5 < ::OpenSSL::Cipher
477
+ # source://openssl//lib/openssl/cipher.rb#19
478
+ def initialize(*args); end
479
+ end
480
+
481
+ class OpenSSL::Config
482
+ include ::Enumerable
483
+ end
484
+
485
+ # source://openssl//lib/openssl/digest.rb#16
486
+ class OpenSSL::Digest < ::Digest::Class
487
+ class << self
488
+ # Return the hash value computed with _name_ Digest. _name_ is either the
489
+ # long name or short name of a supported digest algorithm.
490
+ #
491
+ # === Example
492
+ #
493
+ # OpenSSL::Digest.digest("SHA256", "abc")
494
+ #
495
+ # source://openssl//lib/openssl/digest.rb#25
496
+ def digest(name, data); end
497
+ end
498
+ end
499
+
500
+ # Deprecated.
501
+ #
502
+ # This class is only provided for backwards compatibility.
503
+ # Use OpenSSL::Digest instead.
504
+ #
505
+ # source://openssl//lib/openssl/digest.rb#48
506
+ class OpenSSL::Digest::Digest < ::OpenSSL::Digest; end
507
+
508
+ # source://openssl//lib/openssl/digest.rb#30
509
+ class OpenSSL::Digest::MD4 < ::OpenSSL::Digest
510
+ # source://openssl//lib/openssl/digest.rb#31
511
+ def initialize(data = T.unsafe(nil)); end
512
+
513
+ class << self
514
+ # source://openssl//lib/openssl/digest.rb#37
515
+ def digest(data); end
516
+
517
+ # source://openssl//lib/openssl/digest.rb#38
518
+ def hexdigest(data); end
519
+ end
520
+ end
521
+
522
+ # source://openssl//lib/openssl/digest.rb#30
523
+ class OpenSSL::Digest::MD5 < ::OpenSSL::Digest
524
+ # source://openssl//lib/openssl/digest.rb#31
525
+ def initialize(data = T.unsafe(nil)); end
526
+
527
+ class << self
528
+ # source://openssl//lib/openssl/digest.rb#37
529
+ def digest(data); end
530
+
531
+ # source://openssl//lib/openssl/digest.rb#38
532
+ def hexdigest(data); end
533
+ end
534
+ end
535
+
536
+ # source://openssl//lib/openssl/digest.rb#30
537
+ class OpenSSL::Digest::RIPEMD160 < ::OpenSSL::Digest
538
+ # source://openssl//lib/openssl/digest.rb#31
539
+ def initialize(data = T.unsafe(nil)); end
540
+
541
+ class << self
542
+ # source://openssl//lib/openssl/digest.rb#37
543
+ def digest(data); end
544
+
545
+ # source://openssl//lib/openssl/digest.rb#38
546
+ def hexdigest(data); end
547
+ end
548
+ end
549
+
550
+ # source://openssl//lib/openssl/digest.rb#30
551
+ class OpenSSL::Digest::SHA1 < ::OpenSSL::Digest
552
+ # source://openssl//lib/openssl/digest.rb#31
553
+ def initialize(data = T.unsafe(nil)); end
554
+
555
+ class << self
556
+ # source://openssl//lib/openssl/digest.rb#37
557
+ def digest(data); end
558
+
559
+ # source://openssl//lib/openssl/digest.rb#38
560
+ def hexdigest(data); end
561
+ end
562
+ end
563
+
564
+ # source://openssl//lib/openssl/digest.rb#30
565
+ class OpenSSL::Digest::SHA224 < ::OpenSSL::Digest
566
+ # source://openssl//lib/openssl/digest.rb#31
567
+ def initialize(data = T.unsafe(nil)); end
568
+
569
+ class << self
570
+ # source://openssl//lib/openssl/digest.rb#37
571
+ def digest(data); end
572
+
573
+ # source://openssl//lib/openssl/digest.rb#38
574
+ def hexdigest(data); end
575
+ end
576
+ end
577
+
578
+ # source://openssl//lib/openssl/digest.rb#30
579
+ class OpenSSL::Digest::SHA256 < ::OpenSSL::Digest
580
+ # source://openssl//lib/openssl/digest.rb#31
581
+ def initialize(data = T.unsafe(nil)); end
582
+
583
+ class << self
584
+ # source://openssl//lib/openssl/digest.rb#37
585
+ def digest(data); end
586
+
587
+ # source://openssl//lib/openssl/digest.rb#38
588
+ def hexdigest(data); end
589
+ end
590
+ end
591
+
592
+ # source://openssl//lib/openssl/digest.rb#30
593
+ class OpenSSL::Digest::SHA384 < ::OpenSSL::Digest
594
+ # source://openssl//lib/openssl/digest.rb#31
595
+ def initialize(data = T.unsafe(nil)); end
596
+
597
+ class << self
598
+ # source://openssl//lib/openssl/digest.rb#37
599
+ def digest(data); end
600
+
601
+ # source://openssl//lib/openssl/digest.rb#38
602
+ def hexdigest(data); end
603
+ end
604
+ end
605
+
606
+ # source://openssl//lib/openssl/digest.rb#30
607
+ class OpenSSL::Digest::SHA512 < ::OpenSSL::Digest
608
+ # source://openssl//lib/openssl/digest.rb#31
609
+ def initialize(data = T.unsafe(nil)); end
610
+
611
+ class << self
612
+ # source://openssl//lib/openssl/digest.rb#37
613
+ def digest(data); end
614
+
615
+ # source://openssl//lib/openssl/digest.rb#38
616
+ def hexdigest(data); end
617
+ end
618
+ end
619
+
620
+ # source://openssl//lib/openssl/hmac.rb#4
621
+ class OpenSSL::HMAC
622
+ # Securely compare with another HMAC instance in constant time.
623
+ #
624
+ # source://openssl//lib/openssl/hmac.rb#6
625
+ def ==(other); end
626
+
627
+ # :call-seq:
628
+ # hmac.base64digest -> string
629
+ #
630
+ # Returns the authentication code an a Base64-encoded string.
631
+ #
632
+ # source://openssl//lib/openssl/hmac.rb#17
633
+ def base64digest; end
634
+
635
+ class << self
636
+ # :call-seq:
637
+ # HMAC.base64digest(digest, key, data) -> aString
638
+ #
639
+ # Returns the authentication code as a Base64-encoded string. The _digest_
640
+ # parameter specifies the digest algorithm to use. This may be a String
641
+ # representing the algorithm name or an instance of OpenSSL::Digest.
642
+ #
643
+ # === Example
644
+ # key = 'key'
645
+ # data = 'The quick brown fox jumps over the lazy dog'
646
+ #
647
+ # hmac = OpenSSL::HMAC.base64digest('SHA1', key, data)
648
+ # #=> "3nybhbi3iqa8ino29wqQcBydtNk="
649
+ #
650
+ # source://openssl//lib/openssl/hmac.rb#73
651
+ def base64digest(digest, key, data); end
652
+
653
+ # :call-seq:
654
+ # HMAC.digest(digest, key, data) -> aString
655
+ #
656
+ # Returns the authentication code as a binary string. The _digest_ parameter
657
+ # specifies the digest algorithm to use. This may be a String representing
658
+ # the algorithm name or an instance of OpenSSL::Digest.
659
+ #
660
+ # === Example
661
+ # key = 'key'
662
+ # data = 'The quick brown fox jumps over the lazy dog'
663
+ #
664
+ # hmac = OpenSSL::HMAC.digest('SHA1', key, data)
665
+ # #=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9"
666
+ #
667
+ # source://openssl//lib/openssl/hmac.rb#35
668
+ def digest(digest, key, data); end
669
+
670
+ # :call-seq:
671
+ # HMAC.hexdigest(digest, key, data) -> aString
672
+ #
673
+ # Returns the authentication code as a hex-encoded string. The _digest_
674
+ # parameter specifies the digest algorithm to use. This may be a String
675
+ # representing the algorithm name or an instance of OpenSSL::Digest.
676
+ #
677
+ # === Example
678
+ # key = 'key'
679
+ # data = 'The quick brown fox jumps over the lazy dog'
680
+ #
681
+ # hmac = OpenSSL::HMAC.hexdigest('SHA1', key, data)
682
+ # #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
683
+ #
684
+ # source://openssl//lib/openssl/hmac.rb#54
685
+ def hexdigest(digest, key, data); end
686
+ end
687
+ end
688
+
689
+ # source://openssl//lib/openssl/marshal.rb#15
690
+ module OpenSSL::Marshal
691
+ mixes_in_class_methods ::OpenSSL::Marshal::ClassMethods
692
+
693
+ # source://openssl//lib/openssl/marshal.rb#26
694
+ def _dump(_level); end
695
+
696
+ class << self
697
+ # @private
698
+ #
699
+ # source://openssl//lib/openssl/marshal.rb#16
700
+ def included(base); end
701
+ end
702
+ end
703
+
704
+ # source://openssl//lib/openssl/marshal.rb#20
705
+ module OpenSSL::Marshal::ClassMethods
706
+ # source://openssl//lib/openssl/marshal.rb#21
707
+ def _load(string); end
708
+ end
709
+
710
+ OpenSSL::PKCS12::KEY_EX = T.let(T.unsafe(nil), Integer)
711
+ OpenSSL::PKCS12::KEY_SIG = T.let(T.unsafe(nil), Integer)
712
+
713
+ # source://openssl//lib/openssl/pkcs5.rb#8
714
+ module OpenSSL::PKCS5
715
+ private
716
+
717
+ # OpenSSL::PKCS5.pbkdf2_hmac has been renamed to OpenSSL::KDF.pbkdf2_hmac.
718
+ # This method is provided for backwards compatibility.
719
+ #
720
+ # source://openssl//lib/openssl/pkcs5.rb#13
721
+ def pbkdf2_hmac(pass, salt, iter, keylen, digest); end
722
+
723
+ # source://openssl//lib/openssl/pkcs5.rb#18
724
+ def pbkdf2_hmac_sha1(pass, salt, iter, keylen); end
725
+
726
+ class << self
727
+ # OpenSSL::PKCS5.pbkdf2_hmac has been renamed to OpenSSL::KDF.pbkdf2_hmac.
728
+ # This method is provided for backwards compatibility.
729
+ #
730
+ # source://openssl//lib/openssl/pkcs5.rb#13
731
+ def pbkdf2_hmac(pass, salt, iter, keylen, digest); end
732
+
733
+ # source://openssl//lib/openssl/pkcs5.rb#18
734
+ def pbkdf2_hmac_sha1(pass, salt, iter, keylen); end
735
+ end
736
+ end
737
+
738
+ OpenSSL::PKCS7::Signer = OpenSSL::PKCS7::SignerInfo
739
+
740
+ # source://openssl//lib/openssl/pkey.rb#13
741
+ class OpenSSL::PKey::DH < ::OpenSSL::PKey::PKey
742
+ include ::OpenSSL::Marshal
743
+ extend ::OpenSSL::Marshal::ClassMethods
744
+
745
+ # :call-seq:
746
+ # dh.compute_key(pub_bn) -> string
747
+ #
748
+ # Returns a String containing a shared secret computed from the other
749
+ # party's public value.
750
+ #
751
+ # This method is provided for backwards compatibility, and calls #derive
752
+ # internally.
753
+ #
754
+ # === Parameters
755
+ # * _pub_bn_ is a OpenSSL::BN, *not* the DH instance returned by
756
+ # DH#public_key as that contains the DH parameters only.
757
+ #
758
+ # source://openssl//lib/openssl/pkey.rb#64
759
+ def compute_key(pub_bn); end
760
+
761
+ # :call-seq:
762
+ # dh.generate_key! -> self
763
+ #
764
+ # Generates a private and public key unless a private key already exists.
765
+ # If this DH instance was generated from public \DH parameters (e.g. by
766
+ # encoding the result of DH#public_key), then this method needs to be
767
+ # called first in order to generate the per-session keys before performing
768
+ # the actual key exchange.
769
+ #
770
+ # <b>Deprecated in version 3.0</b>. This method is incompatible with
771
+ # OpenSSL 3.0.0 or later.
772
+ #
773
+ # See also OpenSSL::PKey.generate_key.
774
+ #
775
+ # Example:
776
+ # # DEPRECATED USAGE: This will not work on OpenSSL 3.0 or later
777
+ # dh0 = OpenSSL::PKey::DH.new(2048)
778
+ # dh = dh0.public_key # #public_key only copies the DH parameters (contrary to the name)
779
+ # dh.generate_key!
780
+ # puts dh.private? # => true
781
+ # puts dh0.pub_key == dh.pub_key #=> false
782
+ #
783
+ # # With OpenSSL::PKey.generate_key
784
+ # dh0 = OpenSSL::PKey::DH.new(2048)
785
+ # dh = OpenSSL::PKey.generate_key(dh0)
786
+ # puts dh0.pub_key == dh.pub_key #=> false
787
+ #
788
+ # source://openssl//lib/openssl/pkey.rb#106
789
+ def generate_key!; end
790
+
791
+ # :call-seq:
792
+ # dh.params -> hash
793
+ #
794
+ # Stores all parameters of key to a Hash.
795
+ #
796
+ # The hash has keys 'p', 'q', 'g', 'pub_key', and 'priv_key'.
797
+ #
798
+ # source://openssl//lib/openssl/pkey.rb#46
799
+ def params; end
800
+
801
+ # :call-seq:
802
+ # dh.public_key -> dhnew
803
+ #
804
+ # Returns a new DH instance that carries just the \DH parameters.
805
+ #
806
+ # Contrary to the method name, the returned DH object contains only
807
+ # parameters and not the public key.
808
+ #
809
+ # This method is provided for backwards compatibility. In most cases, there
810
+ # is no need to call this method.
811
+ #
812
+ # For the purpose of re-generating the key pair while keeping the
813
+ # parameters, check OpenSSL::PKey.generate_key.
814
+ #
815
+ # Example:
816
+ # # OpenSSL::PKey::DH.generate by default generates a random key pair
817
+ # dh1 = OpenSSL::PKey::DH.generate(2048)
818
+ # p dh1.priv_key #=> #<OpenSSL::BN 1288347...>
819
+ # dhcopy = dh1.public_key
820
+ # p dhcopy.priv_key #=> nil
821
+ #
822
+ # source://openssl//lib/openssl/pkey.rb#36
823
+ def public_key; end
824
+
825
+ class << self
826
+ # :call-seq:
827
+ # DH.generate(size, generator = 2) -> dh
828
+ #
829
+ # Creates a new DH instance from scratch by generating random parameters
830
+ # and a key pair.
831
+ #
832
+ # See also OpenSSL::PKey.generate_parameters and
833
+ # OpenSSL::PKey.generate_key.
834
+ #
835
+ # +size+::
836
+ # The desired key size in bits.
837
+ # +generator+::
838
+ # The generator.
839
+ #
840
+ # source://openssl//lib/openssl/pkey.rb#133
841
+ def generate(size, generator = T.unsafe(nil), &blk); end
842
+
843
+ # Handle DH.new(size, generator) form here; new(str) and new() forms
844
+ # are handled by #initialize
845
+ #
846
+ # source://openssl//lib/openssl/pkey.rb#143
847
+ def new(*args, &blk); end
848
+ end
849
+ end
850
+
851
+ # source://openssl//lib/openssl/pkey.rb#156
852
+ class OpenSSL::PKey::DSA < ::OpenSSL::PKey::PKey
853
+ include ::OpenSSL::Marshal
854
+ extend ::OpenSSL::Marshal::ClassMethods
855
+
856
+ # :call-seq:
857
+ # dsa.params -> hash
858
+ #
859
+ # Stores all parameters of key to a Hash.
860
+ #
861
+ # The hash has keys 'p', 'q', 'g', 'pub_key', and 'priv_key'.
862
+ #
863
+ # source://openssl//lib/openssl/pkey.rb#181
864
+ def params; end
865
+
866
+ # :call-seq:
867
+ # dsa.public_key -> dsanew
868
+ #
869
+ # Returns a new DSA instance that carries just the \DSA parameters and the
870
+ # public key.
871
+ #
872
+ # This method is provided for backwards compatibility. In most cases, there
873
+ # is no need to call this method.
874
+ #
875
+ # For the purpose of serializing the public key, to PEM or DER encoding of
876
+ # X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and
877
+ # PKey#public_to_der.
878
+ #
879
+ # source://openssl//lib/openssl/pkey.rb#171
880
+ def public_key; end
881
+
882
+ # :call-seq:
883
+ # dsa.syssign(string) -> string
884
+ #
885
+ # Computes and returns the \DSA signature of +string+, where +string+ is
886
+ # expected to be an already-computed message digest of the original input
887
+ # data. The signature is issued using the private key of this DSA instance.
888
+ #
889
+ # <b>Deprecated in version 3.0</b>.
890
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
891
+ #
892
+ # +string+::
893
+ # A message digest of the original input data to be signed.
894
+ #
895
+ # Example:
896
+ # dsa = OpenSSL::PKey::DSA.new(2048)
897
+ # doc = "Sign me"
898
+ # digest = OpenSSL::Digest.digest('SHA1', doc)
899
+ #
900
+ # # With legacy #syssign and #sysverify:
901
+ # sig = dsa.syssign(digest)
902
+ # p dsa.sysverify(digest, sig) #=> true
903
+ #
904
+ # # With #sign_raw and #verify_raw:
905
+ # sig = dsa.sign_raw(nil, digest)
906
+ # p dsa.verify_raw(nil, sig, digest) #=> true
907
+ #
908
+ # source://openssl//lib/openssl/pkey.rb#250
909
+ def syssign(string); end
910
+
911
+ # :call-seq:
912
+ # dsa.sysverify(digest, sig) -> true | false
913
+ #
914
+ # Verifies whether the signature is valid given the message digest input.
915
+ # It does so by validating +sig+ using the public key of this DSA instance.
916
+ #
917
+ # <b>Deprecated in version 3.0</b>.
918
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
919
+ #
920
+ # +digest+::
921
+ # A message digest of the original input data to be signed.
922
+ # +sig+::
923
+ # A \DSA signature value.
924
+ #
925
+ # source://openssl//lib/openssl/pkey.rb#269
926
+ def sysverify(digest, sig); end
927
+
928
+ class << self
929
+ # :call-seq:
930
+ # DSA.generate(size) -> dsa
931
+ #
932
+ # Creates a new DSA instance by generating a private/public key pair
933
+ # from scratch.
934
+ #
935
+ # See also OpenSSL::PKey.generate_parameters and
936
+ # OpenSSL::PKey.generate_key.
937
+ #
938
+ # +size+::
939
+ # The desired key size in bits.
940
+ #
941
+ # source://openssl//lib/openssl/pkey.rb#199
942
+ def generate(size, &blk); end
943
+
944
+ # Handle DSA.new(size) form here; new(str) and new() forms
945
+ # are handled by #initialize
946
+ #
947
+ # source://openssl//lib/openssl/pkey.rb#216
948
+ def new(*args, &blk); end
949
+ end
950
+ end
951
+
952
+ # source://openssl//lib/openssl/pkey.rb#278
953
+ class OpenSSL::PKey::EC < ::OpenSSL::PKey::PKey
954
+ include ::OpenSSL::Marshal
955
+ extend ::OpenSSL::Marshal::ClassMethods
956
+
957
+ # :call-seq:
958
+ # ec.dh_compute_key(pubkey) -> string
959
+ #
960
+ # Derives a shared secret by ECDH. _pubkey_ must be an instance of
961
+ # OpenSSL::PKey::EC::Point and must belong to the same group.
962
+ #
963
+ # This method is provided for backwards compatibility, and calls #derive
964
+ # internally.
965
+ #
966
+ # source://openssl//lib/openssl/pkey.rb#307
967
+ def dh_compute_key(pubkey); end
968
+
969
+ # :call-seq:
970
+ # key.dsa_sign_asn1(data) -> String
971
+ #
972
+ # <b>Deprecated in version 3.0</b>.
973
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
974
+ #
975
+ # source://openssl//lib/openssl/pkey.rb#286
976
+ def dsa_sign_asn1(data); end
977
+
978
+ # :call-seq:
979
+ # key.dsa_verify_asn1(data, sig) -> true | false
980
+ #
981
+ # <b>Deprecated in version 3.0</b>.
982
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw instead.
983
+ #
984
+ # source://openssl//lib/openssl/pkey.rb#295
985
+ def dsa_verify_asn1(data, sig); end
986
+ end
987
+
988
+ OpenSSL::PKey::EC::EXPLICIT_CURVE = T.let(T.unsafe(nil), Integer)
989
+
990
+ # source://openssl//lib/openssl/pkey.rb#319
991
+ class OpenSSL::PKey::EC::Point
992
+ # :call-seq:
993
+ # point.to_bn([conversion_form]) -> OpenSSL::BN
994
+ #
995
+ # Returns the octet string representation of the EC point as an instance of
996
+ # OpenSSL::BN.
997
+ #
998
+ # If _conversion_form_ is not given, the _point_conversion_form_ attribute
999
+ # set to the group is used.
1000
+ #
1001
+ # See #to_octet_string for more information.
1002
+ #
1003
+ # source://openssl//lib/openssl/pkey.rb#330
1004
+ def to_bn(conversion_form = T.unsafe(nil)); end
1005
+ end
1006
+
1007
+ # source://openssl//lib/openssl/pkey.rb#339
1008
+ class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey
1009
+ include ::OpenSSL::Marshal
1010
+ extend ::OpenSSL::Marshal::ClassMethods
1011
+
1012
+ # :call-seq:
1013
+ # rsa.params -> hash
1014
+ #
1015
+ # Stores all parameters of key to a Hash.
1016
+ #
1017
+ # The hash has keys 'n', 'e', 'd', 'p', 'q', 'dmp1', 'dmq1', and 'iqmp'.
1018
+ #
1019
+ # source://openssl//lib/openssl/pkey.rb#363
1020
+ def params; end
1021
+
1022
+ # :call-seq:
1023
+ # rsa.private_decrypt(string) -> String
1024
+ # rsa.private_decrypt(string, padding) -> String
1025
+ #
1026
+ # Decrypt +string+, which has been encrypted with the public key, with the
1027
+ # private key. +padding+ defaults to PKCS1_PADDING, which is known to be
1028
+ # insecure but is kept for backwards compatibility.
1029
+ #
1030
+ # <b>Deprecated in version 3.0</b>.
1031
+ # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.
1032
+ #
1033
+ # source://openssl//lib/openssl/pkey.rb#465
1034
+ def private_decrypt(data, padding = T.unsafe(nil)); end
1035
+
1036
+ # :call-seq:
1037
+ # rsa.private_encrypt(string) -> String
1038
+ # rsa.private_encrypt(string, padding) -> String
1039
+ #
1040
+ # Encrypt +string+ with the private key. +padding+ defaults to
1041
+ # PKCS1_PADDING, which is known to be insecure but is kept for backwards
1042
+ # compatibility. The encrypted string output can be decrypted using
1043
+ # #public_decrypt.
1044
+ #
1045
+ # <b>Deprecated in version 3.0</b>.
1046
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and
1047
+ # PKey::PKey#verify_recover instead.
1048
+ #
1049
+ # source://openssl//lib/openssl/pkey.rb#411
1050
+ def private_encrypt(string, padding = T.unsafe(nil)); end
1051
+
1052
+ # :call-seq:
1053
+ # rsa.public_decrypt(string) -> String
1054
+ # rsa.public_decrypt(string, padding) -> String
1055
+ #
1056
+ # Decrypt +string+, which has been encrypted with the private key, with the
1057
+ # public key. +padding+ defaults to PKCS1_PADDING which is known to be
1058
+ # insecure but is kept for backwards compatibility.
1059
+ #
1060
+ # <b>Deprecated in version 3.0</b>.
1061
+ # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and
1062
+ # PKey::PKey#verify_recover instead.
1063
+ #
1064
+ # source://openssl//lib/openssl/pkey.rb#430
1065
+ def public_decrypt(string, padding = T.unsafe(nil)); end
1066
+
1067
+ # :call-seq:
1068
+ # rsa.public_encrypt(string) -> String
1069
+ # rsa.public_encrypt(string, padding) -> String
1070
+ #
1071
+ # Encrypt +string+ with the public key. +padding+ defaults to
1072
+ # PKCS1_PADDING, which is known to be insecure but is kept for backwards
1073
+ # compatibility. The encrypted string output can be decrypted using
1074
+ # #private_decrypt.
1075
+ #
1076
+ # <b>Deprecated in version 3.0</b>.
1077
+ # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.
1078
+ #
1079
+ # source://openssl//lib/openssl/pkey.rb#448
1080
+ def public_encrypt(data, padding = T.unsafe(nil)); end
1081
+
1082
+ # :call-seq:
1083
+ # rsa.public_key -> rsanew
1084
+ #
1085
+ # Returns a new RSA instance that carries just the public key components.
1086
+ #
1087
+ # This method is provided for backwards compatibility. In most cases, there
1088
+ # is no need to call this method.
1089
+ #
1090
+ # For the purpose of serializing the public key, to PEM or DER encoding of
1091
+ # X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and
1092
+ # PKey#public_to_der.
1093
+ #
1094
+ # source://openssl//lib/openssl/pkey.rb#353
1095
+ def public_key; end
1096
+
1097
+ private
1098
+
1099
+ # source://openssl//lib/openssl/pkey.rb#478
1100
+ def translate_padding_mode(num); end
1101
+
1102
+ class << self
1103
+ # :call-seq:
1104
+ # RSA.generate(size, exponent = 65537) -> RSA
1105
+ #
1106
+ # Generates an \RSA keypair.
1107
+ #
1108
+ # See also OpenSSL::PKey.generate_key.
1109
+ #
1110
+ # +size+::
1111
+ # The desired key size in bits.
1112
+ # +exponent+::
1113
+ # An odd Integer, normally 3, 17, or 65537.
1114
+ #
1115
+ # source://openssl//lib/openssl/pkey.rb#381
1116
+ def generate(size, exp = T.unsafe(nil), &blk); end
1117
+
1118
+ # Handle RSA.new(size, exponent) form here; new(str) and new() forms
1119
+ # are handled by #initialize
1120
+ #
1121
+ # source://openssl//lib/openssl/pkey.rb#390
1122
+ def new(*args, &blk); end
1123
+ end
1124
+ end
1125
+
1126
+ class OpenSSL::Provider
1127
+ def inspect; end
1128
+ def name; end
1129
+ def unload; end
1130
+
1131
+ class << self
1132
+ def load(_arg0); end
1133
+ def provider_names; end
1134
+ end
1135
+ end
1136
+
1137
+ class OpenSSL::Provider::ProviderError < ::OpenSSL::OpenSSLError; end
1138
+
1139
+ # source://openssl//lib/openssl/ssl.rb#22
1140
+ module OpenSSL::SSL
1141
+ private
1142
+
1143
+ # source://openssl//lib/openssl/ssl.rb#249
1144
+ def verify_certificate_identity(cert, hostname); end
1145
+
1146
+ # source://openssl//lib/openssl/ssl.rb#282
1147
+ def verify_hostname(hostname, san); end
1148
+
1149
+ # source://openssl//lib/openssl/ssl.rb#315
1150
+ def verify_wildcard(domain_component, san_component); end
1151
+
1152
+ class << self
1153
+ # source://openssl//lib/openssl/ssl.rb#249
1154
+ def verify_certificate_identity(cert, hostname); end
1155
+
1156
+ # source://openssl//lib/openssl/ssl.rb#282
1157
+ def verify_hostname(hostname, san); end
1158
+
1159
+ # source://openssl//lib/openssl/ssl.rb#315
1160
+ def verify_wildcard(domain_component, san_component); end
1161
+ end
1162
+ end
1163
+
1164
+ OpenSSL::SSL::OP_ALLOW_CLIENT_RENEGOTIATION = T.let(T.unsafe(nil), Integer)
1165
+ OpenSSL::SSL::OP_ALLOW_NO_DHE_KEX = T.let(T.unsafe(nil), Integer)
1166
+ OpenSSL::SSL::OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = T.let(T.unsafe(nil), Integer)
1167
+ OpenSSL::SSL::OP_CLEANSE_PLAINTEXT = T.let(T.unsafe(nil), Integer)
1168
+ OpenSSL::SSL::OP_CRYPTOPRO_TLSEXT_BUG = T.let(T.unsafe(nil), Integer)
1169
+ OpenSSL::SSL::OP_DISABLE_TLSEXT_CA_NAMES = T.let(T.unsafe(nil), Integer)
1170
+ OpenSSL::SSL::OP_ENABLE_KTLS = T.let(T.unsafe(nil), Integer)
1171
+ OpenSSL::SSL::OP_ENABLE_MIDDLEBOX_COMPAT = T.let(T.unsafe(nil), Integer)
1172
+ OpenSSL::SSL::OP_IGNORE_UNEXPECTED_EOF = T.let(T.unsafe(nil), Integer)
1173
+ OpenSSL::SSL::OP_LEGACY_SERVER_CONNECT = T.let(T.unsafe(nil), Integer)
1174
+ OpenSSL::SSL::OP_NO_ANTI_REPLAY = T.let(T.unsafe(nil), Integer)
1175
+ OpenSSL::SSL::OP_NO_ENCRYPT_THEN_MAC = T.let(T.unsafe(nil), Integer)
1176
+ OpenSSL::SSL::OP_NO_RENEGOTIATION = T.let(T.unsafe(nil), Integer)
1177
+ OpenSSL::SSL::OP_NO_TLSv1_3 = T.let(T.unsafe(nil), Integer)
1178
+ OpenSSL::SSL::OP_PRIORITIZE_CHACHA = T.let(T.unsafe(nil), Integer)
1179
+ OpenSSL::SSL::OP_SAFARI_ECDHE_ECDSA_BUG = T.let(T.unsafe(nil), Integer)
1180
+ OpenSSL::SSL::OP_TLSEXT_PADDING = T.let(T.unsafe(nil), Integer)
1181
+ OpenSSL::SSL::SSL2_VERSION = T.let(T.unsafe(nil), Integer)
1182
+ OpenSSL::SSL::SSL3_VERSION = T.let(T.unsafe(nil), Integer)
1183
+
1184
+ # source://openssl//lib/openssl/ssl.rb#23
1185
+ class OpenSSL::SSL::SSLContext
1186
+ # call-seq:
1187
+ # SSLContext.new -> ctx
1188
+ # SSLContext.new(:TLSv1) -> ctx
1189
+ # SSLContext.new("SSLv23") -> ctx
1190
+ #
1191
+ # Creates a new SSL context.
1192
+ #
1193
+ # If an argument is given, #ssl_version= is called with the value. Note
1194
+ # that this form is deprecated. New applications should use #min_version=
1195
+ # and #max_version= as necessary.
1196
+ #
1197
+ # @return [SSLContext] a new instance of SSLContext
1198
+ #
1199
+ # source://openssl//lib/openssl/ssl.rb#94
1200
+ def initialize(version = T.unsafe(nil)); end
1201
+
1202
+ # A callback invoked at connect time to distinguish between multiple
1203
+ # server names.
1204
+ #
1205
+ # The callback is invoked with an SSLSocket and a server name. The
1206
+ # callback must return an SSLContext for the server name or nil.
1207
+ #
1208
+ # source://openssl//lib/openssl/ssl.rb#82
1209
+ def servername_cb; end
1210
+
1211
+ # A callback invoked at connect time to distinguish between multiple
1212
+ # server names.
1213
+ #
1214
+ # The callback is invoked with an SSLSocket and a server name. The
1215
+ # callback must return an SSLContext for the server name or nil.
1216
+ #
1217
+ # source://openssl//lib/openssl/ssl.rb#82
1218
+ def servername_cb=(_arg0); end
1219
+
1220
+ # call-seq:
1221
+ # ctx.set_params(params = {}) -> params
1222
+ #
1223
+ # Sets saner defaults optimized for the use with HTTP-like protocols.
1224
+ #
1225
+ # If a Hash _params_ is given, the parameters are overridden with it.
1226
+ # The keys in _params_ must be assignment methods on SSLContext.
1227
+ #
1228
+ # If the verify_mode is not VERIFY_NONE and ca_file, ca_path and
1229
+ # cert_store are not set then the system default certificate store is
1230
+ # used.
1231
+ #
1232
+ # source://openssl//lib/openssl/ssl.rb#112
1233
+ def set_params(params = T.unsafe(nil)); end
1234
+
1235
+ # call-seq:
1236
+ # ctx.ssl_version = :TLSv1
1237
+ # ctx.ssl_version = "SSLv23"
1238
+ #
1239
+ # Sets the SSL/TLS protocol version for the context. This forces
1240
+ # connections to use only the specified protocol version. This is
1241
+ # deprecated and only provided for backwards compatibility. Use
1242
+ # #min_version= and #max_version= instead.
1243
+ #
1244
+ # === History
1245
+ # As the name hints, this used to call the SSL_CTX_set_ssl_version()
1246
+ # function which sets the SSL method used for connections created from
1247
+ # the context. As of Ruby/OpenSSL 2.1, this accessor method is
1248
+ # implemented to call #min_version= and #max_version= instead.
1249
+ #
1250
+ # source://openssl//lib/openssl/ssl.rb#145
1251
+ def ssl_version=(meth); end
1252
+ end
1253
+
1254
+ # The list of available SSL/TLS methods. This constant is only provided
1255
+ # for backwards compatibility.
1256
+ #
1257
+ # source://openssl//lib/openssl/ssl.rb#170
1258
+ OpenSSL::SSL::SSLContext::METHODS = T.let(T.unsafe(nil), Array)
1259
+
1260
+ # source://openssl//lib/openssl/ssl.rb#158
1261
+ OpenSSL::SSL::SSLContext::METHODS_MAP = T.let(T.unsafe(nil), Hash)
1262
+
1263
+ class OpenSSL::SSL::SSLErrorWaitReadable < ::OpenSSL::SSL::SSLError
1264
+ include ::IO::WaitReadable
1265
+ end
1266
+
1267
+ class OpenSSL::SSL::SSLErrorWaitWritable < ::OpenSSL::SSL::SSLError
1268
+ include ::IO::WaitWritable
1269
+ end
1270
+
1271
+ # SSLServer represents a TCP/IP server socket with Secure Sockets Layer.
1272
+ #
1273
+ # source://openssl//lib/openssl/ssl.rb#478
1274
+ class OpenSSL::SSL::SSLServer
1275
+ include ::OpenSSL::SSL::SocketForwarder
1276
+
1277
+ # Creates a new instance of SSLServer.
1278
+ # * _srv_ is an instance of TCPServer.
1279
+ # * _ctx_ is an instance of OpenSSL::SSL::SSLContext.
1280
+ #
1281
+ # @return [SSLServer] a new instance of SSLServer
1282
+ #
1283
+ # source://openssl//lib/openssl/ssl.rb#486
1284
+ def initialize(svr, ctx); end
1285
+
1286
+ # Works similar to TCPServer#accept.
1287
+ #
1288
+ # source://openssl//lib/openssl/ssl.rb#514
1289
+ def accept; end
1290
+
1291
+ # See IO#close for details.
1292
+ #
1293
+ # source://openssl//lib/openssl/ssl.rb#535
1294
+ def close; end
1295
+
1296
+ # See TCPServer#listen for details.
1297
+ #
1298
+ # source://openssl//lib/openssl/ssl.rb#504
1299
+ def listen(backlog = T.unsafe(nil)); end
1300
+
1301
+ # See BasicSocket#shutdown for details.
1302
+ #
1303
+ # source://openssl//lib/openssl/ssl.rb#509
1304
+ def shutdown(how = T.unsafe(nil)); end
1305
+
1306
+ # When true then #accept works exactly the same as TCPServer#accept
1307
+ #
1308
+ # source://openssl//lib/openssl/ssl.rb#481
1309
+ def start_immediately; end
1310
+
1311
+ # When true then #accept works exactly the same as TCPServer#accept
1312
+ #
1313
+ # source://openssl//lib/openssl/ssl.rb#481
1314
+ def start_immediately=(_arg0); end
1315
+
1316
+ # Returns the TCPServer passed to the SSLServer when initialized.
1317
+ #
1318
+ # source://openssl//lib/openssl/ssl.rb#499
1319
+ def to_io; end
1320
+ end
1321
+
1322
+ # source://openssl//lib/openssl/ssl.rb#333
1323
+ class OpenSSL::SSL::SSLSocket
1324
+ include ::Enumerable
1325
+ include ::OpenSSL::Buffering
1326
+ include ::OpenSSL::SSL::SocketForwarder
1327
+
1328
+ # Close the stream for reading.
1329
+ # This method is ignored by OpenSSL as there is no reasonable way to
1330
+ # implement it, but exists for compatibility with IO.
1331
+ #
1332
+ # source://openssl//lib/openssl/ssl.rb#400
1333
+ def close_read; end
1334
+
1335
+ # Closes the stream for writing. The behavior of this method depends on
1336
+ # the version of OpenSSL and the TLS protocol in use.
1337
+ #
1338
+ # - Sends a 'close_notify' alert to the peer.
1339
+ # - Does not wait for the peer's 'close_notify' alert in response.
1340
+ #
1341
+ # In TLS 1.2 and earlier:
1342
+ # - On receipt of a 'close_notify' alert, responds with a 'close_notify'
1343
+ # alert of its own and close down the connection immediately,
1344
+ # discarding any pending writes.
1345
+ #
1346
+ # Therefore, on TLS 1.2, this method will cause the connection to be
1347
+ # completely shut down. On TLS 1.3, the connection will remain open for
1348
+ # reading only.
1349
+ #
1350
+ # source://openssl//lib/openssl/ssl.rb#419
1351
+ def close_write; end
1352
+
1353
+ # The SSLContext object used in this connection.
1354
+ #
1355
+ # source://openssl//lib/openssl/ssl.rb#344
1356
+ def context; end
1357
+
1358
+ # Returns the value of attribute hostname.
1359
+ #
1360
+ # source://openssl//lib/openssl/ssl.rb#337
1361
+ def hostname; end
1362
+
1363
+ # The underlying IO object.
1364
+ #
1365
+ # source://openssl//lib/openssl/ssl.rb#340
1366
+ def io; end
1367
+
1368
+ # call-seq:
1369
+ # ssl.post_connection_check(hostname) -> true
1370
+ #
1371
+ # Perform hostname verification following RFC 6125.
1372
+ #
1373
+ # This method MUST be called after calling #connect to ensure that the
1374
+ # hostname of a remote peer has been verified.
1375
+ #
1376
+ # source://openssl//lib/openssl/ssl.rb#370
1377
+ def post_connection_check(hostname); end
1378
+
1379
+ # call-seq:
1380
+ # ssl.session -> aSession
1381
+ #
1382
+ # Returns the SSLSession object currently used, or nil if the session is
1383
+ # not established.
1384
+ #
1385
+ # source://openssl//lib/openssl/ssl.rb#391
1386
+ def session; end
1387
+
1388
+ # Whether to close the underlying socket as well, when the SSL/TLS
1389
+ # connection is shut down. This defaults to +false+.
1390
+ #
1391
+ # source://openssl//lib/openssl/ssl.rb#348
1392
+ def sync_close; end
1393
+
1394
+ # Whether to close the underlying socket as well, when the SSL/TLS
1395
+ # connection is shut down. This defaults to +false+.
1396
+ #
1397
+ # source://openssl//lib/openssl/ssl.rb#348
1398
+ def sync_close=(_arg0); end
1399
+
1400
+ # call-seq:
1401
+ # ssl.sysclose => nil
1402
+ #
1403
+ # Sends "close notify" to the peer and tries to shut down the SSL
1404
+ # connection gracefully.
1405
+ #
1406
+ # If sync_close is set to +true+, the underlying IO is also closed.
1407
+ #
1408
+ # source://openssl//lib/openssl/ssl.rb#357
1409
+ def sysclose; end
1410
+
1411
+ # The underlying IO object.
1412
+ #
1413
+ # source://openssl//lib/openssl/ssl.rb#340
1414
+ def to_io; end
1415
+
1416
+ private
1417
+
1418
+ # source://openssl//lib/openssl/ssl.rb#431
1419
+ def client_cert_cb; end
1420
+
1421
+ # source://openssl//lib/openssl/ssl.rb#439
1422
+ def session_get_cb; end
1423
+
1424
+ # source://openssl//lib/openssl/ssl.rb#435
1425
+ def session_new_cb; end
1426
+
1427
+ # @return [Boolean]
1428
+ #
1429
+ # source://openssl//lib/openssl/ssl.rb#425
1430
+ def using_anon_cipher?; end
1431
+
1432
+ class << self
1433
+ # call-seq:
1434
+ # open(remote_host, remote_port, local_host=nil, local_port=nil, context: nil)
1435
+ #
1436
+ # Creates a new instance of SSLSocket.
1437
+ # _remote\_host_ and _remote\_port_ are used to open TCPSocket.
1438
+ # If _local\_host_ and _local\_port_ are specified,
1439
+ # then those parameters are used on the local end to establish the connection.
1440
+ # If _context_ is provided,
1441
+ # the SSL Sockets initial params will be taken from the context.
1442
+ #
1443
+ # === Examples
1444
+ #
1445
+ # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443)
1446
+ # sock.connect # Initiates a connection to localhost:443
1447
+ #
1448
+ # with SSLContext:
1449
+ #
1450
+ # ctx = OpenSSL::SSL::SSLContext.new
1451
+ # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443, context: ctx)
1452
+ # sock.connect # Initiates a connection to localhost:443 with SSLContext
1453
+ #
1454
+ # source://openssl//lib/openssl/ssl.rb#465
1455
+ def open(remote_host, remote_port, local_host = T.unsafe(nil), local_port = T.unsafe(nil), context: T.unsafe(nil)); end
1456
+ end
1457
+ end
1458
+
1459
+ # source://openssl//lib/openssl/ssl.rb#176
1460
+ module OpenSSL::SSL::SocketForwarder
1461
+ # source://openssl//lib/openssl/ssl.rb#182
1462
+ def addr; end
1463
+
1464
+ # source://openssl//lib/openssl/ssl.rb#218
1465
+ def close_on_exec=(value); end
1466
+
1467
+ # @return [Boolean]
1468
+ #
1469
+ # source://openssl//lib/openssl/ssl.rb#222
1470
+ def close_on_exec?; end
1471
+
1472
+ # @return [Boolean]
1473
+ #
1474
+ # source://openssl//lib/openssl/ssl.rb#210
1475
+ def closed?; end
1476
+
1477
+ # source://openssl//lib/openssl/ssl.rb#214
1478
+ def do_not_reverse_lookup=(flag); end
1479
+
1480
+ # source://openssl//lib/openssl/ssl.rb#206
1481
+ def fcntl(*args); end
1482
+
1483
+ # The file descriptor for the socket.
1484
+ #
1485
+ # source://openssl//lib/openssl/ssl.rb#178
1486
+ def fileno; end
1487
+
1488
+ # source://openssl//lib/openssl/ssl.rb#202
1489
+ def getsockopt(level, optname); end
1490
+
1491
+ # source://openssl//lib/openssl/ssl.rb#190
1492
+ def local_address; end
1493
+
1494
+ # source://openssl//lib/openssl/ssl.rb#186
1495
+ def peeraddr; end
1496
+
1497
+ # source://openssl//lib/openssl/ssl.rb#194
1498
+ def remote_address; end
1499
+
1500
+ # source://openssl//lib/openssl/ssl.rb#198
1501
+ def setsockopt(level, optname, optval); end
1502
+
1503
+ # source://openssl//lib/openssl/ssl.rb#239
1504
+ def timeout; end
1505
+
1506
+ # source://openssl//lib/openssl/ssl.rb#243
1507
+ def timeout=(value); end
1508
+
1509
+ # source://openssl//lib/openssl/ssl.rb#226
1510
+ def wait(*args); end
1511
+
1512
+ # source://openssl//lib/openssl/ssl.rb#230
1513
+ def wait_readable(*args); end
1514
+
1515
+ # source://openssl//lib/openssl/ssl.rb#234
1516
+ def wait_writable(*args); end
1517
+ end
1518
+
1519
+ OpenSSL::SSL::TLS1_VERSION = T.let(T.unsafe(nil), Integer)
1520
+ module OpenSSL::Timestamp; end
1521
+
1522
+ class OpenSSL::Timestamp::Factory
1523
+ def additional_certs; end
1524
+ def additional_certs=(_arg0); end
1525
+ def allowed_digests; end
1526
+ def allowed_digests=(_arg0); end
1527
+ def create_timestamp(_arg0, _arg1, _arg2); end
1528
+ def default_policy_id; end
1529
+ def default_policy_id=(_arg0); end
1530
+ def gen_time; end
1531
+ def gen_time=(_arg0); end
1532
+ def serial_number; end
1533
+ def serial_number=(_arg0); end
1534
+ end
1535
+
1536
+ class OpenSSL::Timestamp::Request
1537
+ def initialize(*_arg0); end
1538
+
1539
+ def algorithm; end
1540
+ def algorithm=(_arg0); end
1541
+ def cert_requested=(_arg0); end
1542
+ def cert_requested?; end
1543
+ def message_imprint; end
1544
+ def message_imprint=(_arg0); end
1545
+ def nonce; end
1546
+ def nonce=(_arg0); end
1547
+ def policy_id; end
1548
+ def policy_id=(_arg0); end
1549
+ def to_der; end
1550
+ def to_text; end
1551
+ def version; end
1552
+ def version=(_arg0); end
1553
+ end
1554
+
1555
+ class OpenSSL::Timestamp::Response
1556
+ def initialize(_arg0); end
1557
+
1558
+ def failure_info; end
1559
+ def status; end
1560
+ def status_text; end
1561
+ def to_der; end
1562
+ def to_text; end
1563
+ def token; end
1564
+ def token_info; end
1565
+ def tsa_certificate; end
1566
+ def verify(*_arg0); end
1567
+ end
1568
+
1569
+ OpenSSL::Timestamp::Response::GRANTED = T.let(T.unsafe(nil), Integer)
1570
+ OpenSSL::Timestamp::Response::GRANTED_WITH_MODS = T.let(T.unsafe(nil), Integer)
1571
+ OpenSSL::Timestamp::Response::REJECTION = T.let(T.unsafe(nil), Integer)
1572
+ OpenSSL::Timestamp::Response::REVOCATION_NOTIFICATION = T.let(T.unsafe(nil), Integer)
1573
+ OpenSSL::Timestamp::Response::REVOCATION_WARNING = T.let(T.unsafe(nil), Integer)
1574
+ OpenSSL::Timestamp::Response::WAITING = T.let(T.unsafe(nil), Integer)
1575
+ class OpenSSL::Timestamp::TimestampError < ::OpenSSL::OpenSSLError; end
1576
+
1577
+ class OpenSSL::Timestamp::TokenInfo
1578
+ def initialize(_arg0); end
1579
+
1580
+ def algorithm; end
1581
+ def gen_time; end
1582
+ def message_imprint; end
1583
+ def nonce; end
1584
+ def ordering; end
1585
+ def policy_id; end
1586
+ def serial_number; end
1587
+ def to_der; end
1588
+ def to_text; end
1589
+ def version; end
1590
+ end
1591
+
1592
+ # source://openssl//lib/openssl/x509.rb#327
1593
+ class OpenSSL::X509::Attribute
1594
+ include ::OpenSSL::Marshal
1595
+ extend ::OpenSSL::Marshal::ClassMethods
1596
+
1597
+ # source://openssl//lib/openssl/x509.rb#330
1598
+ def ==(other); end
1599
+ end
1600
+
1601
+ # source://openssl//lib/openssl/x509.rb#374
1602
+ class OpenSSL::X509::CRL
1603
+ include ::OpenSSL::Marshal
1604
+ include ::OpenSSL::X509::Extension::Helpers
1605
+ include ::OpenSSL::X509::Extension::AuthorityKeyIdentifier
1606
+ extend ::OpenSSL::Marshal::ClassMethods
1607
+
1608
+ # source://openssl//lib/openssl/x509.rb#378
1609
+ def ==(other); end
1610
+ end
1611
+
1612
+ # source://openssl//lib/openssl/x509.rb#342
1613
+ class OpenSSL::X509::Certificate
1614
+ include ::OpenSSL::Marshal
1615
+ include ::OpenSSL::X509::Extension::Helpers
1616
+ include ::OpenSSL::X509::Extension::SubjectKeyIdentifier
1617
+ include ::OpenSSL::X509::Extension::AuthorityKeyIdentifier
1618
+ include ::OpenSSL::X509::Extension::CRLDistributionPoints
1619
+ include ::OpenSSL::X509::Extension::AuthorityInfoAccess
1620
+ extend ::OpenSSL::Marshal::ClassMethods
1621
+
1622
+ # source://openssl//lib/openssl/x509.rb#349
1623
+ def inspect; end
1624
+
1625
+ # source://openssl//lib/openssl/x509.rb#358
1626
+ def pretty_print(q); end
1627
+
1628
+ class << self
1629
+ # source://openssl//lib/openssl/x509.rb#369
1630
+ def load_file(path); end
1631
+ end
1632
+ end
1633
+
1634
+ # source://openssl//lib/openssl/x509.rb#45
1635
+ class OpenSSL::X509::Extension
1636
+ include ::OpenSSL::Marshal
1637
+ extend ::OpenSSL::Marshal::ClassMethods
1638
+
1639
+ # source://openssl//lib/openssl/x509.rb#48
1640
+ def ==(other); end
1641
+
1642
+ # source://openssl//lib/openssl/x509.rb#64
1643
+ def to_a; end
1644
+
1645
+ # {"oid"=>sn|ln, "value"=>value, "critical"=>true|false}
1646
+ #
1647
+ # source://openssl//lib/openssl/x509.rb#60
1648
+ def to_h; end
1649
+
1650
+ # "oid = critical, value"
1651
+ #
1652
+ # source://openssl//lib/openssl/x509.rb#53
1653
+ def to_s; end
1654
+ end
1655
+
1656
+ # source://openssl//lib/openssl/x509.rb#154
1657
+ module OpenSSL::X509::Extension::AuthorityInfoAccess
1658
+ include ::OpenSSL::X509::Extension::Helpers
1659
+
1660
+ # Get the information and services for the issuer from the certificate's
1661
+ # authority information access extension exteension, as described in RFC5280
1662
+ # Section 4.2.2.1.
1663
+ #
1664
+ # Returns an array of strings or nil or raises ASN1::ASN1Error.
1665
+ #
1666
+ # source://openssl//lib/openssl/x509.rb#162
1667
+ def ca_issuer_uris; end
1668
+
1669
+ # Get the URIs for OCSP from the certificate's authority information access
1670
+ # extension exteension, as described in RFC5280 Section 4.2.2.1.
1671
+ #
1672
+ # Returns an array of strings or nil or raises ASN1::ASN1Error.
1673
+ #
1674
+ # source://openssl//lib/openssl/x509.rb#177
1675
+ def ocsp_uris; end
1676
+
1677
+ private
1678
+
1679
+ # source://openssl//lib/openssl/x509.rb#190
1680
+ def parse_aia_asn1; end
1681
+ end
1682
+
1683
+ # source://openssl//lib/openssl/x509.rb#95
1684
+ module OpenSSL::X509::Extension::AuthorityKeyIdentifier
1685
+ include ::OpenSSL::X509::Extension::Helpers
1686
+
1687
+ # Get the issuing certificate's key identifier from the
1688
+ # authorityKeyIdentifier extension, as described in RFC5280
1689
+ # Section 4.2.1.1
1690
+ #
1691
+ # Returns the binary String keyIdentifier or nil or raises
1692
+ # ASN1::ASN1Error.
1693
+ #
1694
+ # source://openssl//lib/openssl/x509.rb#104
1695
+ def authority_key_identifier; end
1696
+ end
1697
+
1698
+ # source://openssl//lib/openssl/x509.rb#121
1699
+ module OpenSSL::X509::Extension::CRLDistributionPoints
1700
+ include ::OpenSSL::X509::Extension::Helpers
1701
+
1702
+ # Get the distributionPoint fullName URI from the certificate's CRL
1703
+ # distribution points extension, as described in RFC 5280 Section
1704
+ # 4.2.1.13.
1705
+ #
1706
+ # Returns an array of strings or nil or raises ASN1::ASN1Error.
1707
+ #
1708
+ # source://openssl//lib/openssl/x509.rb#129
1709
+ def crl_uris; end
1710
+ end
1711
+
1712
+ # source://openssl//lib/openssl/x509.rb#68
1713
+ module OpenSSL::X509::Extension::Helpers
1714
+ # source://openssl//lib/openssl/x509.rb#69
1715
+ def find_extension(oid); end
1716
+ end
1717
+
1718
+ # source://openssl//lib/openssl/x509.rb#74
1719
+ module OpenSSL::X509::Extension::SubjectKeyIdentifier
1720
+ include ::OpenSSL::X509::Extension::Helpers
1721
+
1722
+ # Get the subject's key identifier from the subjectKeyIdentifier
1723
+ # exteension, as described in RFC5280 Section 4.2.1.2.
1724
+ #
1725
+ # Returns the binary String key identifier or nil or raises
1726
+ # ASN1::ASN1Error.
1727
+ #
1728
+ # source://openssl//lib/openssl/x509.rb#82
1729
+ def subject_key_identifier; end
1730
+ end
1731
+
1732
+ # source://openssl//lib/openssl/x509.rb#19
1733
+ class OpenSSL::X509::ExtensionFactory
1734
+ # @raise [ExtensionError]
1735
+ #
1736
+ # source://openssl//lib/openssl/x509.rb#28
1737
+ def create_ext_from_array(ary); end
1738
+
1739
+ # source://openssl//lib/openssl/x509.rb#40
1740
+ def create_ext_from_hash(hash); end
1741
+
1742
+ # "oid = critical, value"
1743
+ #
1744
+ # source://openssl//lib/openssl/x509.rb#33
1745
+ def create_ext_from_string(str); end
1746
+
1747
+ # source://openssl//lib/openssl/x509.rb#20
1748
+ def create_extension(*arg); end
1749
+ end
1750
+
1751
+ # source://openssl//lib/openssl/x509.rb#204
1752
+ class OpenSSL::X509::Name
1753
+ include ::Comparable
1754
+ include ::OpenSSL::Marshal
1755
+ extend ::OpenSSL::Marshal::ClassMethods
1756
+
1757
+ # source://openssl//lib/openssl/x509.rb#319
1758
+ def pretty_print(q); end
1759
+
1760
+ class << self
1761
+ # Parses the string representation of a distinguished name. Two
1762
+ # different forms are supported:
1763
+ #
1764
+ # - \OpenSSL format (<tt>X509_NAME_oneline()</tt>) used by
1765
+ # <tt>#to_s</tt>. For example: <tt>/DC=com/DC=example/CN=nobody</tt>
1766
+ # - \OpenSSL format (<tt>X509_NAME_print()</tt>)
1767
+ # used by <tt>#to_s(OpenSSL::X509::Name::COMPAT)</tt>. For example:
1768
+ # <tt>DC=com, DC=example, CN=nobody</tt>
1769
+ #
1770
+ # Neither of them is standardized and has quirks and inconsistencies
1771
+ # in handling of escaped characters or multi-valued RDNs.
1772
+ #
1773
+ # Use of this method is discouraged in new applications. See
1774
+ # Name.parse_rfc2253 and #to_utf8 for the alternative.
1775
+ #
1776
+ # source://openssl//lib/openssl/x509.rb#305
1777
+ def parse(str, template = T.unsafe(nil)); end
1778
+
1779
+ # Parses the string representation of a distinguished name. Two
1780
+ # different forms are supported:
1781
+ #
1782
+ # - \OpenSSL format (<tt>X509_NAME_oneline()</tt>) used by
1783
+ # <tt>#to_s</tt>. For example: <tt>/DC=com/DC=example/CN=nobody</tt>
1784
+ # - \OpenSSL format (<tt>X509_NAME_print()</tt>)
1785
+ # used by <tt>#to_s(OpenSSL::X509::Name::COMPAT)</tt>. For example:
1786
+ # <tt>DC=com, DC=example, CN=nobody</tt>
1787
+ #
1788
+ # Neither of them is standardized and has quirks and inconsistencies
1789
+ # in handling of escaped characters or multi-valued RDNs.
1790
+ #
1791
+ # Use of this method is discouraged in new applications. See
1792
+ # Name.parse_rfc2253 and #to_utf8 for the alternative.
1793
+ #
1794
+ # source://openssl//lib/openssl/x509.rb#305
1795
+ def parse_openssl(str, template = T.unsafe(nil)); end
1796
+
1797
+ # Parses the UTF-8 string representation of a distinguished name,
1798
+ # according to RFC 2253.
1799
+ #
1800
+ # See also #to_utf8 for the opposite operation.
1801
+ #
1802
+ # source://openssl//lib/openssl/x509.rb#286
1803
+ def parse_rfc2253(str, template = T.unsafe(nil)); end
1804
+ end
1805
+ end
1806
+
1807
+ # source://openssl//lib/openssl/x509.rb#207
1808
+ module OpenSSL::X509::Name::RFC2253DN
1809
+ private
1810
+
1811
+ # source://openssl//lib/openssl/x509.rb#237
1812
+ def expand_hexstring(str); end
1813
+
1814
+ # source://openssl//lib/openssl/x509.rb#225
1815
+ def expand_pair(str); end
1816
+
1817
+ # source://openssl//lib/openssl/x509.rb#244
1818
+ def expand_value(str1, str2, str3); end
1819
+
1820
+ # source://openssl//lib/openssl/x509.rb#251
1821
+ def scan(dn); end
1822
+
1823
+ class << self
1824
+ # source://openssl//lib/openssl/x509.rb#237
1825
+ def expand_hexstring(str); end
1826
+
1827
+ # source://openssl//lib/openssl/x509.rb#225
1828
+ def expand_pair(str); end
1829
+
1830
+ # source://openssl//lib/openssl/x509.rb#244
1831
+ def expand_value(str1, str2, str3); end
1832
+
1833
+ # source://openssl//lib/openssl/x509.rb#251
1834
+ def scan(dn); end
1835
+ end
1836
+ end
1837
+
1838
+ # source://openssl//lib/openssl/x509.rb#391
1839
+ class OpenSSL::X509::Request
1840
+ include ::OpenSSL::Marshal
1841
+ extend ::OpenSSL::Marshal::ClassMethods
1842
+
1843
+ # source://openssl//lib/openssl/x509.rb#394
1844
+ def ==(other); end
1845
+ end
1846
+
1847
+ # source://openssl//lib/openssl/x509.rb#384
1848
+ class OpenSSL::X509::Revoked
1849
+ # source://openssl//lib/openssl/x509.rb#385
1850
+ def ==(other); end
1851
+ end
1852
+
1853
+ # source://openssl//lib/openssl/x509.rb#336
1854
+ class OpenSSL::X509::StoreContext
1855
+ # source://openssl//lib/openssl/x509.rb#337
1856
+ def cleanup; end
1857
+ end
1858
+
1859
+ OpenSSL::X509::V_ERR_CA_KEY_TOO_SMALL = T.let(T.unsafe(nil), Integer)
1860
+ OpenSSL::X509::V_ERR_CA_MD_TOO_WEAK = T.let(T.unsafe(nil), Integer)
1861
+ OpenSSL::X509::V_ERR_CRL_PATH_VALIDATION_ERROR = T.let(T.unsafe(nil), Integer)
1862
+ OpenSSL::X509::V_ERR_DANE_NO_MATCH = T.let(T.unsafe(nil), Integer)
1863
+ OpenSSL::X509::V_ERR_DIFFERENT_CRL_SCOPE = T.let(T.unsafe(nil), Integer)
1864
+ OpenSSL::X509::V_ERR_EE_KEY_TOO_SMALL = T.let(T.unsafe(nil), Integer)
1865
+ OpenSSL::X509::V_ERR_EMAIL_MISMATCH = T.let(T.unsafe(nil), Integer)
1866
+ OpenSSL::X509::V_ERR_EXCLUDED_VIOLATION = T.let(T.unsafe(nil), Integer)
1867
+ OpenSSL::X509::V_ERR_HOSTNAME_MISMATCH = T.let(T.unsafe(nil), Integer)
1868
+ OpenSSL::X509::V_ERR_INVALID_CALL = T.let(T.unsafe(nil), Integer)
1869
+ OpenSSL::X509::V_ERR_INVALID_EXTENSION = T.let(T.unsafe(nil), Integer)
1870
+ OpenSSL::X509::V_ERR_INVALID_NON_CA = T.let(T.unsafe(nil), Integer)
1871
+ OpenSSL::X509::V_ERR_INVALID_POLICY_EXTENSION = T.let(T.unsafe(nil), Integer)
1872
+ OpenSSL::X509::V_ERR_IP_ADDRESS_MISMATCH = T.let(T.unsafe(nil), Integer)
1873
+ OpenSSL::X509::V_ERR_KEYUSAGE_NO_CRL_SIGN = T.let(T.unsafe(nil), Integer)
1874
+ OpenSSL::X509::V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE = T.let(T.unsafe(nil), Integer)
1875
+ OpenSSL::X509::V_ERR_NO_EXPLICIT_POLICY = T.let(T.unsafe(nil), Integer)
1876
+ OpenSSL::X509::V_ERR_NO_VALID_SCTS = T.let(T.unsafe(nil), Integer)
1877
+ OpenSSL::X509::V_ERR_OCSP_CERT_UNKNOWN = T.let(T.unsafe(nil), Integer)
1878
+ OpenSSL::X509::V_ERR_OCSP_VERIFY_FAILED = T.let(T.unsafe(nil), Integer)
1879
+ OpenSSL::X509::V_ERR_OCSP_VERIFY_NEEDED = T.let(T.unsafe(nil), Integer)
1880
+ OpenSSL::X509::V_ERR_PATH_LOOP = T.let(T.unsafe(nil), Integer)
1881
+ OpenSSL::X509::V_ERR_PERMITTED_VIOLATION = T.let(T.unsafe(nil), Integer)
1882
+ OpenSSL::X509::V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED = T.let(T.unsafe(nil), Integer)
1883
+ OpenSSL::X509::V_ERR_PROXY_PATH_LENGTH_EXCEEDED = T.let(T.unsafe(nil), Integer)
1884
+ OpenSSL::X509::V_ERR_PROXY_SUBJECT_NAME_VIOLATION = T.let(T.unsafe(nil), Integer)
1885
+ OpenSSL::X509::V_ERR_STORE_LOOKUP = T.let(T.unsafe(nil), Integer)
1886
+ OpenSSL::X509::V_ERR_SUBTREE_MINMAX = T.let(T.unsafe(nil), Integer)
1887
+ OpenSSL::X509::V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 = T.let(T.unsafe(nil), Integer)
1888
+ OpenSSL::X509::V_ERR_SUITE_B_INVALID_ALGORITHM = T.let(T.unsafe(nil), Integer)
1889
+ OpenSSL::X509::V_ERR_SUITE_B_INVALID_CURVE = T.let(T.unsafe(nil), Integer)
1890
+ OpenSSL::X509::V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM = T.let(T.unsafe(nil), Integer)
1891
+ OpenSSL::X509::V_ERR_SUITE_B_INVALID_VERSION = T.let(T.unsafe(nil), Integer)
1892
+ OpenSSL::X509::V_ERR_SUITE_B_LOS_NOT_ALLOWED = T.let(T.unsafe(nil), Integer)
1893
+ OpenSSL::X509::V_ERR_UNABLE_TO_GET_CRL_ISSUER = T.let(T.unsafe(nil), Integer)
1894
+ OpenSSL::X509::V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION = T.let(T.unsafe(nil), Integer)
1895
+ OpenSSL::X509::V_ERR_UNHANDLED_CRITICAL_EXTENSION = T.let(T.unsafe(nil), Integer)
1896
+ OpenSSL::X509::V_ERR_UNNESTED_RESOURCE = T.let(T.unsafe(nil), Integer)
1897
+ OpenSSL::X509::V_ERR_UNSPECIFIED = T.let(T.unsafe(nil), Integer)
1898
+ OpenSSL::X509::V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX = T.let(T.unsafe(nil), Integer)
1899
+ OpenSSL::X509::V_ERR_UNSUPPORTED_CONSTRAINT_TYPE = T.let(T.unsafe(nil), Integer)
1900
+ OpenSSL::X509::V_ERR_UNSUPPORTED_EXTENSION_FEATURE = T.let(T.unsafe(nil), Integer)
1901
+ OpenSSL::X509::V_ERR_UNSUPPORTED_NAME_SYNTAX = T.let(T.unsafe(nil), Integer)
1902
+ OpenSSL::X509::V_FLAG_NO_CHECK_TIME = T.let(T.unsafe(nil), Integer)
1903
+ OpenSSL::X509::V_FLAG_PARTIAL_CHAIN = T.let(T.unsafe(nil), Integer)
1904
+ OpenSSL::X509::V_FLAG_SUITEB_128_LOS = T.let(T.unsafe(nil), Integer)
1905
+ OpenSSL::X509::V_FLAG_SUITEB_128_LOS_ONLY = T.let(T.unsafe(nil), Integer)
1906
+ OpenSSL::X509::V_FLAG_SUITEB_192_LOS = T.let(T.unsafe(nil), Integer)
1907
+ OpenSSL::X509::V_FLAG_TRUSTED_FIRST = T.let(T.unsafe(nil), Integer)
1908
+ OpenSSL::X509::V_FLAG_USE_CHECK_TIME = T.let(T.unsafe(nil), Integer)