X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=ssl%2Ftls1.h;h=f288bb96b398318a1753429b66573a27e97a816a;hb=77a926e6769705944e8ac8db37650cd36161be97;hp=a11caf820aa066ea4820335cbf22aacf5c6f4778;hpb=15a40af2ed0884277134ee134895666332bc5fef;p=openssl.git diff --git a/ssl/tls1.h b/ssl/tls1.h index a11caf820a..f288bb96b3 100644 --- a/ssl/tls1.h +++ b/ssl/tls1.h @@ -157,6 +157,11 @@ extern "C" { #endif +/* Default security level if not overriden at config time */ +#ifndef OPENSSL_TLS_SECURITY_LEVEL +#define OPENSSL_TLS_SECURITY_LEVEL 1 +#endif + #define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 0 #define TLS1_2_VERSION 0x0303 @@ -230,6 +235,9 @@ extern "C" { /* ExtensionType value from RFC5620 */ #define TLSEXT_TYPE_heartbeat 15 +/* ExtensionType value from draft-ietf-tls-applayerprotoneg-00 */ +#define TLSEXT_TYPE_application_layer_protocol_negotiation 16 + /* ExtensionType value from RFC4507 */ #define TLSEXT_TYPE_session_ticket 35 @@ -267,6 +275,9 @@ extern "C" { #define TLSEXT_signature_dsa 2 #define TLSEXT_signature_ecdsa 3 +/* Total number of different signature algorithms */ +#define TLSEXT_signature_num 4 + #define TLSEXT_hash_none 0 #define TLSEXT_hash_md5 1 #define TLSEXT_hash_sha1 2 @@ -274,13 +285,34 @@ extern "C" { #define TLSEXT_hash_sha256 4 #define TLSEXT_hash_sha384 5 #define TLSEXT_hash_sha512 6 + +/* Total number of different digest algorithms */ + +#define TLSEXT_hash_num 7 + /* Flag set for unrecognised algorithms */ #define TLSEXT_nid_unknown 0x1000000 +/* ECC curves */ + +#define TLSEXT_curve_P_256 23 +#define TLSEXT_curve_P_384 24 + #ifndef OPENSSL_NO_TLSEXT #define TLSEXT_MAXLEN_host_name 255 +/* From RFC 5878 */ +#define TLSEXT_SUPPLEMENTALDATATYPE_authz_data 16386 + +/* DTCP Authorization Type + * https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#authorization-data-rules + * http://tools.ietf.org/id/draft-dthakore-tls-authz-04.txt + */ +#define TLSEXT_AUTHZDATAFORMAT_dtcp 66 + +#define TLSEXT_MAXLEN_supplemental_data 1024*16 /* Let's limit to 16k */ + const char *SSL_get_servername(const SSL *s, const int type); int SSL_get_servername_type(const SSL *s); /* SSL_export_keying_material exports a value derived from the master secret, @@ -298,6 +330,12 @@ int SSL_get_sigalgs(SSL *s, int idx, int *psign, int *phash, int *psignandhash, unsigned char *rsig, unsigned char *rhash); +int SSL_get_shared_sigalgs(SSL *s, int idx, + int *psign, int *phash, int *psignandhash, + unsigned char *rsig, unsigned char *rhash); + +int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain); + #define SSL_set_tlsext_host_name(s,name) \ SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name) @@ -526,12 +564,12 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb) #define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032 /* XXX - * Inconsistency alert: - * The OpenSSL names of ciphers with ephemeral DH here include the string - * "DHE", while elsewhere it has always been "EDH". - * (The alias for the list of all such ciphers also is "EDH".) - * The specifications speak of "EDH"; maybe we should allow both forms - * for everything. */ + * Backward compatibility alert: + * Older versions of OpenSSL gave some DHE ciphers names with "EDH" + * instead of "DHE". Going forward, we should be using DHE + * everywhere, though we may indefinitely maintain aliases for users + * or configurations that used "EDH" + */ #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" #define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" #define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA"