Function rmw_dds_common::get_security_files

Function Documentation

bool rmw_dds_common::get_security_files(const std::string &prefix, const std::string &secure_root, std::unordered_map<std::string, std::string> &result)

Get the set of security files in a security enclave.

This function will look through the passed in ‘secure root’ for a set of required filenames that must be in the enclave. If any of the required filenames are missing, the ‘result’ will be empty and the function will return false. If all of the required filenames are present, then this function will fill in the ‘result’ map with a key-value pair of friendy name -> filename. If the prefix is not empty, then the prefix will be applied to the filename.

The friendly names that this function will currently fill in are: IDENTITY_CA CERTIFICATE PRIVATE_KEY PERMISSIONS_CA GOVERNANCE PERMISSIONS

Parameters
  • prefix[in] An optional prefix to apply to the filenames when storing them.

  • secure_root[in] The path to the security enclave to look at.

  • result[out] The map where the friendly name -> filename pairs are stored.

Returns

true if all required files exist in the security enclave, false otherwise.