Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
.vscode/
.vscode/
.zed/
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey I do appreciate the version bump, but we prefer having bumps when we are ready to cut release in a separate PR. It makes it easier for us to keep track everything that has been added into the repo between releases.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sev"
version = "7.1.0"
version = "7.1.1"
authors = [
"Nathaniel McCallum <[email protected]>",
"The VirTEE Project Developers",
Expand Down
17 changes: 17 additions & 0 deletions src/certs/snp/cert_nossl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self> {
let cert = x509_cert::Certificate::from_pem(pem)
Expand Down Expand Up @@ -106,3 +111,15 @@ impl Certificate {
fn io_error_other<S: Into<String>>(error: S) -> io::Error {
io::Error::new(ErrorKind::Other, error.into())
}

impl From<x509_cert::Certificate> for Certificate {
fn from(value: x509_cert::Certificate) -> Self {
Self(value)
}
}

impl From<Certificate> for x509_cert::Certificate {
fn from(Certificate(cert): Certificate) -> Self {
cert
}
}
Loading