From d24642d7673736de3fa3b45fdab6a34f879a60b5 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 5 Oct 2014 14:53:06 +0000 Subject: Use tls1_get_curvelist() in ssl_add_clienthello_tlsext(), rather than hand rolling the same code. ok miod@ --- src/lib/libssl/src/ssl/t1_lib.c | 13 ++----------- src/lib/libssl/t1_lib.c | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) (limited to 'src/lib/libssl') diff --git a/src/lib/libssl/src/ssl/t1_lib.c b/src/lib/libssl/src/ssl/t1_lib.c index 0b3f0f3566..ce827caae7 100644 --- a/src/lib/libssl/src/ssl/t1_lib.c +++ b/src/lib/libssl/src/ssl/t1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_lib.c,v 1.61 2014/10/05 14:47:30 jsing Exp $ */ +/* $OpenBSD: t1_lib.c,v 1.62 2014/10/05 14:53:06 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -743,16 +743,7 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) /* * Add TLS extension EllipticCurves to the ClientHello message. */ - plist = s->tlsext_ellipticcurvelist; - plistlen = s->tlsext_ellipticcurvelist_length; - - /* - * If we have a custom curve list use it otherwise use default. - */ - if (plist == NULL) { - plist = eccurves_default; - plistlen = sizeof(eccurves_default); - } + tls1_get_curvelist(s, 0, &plist, &plistlen); if ((size_t)(limit - ret) < 6) return NULL; diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index 0b3f0f3566..ce827caae7 100644 --- a/src/lib/libssl/t1_lib.c +++ b/src/lib/libssl/t1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_lib.c,v 1.61 2014/10/05 14:47:30 jsing Exp $ */ +/* $OpenBSD: t1_lib.c,v 1.62 2014/10/05 14:53:06 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -743,16 +743,7 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) /* * Add TLS extension EllipticCurves to the ClientHello message. */ - plist = s->tlsext_ellipticcurvelist; - plistlen = s->tlsext_ellipticcurvelist_length; - - /* - * If we have a custom curve list use it otherwise use default. - */ - if (plist == NULL) { - plist = eccurves_default; - plistlen = sizeof(eccurves_default); - } + tls1_get_curvelist(s, 0, &plist, &plistlen); if ((size_t)(limit - ret) < 6) return NULL; -- cgit v1.2.3-55-g6feb