projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
161ff6c
)
Fix ecparam -genkey with point compression or DER outform
author
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Sat, 24 Mar 2018 14:17:11 +0000
(15:17 +0100)
committer
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Sun, 25 Mar 2018 09:12:46 +0000
(11:12 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5741)
apps/ecparam.c
patch
|
blob
|
history
diff --git
a/apps/ecparam.c
b/apps/ecparam.c
index 51877f5991ec93ca4e779157b784da00b067098f..2290242310d194da4284933f81fc268f1a272d44 100644
(file)
--- a/
apps/ecparam.c
+++ b/
apps/ecparam.c
@@
-384,6
+384,9
@@
int ecparam_main(int argc, char **argv)
"}\n");
}
+ if (outformat == FORMAT_ASN1 && genkey)
+ noout = 1;
+
if (!noout) {
if (outformat == FORMAT_ASN1)
i = i2d_ECPKParameters_bio(out, group);
@@
-410,6
+413,9
@@
int ecparam_main(int argc, char **argv)
goto end;
}
+ if (new_form)
+ EC_KEY_set_conv_form(eckey, form);
+
if (!EC_KEY_generate_key(eckey)) {
BIO_printf(bio_err, "unable to generate key\n");
EC_KEY_free(eckey);