* implement a maximum cache size.
*/
struct ssl_session_st *prev, *next;
-# ifndef OPENSSL_NO_TLSEXT
char *tlsext_hostname;
-# ifndef OPENSSL_NO_EC
+# ifndef OPENSSL_NO_EC
size_t tlsext_ecpointformatlist_length;
unsigned char *tlsext_ecpointformatlist; /* peer's list */
size_t tlsext_ellipticcurvelist_length;
unsigned char *tlsext_ellipticcurvelist; /* peer's list */
-# endif /* OPENSSL_NO_EC */
+# endif /* OPENSSL_NO_EC */
/* RFC4507 info */
unsigned char *tlsext_tick; /* Session ticket */
size_t tlsext_ticklen; /* Session ticket length */
unsigned long tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */
-# endif
# ifndef OPENSSL_NO_SRP
char *srp_username;
# endif
ENGINE *client_cert_engine;
# endif
-# ifndef OPENSSL_NO_TLSEXT
/* TLS extensions servername callback */
int (*tlsext_servername_callback) (SSL *, int *, void *);
void *tlsext_servername_arg;
/* Callback for status request */
int (*tlsext_status_cb) (SSL *ssl, void *arg);
void *tlsext_status_arg;
-# endif
# ifndef OPENSSL_NO_PSK
char *psk_identity_hint;
SRP_CTX srp_ctx; /* ctx for SRP authentication */
# endif
-# ifndef OPENSSL_NO_TLSEXT
-
-# ifndef OPENSSL_NO_NEXTPROTONEG
+# ifndef OPENSSL_NO_NEXTPROTONEG
/* Next protocol negotiation information */
/* (for experimental NPN extension). */
const unsigned char *in,
unsigned int inlen, void *arg);
void *next_proto_select_cb_arg;
-# endif
+# endif
/*
* ALPN information (we are in the process of transitioning from NPN to
/* SRTP profiles we are willing to do from RFC 5764 */
STACK_OF(SRTP_PROTECTION_PROFILE) *srtp_profiles;
-# endif
/*
* Callback for disabling session caching and ticket support on a session
* basis, depending on the chosen cipher.
/* what was passed, used for SSLv3/TLS rollback check */
int client_version;
unsigned int max_send_fragment;
-# ifndef OPENSSL_NO_TLSEXT
+
/* TLS extension debug callback */
void (*tlsext_debug_cb) (SSL *s, int client_server, int type,
unsigned char *data, int len, void *arg);
int tlsext_ocsp_resplen;
/* RFC4507 session ticket expected to be received or sent */
int tlsext_ticket_expected;
-# ifndef OPENSSL_NO_EC
+# ifndef OPENSSL_NO_EC
size_t tlsext_ecpointformatlist_length;
/* our list */
unsigned char *tlsext_ecpointformatlist;
size_t tlsext_ellipticcurvelist_length;
/* our list */
unsigned char *tlsext_ellipticcurvelist;
-# endif /* OPENSSL_NO_EC */
+# endif /* OPENSSL_NO_EC */
/* TLS Session Ticket extension override */
TLS_SESSION_TICKET_EXT *tlsext_session_ticket;
/* TLS Session Ticket extension callback */
tls_session_secret_cb_fn tls_session_secret_cb;
void *tls_session_secret_cb_arg;
SSL_CTX *initial_ctx; /* initial ctx, used to store sessions */
-# ifndef OPENSSL_NO_NEXTPROTONEG
+# ifndef OPENSSL_NO_NEXTPROTONEG
/*
* Next protocol negotiation. For the client, this is the protocol that
* we sent in NextProtocol and is set when handling ServerHello
*/
unsigned char *next_proto_negotiated;
unsigned char next_proto_negotiated_len;
-# endif
-# define session_ctx initial_ctx
+# endif
+# define session_ctx initial_ctx
/* What we'll do */
STACK_OF(SRTP_PROTECTION_PROFILE) *srtp_profiles;
/* What's been chosen */
*/
unsigned char *alpn_client_proto_list;
unsigned alpn_client_proto_list_len;
-# else
-# define session_ctx ctx
-# endif /* OPENSSL_NO_TLSEXT */
+
/*-
* 1 if we are renegotiating.
* 2 if we are a server and are inside a handshake
* If zero it can't be used at all.
*/
int valid_flags[SSL_PKEY_NUM];
+ /*
+ * For servers the following masks are for the key and auth algorithms
+ * that are supported by the certs below. For clients they are masks of
+ * *disabled* algorithms based on the current session.
+ */
+ unsigned long mask_k;
+ unsigned long mask_a;
+ unsigned long export_mask_k;
+ unsigned long export_mask_a;
+ /* Client only */
+ unsigned long mask_ssl;
} tmp;
/* Connection binding to prevent renegotiation attacks */
int next_proto_neg_seen;
# endif
-# ifndef OPENSSL_NO_TLSEXT
-
/*
* ALPN information (we are in the process of transitioning from NPN to
* ALPN.)
*/
char is_probably_safari;
# endif /* !OPENSSL_NO_EC */
-
-# endif /* !OPENSSL_NO_TLSEXT */
} SSL3_STATE;
struct dtls1_retransmit_state saved_retransmit_state;
};
-struct ccs_header_st {
- unsigned char type;
- unsigned short seq;
-};
-
struct dtls1_timeout_st {
/* Number of read timeouts so far */
unsigned int read_timeouts;
EVP_PKEY *privatekey;
/* Chain for this certificate */
STACK_OF(X509) *chain;
-# ifndef OPENSSL_NO_TLSEXT
+
/*-
* serverinfo data for this certificate. The data is in TLS Extension
* wire format, specifically it's a series of records like:
*/
unsigned char *serverinfo;
size_t serverinfo_length;
-# endif
} CERT_PKEY;
/* Retrieve Suite B flags */
# define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
* an index, not a pointer.
*/
CERT_PKEY *key;
- /*
- * For servers the following masks are for the key and auth algorithms
- * that are supported by the certs below. For clients they are masks of
- * *disabled* algorithms based on the current session.
- */
- int valid;
- unsigned long mask_k;
- unsigned long mask_a;
- unsigned long export_mask_k;
- unsigned long export_mask_a;
- /* Client only */
- unsigned long mask_ssl;
# ifndef OPENSSL_NO_RSA
RSA *rsa_tmp;
RSA *(*rsa_tmp_cb) (SSL *ssl, int is_export, int keysize);
__owur int ssl_undefined_void_function(void);
__owur int ssl_undefined_const_function(const SSL *s);
__owur CERT_PKEY *ssl_get_server_send_pkey(SSL *s);
-# ifndef OPENSSL_NO_TLSEXT
__owur int ssl_get_server_cert_serverinfo(SSL *s, const unsigned char **serverinfo,
size_t *serverinfo_length);
-# endif
__owur EVP_PKEY *ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *c, const EVP_MD **pmd);
__owur int ssl_cert_type(X509 *x, EVP_PKEY *pkey);
void ssl_set_masks(SSL *s, const SSL_CIPHER *cipher);
void dtls1_clear_record_buffer(SSL *s);
void dtls1_get_message_header(unsigned char *data,
struct hm_header_st *msg_hdr);
-void dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr);
__owur long dtls1_default_timeout(void);
__owur struct timeval *dtls1_get_timeout(SSL *s, struct timeval *timeleft);
__owur int dtls1_check_timeout_num(SSL *s);
__owur int ssl3_get_key_exchange(SSL *s);
__owur int ssl3_get_server_certificate(SSL *s);
__owur int ssl3_check_cert_and_algorithm(SSL *s);
-# ifndef OPENSSL_NO_TLSEXT
-# ifndef OPENSSL_NO_NEXTPROTONEG
+# ifndef OPENSSL_NO_NEXTPROTONEG
__owur int ssl3_send_next_proto(SSL *s);
-# endif
# endif
int dtls1_client_hello(SSL *s);
__owur int tls1_check_ec_tmp_key(SSL *s, unsigned long id);
# endif /* OPENSSL_NO_EC */
-# ifndef OPENSSL_NO_TLSEXT
__owur int tls1_shared_list(SSL *s,
const unsigned char *l1, size_t l1len,
const unsigned char *l2, size_t l2len, int nmatch);
__owur int ssl_prepare_clienthello_tlsext(SSL *s);
__owur int ssl_prepare_serverhello_tlsext(SSL *s);
-# ifndef OPENSSL_NO_HEARTBEATS
+# ifndef OPENSSL_NO_HEARTBEATS
__owur int tls1_heartbeat(SSL *s);
__owur int dtls1_heartbeat(SSL *s);
__owur int tls1_process_heartbeat(SSL *s, unsigned char *p, unsigned int length);
__owur int dtls1_process_heartbeat(SSL *s, unsigned char *p, unsigned int length);
-# endif
+# endif
__owur int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
const unsigned char *limit, SSL_SESSION **ret);
int idx);
void tls1_set_cert_validity(SSL *s);
-# endif
# ifndef OPENSSL_NO_DH
__owur DH *ssl_get_auto_dh(SSL *s);
# endif