User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
20Device and data security
Page 246 of 401
Here below is reported an example with a DER encoded trusted root certificate. This example is applicable
only for an AT terminal where it is possible to convert the HEX string to binary format (i.e. m-center).
Command Response Description
Step 1: Import a trusted root certificate using the stream of byte similar to +UDWNFILE
AT+USECMNG=0,0,
"DERCertificate",947
> Start the data transfer using the
stream of byte.
DER encoded trusted root
certificate data. The <CR><LF>
shall be ignored during the import.
+USECMNG: 1,0,"DERCertificate","8ccadc0
b22cef5be72ac411a11a8d812"
OK
Input DER formatted trusted root
certificate data bytes. Output MD5
hash string of the stored trusted
root certificate DER.
Step 2: List all available certificates and private keys
AT+USECMNG=3 CA, "DERCertificate","thawte Primary Root
CA","2036/07/17"
OK
List all available certificates and
private keys.
Step 3: Set the security profile 2 validation level to trusted root
AT+USECPRF=2,0,1 OK Security profile 2 has the validation
level set to trusted root.
Step 4: Set the security profile 2 trusted root certificate to the CA certificate imported as "DERCertificate"
AT+USECPRF=2,3,
"DERCertificate"
OK Security profile 2 will use the
CA certificate imported as
"DERCertificate" for server
certificate validation.
Step 5: Use the configured USECMNG profile 2 with the UHTTP application
AT+UHTTP=0,1,"www.ssl_tls_
test_server.com"
OK Configure the UHTTP server name.
AT+UHTTP=0,6,1,2 OK Enable the SSL/TLS for the UHTTP
profile #0 and specify the SSL/TLS
security profile 2.
AT+UHTTPC=0,1,"/","https.resp" OK Execute the HTTP GET command.
+UUHTTPCR: 0,1,1 HTTP GET URC response.
In the above example the following DER encoded trusted certificate is used:
308203af30820297a0030201020210083be056904246b1a1756ac95991c74a300d06
092a864886f70d01010505003061310b300906035504061302555331153013060355
040a130c446967694365727420496e6331193017060355040b13107777772e646967
69636572742e636f6d3120301e06035504031317446967694365727420476c6f6261
6c20526f6f74204341301e170d3036313131303030303030305a170d333131313130
3030303030305a3061310b300906035504061302555331153013060355040a130c44
6967694365727420496e6331193017060355040b13107777772e6469676963657274
2e636f6d3120301e06035504031317446967694365727420476c6f62616c20526f6f
7420434130820122300d06092a864886f70d01010105000382010f003082010a0282
010100e23be11172dea8a4d3a357aa50a28f0b7790c9a2a5ee12ce965b010920cc01
93a74e30b753f743c46900579de28d22dd870640008109cece1b83bfdfcd3b7146e2
d666c705b37627168f7b9e1e957deeb748a308dad6af7a0c3906657f4a5d1fbc17f8
abbeee28d7747f7a78995985686e5c23324bbf4ec0e85a6de370bf7710bffc01f685
d9a844105832a97518d5d1a2be47e2276af49a33f84908608bd45fb43a84bfa1aa4a
4c7d3ecf4f5f6c765ea04b37919edc22e66dce141a8e6acbfecdb3146417c75b299e
32bff2eefad30b42d4abb74132da0cd4eff881d5bb8d583fb51be84928a270da3104
ddf7b216f24c0a4e07a8ed4a3d5eb57fa390c3af270203010001a3633061300e0603
551d0f0101ff040403020186300f0603551d130101ff040530030101ff301d060355
1d0e0416041403de503556d14cbb66f0a3e21b1bc397b23dd155301f0603551d2304
183016801403de503556d14cbb66f0a3e21b1bc397b23dd155300d06092a864886f7
0d01010505000382010100cb9c37aa4813120afadd449c4f52b0f4dfae04f5797908
a32418fc4b2b84c02db9d5c7fef4c11f58cbb86d9c7a74e79829ab11b5e370a0a1cd
4c8899938c9170e2ab0f1cbe93a9ff63d5e40760d3a3bf9d5b09f1d58ee353f48e63
fa3fa7dbb466df6266d6d16e418df22db5ea774a9f9d58e22b59c04023ed2d288245
3e7954922698e08048a837eff0d6796016deace80ecd6eac4417382f49dae1453e2a
b93653cf3a5006f72ee8c4574 96c612118d504ad783c2c3a806ba7ebaf1514e9d88
9c1b9386ce2916c8aff64b977255730c01b24a3e1dce9df477cb5b424080530ec2db
d0bbf45bf50b9a9f3eb980112adc888c698345f8d0a3cc6e9d595956dde