添加缓存时间判断

修改编译错误
This commit is contained in:
fengweihao
2019-07-26 13:19:37 +08:00
parent fc2791ee90
commit bd1861d6ce
2 changed files with 5 additions and 1 deletions

View File

@@ -484,6 +484,10 @@ struct key_keeper* key_keeper_init(const char * profile, const char* section, vo
MESA_load_profile_int_def(profile, section, "cert_expire_time", &(keeper->cert_expire_time), 24);
keeper->cert_cache = create_hash_table(keeper->hash_slot_size, keeper->hash_expire_seconds);
if (keeper->cert_expire_time != -1)
{
keeper->hash_expire_seconds = MIN(keeper->cert_expire_time * 1800, (int)(keeper->hash_expire_seconds));
}
if(0==strcmp(keeper->untrusted_ca_path, keeper->trusted_ca_path))
{
TFE_LOG_ERROR(logger, "Warnning: Trusted and Untrusted Root CA share the same path %s .", keeper->trusted_ca_path);

View File

@@ -691,7 +691,7 @@ X509 * ssl_x509_forge(X509 * cacrt, EVP_PKEY * cakey, X509 * origcrt, EVP_PKEY *
else
{
if(!X509_gmtime_adj(X509_get_notBefore(crt), (long)(0 - cert_expire_time * 1800)) ||
!X509_gmtime_adj(X509_get_notAfter(crt), (long)(cert_expire_time * 1800))
!X509_gmtime_adj(X509_get_notAfter(crt), (long)(cert_expire_time * 1800)))
{
goto errout;
}