Thales 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, 1614 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 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 ****.
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.
sjmsec_add_client_untrusted certificate_pub.cer certificate_priv.cer > output.bin
sjmsec_add_server_untrusted certificate.der > output.bin
download output.bin to MES (flash on the module) and use AT^SJMSEC="file","a:/output.bin"
For windows, compileall.bat
Use either gcc from cygwin, or (better) tdm-gcc distribution.
Alternatively, for Linux or windows+cygwin development, use
Code reformatting with restyle:
Implementation is based upon:
11.4 Structure and Description of the Java Security Commands