diff options
author | Nils Larsch <nils@openssl.org> | 2005-05-16 10:11:04 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-05-16 10:11:04 +0000 |
commit | 9dd84053419aa220b5e66a5f9fcf809dbd6d9369 (patch) | |
tree | 7818c598a88a5b457333fd9f5951836fe96834b6 /apps/s_server.c | |
parent | 46a643763de6d8e39ecf6f76fa79b4d04885aa59 (diff) | |
download | openssl-9dd84053419aa220b5e66a5f9fcf809dbd6d9369.tar.gz |
ecc api cleanup; summary:
- hide the EC_KEY structure definition in ec_lcl.c + add
some functions to use/access the EC_KEY fields
- change the way how method specific data (ecdsa/ecdh) is
attached to a EC_KEY
- add ECDSA_sign_ex and ECDSA_do_sign_ex functions with
additional parameters for pre-computed values
- rebuild libeay.num from 0.9.7
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index ea19a50bff..59b6305e97 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -981,13 +981,6 @@ bad: { EC_KEY *ecdh=NULL; - ecdh = EC_KEY_new(); - if (ecdh == NULL) - { - BIO_printf(bio_err,"Could not create ECDH struct.\n"); - goto end; - } - if (named_curve) { int nid = OBJ_sn2nid(named_curve); @@ -998,9 +991,8 @@ bad: named_curve); goto end; } - - ecdh->group = EC_GROUP_new_by_curve_name(nid); - if (ecdh->group == NULL) + ecdh = EC_KEY_new_by_curve_name(nid); + if (ecdh == NULL) { BIO_printf(bio_err, "unable to create curve (%s)\n", named_curve); @@ -1008,15 +1000,15 @@ bad: } } - if (ecdh->group != NULL) + if (ecdh != NULL) { BIO_printf(bio_s_out,"Setting temp ECDH parameters\n"); } else { BIO_printf(bio_s_out,"Using default temp ECDH parameters\n"); - ecdh->group=EC_GROUP_new_by_curve_name(NID_sect163r2); - if (ecdh->group == NULL) + ecdh = EC_KEY_new_by_curve_name(NID_sect163r2); + if (ecdh == NULL) { BIO_printf(bio_err, "unable to create curve (sect163r2)\n"); goto end; |