Loading certificates from memory instead of file path
Is there any reason there isn't a way to load certs from memory? It seems mosquitto_tls_set only takes file paths. If I wanted to store private keys encrypted on storage, I can't decrypt in memory and use with mosquitto, I'd have to store them unencrypted.
Is it possible to get some movement on this enhancement?
This is practical for clients, especially on Windows.
@ralight Hi,
libmosq_EXPORT int mosquitto_tls_set(struct mosquitto *mosq,
const char *cafile, const char *capath,
const char *certfile, const char *keyfile,
int (*pw_callback)(char *buf, int size, int rwflag, void *userdata));
Store private-keys and certificates on disk rather than on RAM is dangerous on clients especially on Windows, but if with private-keys encrypted, it will be safe to be public for everyone, right?
Yes, I think if encrypted on disk with the client app being able to load it into memory and decrypt and pass the bytes into mosquitto it would be more secure and more robust.
Any update on this? Would be great to have. Allows for better management of a device instance if not tied to the File system.
My approach is to decrypt, start, and then delete