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

Rename dpe crates to have dpe prefix #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
22 changes: 11 additions & 11 deletions crypto/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 crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Licensed under the Apache-2.0 license

[package]
name = "crypto"
name = "dpe-crypto"
version = "0.1.0"
edition = "2021"

Expand Down
30 changes: 15 additions & 15 deletions dpe/Cargo.lock

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

6 changes: 3 additions & 3 deletions dpe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ dpe_profile_p256_sha256 = []
dpe_profile_p384_sha384 = []

[dependencies]
crypto = {path = "../crypto"}
platform = {path = "../platform"}
dpe-crypto = {path = "../crypto"}
dpe-platform = {path = "../platform"}
zerocopy = "0.6.1"

[dev-dependencies]
asn1 = "0.13.0"
openssl = "0.10"
x509-parser = "0.14.0"
crypto = {path = "../crypto", features = ["deterministic_rand"]}
dpe-crypto = {path = "../crypto", features = ["deterministic_rand"]}
8 changes: 4 additions & 4 deletions dpe/src/commands/certify_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::{
x509::{MeasurementData, Name, X509CertWriter},
DPE_PROFILE, MAX_CERT_SIZE, MAX_HANDLES,
};
use crypto::Crypto;
use platform::{Platform, PlatformError, MAX_CHUNK_SIZE};
use dpe_crypto::Crypto;
use dpe_platform::{Platform, PlatformError, MAX_CHUNK_SIZE};

#[repr(C)]
#[derive(Debug, PartialEq, Eq, zerocopy::FromBytes, zerocopy::AsBytes)]
Expand Down Expand Up @@ -165,8 +165,8 @@ mod tests {
dpe_instance::tests::{TestTypes, SIMULATION_HANDLE, TEST_LOCALITIES},
support::Support,
};
use crypto::OpensslCrypto;
use platform::DefaultPlatform;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use x509_parser::nom::Parser;
use x509_parser::prelude::X509CertificateParser;
use x509_parser::prelude::*;
Expand Down
4 changes: 2 additions & 2 deletions dpe/src/commands/derive_child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ mod tests {
support::Support,
MAX_HANDLES,
};
use crypto::OpensslCrypto;
use platform::DefaultPlatform;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use zerocopy::AsBytes;

const TEST_DERIVE_CHILD_CMD: DeriveChildCmd = DeriveChildCmd {
Expand Down
4 changes: 2 additions & 2 deletions dpe/src/commands/extend_tci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ mod tests {
dpe_instance::tests::{TestTypes, SIMULATION_HANDLE, TEST_LOCALITIES},
support::Support,
};
use crypto::OpensslCrypto;
use platform::{DefaultPlatform, AUTO_INIT_LOCALITY};
use dpe_crypto::OpensslCrypto;
use dpe_platform::{DefaultPlatform, AUTO_INIT_LOCALITY};
use zerocopy::AsBytes;

const TEST_EXTEND_TCI_CMD: ExtendTciCmd = ExtendTciCmd {
Expand Down
6 changes: 3 additions & 3 deletions dpe/src/commands/get_certificate_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
response::{DpeErrorCode, GetCertificateChainResp, Response, ResponseHdr},
MAX_CERT_SIZE,
};
use platform::{Platform, PlatformError, MAX_CHUNK_SIZE};
use dpe_platform::{Platform, PlatformError, MAX_CHUNK_SIZE};

#[repr(C)]
#[derive(Debug, PartialEq, Eq, zerocopy::FromBytes)]
Expand Down Expand Up @@ -51,8 +51,8 @@ mod tests {
dpe_instance::tests::{TestTypes, TEST_LOCALITIES},
support::test::SUPPORT,
};
use crypto::OpensslCrypto;
use platform::DefaultPlatform;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use zerocopy::AsBytes;

const TEST_GET_CERTIFICATE_CHAIN_CMD: GetCertificateChainCmd = GetCertificateChainCmd {
Expand Down
4 changes: 2 additions & 2 deletions dpe/src/commands/initialize_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ mod tests {
dpe_instance::tests::{TestTypes, TEST_LOCALITIES},
support::Support,
};
use crypto::OpensslCrypto;
use platform::DefaultPlatform;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use zerocopy::AsBytes;

const TEST_INIT_CTX_CMD: InitCtxCmd = InitCtxCmd { flags: 0x1234_5678 };
Expand Down
4 changes: 2 additions & 2 deletions dpe/src/commands/rotate_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ mod tests {
dpe_instance::tests::{TestTypes, SIMULATION_HANDLE, TEST_HANDLE, TEST_LOCALITIES},
support::Support,
};
use crypto::OpensslCrypto;
use platform::DefaultPlatform;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use zerocopy::AsBytes;

const TEST_ROTATE_CTX_CMD: RotateCtxCmd = RotateCtxCmd {
Expand Down
6 changes: 3 additions & 3 deletions dpe/src/commands/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
response::{DpeErrorCode, Response, ResponseHdr, SignResp},
DPE_PROFILE,
};
use crypto::{Crypto, CryptoBuf, Digest, EcdsaSig, HmacSig};
use dpe_crypto::{Crypto, CryptoBuf, Digest, EcdsaSig, HmacSig};

#[repr(C)]
#[derive(Debug, PartialEq, Eq, zerocopy::FromBytes)]
Expand Down Expand Up @@ -122,10 +122,10 @@ mod tests {
dpe_instance::tests::{TestTypes, SIMULATION_HANDLE, TEST_LOCALITIES},
support::{test::SUPPORT, Support},
};
use crypto::OpensslCrypto;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use openssl::x509::X509;
use openssl::{bn::BigNum, ecdsa::EcdsaSig};
use platform::DefaultPlatform;
use zerocopy::AsBytes;

#[cfg(feature = "dpe_profile_p256_sha256")]
Expand Down
4 changes: 2 additions & 2 deletions dpe/src/commands/tag_tci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ mod tests {
dpe_instance::tests::{TestTypes, SIMULATION_HANDLE, TEST_HANDLE, TEST_LOCALITIES},
support::Support,
};
use crypto::OpensslCrypto;
use platform::DefaultPlatform;
use dpe_crypto::OpensslCrypto;
use dpe_platform::DefaultPlatform;
use zerocopy::AsBytes;

const TEST_TAG_TCI_CMD: TagTciCmd = TagTciCmd {
Expand Down
8 changes: 4 additions & 4 deletions dpe/src/dpe_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use crate::{
DPE_PROFILE, INTERNAL_INPUT_INFO_SIZE, MAX_HANDLES,
};
use core::mem::size_of;
use crypto::{Crypto, Digest, Hasher};
use platform::{Platform, MAX_CHUNK_SIZE};
use dpe_crypto::{Crypto, Digest, Hasher};
use dpe_platform::{Platform, MAX_CHUNK_SIZE};
use zerocopy::AsBytes;

pub trait DpeTypes {
Expand Down Expand Up @@ -394,8 +394,8 @@ pub mod tests {
use crate::response::NewHandleResp;
use crate::support::test::SUPPORT;
use crate::{commands::CommandHdr, CURRENT_PROFILE_MAJOR_VERSION};
use crypto::OpensslCrypto;
use platform::{DefaultPlatform, AUTO_INIT_LOCALITY, MAX_CHUNK_SIZE, TEST_CERT_CHAIN};
use dpe_crypto::OpensslCrypto;
use dpe_platform::{DefaultPlatform, AUTO_INIT_LOCALITY, MAX_CHUNK_SIZE, TEST_CERT_CHAIN};
use zerocopy::AsBytes;

pub struct TestTypes;
Expand Down
6 changes: 3 additions & 3 deletions dpe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ impl DpeProfile {
pub const fn get_hash_size(&self) -> usize {
self.get_tci_size()
}
pub const fn alg_len(&self) -> crypto::AlgLen {
pub const fn alg_len(&self) -> dpe_crypto::AlgLen {
match self {
DpeProfile::P256Sha256 => crypto::AlgLen::Bit256,
DpeProfile::P384Sha384 => crypto::AlgLen::Bit384,
DpeProfile::P256Sha256 => dpe_crypto::AlgLen::Bit256,
DpeProfile::P384Sha384 => dpe_crypto::AlgLen::Bit384,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dpe/src/x509.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
tci::{TciMeasurement, TciNodeData},
DpeProfile, DPE_PROFILE,
};
use crypto::{EcdsaPub, EcdsaSig};
use dpe_crypto::{EcdsaPub, EcdsaSig};

/// Type for specifying an X.509 RelativeDistinguisedName
///
Expand Down Expand Up @@ -1119,7 +1119,7 @@ mod tests {
use crate::tci::{TciMeasurement, TciNodeData};
use crate::x509::{MeasurementData, Name, X509CertWriter};
use crate::DPE_PROFILE;
use crypto::{AlgLen, CryptoBuf, EcdsaPub, EcdsaSig};
use dpe_crypto::{AlgLen, CryptoBuf, EcdsaPub, EcdsaSig};
use std::str;
use x509_parser::certificate::X509CertificateParser;
use x509_parser::nom::Parser;
Expand Down
2 changes: 1 addition & 1 deletion platform/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 platform/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Licensed under the Apache-2.0 license

[package]
name = "platform"
name = "dpe-platform"
version = "0.1.0"
edition = "2021"
58 changes: 29 additions & 29 deletions simulator/Cargo.lock

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

Loading