Skip to content

Commit

Permalink
[certd] Fix issuer of self-signed certs to be the computed subject na…
Browse files Browse the repository at this point in the history
…me rather than the requested one. (#184)
  • Loading branch information
arsing authored Mar 26, 2021
1 parent d539159 commit 9c7c8de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cert/aziot-certd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ fn create_cert<'a>(
x509.set_not_after(&not_after)
.map_err(|err| Error::Internal(InternalError::CreateCert(Box::new(err))))?;

x509.set_issuer_name(x509_req.subject_name())
x509.set_issuer_name(subject_name)
.map_err(|err| Error::Internal(InternalError::CreateCert(Box::new(err))))?;

x509.sign(&issuer_private_key, openssl::hash::MessageDigest::sha256())
Expand Down

0 comments on commit 9c7c8de

Please sign in to comment.