There was a problem importing a client certificate with a private key.
I tried to import a certificate without a key with a .crt extension. The import was successful, the modem responded to the AT+SSLSETCERT
command:
+SSLSETCERT: 0
which means "The file has been imported".
The problem is that only 1 file with the extension .crt, .cer or .p12 can be loaded into this modem.
I tried to combine the certificate and key so that everything goes in one file, for example:
-----BEGIN CERTIFICATE-----
………………………………….
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
………………………………….
-----END PRIVATE KEY-----
But in this format, the modem does not accept. Response to command AT+SSLSETCERT
, I get:
+SSLSETCERT: 1
which means "Error".
I read that when combining a certificate and a key, a file with the .pfx or .p12 extension is created. But since these files have a binary encoding, it is not possible to write directly into the code as a constant in order to check the import.
Perhaps there is another way to combine the certificate and key in .crt format? Or perhaps not the correct approach to import the certificate into the modem?