diff options
author | konstantin-b <konstantin-b@yandex-team.ru> | 2022-02-10 16:50:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:44 +0300 |
commit | dec33fe4a0192d8918e7d310decc1e556d6acb3a (patch) | |
tree | 3e7894a2b6ceafdc87aad0db48bb2df662e24ea5 /library/cpp | |
parent | f264dfab52922fb4b9150740c45fcb063e150c10 (diff) | |
download | ydb-dec33fe4a0192d8918e7d310decc1e556d6acb3a.tar.gz |
Restoring authorship annotation for <konstantin-b@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/actors/interconnect/interconnect_stream.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/actors/interconnect/interconnect_stream.cpp b/library/cpp/actors/interconnect/interconnect_stream.cpp index 158ebc9e1d5..843f78c1626 100644 --- a/library/cpp/actors/interconnect/interconnect_stream.cpp +++ b/library/cpp/actors/interconnect/interconnect_stream.cpp @@ -287,23 +287,23 @@ namespace NInterconnect { if (certificate) { std::unique_ptr<BIO, TDeleter> bio(BIO_new_mem_buf(certificate.data(), certificate.size())); Y_VERIFY(bio); - - // first certificate in the chain is expected to be a leaf + + // first certificate in the chain is expected to be a leaf std::unique_ptr<X509, TDeleter> cert(PEM_read_bio_X509(bio.get(), nullptr, nullptr, nullptr)); Y_VERIFY(cert, "failed to parse certificate"); ret = SSL_CTX_use_certificate(Ctx.get(), cert.get()); Y_VERIFY(ret == 1); - - // loading additional certificates in the chain, if any - while(true) { - X509 *ca = PEM_read_bio_X509(bio.get(), nullptr, nullptr, nullptr); - if (ca == nullptr) { - break; - } - ret = SSL_CTX_add0_chain_cert(Ctx.get(), ca); - Y_VERIFY(ret == 1); - // we must not free memory if certificate was added successfully by SSL_CTX_add0_chain_cert - } + + // loading additional certificates in the chain, if any + while(true) { + X509 *ca = PEM_read_bio_X509(bio.get(), nullptr, nullptr, nullptr); + if (ca == nullptr) { + break; + } + ret = SSL_CTX_add0_chain_cert(Ctx.get(), ca); + Y_VERIFY(ret == 1); + // we must not free memory if certificate was added successfully by SSL_CTX_add0_chain_cert + } } if (privateKey) { std::unique_ptr<BIO, TDeleter> bio(BIO_new_mem_buf(privateKey.data(), privateKey.size())); |