/*
- * Copyright 2012-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2012-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
{DTLS1_MT_HELLO_VERIFY_REQUEST, "HelloVerifyRequest"},
{SSL3_MT_NEWSESSION_TICKET, "NewSessionTicket"},
{SSL3_MT_END_OF_EARLY_DATA, "EndOfEarlyData"},
- {SSL3_MT_HELLO_RETRY_REQUEST, "HelloRetryRequest"},
{SSL3_MT_ENCRYPTED_EXTENSIONS, "EncryptedExtensions"},
{SSL3_MT_CERTIFICATE, "Certificate"},
{SSL3_MT_SERVER_KEY_EXCHANGE, "ServerKeyExchange"},
{TLSEXT_SIGALG_ecdsa_sha224, "ecdsa_sha224"},
{TLSEXT_SIGALG_ed25519, "ed25519"},
{TLSEXT_SIGALG_ecdsa_sha1, "ecdsa_sha1"},
- {TLSEXT_SIGALG_rsa_pss_sha256, "rsa_pss_sha256"},
- {TLSEXT_SIGALG_rsa_pss_sha384, "rsa_pss_sha384"},
- {TLSEXT_SIGALG_rsa_pss_sha512, "rsa_pss_sha512"},
+ {TLSEXT_SIGALG_rsa_pss_rsae_sha256, "rsa_pss_rsae_sha256"},
+ {TLSEXT_SIGALG_rsa_pss_rsae_sha384, "rsa_pss_rsae_sha384"},
+ {TLSEXT_SIGALG_rsa_pss_rsae_sha512, "rsa_pss_rsae_sha512"},
+ {TLSEXT_SIGALG_rsa_pss_pss_sha256, "rsa_pss_pss_sha256"},
+ {TLSEXT_SIGALG_rsa_pss_pss_sha384, "rsa_pss_pss_sha384"},
+ {TLSEXT_SIGALG_rsa_pss_pss_sha512, "rsa_pss_pss_sha512"},
{TLSEXT_SIGALG_rsa_pkcs1_sha256, "rsa_pkcs1_sha256"},
{TLSEXT_SIGALG_rsa_pkcs1_sha384, "rsa_pkcs1_sha384"},
{TLSEXT_SIGALG_rsa_pkcs1_sha512, "rsa_pkcs1_sha512"},
break;
case TLSEXT_TYPE_key_share:
- if (mt == SSL3_MT_HELLO_RETRY_REQUEST) {
+ if (server && extlen == 2) {
int group_id;
- if (extlen != 2)
- return 0;
+ /* We assume this is an HRR, otherwise this is an invalid key_share */
group_id = (ext[0] << 8) | ext[1];
BIO_indent(bio, indent + 4, 80);
BIO_printf(bio, "NamedGroup: %s (%d)\n",
return 1;
}
-static int ssl_print_hello_retry_request(BIO *bio, int indent,
- const unsigned char *msg,
- size_t msglen)
-{
- unsigned int cs;
-
- if (!ssl_print_version(bio, indent, "server_version", &msg, &msglen, NULL))
- return 0;
-
- cs = (msg[0] << 8) | msg[1];
- BIO_indent(bio, indent, 80);
- BIO_printf(bio, "cipher_suite {0x%02X, 0x%02X} %s\n",
- msg[0], msg[1], ssl_trace_str(cs, ssl_ciphers_tbl));
- msg += 2;
- msglen -= 2;
-
- if (!ssl_print_extensions(bio, indent, 1, SSL3_MT_HELLO_RETRY_REQUEST, &msg,
- &msglen))
- return 0;
-
- return 1;
-}
-
static int ssl_get_keyex(const char **pname, const SSL *ssl)
{
unsigned long alg_k = ssl->s3->tmp.new_cipher->algorithm_mkey;
if (SSL_IS_TLS13(ssl)) {
if (!ssl_print_hexbuf(bio, indent, "request_context", 1, &msg, &msglen))
return 0;
+ if (!ssl_print_extensions(bio, indent, 1,
+ SSL3_MT_CERTIFICATE_REQUEST, &msg, &msglen))
+ return 0;
+ return 1;
} else {
if (msglen < 1)
return 0;
return 0;
break;
- case SSL3_MT_HELLO_RETRY_REQUEST:
- if (!ssl_print_hello_retry_request(bio, indent + 2, msg, msglen))
- return 0;
- break;
-
case SSL3_MT_ENCRYPTED_EXTENSIONS:
if (!ssl_print_extensions(bio, indent + 2, 1,
SSL3_MT_ENCRYPTED_EXTENSIONS, &msg, &msglen))