tlsctx_client_session_cache_new() -> tlsctx_client_session_create()
Additionally to renaming, it changes the function definition so that
it accepts a pointer to pointer instead of returning a pointer to the
new object.
It is mostly done to make it in line with other functions in the
module.
(cherry picked from commit 7962e7f575)
This commit is contained in:
@@ -320,9 +320,10 @@ typedef struct isc_tlsctx_client_session_cache isc_tlsctx_client_session_cache_t
|
||||
* comparable to or surpass the size of a typical DNS message.
|
||||
*/
|
||||
|
||||
isc_tlsctx_client_session_cache_t *
|
||||
isc_tlsctx_client_session_cache_new(isc_mem_t *mctx, isc_tlsctx_t *ctx,
|
||||
const size_t max_entries);
|
||||
void
|
||||
isc_tlsctx_client_session_cache_create(
|
||||
isc_mem_t *mctx, isc_tlsctx_t *ctx, const size_t max_entries,
|
||||
isc_tlsctx_client_session_cache_t **cachep);
|
||||
/*%<
|
||||
* Create a new TLS client session cache object.
|
||||
*
|
||||
@@ -330,6 +331,7 @@ isc_tlsctx_client_session_cache_new(isc_mem_t *mctx, isc_tlsctx_t *ctx,
|
||||
*\li 'mctx' is a valid memory context object;
|
||||
*\li 'ctx' is a valid TLS context object;
|
||||
*\li 'max_entries' is a positive number;
|
||||
*\li 'cachep' is a valid pointer to a pointer which must be equal to NULL.
|
||||
*/
|
||||
|
||||
void
|
||||
|
||||
@@ -1391,13 +1391,15 @@ struct isc_tlsctx_client_session_cache {
|
||||
isc_mutex_t lock;
|
||||
};
|
||||
|
||||
isc_tlsctx_client_session_cache_t *
|
||||
isc_tlsctx_client_session_cache_new(isc_mem_t *mctx, isc_tlsctx_t *ctx,
|
||||
const size_t max_entries) {
|
||||
void
|
||||
isc_tlsctx_client_session_cache_create(
|
||||
isc_mem_t *mctx, isc_tlsctx_t *ctx, const size_t max_entries,
|
||||
isc_tlsctx_client_session_cache_t **cachep) {
|
||||
isc_tlsctx_client_session_cache_t *nc;
|
||||
|
||||
REQUIRE(ctx != NULL);
|
||||
REQUIRE(max_entries > 0);
|
||||
REQUIRE(cachep != NULL && *cachep == NULL);
|
||||
|
||||
nc = isc_mem_get(mctx, sizeof(*nc));
|
||||
|
||||
@@ -1412,7 +1414,7 @@ isc_tlsctx_client_session_cache_new(isc_mem_t *mctx, isc_tlsctx_t *ctx,
|
||||
|
||||
nc->magic = TLSCTX_CLIENT_SESSION_CACHE_MAGIC;
|
||||
|
||||
return (nc);
|
||||
*cachep = nc;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user