Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
6d72b92f
Commit
6d72b92f
authored
Aug 24, 2016
by
garciay
Browse files
Increase SSp size from Bit128 to Bit256
parent
e16da27a
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
javasrc/adapter/org/etsi/its/adapter/Management.java
View file @
6d72b92f
...
...
@@ -68,7 +68,8 @@ public class Management implements IManagementTA, IManagementLayers {
/**
* Enforce secured mode status
*/
private
static
final
String
TsEnforceSecuredMode
=
((
CharstringValue
)
TERFactory
.
getInstance
().
getTaParameter
(
"TsEnforceSecuredMode"
)).
getString
();
//private static String TsEnforceSecuredMode = ((CharstringValue)TERFactory.getInstance().getTaParameter("TsEnforceSecuredMode")).getString();
private
static
String
TsEnforceSecuredMode
=
"false"
;
/**
* Secured root path to access certificates & private keys
...
...
@@ -354,7 +355,12 @@ public class Management implements IManagementTA, IManagementLayers {
@Override
public
void
setSecuredMode
(
final
byte
[]
securityData
)
{
certificateId
=
ByteHelper
.
byteArrayWithLengthToString
(
ByteHelper
.
concat
(
ByteHelper
.
intToByteArray
(
securityData
.
length
,
4
),
securityData
));
certificateId
=
ByteHelper
.
byteArrayWithLengthToString
(
ByteHelper
.
concat
(
ByteHelper
.
intToByteArray
(
securityData
.
length
-
1
,
4
),
securityData
));
if
(
securityData
[
securityData
.
length
-
1
]
==
0x01
)
{
TsEnforceSecuredMode
=
"true"
;
}
else
{
TsEnforceSecuredMode
=
"false"
;
}
setupSecuredMode
();
}
...
...
javasrc/adapter/org/etsi/its/adapter/SecurityHelper.java
View file @
6d72b92f
This diff is collapsed.
Click to expand it.
javasrc/adapter/org/etsi/its/adapter/layers/GnLayer.java
View file @
6d72b92f
...
...
@@ -421,7 +421,15 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific {
// Other messages
if
(
payloadLength
>
0
)
{
byte
[]
mpayload
=
new
byte
[
payloadLength
];
System
.
arraycopy
(
payload
,
commonHdr
.
length
+
44
/*Topology-Scoped Broadcast*/
,
mpayload
,
0
,
payloadLength
);
int
extendedHeader
=
0
;
if
(
headerType
==
1
)
{
// Beacon
extendedHeader
=
24
;
}
else
if
(
headerType
==
4
)
{
// Geo Broadcast
extendedHeader
=
44
;
}
else
if
(
headerType
==
5
)
{
// Topology-Scoped Broadcast
extendedHeader
=
28
;
}
// TODO To be continued
System
.
arraycopy
(
payload
,
commonHdr
.
length
+
extendedHeader
,
mpayload
,
0
,
payloadLength
);
//TERFactory.getInstance().logDebug("GnLayer.receive: Message =" + ByteHelper.byteArrayToString(mpayload));
lowerInfo
.
put
(
GN_NEXTHEADER
,
nextHeader
);
lowerInfo
.
put
(
GN_TYPE
,
headerType
);
...
...
javasrc/adapter/org/etsi/its/adapter/ports/CamPort.java
View file @
6d72b92f
...
...
@@ -58,7 +58,7 @@ public class CamPort extends ProtocolPort {
);
// Add security info to pass to the ATS
if
(
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
)
==
null
)
{
byte
[]
buf
=
new
byte
[
16
];
byte
[]
buf
=
new
byte
[
32
];
msgInd
=
ByteHelper
.
concat
(
msgInd
,
buf
);
}
else
{
msgInd
=
ByteHelper
.
concat
(
msgInd
,
(
byte
[])
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
));
...
...
javasrc/adapter/org/etsi/its/adapter/ports/DenmPort.java
View file @
6d72b92f
...
...
@@ -58,7 +58,7 @@ public class DenmPort extends ProtocolPort {
);
// Add security info to pass to the ATS
if
(
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
)
==
null
)
{
byte
[]
buf
=
new
byte
[
16
];
byte
[]
buf
=
new
byte
[
32
];
msgInd
=
ByteHelper
.
concat
(
msgInd
,
buf
);
}
else
{
msgInd
=
ByteHelper
.
concat
(
msgInd
,
(
byte
[])
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
));
...
...
javasrc/adapter/org/etsi/its/adapter/ports/GnPort.java
View file @
6d72b92f
...
...
@@ -368,7 +368,7 @@ public class GnPort extends ProtocolPort implements Runnable, IEthernetSpecific
byte
[]
msgInd
=
ByteHelper
.
concat
(
message
,
(
byte
[])
lowerInfo
.
get
(
EthernetLayer
.
LINK_LAYER_DESTINATION
));
// Add security info to pass to the ATS
if
(
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
)
==
null
)
{
byte
[]
buf
=
new
byte
[
16
];
byte
[]
buf
=
new
byte
[
32
];
msgInd
=
ByteHelper
.
concat
(
msgInd
,
buf
);
}
else
{
msgInd
=
ByteHelper
.
concat
(
msgInd
,
(
byte
[])
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
));
...
...
javasrc/adapter/org/etsi/its/adapter/ports/IvimPort.java
View file @
6d72b92f
...
...
@@ -58,7 +58,7 @@ public class IvimPort extends ProtocolPort {
);
// Add security info to pass to the ATS
if
(
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
)
==
null
)
{
byte
[]
buf
=
new
byte
[
16
];
byte
[]
buf
=
new
byte
[
32
];
msgInd
=
ByteHelper
.
concat
(
msgInd
,
buf
);
}
else
{
msgInd
=
ByteHelper
.
concat
(
msgInd
,
(
byte
[])
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
));
...
...
javasrc/adapter/org/etsi/its/adapter/ports/MapemSpatemPort.java
View file @
6d72b92f
...
...
@@ -47,7 +47,7 @@ public class MapemSpatemPort extends ProtocolPort {
);
// Add security info to pass to the ATS
if
(
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
)
==
null
)
{
byte
[]
buf
=
new
byte
[
16
];
byte
[]
buf
=
new
byte
[
32
];
msgInd
=
ByteHelper
.
concat
(
msgInd
,
buf
);
}
else
{
msgInd
=
ByteHelper
.
concat
(
msgInd
,
(
byte
[])
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
));
...
...
javasrc/adapter/org/etsi/its/adapter/ports/SremSsemPort.java
View file @
6d72b92f
...
...
@@ -47,7 +47,7 @@ public class SremSsemPort extends ProtocolPort {
);
// Add security info to pass to the ATS
if
(
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
)
==
null
)
{
byte
[]
buf
=
new
byte
[
16
];
byte
[]
buf
=
new
byte
[
32
];
msgInd
=
ByteHelper
.
concat
(
msgInd
,
buf
);
}
else
{
msgInd
=
ByteHelper
.
concat
(
msgInd
,
(
byte
[])
lowerInfo
.
get
(
SecurityHelper
.
SEC_SSP
));
...
...
javasrc/codec/org/etsi/ttcn/codec/its/facilities/FacilitiesInd.java
View file @
6d72b92f
...
...
@@ -22,7 +22,7 @@ public class FacilitiesInd extends Record {
protected
void
preDecode
(
CodecBuffer
buf
,
Type
decodingHypothesis
)
{
// System.out.println(">>> FacilitiesInd.preDecode: " + decodingHypothesis);
int
msgLen
=
buf
.
getNbBits
()
-
8
-
8
-
8
-
32
-
8
-
16
-
16
-
128
-
32
;
// FIXME Add support of SSP (Bit128) & ITS-AID (UInt32) extra fields: fixed size (
128
) is not nice!
int
msgLen
=
buf
.
getNbBits
()
-
8
-
8
-
8
-
32
-
8
-
16
-
16
-
256
-
32
;
// FIXME Add support of SSP (Bit128) & ITS-AID (UInt32) extra fields: fixed size (
256
) is not nice!
int
offset
=
0
;
messageBuffer
=
buf
.
getBuffer
(
offset
,
msgLen
);
offset
+=
msgLen
;
...
...
@@ -33,7 +33,7 @@ public class FacilitiesInd extends Record {
gnTc
=
buf
.
getBuffer
(
offset
,
8
);
offset
+=
8
;
btpDestinationPort
=
buf
.
getBuffer
(
offset
,
16
);
offset
+=
16
;
btpInfo
=
buf
.
getBuffer
(
offset
,
16
);
offset
+=
16
;
ssp
=
buf
.
getBuffer
(
offset
,
128
);
offset
+=
128
;
ssp
=
buf
.
getBuffer
(
offset
,
256
);
offset
+=
256
;
its_aid
=
buf
.
getBuffer
(
offset
,
32
);
offset
+=
32
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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