aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-04-10 16:13:20 +0100
committerMatt Caswell <matt@openssl.org>2017-05-03 14:37:42 +0100
commit84c34ba8762463057d372e22ad98a045dbd9a51f (patch)
tree0562b023b190ead09b239fd71d0a77676de81922 /include
parentf0ef20bf386b5c37ba5a4ce5c1de9a819bbeffb2 (diff)
downloadopenssl-84c34ba8762463057d372e22ad98a045dbd9a51f.tar.gz
Extend the SERVERINFO file format to include an extensions context
This enables us to know what messages the extensions are relevant for in TLSv1.3. The new file format is not compatible with the previous one so we call it SERVERINFOV2. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3298)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/ssl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index b1da6c5a69..0fbd7425d4 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1451,9 +1451,17 @@ __owur int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d,
__owur int SSL_use_certificate(SSL *ssl, X509 *x);
__owur int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);
+
+/* serverinfo file format versions */
+# define SERVERINFOV1 1
+# define SERVERINFOV2 2
+
/* Set serverinfo data for the current active cert. */
__owur int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
size_t serverinfo_length);
+__owur int SSL_CTX_use_serverinfo_ex(SSL_CTX *ctx, unsigned int version,
+ const unsigned char *serverinfo,
+ size_t serverinfo_length);
__owur int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
#ifndef OPENSSL_NO_RSA
@@ -2328,6 +2336,7 @@ int ERR_load_SSL_strings(void);
# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178
# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179
# define SSL_F_SSL_CTX_USE_SERVERINFO 336
+# define SSL_F_SSL_CTX_USE_SERVERINFO_EX 543
# define SSL_F_SSL_CTX_USE_SERVERINFO_FILE 337
# define SSL_F_SSL_DANE_DUP 403
# define SSL_F_SSL_DANE_ENABLE 395