diff options
-rw-r--r-- | keystore/keystore_cli_v2.cpp | 4 | ||||
-rw-r--r-- | keystore/tests/Android.bp | 2 | ||||
-rw-r--r-- | keystore2/Android.bp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/keystore/keystore_cli_v2.cpp b/keystore/keystore_cli_v2.cpp index 6e45ee27..43f72a99 100644 --- a/keystore/keystore_cli_v2.cpp +++ b/keystore/keystore_cli_v2.cpp @@ -56,7 +56,7 @@ struct TestCase { keymint::AuthorizationSet parameters; }; -constexpr const char keystore2_service_name[] = "android.system.keystore2"; +constexpr const char keystore2_service_name[] = "android.system.keystore2.IKeystoreService/default"; int unwrapError(const ndk::ScopedAStatus& status) { if (status.isOk()) return 0; @@ -769,7 +769,7 @@ int GenerateKey(const std::string& name, keymint::SecurityLevel securityLevel, b sec_level->generateKey(keyDescriptor(name), {} /* attestationKey */, params.vector_data(), 0 /* flags */, {} /* entropy */, &keyMetadata); - if (rc.isOk()) { + if (!rc.isOk()) { std::cerr << "GenerateKey failed: " << rc.getDescription() << std::endl; return unwrapError(rc); } diff --git a/keystore/tests/Android.bp b/keystore/tests/Android.bp index 249cb77a..39601ebb 100644 --- a/keystore/tests/Android.bp +++ b/keystore/tests/Android.bp @@ -62,9 +62,9 @@ cc_test { "libgtest_main", "libutils", "liblog", + "android.security.apc-ndk_platform", ], shared_libs: [ - "android.security.apc-ndk_platform", "libbinder_ndk", ], sanitize: { diff --git a/keystore2/Android.bp b/keystore2/Android.bp index 0ba49ed8..32493c0e 100644 --- a/keystore2/Android.bp +++ b/keystore2/Android.bp @@ -145,4 +145,6 @@ rust_binary { ], vintf_fragments: ["android.system.keystore2-service.xml"], + + required: ["keystore_cli_v2"], } |