Преглед изворни кода

Remove the add_alert hook.

This was added to support the no_certificate warning alert in SSLv3. That has
since been removed. In the long run, I would like for ssl_send_alert to go
through a flow similar to add_alert so the BIO-free APIs work right and avoid a
host of strangeness surrounding wpend_buf. For now, remove the unused hook.

Change-Id: I1995028b8af4ffa836028794e6b33b2cd1b2435b
Reviewed-on: https://boringssl-review.googlesource.com/31984
Commit-Queue: Steven Valdez <svaldez@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
kris/onging/CECPQ3_patch15
David Benjamin пре 6 година
committed by CQ bot account: commit-bot@chromium.org
родитељ
комит
d1673c2191
5 измењених фајлова са 0 додато и 28 уклоњено
  1. +0
    -9
      ssl/d1_both.cc
  2. +0
    -1
      ssl/dtls_method.cc
  3. +0
    -5
      ssl/internal.h
  4. +0
    -12
      ssl/s3_both.cc
  5. +0
    -1
      ssl/tls_method.cc

+ 0
- 9
ssl/d1_both.cc Прегледај датотеку

@@ -601,15 +601,6 @@ bool dtls1_add_change_cipher_spec(SSL *ssl) {
return add_outgoing(ssl, true /* ChangeCipherSpec */, Array<uint8_t>());
}

bool dtls1_add_alert(SSL *ssl, uint8_t level, uint8_t desc) {
// The |add_alert| path is only used for warning alerts for now, which DTLS
// never sends. This will be implemented later once closure alerts are
// converted.
assert(false);
OPENSSL_PUT_ERROR(SSL, ERR_R_INTERNAL_ERROR);
return false;
}

// dtls1_update_mtu updates the current MTU from the BIO, ensuring it is above
// the minimum.
static void dtls1_update_mtu(SSL *ssl) {


+ 0
- 1
ssl/dtls_method.cc Прегледај датотеку

@@ -121,7 +121,6 @@ static const SSL_PROTOCOL_METHOD kDTLSProtocolMethod = {
dtls1_finish_message,
dtls1_add_message,
dtls1_add_change_cipher_spec,
dtls1_add_alert,
dtls1_flush_flight,
dtls1_on_handshake_complete,
dtls1_set_read_state,


+ 0
- 5
ssl/internal.h Прегледај датотеку

@@ -1889,9 +1889,6 @@ struct SSL_PROTOCOL_METHOD {
// add_change_cipher_spec adds a ChangeCipherSpec record to the pending
// flight. It returns true on success and false on error.
bool (*add_change_cipher_spec)(SSL *ssl);
// add_alert adds an alert to the pending flight. It returns true on success
// and false on error.
bool (*add_alert)(SSL *ssl, uint8_t level, uint8_t desc);
// flush_flight flushes the pending flight to the transport. It returns one on
// success and <= 0 on error.
int (*flush_flight)(SSL *ssl);
@@ -2589,14 +2586,12 @@ bool ssl3_init_message(SSL *ssl, CBB *cbb, CBB *body, uint8_t type);
bool ssl3_finish_message(SSL *ssl, CBB *cbb, Array<uint8_t> *out_msg);
bool ssl3_add_message(SSL *ssl, Array<uint8_t> msg);
bool ssl3_add_change_cipher_spec(SSL *ssl);
bool ssl3_add_alert(SSL *ssl, uint8_t level, uint8_t desc);
int ssl3_flush_flight(SSL *ssl);

bool dtls1_init_message(SSL *ssl, CBB *cbb, CBB *body, uint8_t type);
bool dtls1_finish_message(SSL *ssl, CBB *cbb, Array<uint8_t> *out_msg);
bool dtls1_add_message(SSL *ssl, Array<uint8_t> msg);
bool dtls1_add_change_cipher_spec(SSL *ssl);
bool dtls1_add_alert(SSL *ssl, uint8_t level, uint8_t desc);
int dtls1_flush_flight(SSL *ssl);

// ssl_add_message_cbb finishes the handshake message in |cbb| and adds it to


+ 0
- 12
ssl/s3_both.cc Прегледај датотеку

@@ -266,18 +266,6 @@ bool ssl3_add_change_cipher_spec(SSL *ssl) {
return true;
}

bool ssl3_add_alert(SSL *ssl, uint8_t level, uint8_t desc) {
uint8_t alert[2] = {level, desc};
if (!tls_flush_pending_hs_data(ssl) ||
!add_record_to_flight(ssl, SSL3_RT_ALERT, alert)) {
return false;
}

ssl_do_msg_callback(ssl, 1 /* write */, SSL3_RT_ALERT, alert);
ssl_do_info_callback(ssl, SSL_CB_WRITE_ALERT, ((int)level << 8) | desc);
return true;
}

int ssl3_flush_flight(SSL *ssl) {
if (!tls_flush_pending_hs_data(ssl)) {
return -1;


+ 0
- 1
ssl/tls_method.cc Прегледај датотеку

@@ -119,7 +119,6 @@ static const SSL_PROTOCOL_METHOD kTLSProtocolMethod = {
ssl3_finish_message,
ssl3_add_message,
ssl3_add_change_cipher_spec,
ssl3_add_alert,
ssl3_flush_flight,
ssl3_on_handshake_complete,
ssl3_set_read_state,


Loading…
Откажи
Сачувај