aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorkonstantin-b <konstantin-b@yandex-team.ru>2022-02-10 16:50:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:44 +0300
commit8051c146c2522c597bb0743cb37c8cc8612895dc (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp
parentdec33fe4a0192d8918e7d310decc1e556d6acb3a (diff)
downloadydb-8051c146c2522c597bb0743cb37c8cc8612895dc.tar.gz
Restoring authorship annotation for <konstantin-b@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/interconnect/interconnect_stream.cpp26
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 843f78c162..158ebc9e1d 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()));