BGS5 - Set Customer Keystore Error | Telit Cinterion IoT Developer Community
September 11, 2018 - 2:32pm, 3470 views
I have a query about the BGS5, I am following the indications of the "BGS5 Java user guide" about how to create a security enviroment and sign our application, but when i write the command "SetCumstomerKeystore.bin" in the device and execute it, BGS5 reports the following error:
AT^SJMSEC="file","SetCustomerKeystore.bin"
^SJMSEC: 7,"keystore error (3: security domain not found)"
ERROR
I have reviewed the documentation but I can not find where is the error. Could you help me at this point?
Hi
Please write what revision of module do you have (ATI1 command).
Please give logs from how you prepare and create your binary file. Step by step and how you upload this file to your module. Can you send me your bin file so I would test it?
Regards
Krzysztof
Hi,
Module Revision:
ATI1
Cinterion
BGS5
REVISION 01.100
A-REVISION 00.001.36
OK
Binary files steps:
"C:\Program Files (x86)\Java\jdk1.7.0_25\jre\bin\keytool.exe" -genkey -alias myalias -keypass password -keystore se_customer.ks -storepass password -sigalg SHA1withRSA -keyalg RSA -keysize 2048
+Cußles son su nombre y su apellido?
[Unknown]: operator
+Cußl es el nombre de su unidad de organizaci¾n?
[Unknown]: develop
+Cußl es el nombre de su organizaci¾n?
[Unknown]: Prueba
+Cußl es el nombre de su ciudad o localidad?
[Unknown]: Cadiz
+Cußl es el nombre de su estado o provincia?
[Unknown]: Cadiz
+Cußl es el c¾digo de paÝs de dos letras de la unidad?
[Unknown]: ES
+Es correcto CN=operator, OU=develop, O=Prueba, L=Cadiz, ST=Cadiz, C=ES?
[no]: si
2º Create ME Keystore:
"C:\Program Files (x86)\Cinterion\CMTK\BGS5\WTK\bin\mekeytool.exe" -import -MEkeystore me_customer.ks -alias myalias -domain myalias -keystore se_customer.ks -storepass password
3º Create Java Security Command
java -jar "C:\Program Files (x86)\Cinterion\CMTK\BGS5\WTK\bin\jseccmd.jar" -cmd SetCustomerKeystore -imei 351519099256897 -alias myalias -keypass password -storepass password -keystore se_customer.ks -filename me_customer.ks > SetCustomerKeystore.bin
java -jar "C:\Program Files (x86)\Cinterion\CMTK\BGS5\WTK\bin\jseccmd.jar" -cmd DelCustomerKeystore -imei 351519099256897 -alias myalias -keypass password -storepass password -keystore se_customer.ks > DelCustomerKeystore.txt
But I solved it. The error is in the alias, if no change the sample name (BGS5 Java user guide) then it run ok. The correct steps:
"C:\Program Files (x86)\Java\jdk1.7.0_25\jre\bin\keytool.exe" -genkey -alias operator -keypass password -keystore se_customer.ks -storepass password -sigalg SHA1withRSA -keyalg RSA -keysize 2048
"C:\Program Files (x86)\Cinterion\CMTK\BGS5\WTK\bin\mekeytool.exe" -import -MEkeystore me_customer.ks -alias operator -domain operator -keystore se_customer.ks -storepass password
java -jar "C:\Program Files (x86)\Cinterion\CMTK\BGS5\WTK\bin\jseccmd.jar" -cmd SetCustomerKeystore -imei 351519099256897 -alias operator -keypass password -storepass password -keystore se_customer.ks -filename me_customer.ks > SetCustomerKeystore.bin
java -jar "C:\Program Files (x86)\Cinterion\CMTK\BGS5\WTK\bin\jseccmd.jar" -cmd DelCustomerKeystore -imei 351519099256897 -alias operator -keypass password -storepass password -keystore se_customer.ks > DelCustomerKeystore.txt
Thanks you!
Raúl
Hi
It actually works for you and more investigation is no needed?
Regards
Krzysztof
Yes, it work OK, my application is signed and running on the device. Only I will like know why the alias can not be change to another name.
Regards
Raúl
Hello,
You should be able to define your own alias and as I can see you use alias 'operator' and it seems to work.
Maybe the problem occured because of some previosly installed customer keystore on the module.
Regards,
Bartłomiej