At present, dropshot::ConfigTls is relatively inflexible: it requires the caller to provide a PathBuf for both the certificate and private key.
This requires the file to be something that the process can open at arbitrary points during regular operation, rather than prior to dropping privileges required to open files. It also means the key must be stored in a plain file on disk, accessible to the user account in which the server runs, which is also not ideal.
At a minimum, we should be able to take both of these inputs as a String or a Vec<u8>, in addition to being willing to load them from disk as we presently do.
At present,
dropshot::ConfigTlsis relatively inflexible: it requires the caller to provide aPathBuffor both the certificate and private key.This requires the file to be something that the process can open at arbitrary points during regular operation, rather than prior to dropping privileges required to open files. It also means the key must be stored in a plain file on disk, accessible to the user account in which the server runs, which is also not ideal.
At a minimum, we should be able to take both of these inputs as a
Stringor aVec<u8>, in addition to being willing to load them from disk as we presently do.