diff --git a/plugin/business/ssl-policy/src/ssl_policy.cpp b/plugin/business/ssl-policy/src/ssl_policy.cpp index b48c345..fb9dde7 100644 --- a/plugin/business/ssl-policy/src/ssl_policy.cpp +++ b/plugin/business/ssl-policy/src/ssl_policy.cpp @@ -81,7 +81,21 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin param->keyring=1; item=cJSON_GetObjectItem(json, "keyring"); - if(item && item->type==cJSON_Number) param->keyring=item->valueint; + if(item) + { + if(item->type==cJSON_Number) + { + param->keyring=item->valueint; + } + else if(item->type==cJSON_String) + { + param->keyring=atoi(item->valuestring); + } + else + { + TFE_LOG_ERROR(enforcer->logger, "Invalid intercept parameter: %d invalid keyring format", param->policy_id); + } + } exclusions=cJSON_GetObjectItem(json, "exclusions"); if(exclusions)