@@ -276,6 +276,10 @@ namespace NInterconnect {
276
276
RSA_free (rsa);
277
277
}
278
278
279
+ void operator ()(EVP_PKEY *pKey) const {
280
+ EVP_PKEY_free (pKey);
281
+ }
282
+
279
283
void operator ()(SSL_CTX *ctx) const {
280
284
SSL_CTX_free (ctx);
281
285
}
@@ -297,7 +301,7 @@ namespace NInterconnect {
297
301
Y_ABORT_UNLESS (Ctx, " SSL_CTX_new() failed" );
298
302
ret = SSL_CTX_set_min_proto_version (Ctx.get (), TLS1_2_VERSION);
299
303
Y_ABORT_UNLESS (ret == 1 , " failed to set min proto version" );
300
- ret = SSL_CTX_set_max_proto_version (Ctx.get (), TLS1_2_VERSION );
304
+ ret = SSL_CTX_set_max_proto_version (Ctx.get (), TLS1_3_VERSION );
301
305
Y_ABORT_UNLESS (ret == 1 , " failed to set max proto version" );
302
306
#endif
303
307
SSL_CTX_set_verify (Ctx.get (), SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, &Verify);
@@ -328,9 +332,9 @@ namespace NInterconnect {
328
332
if (privateKey) {
329
333
std::unique_ptr<BIO, TDeleter> bio (BIO_new_mem_buf (privateKey.data (), privateKey.size ()));
330
334
Y_ABORT_UNLESS (bio);
331
- std::unique_ptr<RSA , TDeleter> pkey (PEM_read_bio_RSAPrivateKey (bio.get (), nullptr , nullptr , nullptr ));
335
+ std::unique_ptr<EVP_PKEY , TDeleter> pkey (PEM_read_bio_PrivateKey (bio.get (), nullptr , nullptr , nullptr ));
332
336
Y_ABORT_UNLESS (pkey);
333
- ret = SSL_CTX_use_RSAPrivateKey (Ctx.get (), pkey.get ());
337
+ ret = SSL_CTX_use_PrivateKey (Ctx.get (), pkey.get ());
334
338
Y_ABORT_UNLESS (ret == 1 );
335
339
}
336
340
if (caFilePath) {
0 commit comments