浏览代码

Fix typo, verify leaf certificate attributes

The result of the verify leaf certificate attributes was ignored and always be OK. This fix will return corresponding error when verify leaf certificate attributes returns a not OK response code.
Jesse Kerkhoven 5 年之前
父节点
当前提交
779a0b71b4
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      RISE-V2G-Shared/src/main/java/com/v2gclarity/risev2g/shared/utils/SecurityUtils.java

+ 1 - 2
RISE-V2G-Shared/src/main/java/com/v2gclarity/risev2g/shared/utils/SecurityUtils.java

@@ -434,8 +434,7 @@ public final class SecurityUtils {
 		
 		
 		
 		
 		responseCode = verifyLeafCertificateAttributes(leafCertificate, pki);
 		responseCode = verifyLeafCertificateAttributes(leafCertificate, pki);
-		if (responseCode.equals(ResponseCodeType.OK))
-			return responseCode;
+		if (!responseCode.equals(ResponseCodeType.OK)) return responseCode;
 		
 		
 		return ResponseCodeType.OK;
 		return ResponseCodeType.OK;
 	}
 	}