summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_locl.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-08-11 15:41:49 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-08-13 14:11:05 +0100
commitec24630ae2b714d6e22fbfa4695aa8f8adef1828 (patch)
treed011ddd52b33c5bb4d58cdede78c9d4ea690199a /ssl/ssl_locl.h
parent3bca6c27317958f30f8bbfe67814a7ab9a07f4a3 (diff)
Modify TLS support for new X25519 API.
When handling ECDH check to see if the curve is "custom" (X25519 is currently the only curve of this type) and instead of setting a curve NID just allocate a key of appropriate type. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/ssl_locl.h')
-rw-r--r--ssl/ssl_locl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index f502cadb1d..3c230d14d6 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -1987,7 +1987,13 @@ __owur int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s);
SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n);
# ifndef OPENSSL_NO_EC
-__owur int tls1_ec_curve_id2nid(int curve_id);
+/* Flags values from tls1_ec_curve_id2nid() */
+/* Mask for curve type */
+# define TLS_CURVE_TYPE 0x3
+# define TLS_CURVE_PRIME 0x0
+# define TLS_CURVE_CHAR2 0x1
+# define TLS_CURVE_CUSTOM 0x2
+__owur int tls1_ec_curve_id2nid(int curve_id, unsigned int *pflags);
__owur int tls1_ec_nid2curve_id(int nid);
__owur int tls1_check_curve(SSL *s, const unsigned char *p, size_t len);
__owur int tls1_shared_curve(SSL *s, int nmatch);