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:
15d4e18
)
Make it possible to import DER based X509 certificates
50/77950/4
author
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Fri, 1 Jul 2016 17:35:58 +0000
(19:35 +0200)
committer
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Tue, 5 Jul 2016 08:54:51 +0000
(10:54 +0200)
Change-Id: I86442c8faa6244d2d71ed1e0396464c580844166
src/key.c
patch
|
blob
|
history
diff --git
a/src/key.c
b/src/key.c
index
1a02ce5
..
cd87042
100644
(file)
--- a/
src/key.c
+++ b/
src/key.c
@@
-348,6
+348,18
@@
int import_evp(yaca_key_h *key,
private = false;
password_supported = false;
}
+
+ if (pkey == NULL) {
+ BIO_reset(src);
+ X509 *x509 = d2i_X509_bio(src, NULL);
+ if (x509 != NULL) {
+ pkey = X509_get_pubkey(x509);
+ X509_free(x509);
+ }
+ ERROR_CLEAR();
+ private = false;
+ password_supported = false;
+ }
}
BIO_free(src);