summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/src/ssl/t1_lib.c8
-rw-r--r--src/lib/libssl/t1_lib.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libssl/src/ssl/t1_lib.c b/src/lib/libssl/src/ssl/t1_lib.c
index 409da9b4bd..22e84fe122 100644
--- a/src/lib/libssl/src/ssl/t1_lib.c
+++ b/src/lib/libssl/src/ssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.63 2014/10/05 14:56:32 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.64 2014/10/15 14:02:16 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -458,9 +458,6 @@ tls1_set_ec_id(unsigned char *curve_id, unsigned char *comp_id, EC_KEY *ec)
458 if (ec == NULL) 458 if (ec == NULL)
459 return (0); 459 return (0);
460 460
461 if (EC_KEY_get0_public_key(ec) == NULL)
462 return (0);
463
464 /* Determine if it is a prime field. */ 461 /* Determine if it is a prime field. */
465 if ((grp = EC_KEY_get0_group(ec)) == NULL) 462 if ((grp = EC_KEY_get0_group(ec)) == NULL)
466 return (0); 463 return (0);
@@ -484,6 +481,9 @@ tls1_set_ec_id(unsigned char *curve_id, unsigned char *comp_id, EC_KEY *ec)
484 481
485 /* Specify the compression identifier. */ 482 /* Specify the compression identifier. */
486 if (comp_id != NULL) { 483 if (comp_id != NULL) {
484 if (EC_KEY_get0_public_key(ec) == NULL)
485 return (0);
486
487 if (EC_KEY_get_conv_form(ec) == POINT_CONVERSION_COMPRESSED) { 487 if (EC_KEY_get_conv_form(ec) == POINT_CONVERSION_COMPRESSED) {
488 *comp_id = is_prime ? 488 *comp_id = is_prime ?
489 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime : 489 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime :
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 409da9b4bd..22e84fe122 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.63 2014/10/05 14:56:32 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.64 2014/10/15 14:02:16 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -458,9 +458,6 @@ tls1_set_ec_id(unsigned char *curve_id, unsigned char *comp_id, EC_KEY *ec)
458 if (ec == NULL) 458 if (ec == NULL)
459 return (0); 459 return (0);
460 460
461 if (EC_KEY_get0_public_key(ec) == NULL)
462 return (0);
463
464 /* Determine if it is a prime field. */ 461 /* Determine if it is a prime field. */
465 if ((grp = EC_KEY_get0_group(ec)) == NULL) 462 if ((grp = EC_KEY_get0_group(ec)) == NULL)
466 return (0); 463 return (0);
@@ -484,6 +481,9 @@ tls1_set_ec_id(unsigned char *curve_id, unsigned char *comp_id, EC_KEY *ec)
484 481
485 /* Specify the compression identifier. */ 482 /* Specify the compression identifier. */
486 if (comp_id != NULL) { 483 if (comp_id != NULL) {
484 if (EC_KEY_get0_public_key(ec) == NULL)
485 return (0);
486
487 if (EC_KEY_get_conv_form(ec) == POINT_CONVERSION_COMPRESSED) { 487 if (EC_KEY_get_conv_form(ec) == POINT_CONVERSION_COMPRESSED) {
488 *comp_id = is_prime ? 488 *comp_id = is_prime ?
489 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime : 489 TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime :