Deleted Added
full compact
ec_ameth.c (267256) ec_ameth.c (273144)
1/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
2 * project 2006.
3 */
4/* ====================================================================
5 * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 439 unchanged lines hidden (view full) ---

448 {
449 reason = ERR_R_MALLOC_FAILURE;
450 goto err;
451 }
452
453 if (ktype > 0)
454 {
455 public_key = EC_KEY_get0_public_key(x);
1/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
2 * project 2006.
3 */
4/* ====================================================================
5 * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 439 unchanged lines hidden (view full) ---

448 {
449 reason = ERR_R_MALLOC_FAILURE;
450 goto err;
451 }
452
453 if (ktype > 0)
454 {
455 public_key = EC_KEY_get0_public_key(x);
456 if ((pub_key = EC_POINT_point2bn(group, public_key,
457 EC_KEY_get_conv_form(x), NULL, ctx)) == NULL)
456 if (public_key != NULL)
458 {
457 {
459 reason = ERR_R_EC_LIB;
460 goto err;
461 }
462 if (pub_key)
458 if ((pub_key = EC_POINT_point2bn(group, public_key,
459 EC_KEY_get_conv_form(x), NULL, ctx)) == NULL)
460 {
461 reason = ERR_R_EC_LIB;
462 goto err;
463 }
463 buf_len = (size_t)BN_num_bytes(pub_key);
464 buf_len = (size_t)BN_num_bytes(pub_key);
465 }
464 }
465
466 if (ktype == 2)
467 {
468 priv_key = EC_KEY_get0_private_key(x);
469 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len)
470 buf_len = i;
471 }

--- 190 unchanged lines hidden ---
466 }
467
468 if (ktype == 2)
469 {
470 priv_key = EC_KEY_get0_private_key(x);
471 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len)
472 buf_len = i;
473 }

--- 190 unchanged lines hidden ---