diff options
author | 2018-02-21 16:44:35 -0800 | |
---|---|---|
committer | 2018-03-20 09:17:28 -0700 | |
commit | 7ae3733cab31c9c8b06dc5961984e063685de261 (patch) | |
tree | b4d8535830d94b9de4b520761c29ff1162fcf485 /include/grpc/grpc_security.h | |
parent | c4223da3ef38b1ad728e5b6a7ccd3dd0a0008937 (diff) |
[grpc] Add SSL session client cache support
Diffstat (limited to 'include/grpc/grpc_security.h')
-rw-r--r-- | include/grpc/grpc_security.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index abc591fd75..7c069b39d5 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -100,6 +100,25 @@ GRPCAPI void grpc_auth_context_add_cstring_property(grpc_auth_context* ctx, GRPCAPI int grpc_auth_context_set_peer_identity_property_name( grpc_auth_context* ctx, const char* name); +/** --- SSL Session Cache. --- + + A SSL session cache object represents a way to cache client sessions + between connections. Only ticket-based resumption is supported. */ + +typedef struct grpc_ssl_session_cache grpc_ssl_session_cache; + +/** Create LRU cache for client-side SSL sessions with the given capacity. + If capacity is < 1, a default capacity is used instead. */ +GRPCAPI grpc_ssl_session_cache* grpc_ssl_session_cache_create_lru( + size_t capacity); + +/** Destroy SSL session cache. */ +GRPCAPI void grpc_ssl_session_cache_destroy(grpc_ssl_session_cache* cache); + +/** Create a channel arg with the given cache object. */ +GRPCAPI grpc_arg +grpc_ssl_session_cache_create_channel_arg(grpc_ssl_session_cache* cache); + /** --- grpc_channel_credentials object. --- A channel credentials object represents a way to authenticate a client on a |