Переглянути джерело

Unwind V2ClientHello counters.

It does not appear removing support for these is feasible right now. :-(

Change-Id: I99521ba6c141855b5140d98bce445d7e62415661
Reviewed-on: https://boringssl-review.googlesource.com/17251
Reviewed-by: David Benjamin <davidben@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 роки тому
джерело
коміт
9961dff055
4 змінених файлів з 0 додано та 26 видалено
  1. +0
    -4
      include/openssl/ssl.h
  2. +0
    -17
      ssl/handshake_server.c
  3. +0
    -3
      ssl/internal.h
  4. +0
    -2
      ssl/s3_both.c

+ 0
- 4
include/openssl/ssl.h Переглянути файл

@@ -3170,10 +3170,6 @@ OPENSSL_EXPORT int SSL_CTX_set_max_send_fragment(SSL_CTX *ctx,
OPENSSL_EXPORT int SSL_set_max_send_fragment(SSL *ssl,
size_t max_send_fragment);

/* SSL_get_v2clienthello_count returns the total number of V2ClientHellos that
* are accepted. */
OPENSSL_EXPORT uint64_t SSL_get_v2clienthello_count(void);

/* ssl_early_callback_ctx (aka |SSL_CLIENT_HELLO|) is passed to certain
* callbacks that are called very early on during the server handshake. At this
* point, much of the SSL* hasn't been filled out and only the ClientHello can


+ 0
- 17
ssl/handshake_server.c Переглянути файл

@@ -184,17 +184,6 @@ static int ssl3_get_next_proto(SSL_HANDSHAKE *hs);
static int ssl3_get_channel_id(SSL_HANDSHAKE *hs);
static int ssl3_send_server_finished(SSL_HANDSHAKE *hs);

static struct CRYPTO_STATIC_MUTEX g_v2clienthello_lock =
CRYPTO_STATIC_MUTEX_INIT;
static uint64_t g_v2clienthello_count = 0;

uint64_t SSL_get_v2clienthello_count(void) {
CRYPTO_STATIC_MUTEX_lock_read(&g_v2clienthello_lock);
uint64_t ret = g_v2clienthello_count;
CRYPTO_STATIC_MUTEX_unlock_read(&g_v2clienthello_lock);
return ret;
}

int ssl3_accept(SSL_HANDSHAKE *hs) {
SSL *const ssl = hs->ssl;
uint32_t alg_a;
@@ -441,12 +430,6 @@ int ssl3_accept(SSL_HANDSHAKE *hs) {
hs->new_session = NULL;
}

if (hs->v2_clienthello) {
CRYPTO_STATIC_MUTEX_lock_write(&g_v2clienthello_lock);
g_v2clienthello_count++;
CRYPTO_STATIC_MUTEX_unlock_write(&g_v2clienthello_lock);
}

ssl->s3->initial_handshake_complete = 1;
ssl_update_cache(hs, SSL_SESS_CACHE_SERVER);



+ 0
- 3
ssl/internal.h Переглянути файл

@@ -1124,9 +1124,6 @@ struct ssl_handshake_st {
* or received. */
unsigned ticket_expected:1;

/* v2_clienthello is one if we received a V2ClientHello. */
unsigned v2_clienthello:1;

/* extended_master_secret is one if the extended master secret extension is
* negotiated in this handshake. */
unsigned extended_master_secret:1;


+ 0
- 2
ssl/s3_both.c Переглянути файл

@@ -678,8 +678,6 @@ static int read_v2_client_hello(SSL *ssl) {
ssl_read_buffer_discard(ssl);

ssl->s3->is_v2_hello = 1;
/* This is the first message, so hs must be non-NULL. */
ssl->s3->hs->v2_clienthello = 1;
return 1;
}



Завантаження…
Відмінити
Зберегти