diff options
author | jsing <> | 2014-10-05 14:53:06 +0000 |
---|---|---|
committer | jsing <> | 2014-10-05 14:53:06 +0000 |
commit | d24642d7673736de3fa3b45fdab6a34f879a60b5 (patch) | |
tree | 2e7031a8bbd079057c0bfc3bdb26d97f6c38d00a /src/lib | |
parent | 3a6fc608f61f6b2609b78c891045d3eb92dfa682 (diff) | |
download | openbsd-d24642d7673736de3fa3b45fdab6a34f879a60b5.tar.gz openbsd-d24642d7673736de3fa3b45fdab6a34f879a60b5.tar.bz2 openbsd-d24642d7673736de3fa3b45fdab6a34f879a60b5.zip |
Use tls1_get_curvelist() in ssl_add_clienthello_tlsext(), rather than
hand rolling the same code.
ok miod@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/src/ssl/t1_lib.c | 13 | ||||
-rw-r--r-- | src/lib/libssl/t1_lib.c | 13 |
2 files changed, 4 insertions, 22 deletions
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 @@ | |||
1 | /* $OpenBSD: t1_lib.c,v 1.61 2014/10/05 14:47:30 jsing Exp $ */ | 1 | /* $OpenBSD: t1_lib.c,v 1.62 2014/10/05 14:53:06 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 | * |
@@ -743,16 +743,7 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
743 | /* | 743 | /* |
744 | * Add TLS extension EllipticCurves to the ClientHello message. | 744 | * Add TLS extension EllipticCurves to the ClientHello message. |
745 | */ | 745 | */ |
746 | plist = s->tlsext_ellipticcurvelist; | 746 | tls1_get_curvelist(s, 0, &plist, &plistlen); |
747 | plistlen = s->tlsext_ellipticcurvelist_length; | ||
748 | |||
749 | /* | ||
750 | * If we have a custom curve list use it otherwise use default. | ||
751 | */ | ||
752 | if (plist == NULL) { | ||
753 | plist = eccurves_default; | ||
754 | plistlen = sizeof(eccurves_default); | ||
755 | } | ||
756 | 747 | ||
757 | if ((size_t)(limit - ret) < 6) | 748 | if ((size_t)(limit - ret) < 6) |
758 | return NULL; | 749 | 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 @@ | |||
1 | /* $OpenBSD: t1_lib.c,v 1.61 2014/10/05 14:47:30 jsing Exp $ */ | 1 | /* $OpenBSD: t1_lib.c,v 1.62 2014/10/05 14:53:06 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 | * |
@@ -743,16 +743,7 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
743 | /* | 743 | /* |
744 | * Add TLS extension EllipticCurves to the ClientHello message. | 744 | * Add TLS extension EllipticCurves to the ClientHello message. |
745 | */ | 745 | */ |
746 | plist = s->tlsext_ellipticcurvelist; | 746 | tls1_get_curvelist(s, 0, &plist, &plistlen); |
747 | plistlen = s->tlsext_ellipticcurvelist_length; | ||
748 | |||
749 | /* | ||
750 | * If we have a custom curve list use it otherwise use default. | ||
751 | */ | ||
752 | if (plist == NULL) { | ||
753 | plist = eccurves_default; | ||
754 | plistlen = sizeof(eccurves_default); | ||
755 | } | ||
756 | 747 | ||
757 | if ((size_t)(limit - ret) < 6) | 748 | if ((size_t)(limit - ret) < 6) |
758 | return NULL; | 749 | return NULL; |