projects
/
platform
/
core
/
security
/
yaca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8eb6223
)
Implement getting the bits of an evp type key.
80/65780/4
author
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Tue, 12 Apr 2016 11:34:44 +0000
(13:34 +0200)
committer
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Wed, 13 Apr 2016 09:26:13 +0000
(11:26 +0200)
Change-Id: Ibbd62e146bcfc7ecaa999a694416db2488e14052
src/key.c
patch
|
blob
|
history
diff --git
a/src/key.c
b/src/key.c
index
78dd5c8
..
6ba3c9e
100644
(file)
--- a/
src/key.c
+++ b/
src/key.c
@@
-104,8
+104,16
@@
API int yaca_key_get_length(const yaca_key_h key)
}
if (evp_key != NULL) {
+ int ret;
+
evp_key_sanity_check(evp_key);
- return YACA_ERROR_NOT_IMPLEMENTED;
+
+ // TODO: handle ECC keys when they're implemented
+ ret = EVP_PKEY_bits(evp_key->evp);
+ if (ret <= 0)
+ return YACA_ERROR_OPENSSL_FAILURE;
+
+ return ret;
}
return YACA_ERROR_INVALID_ARGUMENT;