-
Notifications
You must be signed in to change notification settings - Fork 68
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
Improve E2E testing #253
Improve E2E testing #253
Conversation
0a79d00
to
6afefe4
Compare
This commit improves integration testing by adding tests for: * cross-checking compatibility for handling key material and other buffer encodings * fault testing the handling of request header values * expand stress testing to cover asymmetric encryption and decryption, and ECC sign/verify * checking that operations that are not in the supported opcodes list are indeed not supported Some other improvements: * moving testing for ECC signatures from integration testing to E2E testing * change the `export` usage flags to `false` unless explicitly required by the test Signed-off-by: Ionut Mihalcea <[email protected]>
6afefe4
to
f248e97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your effort! I will update parallaxsecond/parsec-book#65 with these changes
[dev-dependencies] | ||
ring = "0.16.15" | ||
lazy_static = "1.4.0" | ||
rsa = "0.3.0" | ||
rand = "0.7.3" | ||
sha2 = "0.9.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
SignEcc, | ||
VerifyEcc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh pretty good 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, unfortunately PKCS11 doesn't support it -_- one day!!!
#[test] | ||
fn tpm_sign_cross() { | ||
let key_name = String::from("tpm_sign_cross"); | ||
let (mut client, pub_key, signature) = setup_sign(ProviderID::Tpm, key_name.clone()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit and maybe not good for performance but we could put this function in a for provider in [Tpm, MbedCrypto, Pkcs11]
loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yeah, I guess! My only concern was with figuring out what failed and where, but I guess we can put a format!
in the expect(...)
@@ -5,6 +5,8 @@ use parsec_client::core::interface::operations::list_providers::Uuid; | |||
use parsec_client::core::interface::requests::{AuthType, Opcode, ProviderID, Result}; | |||
use std::collections::HashSet; | |||
|
|||
mod cross; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this might be needed so that test are executed? Even without pub
🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it's only about the tests being in some module
This commit improves integration testing by adding tests for:
buffer encodings
decryption, and ECC sign/verify
list are indeed not supported
Some other improvements:
testing
export
usage flags tofalse
unless explicitly requiredby the test
Signed-off-by: Ionut Mihalcea [email protected]