Hi,
I work in a project where we use nRF9160, and use certificates in order to access https addresses. This works fine, and I use the modem_key_mgmt lib to read/write credentials. I know that the lib uses AT%CMNG commands, and I have used them directly also.
However, after checking both the lib and the AT specification, there seems to be no good way of deleting credentials unless you know exactly what tags and types you have stored in the modem. The only way of doing that that I have found now is to do the following:
Send AT command "AT%CMNG=1".
That returns a (possibly very long) list of all credentials.
Parse the list, to obtain the tags and types.
Do a delete for each entry.
This of course works, but the main problem is that the reply is often very long (multiple kB for just a few credentials) and I seem to have to allocate one big buffer for it. Also, the parsing is not very nice to have to do by myself.
The reason I want to erase/delete all credentials is when I do a factory reset, I don't want anything left behind.
Have I missed something? Some good function/AT command or possible way to do this?
Thanks,
Andreas Pettersson