Commit 279c19a9 authored by Letitia Li's avatar Letitia Li

Adding warning if unmapped key

parent 2d3dcbd7
......@@ -712,7 +712,7 @@ public class TML2Avatar {
block.addAttribute(new AvatarAttribute(ae.securityPattern.key, AvatarType.INTEGER, block, null));
block.addAttribute(new AvatarAttribute("encryptedKey_" + ae.securityPattern.key, AvatarType.INTEGER, block, null));
if (block.getAvatarAttributeWithName("key_" + ae.securityPattern.name)==null){
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped");
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped for task " + block.getName());
}
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.name, AvatarType.INTEGER, block, null));
......@@ -732,7 +732,7 @@ public class TML2Avatar {
block.addAttribute(new AvatarAttribute(ae.securityPattern.name, AvatarType.INTEGER, block, null));
block.addAttribute(new AvatarAttribute(ae.securityPattern.name + "_encrypted", AvatarType.INTEGER, block, null));
if (block.getAvatarAttributeWithName("key_" + ae.securityPattern.name)==null){
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped");
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped for task " + block.getName());
}
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.name, AvatarType.INTEGER, block, null));
......@@ -821,7 +821,7 @@ public class TML2Avatar {
} else if (ae.securityPattern.type.equals("MAC")) {
block.addAttribute(new AvatarAttribute(ae.securityPattern.name, AvatarType.INTEGER, block, null));
if (block.getAvatarAttributeWithName("key_" + ae.securityPattern.name)==null){
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped");
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped for task " + block.getName());
}
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.name, AvatarType.INTEGER, block, null));
......@@ -877,7 +877,6 @@ public class TML2Avatar {
}
} else if (ae.securityPattern != null && ae.getName().contains("decrypt")) {
TraceManager.addDev("!!!! " );
//Decryption action
//block.addAttribute(new AvatarAttribute(ae.securityPattern.name, AvatarType.INTEGER, block, null));
//block.addAttribute(new AvatarAttribute(ae.securityPattern.name+"_encrypted", AvatarType.INTEGER, block, null));
......@@ -887,7 +886,7 @@ public class TML2Avatar {
//Add sdecrypt method
AvatarMethod sdecrypt = new AvatarMethod("sdecrypt", ae);
if (block.getAvatarAttributeWithName("key_" + ae.securityPattern.name)==null){
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped");
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped for task " + block.getName());
}
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.key, AvatarType.INTEGER, block, null));
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.name, AvatarType.INTEGER, block, null));
......@@ -906,7 +905,8 @@ public class TML2Avatar {
AvatarMethod sdecrypt = new AvatarMethod("sdecrypt", ae);
block.addAttribute(new AvatarAttribute(ae.securityPattern.name, AvatarType.INTEGER, block, null));
if (block.getAvatarAttributeWithName("key_" + ae.securityPattern.name)==null){
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped");
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped for task " + block.getName());
}
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.name, AvatarType.INTEGER, block, null));
......@@ -967,7 +967,8 @@ public class TML2Avatar {
block.addAttribute(new AvatarAttribute("encryptedKey_" + ae.securityPattern.key, AvatarType.INTEGER, block, null));
block.addAttribute(new AvatarAttribute("privKey_" + ae.securityPattern.name, AvatarType.INTEGER, block, null));
if (block.getAvatarAttributeWithName("key_" + ae.securityPattern.name)==null){
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped");
TraceManager.addDev("Key " + ae.securityPattern.name + " not mapped for task " + block.getName());
}
block.addAttribute(new AvatarAttribute("key_" + ae.securityPattern.key, AvatarType.INTEGER, block, null));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment