TSG-3455 修正 tfe.fs2 的 trusted_cert_nums 计数
This commit is contained in:
@@ -2068,13 +2068,21 @@ void ssl_stream_free(struct ssl_stream * s_stream, struct event_base * evbase, s
|
|||||||
|
|
||||||
int ssl_manager_add_trust_ca(struct ssl_mgr* mgr, const char* pem_file)
|
int ssl_manager_add_trust_ca(struct ssl_mgr* mgr, const char* pem_file)
|
||||||
{
|
{
|
||||||
|
int ret = ssl_trusted_cert_storage_add(mgr->trust_CA_store, SSL_X509_OBJ_CERT, pem_file);
|
||||||
|
if (ret == 1)
|
||||||
|
{
|
||||||
ATOMIC_INC(&((*(mgr->svc_cache)).stat.trusted_cert_cnt));
|
ATOMIC_INC(&((*(mgr->svc_cache)).stat.trusted_cert_cnt));
|
||||||
return ssl_trusted_cert_storage_add(mgr->trust_CA_store, SSL_X509_OBJ_CERT, pem_file);
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
int ssl_manager_del_trust_ca(struct ssl_mgr* mgr, const char* pem_file)
|
int ssl_manager_del_trust_ca(struct ssl_mgr* mgr, const char* pem_file)
|
||||||
{
|
{
|
||||||
|
int ret = ssl_trusted_cert_storage_del(mgr->trust_CA_store, SSL_X509_OBJ_CERT, pem_file);
|
||||||
|
if (ret == 1)
|
||||||
|
{
|
||||||
ATOMIC_DEC(&((*(mgr->svc_cache)).stat.trusted_cert_cnt));
|
ATOMIC_DEC(&((*(mgr->svc_cache)).stat.trusted_cert_cnt));
|
||||||
return ssl_trusted_cert_storage_del(mgr->trust_CA_store, SSL_X509_OBJ_CERT, pem_file);
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
int ssl_manager_add_crl(struct ssl_mgr* mgr, const char* pem_file)
|
int ssl_manager_add_crl(struct ssl_mgr* mgr, const char* pem_file)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user