How to M95 SSL Server Connection

Hi
I made a connection with m95 and stm32 on the server. I am able to send IOT data. But I want to do this with ssl connection for security. I read some documentation but I didn’t understand about key and certificate. Actually I don’t know much about SSL.
In document example:

using AT+QSECWRITE=“RAM:client.pem” command.

But how do I get client.pem, user_key.pem, cacert.pem and where should I keep this. How does the M95 load this into ram. If I upload this to stm32, will M95 find it with this command?

1 Like
  1. cacert,pem —is root CA certificate
    client.pem ----is a public key
    user_key -----is a priviate key

  2. AT+QSECWRITE=“RAM:client.pem” is at for upload the cert to M95

  3. these there cert should be got from the website , which you want to used .e.g AWS , google,

1 Like

Thank you for answer.
I wanted to know how to add Certificate file and send to server with my m95 modem.
I find the solution. I send binary data to RAM with uart as AT-command.

gsm_command("AT+QSECWRITE=\"RAM:clt.pem\",1500,100\r", 10000, msg, 100, 3, "\r\n+QSECWRITE:", "\r\nCONNECT", "\r\n+CME ERROR:");
Return file size and checksum: QSECWRITE: 1334,6e7c\r\n\r\n

Send Certificate:
gsm_command("-----BEGIN CERTIFICATE----- MIIDrDCCApQCCQDap/pt+urfQzA .....

gsm_command("AT+QSECREAD=\"RAM:clt.pem\"\r", 1000, msg, 100, 2, "\r\n+QSECREAD:", "\r\n+CME ERROR:");
Return 1 and checksum: QSECREAD: 1,6e7c

gsm_command("AT+QFLDS=\"RAM\"\r", 300, msg, 100, 1, "\r\n+QFLDS:");
Return free storage and total storage size: QFLDS: 642556,647668,642556

Configure CA certificate.
gsm_command("AT+QSSLCFG=\"cacert\",0,\"RAM:ca.pem\"\r", 1000, msg, 100, 2, "\r\nOK", "\r\nERROR"); // OK

Configure client certificate.
gsm_command("AT+QSSLCFG=\"clientcert\",0,\"RAM:clt.pem\"\r", 1000, msg, 100, 2, "\r\nOK", "\r\nERROR"); // OK

Configure client key
gsm_command("AT+QSSLCFG=\"clientkey\",0,\"RAM:key.pem\"\r", 1000, msg, 100, 2, "\r\nOK", "\r\nERROR"); // OK

1 Like