diff options
author | Krzysztof KosiĆski <krzysio@google.com> | 2024-02-23 02:35:29 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-02-23 02:35:29 +0000 |
commit | d53c80d78835e4465edd59e8ea19c259d05ec54b (patch) | |
tree | a0da8416687a507faab2c3de09a7791d4255189e /src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h | |
parent | 7f52fa8c3060b403b3ce1181d4e636f720f891f9 (diff) | |
parent | d0ea8b5e8030562cfe6a6be629b9149f8700523b (diff) | |
download | grpc-grpc-d53c80d78835e4465edd59e8ea19c259d05ec54b.tar.gz |
Upgrade gRPC to version 1.61.1. am: d0ea8b5e80
Original change: https://android-review.googlesource.com/c/platform/external/grpc-grpc/+/2972751
Change-Id: I0e12d02c8be49fdf7d73f148c15531b144eff74e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h')
-rw-r--r-- | src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h index 2965e97f31..1a3e256881 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h @@ -23,33 +23,34 @@ #include <stdbool.h> -#include "src/core/tsi/transport_security_grpc.h" +#include "src/core/tsi/alts/crypt/gsec.h" +#include "src/core/tsi/transport_security_interface.h" -/// -/// This method creates an ALTS zero-copy grpc protector. -/// -///- key: a symmetric key used to seal/unseal frames. -///- key_size: the size of symmetric key. -///- is_rekey: use rekeying AEAD crypter. -///- is_client: a flag indicating if the protector will be used at client or -/// server side. -///- is_integrity_only: a flag indicating if the protector instance will be -/// used for integrity-only or privacy-integrity mode. -///- enable_extra_copy: a flag indicating if the protector instance does one -/// extra memory copy during the protect operation for integrity_only mode. -/// For the unprotect operation, it is still zero-copy. If application intends -/// to modify the data buffer after the protect operation, we can turn on this -/// mode to avoid integrity check failure. -///- max_protected_frame_size: an in/out parameter indicating max frame size -/// to be used by the protector. If it is nullptr, the default frame size will -/// be used. Otherwise, the provided frame size will be adjusted (if not -/// falling into a valid frame range) and used. -///- protector: a pointer to the zero-copy protector returned from the method. -/// -/// This method returns TSI_OK on success or a specific error code otherwise. -/// +// +// This method creates an ALTS zero-copy grpc protector. +// +//- key_factory: a key factory that creates keys to seal/unseal frames. +// it self-contains the information such as key length and whether rekey is +// supported. +//- is_client: a flag indicating if the protector will be used at client or +// server side. +//- is_integrity_only: a flag indicating if the protector instance will be +// used for integrity-only or privacy-integrity mode. +//- enable_extra_copy: a flag indicating if the protector instance does one +// extra memory copy during the protect operation for integrity_only mode. +// For the unprotect operation, it is still zero-copy. If application intends +// to modify the data buffer after the protect operation, we can turn on this +// mode to avoid integrity check failure. +//- max_protected_frame_size: an in/out parameter indicating max frame size +// to be used by the protector. If it is nullptr, the default frame size will +// be used. Otherwise, the provided frame size will be adjusted (if not +// falling into a valid frame range) and used. +//- protector: a pointer to the zero-copy protector returned from the method. +// +// This method returns TSI_OK on success or a specific error code otherwise. +// tsi_result alts_zero_copy_grpc_protector_create( - const uint8_t* key, size_t key_size, bool is_rekey, bool is_client, + const grpc_core::GsecKeyFactoryInterface& key_factory, bool is_client, bool is_integrity_only, bool enable_extra_copy, size_t* max_protected_frame_size, tsi_zero_copy_grpc_protector** protector); |