From a221f2cc3e7a7cd56821cfaec4b8122e99845cdf Mon Sep 17 00:00:00 2001 From: BRA1L0R <17928339+BRA1L0R@users.noreply.github.com> Date: Thu, 13 Nov 2025 21:44:07 +0100 Subject: [PATCH 1/2] Implement from and into x509_cert::Certificate for Certificate type when using cert_nossl --- .gitignore | 3 ++- src/certs/snp/cert_nossl.rs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5f9ff5d6..c03e55e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -.vscode/ \ No newline at end of file +.vscode/ +.zed/ diff --git a/src/certs/snp/cert_nossl.rs b/src/certs/snp/cert_nossl.rs index 88aeb1a4..8a7cb35c 100644 --- a/src/certs/snp/cert_nossl.rs +++ b/src/certs/snp/cert_nossl.rs @@ -62,6 +62,11 @@ impl Verifiable for (&Certificate, &Certificate) { } impl Certificate { + /// Gets a reference to the X509 certificate inside + pub fn cert(&self) -> &x509_cert::Certificate { + &self.0 + } + /// Create a Certificate from a PEM-encoded X509 structure. pub fn from_pem(pem: &[u8]) -> Result { let cert = x509_cert::Certificate::from_pem(pem) @@ -106,3 +111,15 @@ impl Certificate { fn io_error_other>(error: S) -> io::Error { io::Error::new(ErrorKind::Other, error.into()) } + +impl From for Certificate { + fn from(value: x509_cert::Certificate) -> Self { + Self(value) + } +} + +impl From for x509_cert::Certificate { + fn from(Certificate(cert): Certificate) -> Self { + cert + } +} From 517b24704468c16dac295512e3af92929074b238 Mon Sep 17 00:00:00 2001 From: BRA1L0R <17928339+BRA1L0R@users.noreply.github.com> Date: Thu, 13 Nov 2025 21:44:47 +0100 Subject: [PATCH 2/2] Bump version to 7.1.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab6cc588..24587e84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1546,7 +1546,7 @@ dependencies = [ [[package]] name = "sev" -version = "7.1.0" +version = "7.1.1" dependencies = [ "base64", "bitfield", diff --git a/Cargo.toml b/Cargo.toml index 0858b3c4..53a1f3c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sev" -version = "7.1.0" +version = "7.1.1" authors = [ "Nathaniel McCallum ", "The VirTEE Project Developers",