User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 235 of 401
o pkcs9_emailAddress (http://oid-info.com/get/1.2.840.113549.1.9.1)
o pkcs9_unstructuredName (http://oid-info.com/get/1.2.840.113549.1.9.2)
The import of an X.509 certificate with DN containing other value fields (not in the above list) will result
in an import error (error result code: USECMNG invalid certificate/key format).
20.3.2.2Syntax
Type Syntax Response Example
Generic syntax:
Action AT+USECMNG=<op_code>,
[<type>[,<internal_name>[,
<param1>[,<param2>]]]]
OK -
Import a certificate or private key from serial I/O:
Action AT+USECMNG=0,<type>,<internal_
name>,<data_size>[,<password>]
>
Start transfer of data ...
+USECMNG: 0,<type>,<internal_
name>,<md5_string>
OK
AT+USECMNG=0,0,"AddTrustCA",
1327
>-----BEGIN CERTIFICATE-----
(...other certificate data bytes...)
+USECMNG: 0,0,"AddTrustCA",
"77107370ec4db40a0
8a6e36a64a1435b"
OK
Import a certificate or private key from a file stored on FS:
Action AT+USECMNG=1,<type>,<internal_
name>,<filename>[,<password>]
+USECMNG: 1,<type>,<internal_
name>,<md5_string>
OK
AT+USECMNG=1,0,"AddTrustCA",
"addtrust.cert"
+USECMNG: 1,0,"AddTrustCA","7710
7370ec4db40a08a6e36a64a1435b"
OK
Remove an imported certificate or private key:
Action AT+USECMNG=2,<type>,<internal_
name>
OK AT+USECMNG=2,0,"AddTrustCA"
OK
List imported certificates or private keys:
Read AT+USECMNG=3[,<type>] <cert_type>,<internal_name>[,
<common_name>,<expiration_
date>]
...
OK
AT+USECMNG=3
"CA","AddTrustCA","AddTrust
External CA Root","2020/05/30"
"CA","GlobalSignCA","GlobalSign",
"2029/03/18"
"CC","JohnDoeCC","GlobalSign","20
10/01/01"
"PK","JohnDoePK"
OK
Retrieve the MD5 of an imported certificate or private key:
Read AT+USECMNG=4,<type>,<internal_
name>
+USECMNG: 4,<type>,<internal_
name>,<md5_string>
OK
AT+USECMNG=4,0,"AddTrustCA"
+USECMNG: 4,0,"AddTrustCA",
"77107370ec4db40a0
8a6e36a64a1435b"
OK
Test AT+USECMNG=? +USECMNG: (list of supported <op_
code>s),(list of supported <type>s)
OK
+USECMNG: (0-4),(0-2)
OK
20.3.2.3Defined values
Parameter Type Description
<op_code> Number Type of operation:
0: import a certificate or a private key (data provided by the stream of byte)
1: import a certificate or a private key (data provided from a file on FS)
2: remove an imported certificate or private key