diff options
author | Shawn Willden <swillden@google.com> | 2015-02-25 19:16:36 -0700 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2015-02-25 19:23:51 -0700 |
commit | 28eed514058f9f1408e86910bfc67bb87af05506 (patch) | |
tree | da23bae2e59089de1e875928d88e61f4af714e4b /rsa_operation.cpp | |
parent | 26aaa76e18a1a1bc92c7d5ee6ecc62769dd764ec (diff) | |
download | android_system_keymaster-28eed514058f9f1408e86910bfc67bb87af05506.tar.gz android_system_keymaster-28eed514058f9f1408e86910bfc67bb87af05506.tar.bz2 android_system_keymaster-28eed514058f9f1408e86910bfc67bb87af05506.zip |
Increment reference count rather than duping key.
Change-Id: Ia5068fd01975e33e2dd4996811d5a9125767d17a
Diffstat (limited to 'rsa_operation.cpp')
-rw-r--r-- | rsa_operation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rsa_operation.cpp b/rsa_operation.cpp index 27394a6..a75d9ae 100644 --- a/rsa_operation.cpp +++ b/rsa_operation.cpp @@ -84,7 +84,8 @@ RSA* RsaOperationFactory::GetRsaKey(const Key& key, keymaster_error_t* error) { *error = KM_ERROR_UNKNOWN_ERROR; return NULL; } - return RSAPrivateKey_dup(rsa_key->key()); + RSA_up_ref(rsa_key->key()); + return rsa_key->key(); } static const keymaster_digest_t supported_digests[] = {KM_DIGEST_NONE}; |