summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXVLANAU <vlatko.naumovski@seavus.com>2011-11-21 10:26:12 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2012-05-25 14:39:27 +0200
commit802fb4fd7bb51a929ec72d6d64a907a5da836330 (patch)
treeafc3b8899c989f536253587e56d2d93b19bc23f0
parentcd7cf159f607fc4e9e0d62eec70de0f892c367ea (diff)
OTP Handling on u4500
Add De-Authentication command Add new error codes for permanent and persistent authentication ST-Ericsson ID: 255603 ST-Ericsson FOSS-OUT: NA Change-Id: Ib80d54f56d6be1b9aaf64e29b3f9e3cffb748faf Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31753 Tested-by: Vlatko STENKOSKI Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com> Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
-rw-r--r--lcmodule/source/LCM.rc10
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml12
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml4
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c2
-rw-r--r--source/CEH/commands_impl.cpp7
-rw-r--r--source/LCDriver.cpp8
-rw-r--r--source/LCDriver.h8
-rw-r--r--source/LCDriver.rc6
-rw-r--r--source/LCDriverMethods.cpp19
-rw-r--r--source/LCDriverMethods.h1
-rw-r--r--source/LcdVersion.cpp2
-rw-r--r--source/config/commands.xml11
12 files changed, 80 insertions, 10 deletions
diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc
index 34fffa4..16c2409 100644
--- a/lcmodule/source/LCM.rc
+++ b/lcmodule/source/LCM.rc
@@ -69,15 +69,15 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "Comments", "Build date: 2011-11-17"
+ VALUE "Comments", "Build date: 2011-11-18"
VALUE "CompanyName", "STEricsson AB"
- VALUE "FileDescription", "LCDriver Dynamic Link Library"
+ VALUE "FileDescription", "LCM Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
- VALUE "InternalName", "Loader Communication Driver"
+ VALUE "InternalName", "Loader Communication Module"
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011"
- VALUE "PrivateBuild", "Change-Id: I90074ddf7bca008f8f34777b749dc5bb44346d24"
+ VALUE "PrivateBuild", "Change-Id: Ib80d54f56d6be1b9aaf64e29b3f9e3cffb748faf"
VALUE "ProductName", "CXA1104507 Loader Communication Module"
- VALUE "ProductVersion", "PX1"
+ VALUE "ProductVersion", "PX2"
END
END
BLOCK "VarFileInfo"
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml
index 4c60f44..4d32f14 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml
@@ -388,6 +388,18 @@
<value ref=" VeryLimitedProductionModeLevel"/>
</permissions>
</command>
+
+ <command number="16" name="System Deauthenticate" ADbg="false" source="PC"> supportedcmdtype="longrunning">
+ <interface type="loader" name="Deauthenticate"/>
+ <documentation>
+ This command is used by the Loader to deauthenticates the ME from prior authentications to prevent unauthorized access.
+ </documentation>
+ <input>
+ <value type="uint32" name="Type">Deauthentication type: 1 = permanent deauthentication, 0 = deauthenticate until next reboot of the ME.</value>
+ </input>
+ <output>
+ </output>
+ </command>
</group>
<group number="02" name="Flash application" supportedcmdtype="longrunning,shortrunning">
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
index 1c2bb7e..af1048f 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
@@ -16,6 +16,7 @@
<value number="51" name="E_INVALID_INPUT_PARAMETERS" fatal="false" short="The expected value into the function was incorrect."> Check the input parameters in the command that you try to execute. Repeat operation. Report if problem is not solved.</value>
<value number="52" name="E_INVALID_CURRDATE_STRING_LENGTH" fatal="false" short="Indicate that the currdate string array variable has invalid length."> Try to reset the loader and if problem still exist, report this error.</value>
<value number="53" name="E_UNALIGNED_DATA" fatal="false" short="Indicate that a variable is not aligned."> Try to reset the loader and if still exist the problem, report this error.</value>
+ <value number="54" name="E_COPS_DEAUTHENTICATION_FAILED" fatal="false" short="Indicate that ME De-Authentication failed."> Try to reset the loader and if still exist the problem, report this error.</value>
<!--
* IO Fatal 100-150
@@ -113,6 +114,9 @@
<value number="602" name="E_UNDEFINED_AUTHENTICATION_TYPE" fatal="true" short="Undefined authentication type.">Check the authentication type. The loader supports authentication with CA certificate and control keyes.Repeat authentiacton. Report if problem still exist.</value>
<value number="651" name="E_RTC_TIME_NOT_ACCURATE" fatal="false" short="System Time is not properly set."> Default system time is used.Set the Time properly. Report if problem still exist.</value>
<value number="652" name="E_RTC_INTIALIZATION_FAILED" fatal="false" short="Hardware error ocure during initialization of RTC."> Report this problem</value>
+ <value number="653" name="E_UNDEFINED_DEAUTHENTICATION_TYPE" fatal="false" short="Undefined deauthentication type."> Check input parameters and repeat operation. Report if problem still exist.</value>
+ <value number="654" name="E_COPS_DEVICE_STATE_FULL" fatal="false" short="Indicate that ME is in full security mode,Full authentication is needed prior to use COPS functionalities."> Perform RSA or SIMLOCK authentication prior to use COPS functionalities.</value>
+ <value number="655" name="E_COPS_DEVICE_STATE_RELAXED" fatal="false" short="Indicate that ME is in authenticate security mode, Permanent type authentication is needed prior to use COPS functionalities."> Perform permanent authentication prior to use COPS functionalities.</value>
<!--
* Flash Fatal 700-750
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c
index 3806e59..8ef2ff3 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c
@@ -11,6 +11,6 @@
* brief ASCII string variable holding the LCM version/build time/product number..
*/
-char LCM_CurrentVersion[] = "R1V";
+char LCM_CurrentVersion[] = "PX2";
/** @} */
diff --git a/source/CEH/commands_impl.cpp b/source/CEH/commands_impl.cpp
index 768f075..96fee23 100644
--- a/source/CEH/commands_impl.cpp
+++ b/source/CEH/commands_impl.cpp
@@ -77,6 +77,13 @@ ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_System_AuthenticateImpl(uint16 Sessi
return E_SUCCESS;
}
+ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_System_DeauthenticateImpl(uint16 Session, ErrorCode_e Status)
+{
+ cmdResult_->GeneralResponse_Session = Session;
+
+ return E_SUCCESS;
+}
+
ErrorCode_e LoaderRpcInterfaceImpl::DoRPC_System_GetControlKeysImpl(uint16 Session)
{
cmdResult_->GeneralResponse_Session = Session;
diff --git a/source/LCDriver.cpp b/source/LCDriver.cpp
index 914483e..9c7643b 100644
--- a/source/LCDriver.cpp
+++ b/source/LCDriver.cpp
@@ -254,6 +254,14 @@ LCDRIVER_API int __cdecl System_Authenticate(LCDContext Context, int iType, int
return Context->m_pObject->Do_System_Authenticate(iType, piSize, puchdata);
}
+LCDRIVER_API int __cdecl System_Deauthenticate(LCDContext Context, int iType)
+{
+ VERIFY_CONTEXT_STARTED(Context);
+
+ return Context->m_pObject->Do_System_Deauthenticate(iType);
+
+}
+
LCDRIVER_API int __cdecl System_GetControlKeys(LCDContext Context, TSIMLockKeys *pSIMLockKeys)
{
VERIFY_CONTEXT_STARTED(Context);
diff --git a/source/LCDriver.h b/source/LCDriver.h
index 9f6db6e..b375c5e 100644
--- a/source/LCDriver.h
+++ b/source/LCDriver.h
@@ -375,6 +375,14 @@ extern "C"
LCDRIVER_API int __cdecl System_Authenticate(LCDContext Context, int iType, int *piSize, unsigned char *puchdata);
/// <summary>
+ /// This command deauthenticates the ME from prior
+ /// authentications to prevent unauthorized access.
+ /// </summary>
+ /// <param name="iType">Deauthentication type:0 = deauthenticate until next reboot of the ME,1 = permanent deauthentication.</param>
+ /// <returns> Status of the command.</returns>
+ LCDRIVER_API int __cdecl System_Deauthenticate(LCDContext Context, int iType);
+
+ /// <summary>
/// This command is used by the loader to retrieve the SimLock control keys from the host to authenticate a user.
/// The command is used in the authentication context.
/// </summary>
diff --git a/source/LCDriver.rc b/source/LCDriver.rc
index 7eff992..7537f6f 100644
--- a/source/LCDriver.rc
+++ b/source/LCDriver.rc
@@ -81,15 +81,15 @@ BEGIN
BEGIN
BLOCK "000904b0"
BEGIN
- VALUE "Comments", "Build date: 2011-11-17"
+ VALUE "Comments", "Build date: 2011-11-18"
VALUE "CompanyName", "STEricsson AB"
VALUE "FileDescription", "LCDriver Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "Loader Communication Driver"
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011"
- VALUE "PrivateBuild", "Change-Id: I90074ddf7bca008f8f34777b749dc5bb44346d24"
+ VALUE "PrivateBuild", "Change-Id: Ib80d54f56d6be1b9aaf64e29b3f9e3cffb748faf"
VALUE "ProductName", "CXC 173 0865, LCDriver DLL"
- VALUE "ProductVersion", "PU1"
+ VALUE "ProductVersion", "PU2"
END
END
BLOCK "VarFileInfo"
diff --git a/source/LCDriverMethods.cpp b/source/LCDriverMethods.cpp
index 13997ea..2791c3d 100644
--- a/source/LCDriverMethods.cpp
+++ b/source/LCDriverMethods.cpp
@@ -745,6 +745,25 @@ ErrorExit:
}
/// <summary>
+/// This command deauthenticates the ME from prior
+/// authentications to prevent unauthorized access.
+/// </summary>
+/// <param name="iType">Deauthentication type:0 = deauthenticate until next reboot of the ME,1 = permanent deauthentication.</param>
+/// <returns> Status of the command.</returns>
+int CLCDriverMethods::Do_System_Deauthenticate(int iType)
+{
+ uint16 uiSessionOut = 0;
+ int ReturnValue = E_SUCCESS;
+
+ VERIFY_SUCCESS(IsMainThreadAlive());
+ VERIFY_SUCCESS(m_pLoaderRpcFunctions->DoRPC_System_Deauthenticate(uiSessionOut, iType));
+ VERIFY_SUCCESS(WaitForEvent(EVENT_GR_RECEIVED | EVENT_CMD_RECEIVED, GROUP_SYSTEM, COMMAND_SYSTEM_DEAUTHENTICATE));
+
+ErrorExit:
+ return ReturnValue;
+}
+
+/// <summary>
/// This command is used by the loader to retrieve the SimLock control keys from the host to authenticate a user.
/// The command is used in the authentication context.
/// </summary>
diff --git a/source/LCDriverMethods.h b/source/LCDriverMethods.h
index 037b880..6e4ae2a 100644
--- a/source/LCDriverMethods.h
+++ b/source/LCDriverMethods.h
@@ -70,6 +70,7 @@ public:
int Do_System_SetSystemTime(uint32 EpochTime);
int Do_System_SwitchCommunicationDevice(uint32 Device, uint32 DeviceParam);
int Do_System_StartCommRelay(uint32 HostDeviceId, uint32 TargetDeviceId, uint32 ControlDeviceId);
+ int Do_System_Deauthenticate(int iType);
int Do_Flash_ProcessFile(const char *pchPath, const char *pchType, int iUseBulk, int iDeleteBuffers);
int Do_Flash_ListDevices(TDevices *pDevices, int *piDeviceSize);
diff --git a/source/LcdVersion.cpp b/source/LcdVersion.cpp
index 4b46588..ee2bb29 100644
--- a/source/LcdVersion.cpp
+++ b/source/LcdVersion.cpp
@@ -16,6 +16,6 @@
* var char *LCD_VersionList[]
* brief ASCII string list variable holding the LCD version/build time/product number..
*/
-char *LCD_VersionList[] = {"R1V",
+char *LCD_VersionList[] = {"PX2",
NULL
};
diff --git a/source/config/commands.xml b/source/config/commands.xml
index 650cbfe..d0c2b24 100644
--- a/source/config/commands.xml
+++ b/source/config/commands.xml
@@ -387,6 +387,17 @@
</permissions>
</command>
+ <command number="16" name="System Deauthenticate" ADbg="false" source="PC"> supportedcmdtype="longrunning">
+ <interface type="loader" name="Deauthenticate"/>
+ <documentation>
+ This command is used by the Loader to deauthenticates the ME from prior authentications to prevent unauthorized access.
+ </documentation>
+ <input>
+ <value type="uint32" name="Type">Deauthentication type: 1 = permanent deauthentication, 0 = deauthenticate until next reboot of the ME.</value>
+ </input>
+ <output>
+ </output>
+ </command>
</group>
<group number="2" name="Flash application">