Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mbe-tools
TTool
Commits
f35771a5
Commit
f35771a5
authored
Sep 12, 2017
by
Letitia Li
Browse files
Added new tutorial model
parent
fb0e8917
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
modeling/SysMLSec/AliceAndBobHW.xml
0 → 100644
View file @
f35771a5
This diff is collapsed.
Click to expand it.
src/main/java/tmltranslator/toavatar/TML2Avatar.java
View file @
f35771a5
...
...
@@ -666,14 +666,16 @@ public class TML2Avatar {
else
if
(
ae
.
securityPattern
.
type
.
equals
(
"Symmetric Encryption"
)){
if
(!
ae
.
securityPattern
.
nonce
.
isEmpty
()){
block
.
addAttribute
(
new
AvatarAttribute
(
ae
.
securityPattern
.
nonce
,
AvatarType
.
INTEGER
,
block
,
null
));
block
.
addAttribute
(
new
AvatarAttribute
(
ae
.
securityPattern
.
name
,
AvatarType
.
INTEGER
,
block
,
null
));
AvatarMethod
concat2
=
new
AvatarMethod
(
"concat2"
,
ae
);
concat2
.
addParameter
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
));
concat2
.
addParameter
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
nonce
));
concat2
.
addReturnParameter
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
));
if
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
)
!=
null
&&
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
nonce
)!=
null
){
block
.
addMethod
(
concat2
);
System
.
out
.
println
(
"Adding concat2"
);
tran
.
addAction
(
ae
.
securityPattern
.
name
+
"=concat2("
+
ae
.
securityPattern
.
name
+
","
+
ae
.
securityPattern
.
nonce
+
")"
);
}
tran
.
addAction
(
ae
.
securityPattern
.
name
+
"=concat2("
+
ae
.
securityPattern
.
name
+
","
+
ae
.
securityPattern
.
nonce
+
")"
);
}
//Securing a key instead of data
if
(!
ae
.
securityPattern
.
key
.
isEmpty
()){
...
...
@@ -820,7 +822,8 @@ public class TML2Avatar {
get2
.
addParameter
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
));
get2
.
addParameter
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
));
get2
.
addParameter
(
block
.
getAvatarAttributeWithName
(
"testnonce_"
+
ae
.
securityPattern
.
nonce
));
if
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
)!=
null
&&
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
)!=
null
&&
block
.
getAvatarAttributeWithName
(
"testnonce_"
+
ae
.
securityPattern
.
nonce
)!=
null
)
{
if
(
block
.
getAvatarAttributeWithName
(
ae
.
securityPattern
.
name
)!=
null
&&
block
.
getAvatarAttributeWithName
(
"testnonce_"
+
ae
.
securityPattern
.
nonce
)!=
null
)
{
System
.
out
.
println
(
"adding get2"
);
block
.
addMethod
(
get2
);
}
tran
.
addAction
(
"get2("
+
ae
.
securityPattern
.
name
+
","
+
ae
.
securityPattern
.
name
+
",testnonce_"
+
ae
.
securityPattern
.
nonce
+
")"
);
...
...
src/main/java/ui/tmlcompd/TMLCPrimitiveComponent.java
View file @
f35771a5
...
...
@@ -201,7 +201,7 @@ public class TMLCPrimitiveComponent extends TGCScalableWithInternalComponent imp
iconIsDrawn
=
false
;
}
if
(
isAttacker
){
g
.
drawImage
(
IconManager
.
imgic7008
.
getImage
(),
x
+
width
-
iconSize
-
textX
,
y
+
2
*
textX
,
null
);
g
.
drawImage
(
IconManager
.
imgic7008
.
getImage
(),
x
+
width
-
2
*
iconSize
-
textX
,
y
+
2
*
textX
,
null
);
}
// Attributes
...
...
src/main/resources/ui/util/attacker.gif
View replaced file @
fb0e8917
View file @
f35771a5
94 Bytes
|
W:
|
H:
151 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment