case DTLS1_BAD_VER:
case DTLS1_VERSION:
case DTLS1_2_VERSION:
+ case DTLS1_3_VERSION:
ss->session_id_length = SSL3_SSL_SESSION_ID_LENGTH;
break;
default:
s->session = NULL;
if (session) {
- if (SSL_CONNECTION_IS_TLS13(s)) {
+ if (SSL_CONNECTION_IS_VERSION13(s)) {
/*
* We generate the session id while constructing the
* NewSessionTicket in TLSv1.3.
int try_session_cache = 0;
SSL_TICKET_STATUS r;
- if (SSL_CONNECTION_IS_TLS13(s)) {
+ if (SSL_CONNECTION_IS_VERSION13(s)) {
/*
* By default we will send a new ticket. This can be overridden in the
* ticket processing.
goto err;
}
- if (!SSL_CONNECTION_IS_TLS13(s)) {
- /* We already did this for TLS1.3 */
+ if (!SSL_CONNECTION_IS_VERSION13(s)) {
+ /* We already did this for (D)TLS1.3 */
SSL_SESSION_free(s->session);
s->session = ret;
}
err:
if (ret != NULL) {
SSL_SESSION_free(ret);
- /* In TLSv1.3 s->session was already set to ret, so we NULL it out */
- if (SSL_CONNECTION_IS_TLS13(s))
+ /* In (D)TLSv1.3 s->session was already set to ret, so we NULL it out */
+ if (SSL_CONNECTION_IS_VERSION13(s))
s->session = NULL;
if (!try_session_cache) {
s->ext.ticket_expected = 0;
/*
- * If tickets disabled or not supported by the protocol version
+ * If tickets are disabled or not supported by the protocol version
* (e.g. TLSv1.3) behave as if no ticket present to permit stateful
* resumption.
*/
ret = SSL_TICKET_EMPTY;
goto end;
}
- if (!SSL_CONNECTION_IS_TLS13(s) && s->ext.session_secret_cb) {
+ if (!SSL_CONNECTION_IS_VERSION13(s) && s->ext.session_secret_cb) {
/*
* Indicate that the ticket couldn't be decrypted rather than
* generating the session from ticket now, trigger
goto end;
}
EVP_CIPHER_free(aes256cbc);
- if (SSL_CONNECTION_IS_TLS13(s))
+ if (SSL_CONNECTION_IS_VERSION13(s))
renew_ticket = 1;
}
/*
}
}
- if (s->ext.session_secret_cb == NULL || SSL_CONNECTION_IS_TLS13(s)) {
+ if (s->ext.session_secret_cb == NULL || SSL_CONNECTION_IS_VERSION13(s)) {
switch (ret) {
case SSL_TICKET_NO_DECRYPT:
case SSL_TICKET_SUCCESS_RENEW:
msg += 4;
BIO_indent(bio, indent + 2, 80);
BIO_printf(bio, "ticket_lifetime_hint=%u\n", tick_life);
- if (SSL_CONNECTION_IS_TLS13(sc)) {
+ if (SSL_CONNECTION_IS_VERSION13(sc)) {
unsigned int ticket_age_add;
if (msglen < 4)
}
if (!ssl_print_hexbuf(bio, indent + 2, "ticket", 2, &msg, &msglen))
return 0;
- if (SSL_CONNECTION_IS_TLS13(sc)
+ if (SSL_CONNECTION_IS_VERSION13(sc)
&& !ssl_print_extensions(bio, indent + 2, 0,
SSL3_MT_NEWSESSION_TICKET, &msg, &msglen))
return 0;