diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-06-15 18:24:59 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2023-06-15 18:26:33 +0300 |
commit | 068d4453cf9fc68c875eee73f5c637bb076f6a71 (patch) | |
tree | da3e83fdb9488ea08faa39d8b41916744f9acad7 /contrib | |
parent | 7e7de263d4acbc6eacf92b618bcb5f9049bccc9b (diff) | |
download | ydb-068d4453cf9fc68c875eee73f5c637bb076f6a71.tar.gz |
Create stable-23-2 branch
x-stable-origin-commit: 3fd4d58117c143ed9e6b21813ccd9e507d2cd4d3
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libs/grpc/CMakeLists.darwin.txt | 2 | ||||
-rw-r--r-- | contrib/libs/grpc/CMakeLists.linux-aarch64.txt | 2 | ||||
-rw-r--r-- | contrib/libs/grpc/CMakeLists.linux.txt | 2 | ||||
-rw-r--r-- | contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp | 16 | ||||
-rw-r--r-- | contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.h (renamed from contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.h) | 2 | ||||
-rw-r--r-- | contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp | 10 | ||||
-rw-r--r-- | contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc | 8 | ||||
-rw-r--r-- | contrib/libs/libfyaml/include/libfyaml.h | 14 | ||||
-rw-r--r-- | contrib/libs/libfyaml/src/lib/fy-doc.c | 12 |
9 files changed, 49 insertions, 19 deletions
diff --git a/contrib/libs/grpc/CMakeLists.darwin.txt b/contrib/libs/grpc/CMakeLists.darwin.txt index 9bb0c69fdb..7023bec32e 100644 --- a/contrib/libs/grpc/CMakeLists.darwin.txt +++ b/contrib/libs/grpc/CMakeLists.darwin.txt @@ -641,10 +641,10 @@ target_sources(contrib-libs-grpc PRIVATE ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc + ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc - ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_fallback.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc diff --git a/contrib/libs/grpc/CMakeLists.linux-aarch64.txt b/contrib/libs/grpc/CMakeLists.linux-aarch64.txt index d4e3b955f5..4ac27dae52 100644 --- a/contrib/libs/grpc/CMakeLists.linux-aarch64.txt +++ b/contrib/libs/grpc/CMakeLists.linux-aarch64.txt @@ -642,10 +642,10 @@ target_sources(contrib-libs-grpc PRIVATE ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc + ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc - ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_fallback.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc diff --git a/contrib/libs/grpc/CMakeLists.linux.txt b/contrib/libs/grpc/CMakeLists.linux.txt index d4e3b955f5..4ac27dae52 100644 --- a/contrib/libs/grpc/CMakeLists.linux.txt +++ b/contrib/libs/grpc/CMakeLists.linux.txt @@ -642,10 +642,10 @@ target_sources(contrib-libs-grpc PRIVATE ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc + ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc - ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_fallback.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.cc ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp b/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp new file mode 100644 index 0000000000..15629cfbe7 --- /dev/null +++ b/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.cpp @@ -0,0 +1,16 @@ +#include "add_arcadia_root_certs.h" +#include "grpc/support/alloc.h" + +#include <library/cpp/resource/resource.h> + +namespace grpc_core { + grpc_slice AddArcadiaRootCerts(grpc_slice systemCerts) { + TString cacert = NResource::Find("/builtin/cacert"); + size_t sumSize = cacert.size() + GRPC_SLICE_LENGTH(systemCerts); + char* bundleString = static_cast<char*>(gpr_zalloc(sumSize + 1)); // With \0. + memcpy(bundleString, cacert.data(), cacert.size()); + memcpy(bundleString + cacert.size(), GRPC_SLICE_START_PTR(systemCerts), GRPC_SLICE_LENGTH(systemCerts)); + grpc_slice_unref(systemCerts); + return grpc_slice_new(bundleString, sumSize, gpr_free); + } +} diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.h b/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.h index fb57648e48..d41bb2032f 100644 --- a/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.h +++ b/contrib/libs/grpc/src/core/lib/security/security_connector/add_arcadia_root_certs.h @@ -3,5 +3,5 @@ #include <grpc/slice.h> namespace grpc_core { - grpc_slice LoadArcadiaRootCerts(); + grpc_slice AddArcadiaRootCerts(grpc_slice systemCerts); } diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp b/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp deleted file mode 100644 index d07d3b21b8..0000000000 --- a/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "load_arcadia_root_certs.h" - -#include <library/cpp/resource/resource.h> - -namespace grpc_core { - grpc_slice LoadArcadiaRootCerts() { - TString cacert = NResource::Find("/builtin/cacert"); - return grpc_slice_from_copied_buffer(cacert.data(), cacert.size() + 1); // With \0. - } -} diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc index d7e5ba282e..c19641fcc5 100644 --- a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc +++ b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc @@ -39,7 +39,7 @@ #include "src/core/lib/security/security_connector/ssl_utils_config.h" #include "src/core/tsi/ssl_transport_security.h" -#include "load_arcadia_root_certs.h" +#include "add_arcadia_root_certs.h" /* -- Constants. -- */ @@ -581,13 +581,11 @@ grpc_slice DefaultSslRootStore::ComputePemRootCerts() { } gpr_free(pem_root_certs); } - // Load Arcadia certs. - if (GRPC_SLICE_IS_EMPTY(result)) { - result = LoadArcadiaRootCerts(); - } // Try loading roots from OS trust store if flag is enabled. if (GRPC_SLICE_IS_EMPTY(result) && !not_use_system_roots) { result = LoadSystemRootCerts(); + // Merge with Arcadia certs. + result = AddArcadiaRootCerts(result); } // Fallback to roots manually shipped with gRPC. if (GRPC_SLICE_IS_EMPTY(result) && diff --git a/contrib/libs/libfyaml/include/libfyaml.h b/contrib/libs/libfyaml/include/libfyaml.h index 2d8bed3ba6..263e7d0dc8 100644 --- a/contrib/libs/libfyaml/include/libfyaml.h +++ b/contrib/libs/libfyaml/include/libfyaml.h @@ -2772,6 +2772,20 @@ fy_node_get_style(struct fy_node *fyn) FY_EXPORT; /** + * fy_node_set_style() - Set the node style + * + * Set the node rendering style. + * If current node style is alias it won't be changed + * to save document structure + * + * @fyn: The node + * @style: The node style + */ +void +fy_node_set_style(struct fy_node *fyn, enum fy_node_style style) + FY_EXPORT; + +/** * fy_node_is_scalar() - Check whether the node is a scalar * * Convenience method for checking whether a node is a scalar. diff --git a/contrib/libs/libfyaml/src/lib/fy-doc.c b/contrib/libs/libfyaml/src/lib/fy-doc.c index a40694a24c..436a0b1cca 100644 --- a/contrib/libs/libfyaml/src/lib/fy-doc.c +++ b/contrib/libs/libfyaml/src/lib/fy-doc.c @@ -3352,6 +3352,18 @@ enum fy_node_style fy_node_get_style(struct fy_node *fyn) return fyn ? fyn->style : FYNS_PLAIN; } +void fy_node_set_style(struct fy_node *fyn, enum fy_node_style style) +{ + if (!fyn) + return; + + /* ignore alias nodes to save document structure */ + if (fyn->style == FYNS_ALIAS) + return; + + fyn->style = style; +} + bool fy_node_is_null(struct fy_node *fyn) { if (!fyn) |