diff options
| author | luwenpeng <[email protected]> | 2019-08-15 13:15:54 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2019-09-03 11:03:03 +0800 |
| commit | 1f7a32f7f51eeef45bb58dde4e7d5d9d060ff932 (patch) | |
| tree | 8722c02415676ebc751af84cd2682a821540b0c3 /platform/src/ssl_service_cache.cpp | |
| parent | 9c8bc53d284ea2d2242255c5e641447d6ea5ab22 (diff) | |
修正 ssl_svc_client_st_mk_key() 返回的 hash_key_sz
Diffstat (limited to 'platform/src/ssl_service_cache.cpp')
| -rw-r--r-- | platform/src/ssl_service_cache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/src/ssl_service_cache.cpp b/platform/src/ssl_service_cache.cpp index 994b816..1bc3442 100644 --- a/platform/src/ssl_service_cache.cpp +++ b/platform/src/ssl_service_cache.cpp @@ -137,7 +137,7 @@ static size_t ssl_svc_client_st_mk_key(const struct ssl_chello* chello, const st key_len=snprintf(key_buff, sz, "%s:", sip); chello_id_len=ssl_svc_app_st_mk_key(chello, addr, chello_id_buff, sizeof(chello_id_buff)); memcpy(key_buff+key_len, chello_id_buff, MIN(chello_id_len, sz-key_len)); - key_len+=chello_id_len; + key_len += MIN(chello_id_len, sz-key_len); free(addr_str); return key_len; @@ -378,7 +378,7 @@ struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsig cache->fail_as_cli_pinning_count=fail_as_pinning_cnt; cache->fail_as_proto_err_count=fail_as_proto_err_cnt; cache->fail_time_window=fail_time_win; - cache->succ_as_app_not_pinning_count=4;//TODO: read from profile. + cache->succ_as_app_not_pinning_count=SUCC_AS_APP_NOT_PINNING;//TODO: read from profile. void (*free_func[])(void *)={ssl_svc_free_client_st, ssl_svc_free_server_st, ssl_svc_free_app_st}; for(i=0; i<3; i++) { |
