Set openssl version number when creation certs

This commit is contained in:
Brian Picciano 2024-06-04 19:49:15 +02:00
parent 27ebc2fac9
commit db5db6fdd5

View File

@ -31,6 +31,10 @@ impl Certificate {
};
let mut builder = X509::builder().expect("initializing x509 builder");
builder
.set_version(2) // version number is 0-indexed, so this is version 3
.or_unexpected_while("setting version")?;
builder
.set_subject_name(&name)
.or_unexpected_while("setting subject name")?;