pub fn add(
instance_name: Option<String>,
paths: Vec<PathBuf>,
domain_name: Option<String>,
force: bool,
) -> Result<(), Error>
Expand description
Adds the given certificate(s) as the certificate(s) for the given domain.
§Arguments
instance_name
: The name of the instance for which to add them. If omitted, we should default to the active instance.paths
: The paths of the certificate files to add.domain_name
: The name of the domain to add. If it is not present, then the function is supposed to deduce it from the given certificates.force
: If given, does not ask for permission to override an existing certificate but just does it$^{TM}$.
§Errors
This function errors if we failed to read any of the certificates, parse them, if not all the required certificates were given, if we failed to write them and create the directory structure or if we are asked to deduce the domain name but failed.