Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

Telit Cinterion IoT Developer Community

SJMSEC tools: simple implementation for AT^SJMSEC TLS/SSL untrusted certificate uploader / production environment / Intel-based wireles modules, C language

Documentation, October 14, 2019 - 12:11pm, 3255 views

Hereby we are publishing the source code (MIT license).
You are free to include source code in your product under certain terms or to use it as reference.
Consult source file header inside zip archive for licence details.

The solution:
SJMSEC tools

The purpose of the tool is to encapsulate certificate into bin format
that can be passed as parameter to AT^SJMSEC command.
While AT^SJMSEC supports several possible keystore handling operations,
this limited application only handles two cases:
uploading server or client certificates in untrusted mode.
The output should be redirected to binary file of arbitrary name,
similarly as one would do with output from jseccmd.jar.

The tools are already precompiled for Windows, with full portable source code available.

Usage:
(
sjmsec_add_client_untrusted certificate_pub.cer certificate_priv.cer > output.bin
or
sjmsec_add_server_untrusted certificate.der > output.bin
)
then
download output.bin to MES (flash on the module) and use AT^SJMSEC="file","a:/output.bin"

Compilation:
gcc based.
For windows, compileall.bat
Use either gcc from cygwin, or (better) tdm-gcc distribution.

Alternatively, for Linux or windows+cygwin development, use
run_sjmsec_add_client_untrusted, run_sjmsec_add_server_untrusted

Regression checking:
testall.bat

Code reformatting with restyle:
reformatall.bat

Implementation is based upon:
ehsx_java_usersguide_v05.pdf
11.4 Structure and Description of the Java Security Commands

Downloads

Please Log in or register to download the files.

Author

kbosak's picture
kbosak