Motion Master 6.0.0-alpha.50
Next-generation motion control software
Loading...
Searching...
No Matches
cert_updater.h File Reference
#include <expected>
#include <filesystem>
#include <string>
Include dependency graph for cert_updater.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mm::ResolvedCert
 The TLS cert/key paths the server should use, plus where they came from. More...
 

Namespaces

namespace  mm
 

Functions

std::string mm::defaultCertUrl ()
 Default rolling-release URL for the current TLS certificate.
 
std::string mm::defaultKeyUrl ()
 Default rolling-release URL for the current TLS private key. See defaultCertUrl.
 
std::expected< void, std::string > mm::fetchAndSwapCert (const std::string &certPath, const std::string &keyPath, const std::string &certUrl, const std::string &keyUrl)
 Downloads a fresh certificate and key and atomically installs them.
 
ResolvedCert mm::resolveCertPaths (const std::string &configCertPath, const std::string &configKeyPath, const std::filesystem::path &defaultCertPath, const std::filesystem::path &defaultKeyPath)
 Resolve the TLS cert/key file paths, choosing by discovery when not configured.
 
std::expected< void, std::string > mm::healCertIfNeeded (const std::string &certPath, const std::string &keyPath, bool autoUpdate, const std::string &certUrl, const std::string &keyUrl)
 Assess the served TLS certificate and refresh it if missing, expired, or expiring soon (the startup "cert self-heal").