Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump minor version to 0.4.3 #176

Merged
merged 1 commit into from
Aug 8, 2023
Merged
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
37 changes: 27 additions & 10 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sevctl"
version = "0.4.2"
version = "0.4.3"
authors = ["The Enarx/VirTEE Project Developers"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -22,7 +22,7 @@ is-it-maintained-issue-resolution = { repository = "virtee/sevctl" }
is-it-maintained-open-issues = { repository = "virtee/sevctl" }

[dependencies]
sev = { version = "1.1.0", features = ["openssl"] }
sev = { version = "1.2.0", default-features = false, features = ["sev", "openssl"] }
serde = { version = "1.0", features = ["derive"] }
# serde_json is just for the example, not required in general
serde_json = "1.0"
Expand Down
37 changes: 18 additions & 19 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,24 @@ mod secret;
mod session;
mod vmsa;

use anyhow::{Context, Result};

use structopt::StructOpt;

use codicon::*;
use crate::vmsa::*;

use ::sev::certs::*;
use ::sev::firmware::host::{
types::{PlatformStatusFlags, Status},
Firmware,
use std::{
fs::File,
io::{self, Cursor},
path::PathBuf,
process::exit,
time::Duration,
};
use ::sev::Generation;

use std::fs::File;
use std::io::{self, Cursor};
use std::path::PathBuf;
use std::process::exit;
use std::time::Duration;

use crate::vmsa::*;
use ::sev::{
certs::sev::*,
firmware::host::{Firmware, PlatformStatusFlags, Status},
Generation,
};
use anyhow::{Context, Result};
use codicon::*;
use structopt::StructOpt;

const VERSION: &str = env!("CARGO_PKG_VERSION");
const AUTHORS: &str = env!("CARGO_PKG_AUTHORS");
Expand Down Expand Up @@ -364,9 +362,10 @@ mod export {

mod verify {
use super::*;

use std::{convert::TryInto, fmt::Display};

use colorful::*;
use std::convert::TryInto;
use std::fmt::Display;

pub fn cmd(
quiet: bool,
Expand Down
4 changes: 2 additions & 2 deletions src/measurement.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: Apache-2.0

use super::*;

use std::path::{Path, PathBuf};

use structopt::StructOpt;

use anyhow::Context;

#[derive(StructOpt)]
pub enum MeasurementCmd {
Build(BuildArgs),
Expand Down
17 changes: 9 additions & 8 deletions src/ok.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// SPDX-License-Identifier: Apache-2.0

use super::*;
use colorful::*;
use std::arch::x86_64;
use std::fmt;
use std::fs;
use std::mem::transmute;
use std::mem::MaybeUninit;
use std::os::unix::io::AsRawFd;
use std::str::from_utf8;

use std::{
arch::x86_64,
fmt, fs,
mem::{transmute, MaybeUninit},
os::unix::io::AsRawFd,
str::from_utf8,
};

use anyhow::anyhow;
use bitfield::bitfield;
use colorful::*;
use msru::{Accessor, Msr};

bitfield! {
Expand Down
9 changes: 5 additions & 4 deletions src/secret.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// SPDX-License-Identifier: Apache-2.0

use std::convert::TryFrom;
use structopt::StructOpt;

use anyhow::Context;
use super::*;

use crate::measurement;

use std::convert::TryFrom;

use structopt::StructOpt;

struct SecretPair {
uuid: uuid::Uuid,
secret: Vec<u8>,
Expand Down
17 changes: 9 additions & 8 deletions src/session.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// SPDX-License-Identifier: Apache-2.0

use anyhow::Context;
use super::*;

use std::convert::{From, TryFrom};
use std::fs;
use std::mem::size_of;
use std::path::PathBuf;
use std::slice::from_raw_parts;
use std::{
convert::{From, TryFrom},
fs,
mem::size_of,
path::PathBuf,
slice::from_raw_parts,
};

use ::sev::certs::sev::Certificate;
use ::sev::{launch::sev, session};
use ::sev::{certs::sev::sev::Certificate, launch::sev, session};

use codicon::{Decoder, Encoder};

Expand Down
5 changes: 3 additions & 2 deletions src/vmsa/build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: Apache-2.0

use super::*;

use crate::{BuildUpdateCmdArgs, Ovmf, UserspaceVmm};

use anyhow::Context;
use sev::vmsa::*;
use ::sev::vmsa::*;

pub fn cmd(args: BuildUpdateCmdArgs) -> super::Result<()> {
let mut vmsa = Vmsa::default();
Expand Down
15 changes: 8 additions & 7 deletions src/vmsa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ pub mod update;

use super::*;

use std::collections::HashMap;
use std::convert::TryInto;
use std::fmt;
use std::fmt::Write;
use std::fs;
use std::str::FromStr;
use std::string::{ParseError, String};
use std::{
collections::HashMap,
convert::TryInto,
fmt::{self, Write},
fs,
str::FromStr,
string::{ParseError, String},
};

use uuid::{uuid, Uuid};

Expand Down
5 changes: 3 additions & 2 deletions src/vmsa/show.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: Apache-2.0

use super::*;

use crate::VmsaShowCmdArgs;

use anyhow::Context;
use sev::vmsa::*;
use ::sev::vmsa::*;

pub fn cmd(args: VmsaShowCmdArgs) -> super::Result<()> {
let vmsa = Vmsa::from_file(&args.filename).context("error reading VMSA from file")?;
Expand Down
5 changes: 3 additions & 2 deletions src/vmsa/update.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: Apache-2.0

use super::*;

use crate::{BuildUpdateCmdArgs, Ovmf, UserspaceVmm};

use anyhow::Context;
use sev::vmsa::*;
use ::sev::vmsa::*;

pub fn cmd(args: BuildUpdateCmdArgs) -> super::Result<()> {
let mut vmsa = Vmsa::from_file(&args.filename).context("error reading VMSA from file")?;
Expand Down
Loading