Skip to content

Commit

Permalink
chore(deps): update dependencies, bump min Rust version
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zak <[email protected]>
  • Loading branch information
rjzak committed Oct 4, 2023
1 parent cfb91b7 commit f5a5249
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
toolchain:
- 1.60.0 # MSRV
- 1.66.1 # MSRV
- stable
- beta
- nightly
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/.idea
Cargo.lock
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.6.0"
authors = ["The Enarx Project Developers"]
license = "Apache-2.0"
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"
homepage = "https://github.com/enarx/sgx"
repository = "https://github.com/enarx/sgx"
description = "Library for Intel SGX"
Expand All @@ -25,19 +25,19 @@ is-it-maintained-open-issues = { repository = "enarx/sgx" }
rcrypto = ["rand", "rsa", "sha2", "num-integer", "num-traits", "const-oid", "der", "x509",]

[dependencies]
x86_64 = { version = "^0.14.6", default-features = false }
openssl = { version = "^0.10.36", optional = true }
bitflags = "^1.3.2"
x86_64 = { version = "^0.14.11", default-features = false }
openssl = { version = "^0.10.57", optional = true }
bitflags = "^2.4.0"

# Used by the rcrypto feature (see above).
num-integer = { version = "^0.1.44", optional = true }
num-traits = { version = "^0.2.14", optional = true }
rand = { version = "^0.8.4", optional = true }
sha2 = { version = "0.10.2", features = ["oid"], optional = true }
rsa = { version = "0.8.1", features = ["sha2"], optional = true }
num-integer = { version = "^0.1.45", optional = true }
num-traits = { version = "^0.2.16", optional = true }
rand = { version = "^0.8.5", optional = true }
sha2 = { version = "0.10.8", features = ["oid"], optional = true }
rsa = { version = "0.9.2", features = ["sha2"], optional = true }
const-oid = { version = "0.9.1", default-features = false, optional = true }
der = { version = "0.6.1", optional = true }
x509 = { version = "0.1", package = "x509-cert", default-features = false, optional = true }
der = { version = "0.7.8", optional = true }
x509 = { version = "0.2.4", package = "x509-cert", default-features = false, optional = true }

[target.'cfg(target_arch = "x86_64")'.dependencies]
xsave = { version = "^2.0.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.60"
channel = "1.66"
profile = "minimal"
3 changes: 2 additions & 1 deletion src/crypto/rcrypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
use num_integer::Integer;
use num_traits::ToPrimitive;
use rand::thread_rng;
use rsa::{pkcs1::DecodeRsaPrivateKey, BigUint, Pkcs1v15Sign, PublicKeyParts, RsaPrivateKey};
use rsa::traits::PublicKeyParts;
use rsa::{pkcs1::DecodeRsaPrivateKey, BigUint, Pkcs1v15Sign, RsaPrivateKey};
use sha2::{Digest, Sha256};

fn arr_from_big(value: &BigUint) -> [u8; 384] {
Expand Down
1 change: 1 addition & 0 deletions src/page/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bitflags::bitflags! {
///
/// This type identifies the flags of one or more pages. Some of these
/// flags indicate permissions. Others, indicate state.
#[derive(Copy, Clone, Debug)]
pub struct Flags: u8 {
const READ = 1 << 0;
const WRITE = 1 << 1;
Expand Down
2 changes: 1 addition & 1 deletion src/parameters/attributes/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

bitflags::bitflags! {
/// Expresses the non-XSAVE related enclave features
#[derive(Default)]
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
pub struct Features: u64 {
/// Enclave has been initialized by EINIT
///
Expand Down
2 changes: 1 addition & 1 deletion src/parameters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bitflags::bitflags! {
///
/// This type controls which extra data will be provided in the SSA page
/// after an AEX.
#[derive(Default)]
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
pub struct MiscSelect: u32 {
/// Report #PF and #GP information
const EXINFO = 1 << 0;
Expand Down
4 changes: 2 additions & 2 deletions src/pck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ impl<'a> SgxExtension<'a> {
.find(|e| e.extn_id == SgxExtensionRaw::OID)
.ok_or(SgxExtensionError::MissingSgxExtension)?;

let sgx_extension: SgxExtensionRaw =
Decode::from_der(extension.extn_value).map_err(SgxExtensionError::DerDecodingError)?;
let sgx_extension: SgxExtensionRaw = Decode::from_der(extension.extn_value.as_bytes())
.map_err(SgxExtensionError::DerDecodingError)?;

Ok(Self {
fmspc: sgx_extension.fmspc.bytes,
Expand Down

0 comments on commit f5a5249

Please sign in to comment.