ruby-paseto 0.1.0 → 0.1.2

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.
@@ -946,12 +946,13 @@ class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey
946
946
  # rsa.private_decrypt(string, padding) -> String
947
947
  #
948
948
  # Decrypt +string+, which has been encrypted with the public key, with the
949
- # private key. +padding+ defaults to PKCS1_PADDING.
949
+ # private key. +padding+ defaults to PKCS1_PADDING, which is known to be
950
+ # insecure but is kept for backwards compatibility.
950
951
  #
951
952
  # <b>Deprecated in version 3.0</b>.
952
953
  # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.
953
954
  #
954
- # source://openssl//openssl/pkey.rb#435
955
+ # source://openssl//openssl/pkey.rb#439
955
956
  def private_decrypt(data, padding = T.unsafe(nil)); end
956
957
 
957
958
  # :call-seq:
@@ -959,14 +960,15 @@ class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey
959
960
  # rsa.private_encrypt(string, padding) -> String
960
961
  #
961
962
  # Encrypt +string+ with the private key. +padding+ defaults to
962
- # PKCS1_PADDING. The encrypted string output can be decrypted using
963
+ # PKCS1_PADDING, which is known to be insecure but is kept for backwards
964
+ # compatibility. The encrypted string output can be decrypted using
963
965
  # #public_decrypt.
964
966
  #
965
967
  # <b>Deprecated in version 3.0</b>.
966
968
  # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and
967
969
  # PKey::PKey#verify_recover instead.
968
970
  #
969
- # source://openssl//openssl/pkey.rb#372
971
+ # source://openssl//openssl/pkey.rb#373
970
972
  def private_encrypt(string, padding = T.unsafe(nil)); end
971
973
 
972
974
  # :call-seq:
@@ -974,13 +976,14 @@ class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey
974
976
  # rsa.public_decrypt(string, padding) -> String
975
977
  #
976
978
  # Decrypt +string+, which has been encrypted with the private key, with the
977
- # public key. +padding+ defaults to PKCS1_PADDING.
979
+ # public key. +padding+ defaults to PKCS1_PADDING which is known to be
980
+ # insecure but is kept for backwards compatibility.
978
981
  #
979
982
  # <b>Deprecated in version 3.0</b>.
980
983
  # Consider using PKey::PKey#sign_raw and PKey::PKey#verify_raw, and
981
984
  # PKey::PKey#verify_recover instead.
982
985
  #
983
- # source://openssl//openssl/pkey.rb#394
986
+ # source://openssl//openssl/pkey.rb#396
984
987
  def public_decrypt(string, padding = T.unsafe(nil)); end
985
988
 
986
989
  # :call-seq:
@@ -988,13 +991,14 @@ class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey
988
991
  # rsa.public_encrypt(string, padding) -> String
989
992
  #
990
993
  # Encrypt +string+ with the public key. +padding+ defaults to
991
- # PKCS1_PADDING. The encrypted string output can be decrypted using
994
+ # PKCS1_PADDING, which is known to be insecure but is kept for backwards
995
+ # compatibility. The encrypted string output can be decrypted using
992
996
  # #private_decrypt.
993
997
  #
994
998
  # <b>Deprecated in version 3.0</b>.
995
999
  # Consider using PKey::PKey#encrypt and PKey::PKey#decrypt instead.
996
1000
  #
997
- # source://openssl//openssl/pkey.rb#415
1001
+ # source://openssl//openssl/pkey.rb#418
998
1002
  def public_encrypt(data, padding = T.unsafe(nil)); end
999
1003
 
1000
1004
  # :call-seq:
@@ -1014,7 +1018,7 @@ class OpenSSL::PKey::RSA < ::OpenSSL::PKey::PKey
1014
1018
 
1015
1019
  private
1016
1020
 
1017
- # source://openssl//openssl/pkey.rb#452
1021
+ # source://openssl//openssl/pkey.rb#456
1018
1022
  def translate_padding_mode(num); end
1019
1023
 
1020
1024
  class << self
@@ -1044,23 +1048,23 @@ end
1044
1048
  module OpenSSL::SSL
1045
1049
  private
1046
1050
 
1047
- # source://openssl//openssl/ssl.rb#273
1051
+ # source://openssl//openssl/ssl.rb#276
1048
1052
  def verify_certificate_identity(cert, hostname); end
1049
1053
 
1050
- # source://openssl//openssl/ssl.rb#306
1054
+ # source://openssl//openssl/ssl.rb#309
1051
1055
  def verify_hostname(hostname, san); end
1052
1056
 
1053
- # source://openssl//openssl/ssl.rb#339
1057
+ # source://openssl//openssl/ssl.rb#342
1054
1058
  def verify_wildcard(domain_component, san_component); end
1055
1059
 
1056
1060
  class << self
1057
- # source://openssl//openssl/ssl.rb#273
1061
+ # source://openssl//openssl/ssl.rb#276
1058
1062
  def verify_certificate_identity(cert, hostname); end
1059
1063
 
1060
- # source://openssl//openssl/ssl.rb#306
1064
+ # source://openssl//openssl/ssl.rb#309
1061
1065
  def verify_hostname(hostname, san); end
1062
1066
 
1063
- # source://openssl//openssl/ssl.rb#339
1067
+ # source://openssl//openssl/ssl.rb#342
1064
1068
  def verify_wildcard(domain_component, san_component); end
1065
1069
  end
1066
1070
  end
@@ -1099,7 +1103,7 @@ class OpenSSL::SSL::SSLContext
1099
1103
  #
1100
1104
  # @return [SSLContext] a new instance of SSLContext
1101
1105
  #
1102
- # source://openssl//openssl/ssl.rb#124
1106
+ # source://openssl//openssl/ssl.rb#127
1103
1107
  def initialize(version = T.unsafe(nil)); end
1104
1108
 
1105
1109
  # call-seq:
@@ -1110,7 +1114,7 @@ class OpenSSL::SSL::SSLContext
1110
1114
  # Sets the upper bound of the supported SSL/TLS protocol version. See
1111
1115
  # #min_version= for the possible values.
1112
1116
  #
1113
- # source://openssl//openssl/ssl.rb#187
1117
+ # source://openssl//openssl/ssl.rb#190
1114
1118
  def max_version=(version); end
1115
1119
 
1116
1120
  # call-seq:
@@ -1134,7 +1138,7 @@ class OpenSSL::SSL::SSLContext
1134
1138
  # sock = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx)
1135
1139
  # sock.connect # Initiates a connection using either TLS 1.1 or TLS 1.2
1136
1140
  #
1137
- # source://openssl//openssl/ssl.rb#175
1141
+ # source://openssl//openssl/ssl.rb#178
1138
1142
  def min_version=(version); end
1139
1143
 
1140
1144
  # A callback invoked at connect time to distinguish between multiple
@@ -1143,7 +1147,7 @@ class OpenSSL::SSL::SSLContext
1143
1147
  # The callback is invoked with an SSLSocket and a server name. The
1144
1148
  # callback must return an SSLContext for the server name or nil.
1145
1149
  #
1146
- # source://openssl//openssl/ssl.rb#112
1150
+ # source://openssl//openssl/ssl.rb#115
1147
1151
  def servername_cb; end
1148
1152
 
1149
1153
  # A callback invoked at connect time to distinguish between multiple
@@ -1152,7 +1156,7 @@ class OpenSSL::SSL::SSLContext
1152
1156
  # The callback is invoked with an SSLSocket and a server name. The
1153
1157
  # callback must return an SSLContext for the server name or nil.
1154
1158
  #
1155
- # source://openssl//openssl/ssl.rb#112
1159
+ # source://openssl//openssl/ssl.rb#115
1156
1160
  def servername_cb=(_arg0); end
1157
1161
 
1158
1162
  # call-seq:
@@ -1167,7 +1171,7 @@ class OpenSSL::SSL::SSLContext
1167
1171
  # cert_store are not set then the system default certificate store is
1168
1172
  # used.
1169
1173
  #
1170
- # source://openssl//openssl/ssl.rb#143
1174
+ # source://openssl//openssl/ssl.rb#146
1171
1175
  def set_params(params = T.unsafe(nil)); end
1172
1176
 
1173
1177
  # call-seq:
@@ -1185,7 +1189,7 @@ class OpenSSL::SSL::SSLContext
1185
1189
  # the context. As of Ruby/OpenSSL 2.1, this accessor method is
1186
1190
  # implemented to call #min_version= and #max_version= instead.
1187
1191
  #
1188
- # source://openssl//openssl/ssl.rb#206
1192
+ # source://openssl//openssl/ssl.rb#209
1189
1193
  def ssl_version=(meth); end
1190
1194
 
1191
1195
  # A callback invoked when DH parameters are required for ephemeral DH key
@@ -1200,7 +1204,7 @@ class OpenSSL::SSL::SSLContext
1200
1204
  #
1201
1205
  # <b>Deprecated in version 3.0.</b> Use #tmp_dh= instead.
1202
1206
  #
1203
- # source://openssl//openssl/ssl.rb#105
1207
+ # source://openssl//openssl/ssl.rb#108
1204
1208
  def tmp_dh_callback; end
1205
1209
 
1206
1210
  # A callback invoked when DH parameters are required for ephemeral DH key
@@ -1215,23 +1219,23 @@ class OpenSSL::SSL::SSLContext
1215
1219
  #
1216
1220
  # <b>Deprecated in version 3.0.</b> Use #tmp_dh= instead.
1217
1221
  #
1218
- # source://openssl//openssl/ssl.rb#105
1222
+ # source://openssl//openssl/ssl.rb#108
1219
1223
  def tmp_dh_callback=(_arg0); end
1220
1224
  end
1221
1225
 
1222
- # source://openssl//openssl/ssl.rb#34
1226
+ # source://openssl//openssl/ssl.rb#37
1223
1227
  OpenSSL::SSL::SSLContext::DEFAULT_2048 = T.let(T.unsafe(nil), OpenSSL::PKey::DH)
1224
1228
 
1225
- # source://openssl//openssl/ssl.rb#46
1229
+ # source://openssl//openssl/ssl.rb#49
1226
1230
  OpenSSL::SSL::SSLContext::DEFAULT_TMP_DH_CALLBACK = T.let(T.unsafe(nil), Proc)
1227
1231
 
1228
1232
  # The list of available SSL/TLS methods. This constant is only provided
1229
1233
  # for backwards compatibility.
1230
1234
  #
1231
- # source://openssl//openssl/ssl.rb#232
1235
+ # source://openssl//openssl/ssl.rb#235
1232
1236
  OpenSSL::SSL::SSLContext::METHODS = T.let(T.unsafe(nil), Array)
1233
1237
 
1234
- # source://openssl//openssl/ssl.rb#220
1238
+ # source://openssl//openssl/ssl.rb#223
1235
1239
  OpenSSL::SSL::SSLContext::METHODS_MAP = T.let(T.unsafe(nil), Hash)
1236
1240
 
1237
1241
  class OpenSSL::SSL::SSLErrorWaitReadable < ::OpenSSL::SSL::SSLError
@@ -1252,42 +1256,42 @@ class OpenSSL::SSL::SSLServer
1252
1256
  #
1253
1257
  # @return [SSLServer] a new instance of SSLServer
1254
1258
  #
1255
- # source://openssl//openssl/ssl.rb#488
1259
+ # source://openssl//openssl/ssl.rb#491
1256
1260
  def initialize(svr, ctx); end
1257
1261
 
1258
1262
  # Works similar to TCPServer#accept.
1259
1263
  #
1260
- # source://openssl//openssl/ssl.rb#516
1264
+ # source://openssl//openssl/ssl.rb#519
1261
1265
  def accept; end
1262
1266
 
1263
1267
  # See IO#close for details.
1264
1268
  #
1265
- # source://openssl//openssl/ssl.rb#537
1269
+ # source://openssl//openssl/ssl.rb#540
1266
1270
  def close; end
1267
1271
 
1268
1272
  # See TCPServer#listen for details.
1269
1273
  #
1270
- # source://openssl//openssl/ssl.rb#506
1274
+ # source://openssl//openssl/ssl.rb#509
1271
1275
  def listen(backlog = T.unsafe(nil)); end
1272
1276
 
1273
1277
  # See BasicSocket#shutdown for details.
1274
1278
  #
1275
- # source://openssl//openssl/ssl.rb#511
1279
+ # source://openssl//openssl/ssl.rb#514
1276
1280
  def shutdown(how = T.unsafe(nil)); end
1277
1281
 
1278
1282
  # When true then #accept works exactly the same as TCPServer#accept
1279
1283
  #
1280
- # source://openssl//openssl/ssl.rb#483
1284
+ # source://openssl//openssl/ssl.rb#486
1281
1285
  def start_immediately; end
1282
1286
 
1283
1287
  # When true then #accept works exactly the same as TCPServer#accept
1284
1288
  #
1285
- # source://openssl//openssl/ssl.rb#483
1289
+ # source://openssl//openssl/ssl.rb#486
1286
1290
  def start_immediately=(_arg0); end
1287
1291
 
1288
1292
  # Returns the TCPServer passed to the SSLServer when initialized.
1289
1293
  #
1290
- # source://openssl//openssl/ssl.rb#501
1294
+ # source://openssl//openssl/ssl.rb#504
1291
1295
  def to_io; end
1292
1296
  end
1293
1297
 
@@ -1298,17 +1302,17 @@ class OpenSSL::SSL::SSLSocket
1298
1302
 
1299
1303
  # The SSLContext object used in this connection.
1300
1304
  #
1301
- # source://openssl//openssl/ssl.rb#368
1305
+ # source://openssl//openssl/ssl.rb#371
1302
1306
  def context; end
1303
1307
 
1304
1308
  # Returns the value of attribute hostname.
1305
1309
  #
1306
- # source://openssl//openssl/ssl.rb#361
1310
+ # source://openssl//openssl/ssl.rb#364
1307
1311
  def hostname; end
1308
1312
 
1309
1313
  # The underlying IO object.
1310
1314
  #
1311
- # source://openssl//openssl/ssl.rb#364
1315
+ # source://openssl//openssl/ssl.rb#367
1312
1316
  def io; end
1313
1317
 
1314
1318
  # call-seq:
@@ -1319,7 +1323,7 @@ class OpenSSL::SSL::SSLSocket
1319
1323
  # This method MUST be called after calling #connect to ensure that the
1320
1324
  # hostname of a remote peer has been verified.
1321
1325
  #
1322
- # source://openssl//openssl/ssl.rb#394
1326
+ # source://openssl//openssl/ssl.rb#397
1323
1327
  def post_connection_check(hostname); end
1324
1328
 
1325
1329
  # call-seq:
@@ -1328,19 +1332,19 @@ class OpenSSL::SSL::SSLSocket
1328
1332
  # Returns the SSLSession object currently used, or nil if the session is
1329
1333
  # not established.
1330
1334
  #
1331
- # source://openssl//openssl/ssl.rb#415
1335
+ # source://openssl//openssl/ssl.rb#418
1332
1336
  def session; end
1333
1337
 
1334
1338
  # Whether to close the underlying socket as well, when the SSL/TLS
1335
1339
  # connection is shut down. This defaults to +false+.
1336
1340
  #
1337
- # source://openssl//openssl/ssl.rb#372
1341
+ # source://openssl//openssl/ssl.rb#375
1338
1342
  def sync_close; end
1339
1343
 
1340
1344
  # Whether to close the underlying socket as well, when the SSL/TLS
1341
1345
  # connection is shut down. This defaults to +false+.
1342
1346
  #
1343
- # source://openssl//openssl/ssl.rb#372
1347
+ # source://openssl//openssl/ssl.rb#375
1344
1348
  def sync_close=(_arg0); end
1345
1349
 
1346
1350
  # call-seq:
@@ -1351,31 +1355,31 @@ class OpenSSL::SSL::SSLSocket
1351
1355
  #
1352
1356
  # If sync_close is set to +true+, the underlying IO is also closed.
1353
1357
  #
1354
- # source://openssl//openssl/ssl.rb#381
1358
+ # source://openssl//openssl/ssl.rb#384
1355
1359
  def sysclose; end
1356
1360
 
1357
1361
  # The underlying IO object.
1358
1362
  #
1359
- # source://openssl//openssl/ssl.rb#364
1363
+ # source://openssl//openssl/ssl.rb#367
1360
1364
  def to_io; end
1361
1365
 
1362
1366
  private
1363
1367
 
1364
- # source://openssl//openssl/ssl.rb#429
1368
+ # source://openssl//openssl/ssl.rb#432
1365
1369
  def client_cert_cb; end
1366
1370
 
1367
- # source://openssl//openssl/ssl.rb#441
1371
+ # source://openssl//openssl/ssl.rb#444
1368
1372
  def session_get_cb; end
1369
1373
 
1370
- # source://openssl//openssl/ssl.rb#437
1374
+ # source://openssl//openssl/ssl.rb#440
1371
1375
  def session_new_cb; end
1372
1376
 
1373
- # source://openssl//openssl/ssl.rb#433
1377
+ # source://openssl//openssl/ssl.rb#436
1374
1378
  def tmp_dh_callback; end
1375
1379
 
1376
1380
  # @return [Boolean]
1377
1381
  #
1378
- # source://openssl//openssl/ssl.rb#423
1382
+ # source://openssl//openssl/ssl.rb#426
1379
1383
  def using_anon_cipher?; end
1380
1384
 
1381
1385
  class << self
@@ -1400,38 +1404,38 @@ class OpenSSL::SSL::SSLSocket
1400
1404
  # sock = OpenSSL::SSL::SSLSocket.open('localhost', 443, context: ctx)
1401
1405
  # sock.connect # Initiates a connection to localhost:443 with SSLContext
1402
1406
  #
1403
- # source://openssl//openssl/ssl.rb#467
1407
+ # source://openssl//openssl/ssl.rb#470
1404
1408
  def open(remote_host, remote_port, local_host = T.unsafe(nil), local_port = T.unsafe(nil), context: T.unsafe(nil)); end
1405
1409
  end
1406
1410
  end
1407
1411
 
1408
1412
  module OpenSSL::SSL::SocketForwarder
1409
- # source://openssl//openssl/ssl.rb#244
1413
+ # source://openssl//openssl/ssl.rb#247
1410
1414
  def addr; end
1411
1415
 
1412
1416
  # @return [Boolean]
1413
1417
  #
1414
- # source://openssl//openssl/ssl.rb#264
1418
+ # source://openssl//openssl/ssl.rb#267
1415
1419
  def closed?; end
1416
1420
 
1417
- # source://openssl//openssl/ssl.rb#268
1421
+ # source://openssl//openssl/ssl.rb#271
1418
1422
  def do_not_reverse_lookup=(flag); end
1419
1423
 
1420
- # source://openssl//openssl/ssl.rb#260
1424
+ # source://openssl//openssl/ssl.rb#263
1421
1425
  def fcntl(*args); end
1422
1426
 
1423
1427
  # The file descriptor for the socket.
1424
1428
  #
1425
- # source://openssl//openssl/ssl.rb#240
1429
+ # source://openssl//openssl/ssl.rb#243
1426
1430
  def fileno; end
1427
1431
 
1428
- # source://openssl//openssl/ssl.rb#256
1432
+ # source://openssl//openssl/ssl.rb#259
1429
1433
  def getsockopt(level, optname); end
1430
1434
 
1431
- # source://openssl//openssl/ssl.rb#248
1435
+ # source://openssl//openssl/ssl.rb#251
1432
1436
  def peeraddr; end
1433
1437
 
1434
- # source://openssl//openssl/ssl.rb#252
1438
+ # source://openssl//openssl/ssl.rb#255
1435
1439
  def setsockopt(level, optname, optval); end
1436
1440
  end
1437
1441