-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): better android finish test check
Signed-off-by: Berend Sliedrecht <[email protected]>
- Loading branch information
1 parent
d6ca21f
commit ff2cf2d
Showing
5 changed files
with
51 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,14 @@ | ||
use android_activity::AndroidApp; | ||
use secure_env::{ | ||
error::SecureEnvResult, key::KeyOps, secure_environment::SecureEnvironmentOps, | ||
SecureEnvironment, | ||
}; | ||
use secure_env::{key::KeyOps, secure_environment::SecureEnvironmentOps, SecureEnvironment}; | ||
|
||
fn main() -> SecureEnvResult<()> { | ||
let k = SecureEnvironment::generate_keypair("some-id")?; | ||
let n_k = SecureEnvironment::get_keypair_by_id("some-id")?; | ||
#[no_mangle] | ||
fn android_main(_app: AndroidApp) { | ||
let k = SecureEnvironment::generate_keypair("some-id").unwrap(); | ||
let n_k = SecureEnvironment::get_keypair_by_id("some-id").unwrap(); | ||
|
||
let k = k.get_public_key()?; | ||
let n_k = n_k.get_public_key()?; | ||
let k = k.get_public_key().unwrap(); | ||
let n_k = n_k.get_public_key().unwrap(); | ||
|
||
assert_eq!(k, n_k); | ||
println!("Created and got key and they are equal"); | ||
|
||
Ok(()) | ||
} | ||
|
||
#[no_mangle] | ||
fn android_main(_app: AndroidApp) { | ||
match main() { | ||
Ok(_) => println!("Success!"), | ||
Err(e) => eprintln!("Error!: {e:?}"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters