InterceptPolicy:添加protocol errors参数、且修正默认参数
This commit is contained in:
@@ -141,6 +141,7 @@ public class InterceptController extends CommonController {
|
||||
String cert_transparency = request.getParameter("cert_transparency");
|
||||
String client_cert_req = request.getParameter("client_cert_req");
|
||||
String pinning = request.getParameter("pinning");
|
||||
String protocol_errors = request.getParameter("protocol_errors");
|
||||
if(StringUtils.isNotBlank(ev_cert)){
|
||||
map.put("ev_cert", Integer.parseInt(ev_cert.trim()));
|
||||
}else {
|
||||
@@ -156,6 +157,11 @@ public class InterceptController extends CommonController {
|
||||
}else {
|
||||
map.put("pinning", 0);
|
||||
}
|
||||
if(StringUtils.isNotBlank(protocol_errors)){
|
||||
map.put("protocol_errors", Integer.parseInt(protocol_errors.trim()));
|
||||
}else {
|
||||
map.put("protocol_errors", 0);
|
||||
}
|
||||
if(StringUtils.isNotBlank(client_cert_req)){
|
||||
map.put("client_cert_req", Integer.parseInt(client_cert_req.trim()));
|
||||
}else {
|
||||
@@ -526,6 +532,9 @@ public class InterceptController extends CommonController {
|
||||
if(((Map<String,Object>)userregion.get("exclusions")).containsKey("ev_cert")) {
|
||||
pxyInterceptCfg.setPinning(((Map<String,Object>)userregion.get("exclusions")).get("ev_cert").toString());
|
||||
}
|
||||
if(((Map<String,Object>)userregion.get("exclusions")).containsKey("ev_cert")) {
|
||||
pxyInterceptCfg.setProtocolErrors(((Map<String,Object>)userregion.get("exclusions")).get("ev_cert").toString());
|
||||
}
|
||||
if(((Map<String,Object>)((Map<String,Object>)userregion.get("cert_verify")).get("approach")).containsKey("cn")) {
|
||||
pxyInterceptCfg.setCn(((Map<String,Object>)((Map<String,Object>)userregion.get("cert_verify")).get("approach")).get("cn").toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user