[control] Mark's UI decisions: Remote-Name shown with the proof, [ui] logout_url for Sign out, openssl signing files for the manual intermediate step, engine.not_ready, server sentences for the eight generic codes
This commit is contained in:
@@ -203,6 +203,22 @@ pub fn intermediate_csr(key: &KeyPair, cn: &str) -> Result<String, PkiError> {
|
||||
.map_err(build)
|
||||
}
|
||||
|
||||
/// The extensions for signing an intermediate with openssl on the offline machine (the
|
||||
/// accepted manual step until Custos can sign, docs/pki.md): the same profile as
|
||||
/// [`sign_intermediate`]. Use with `openssl x509 -req … -days 365 -extfile <this file>`.
|
||||
pub const INTERMEDIATE_OPENSSL_EXT: &str = "basicConstraints = critical, CA:TRUE, pathlen:0\n\
|
||||
keyUsage = critical, keyCertSign, cRLSign, digitalSignature\n\
|
||||
subjectKeyIdentifier = hash\n\
|
||||
authorityKeyIdentifier = keyid:always\n";
|
||||
|
||||
/// The openssl command that signs a renewal on the offline machine (files named after the
|
||||
/// request). OpenSSL 3 picks a random serial.
|
||||
pub fn openssl_sign_command(base: &str) -> String {
|
||||
format!(
|
||||
"openssl x509 -req -in {base}.csr -CA domi-root.crt -CAkey domi-root.key -days {INTERMEDIATE_DAYS} -sha256 -extfile {base}.ext -out {base}.crt"
|
||||
)
|
||||
}
|
||||
|
||||
/// Sign an intermediate CSR with the root (offline, or in Custos once it can). Only the CSR's
|
||||
/// public key and CN are used; the CN must start with [`INTERMEDIATE_CN`].
|
||||
pub fn sign_intermediate(
|
||||
|
||||
Reference in New Issue
Block a user