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

Switch imports to crates.io #497

Merged
merged 1 commit into from
Aug 5, 2021
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
70 changes: 25 additions & 45 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name = "parsec"
path = "src/bin/main.rs"

[dependencies]
parsec-interface = { git = "https://github.com/parallaxsecond/parsec-interface-rs.git", rev = "6b951390791b398b76eb02c942e24d7c91acc980"}
parsec-interface = "0.25.0"
rand = { version = "0.8.3", features = ["small_rng"], optional = true }
base64 = "0.13.0"
uuid = "0.8.2"
Expand All @@ -26,16 +26,16 @@ toml = "0.5.8"
serde = { version = "1.0.123", features = ["derive"] }
env_logger = "0.8.3"
log = { version = "0.4.14", features = ["serde"] }
cryptoki = { git = "https://github.com/parallaxsecond/rust-cryptoki", rev = "2cd54bba7a00db93b3e9e2acf50726558a1784fc", optional = true, features = ["psa-crypto-conversions"] }
cryptoki = { version = "0.2.0", optional = true, features = ["psa-crypto-conversions"] }
picky-asn1-der = { version = "<=0.2.4", optional = true }
picky-asn1 = { version = ">=0.3.1, <=0.3.1", optional = true }
tss-esapi = { git = "https://github.com/parallaxsecond/rust-tss-esapi", rev = "1f68655e278b0319c080b9804a7bf3f6e11ff721", optional = true }
tss-esapi = { version = "6.1.0", optional = true }
bincode = "1.3.1"
structopt = "0.3.21"
derivative = "2.2.0"
version = "3.0.0"
hex = { version = "0.4.2", optional = true }
psa-crypto = { git = "https://github.com/parallaxsecond/rust-psa-crypto.git", rev = "8605006d34944fa880edd3d4d347f460c5585747", default-features = false, features = ["operations"], optional = true }
psa-crypto = { version = "0.9.0", default-features = false, features = ["operations"], optional = true }
zeroize = { version = "1.2.0", features = ["zeroize_derive"] }
picky-asn1-x509 = { version = "0.4.0", optional = true }
users = "0.11.0"
Expand Down
2 changes: 1 addition & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ run_old_e2e_tests() {
# /tmp/parsec/parsec.sock. This can not be created in the Dockerfile as this is where
# the repository is checked out.
ln -s /tmp/parsec.sock /tmp/parsec/parsec.sock
RUST_BACKTRACE=1 cargo test --manifest-path /tmp/old_e2e_tests/Cargo.toml normal_tests
RUST_BACKTRACE=1 cargo test --manifest-path /tmp/old_e2e_tests/Cargo.toml normal_tests -- --skip asym_verify_fail
hug-dev marked this conversation as resolved.
Show resolved Hide resolved
fi
}

Expand Down
22 changes: 20 additions & 2 deletions e2e_tests/src/stress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ const KEY_DATA: [u8; 140] = [
39, 22, 141, 173, 85, 26, 58, 9, 128, 27, 57, 131, 2, 3, 1, 0, 1,
];

const SIGNATURE: [u8; 128] = [
0x8c, 0xf8, 0x87, 0x3a, 0xb2, 0x9a, 0x18, 0xf9, 0xe0, 0x2e, 0xb9, 0x2d, 0xe7, 0xc8, 0x32, 0x12,
0xd6, 0xd9, 0x2d, 0x98, 0xec, 0x9e, 0x47, 0xb7, 0x5b, 0x26, 0x86, 0x9d, 0xf5, 0xa2, 0x6b, 0x8b,
0x6f, 0x00, 0xd3, 0xbb, 0x68, 0x88, 0xe1, 0xad, 0xcf, 0x1c, 0x09, 0x81, 0x91, 0xbf, 0xee, 0xce,
0x4f, 0xb5, 0x83, 0x3c, 0xf5, 0xb0, 0xfa, 0x68, 0x69, 0xde, 0x7b, 0xe8, 0x49, 0x69, 0x40, 0xad,
0x90, 0xf1, 0x7f, 0x31, 0xf2, 0x75, 0x4e, 0x1c, 0x52, 0x92, 0x72, 0x2e, 0x0b, 0x06, 0xe7, 0x32,
0xb4, 0x5e, 0x82, 0x8b, 0x39, 0x72, 0x24, 0x5f, 0xee, 0x17, 0xae, 0x2d, 0x77, 0x53, 0xff, 0x1a,
0xad, 0x12, 0x83, 0x4f, 0xb5, 0x52, 0x92, 0x6e, 0xda, 0xb2, 0x55, 0x77, 0xa7, 0x58, 0xcc, 0x10,
0xa6, 0x7f, 0xc5, 0x26, 0x4e, 0x5b, 0x75, 0x9d, 0x83, 0x05, 0x9f, 0x99, 0xde, 0xc6, 0xf5, 0x12,
];

const SIGNATURE_ECC: [u8; 64] = [
0x0b, 0x4a, 0x00, 0xdb, 0xdb, 0x66, 0xb8, 0x60, 0xa5, 0xb9, 0x5b, 0x2d, 0x99, 0x66, 0xa6, 0x17,
0x79, 0x89, 0x4f, 0xd2, 0x9b, 0x70, 0x12, 0x21, 0x7a, 0x7b, 0xeb, 0xfe, 0x37, 0x90, 0x2f, 0x13,
0xe2, 0x51, 0x6e, 0xe4, 0xe6, 0x85, 0x62, 0x3a, 0xbe, 0x23, 0xb2, 0xde, 0x22, 0x87, 0x40, 0xf2,
0xff, 0x65, 0xd2, 0xb8, 0xe7, 0x7b, 0x72, 0x21, 0x3a, 0x32, 0x7e, 0xd8, 0x80, 0x4e, 0x7a, 0xe3,
];

#[derive(Copy, Clone, Debug)]
pub struct StressTestConfig {
pub no_threads: usize,
Expand Down Expand Up @@ -209,7 +227,7 @@ impl StressTestWorker {
.verify_with_rsa_sha256(
self.sign_key_name.clone(),
HASH.to_vec(),
vec![0xff; 128],
SIGNATURE.to_vec(),
)
.expect_err("Verification should fail.");
if !(status == ResponseStatus::PsaErrorInvalidSignature
Expand Down Expand Up @@ -245,7 +263,7 @@ impl StressTestWorker {
.verify_with_ecdsa_sha256(
self.ecc_key_name.as_ref().unwrap().clone(),
HASH.to_vec(),
vec![0xff; 64],
SIGNATURE_ECC.to_vec(),
)
.expect_err("Verification should fail.");
if !(status == ResponseStatus::PsaErrorInvalidSignature
Expand Down
Loading