| Index: net/quic/crypto/crypto_handshake.h
|
| diff --git a/net/quic/crypto/crypto_handshake.h b/net/quic/crypto/crypto_handshake.h
|
| index 45b74a57a22985b3642f19a0a62de05e231ad5d3..c5c90320a4c5b39f6d85654da1d715a2bd7b0a4b 100644
|
| --- a/net/quic/crypto/crypto_handshake.h
|
| +++ b/net/quic/crypto/crypto_handshake.h
|
| @@ -26,11 +26,11 @@ enum HandshakeFailureReason {
|
|
|
| // Failure reasons for an invalid client nonce in CHLO.
|
| //
|
| - // TODO(rtenneti): Implement capturing of error from strike register.
|
| - CLIENT_NONCE_UNKNOWN_FAILURE = 1,
|
| - // Invalid client nonce. A possible reason, client nonce had incorrect length.
|
| - CLIENT_NONCE_INVALID_FAILURE = 2,
|
| - // Client orbit is not valid.
|
| + // Client nonce had incorrect length.
|
| + CLIENT_NONCE_INVALID_FAILURE = 1,
|
| + // Client nonce is not unique.
|
| + CLIENT_NONCE_NOT_UNIQUE_FAILURE = 2,
|
| + // Client orbit is invalid or incorrect.
|
| CLIENT_NONCE_INVALID_ORBIT_FAILURE = 3,
|
| // Client nonce's timestamp is not in the strike register's valid time range.
|
| CLIENT_NONCE_INVALID_TIME_FAILURE = 4,
|
| @@ -39,46 +39,43 @@ enum HandshakeFailureReason {
|
|
|
| // Failure reasons for an invalid server nonce in CHLO.
|
| //
|
| - SERVER_NONCE_INVALID_FAILURE = 6, // Nonce had incorrect length.
|
| - SERVER_NONCE_DECRYPTION_FAILURE = 7, // Unbox of nonce failed.
|
| - SERVER_NONCE_NOT_UNIQUE_FAILURE = 8, // Nonce is not unique.
|
| - // Server orbit is not valid.
|
| - SERVER_NONCE_INVALID_ORBIT_FAILURE = 9,
|
| + // Unbox of server nonce failed.
|
| + SERVER_NONCE_DECRYPTION_FAILURE = 6,
|
| + // Decrypted server nonce had incorrect length.
|
| + SERVER_NONCE_INVALID_FAILURE = 7,
|
| + // Server nonce is not unique.
|
| + SERVER_NONCE_NOT_UNIQUE_FAILURE = 8,
|
| // Server nonce's timestamp is not in the strike register's valid time range.
|
| - SERVER_NONCE_INVALID_TIME_FAILURE = 10,
|
| - // Server nonce verification has failed because strike register is down.
|
| - SERVER_NONCE_NO_STRIKE_REGISTER_FAILURE = 11,
|
| + SERVER_NONCE_INVALID_TIME_FAILURE = 9,
|
|
|
| // Failure reasons for an invalid server config in CHLO.
|
| //
|
| // Missing Server config id (kSCID) tag.
|
| - SERVER_CONFIG_INCHOATE_HELLO_FAILURE = 12,
|
| - // GetConfigWithScid couldn't find the Server config id (kSCID).
|
| - SERVER_CONFIG_UNKNOWN_CONFIG_FAILURE = 13,
|
| + SERVER_CONFIG_INCHOATE_HELLO_FAILURE = 10,
|
| + // Couldn't find the Server config id (kSCID).
|
| + SERVER_CONFIG_UNKNOWN_CONFIG_FAILURE = 11,
|
|
|
| // Failure reasons for an invalid source-address token.
|
| //
|
| // Missing Source-address token (kSourceAddressTokenTag) tag.
|
| - SOURCE_ADDRESS_TOKEN_INVALID_FAILURE = 14,
|
| + SOURCE_ADDRESS_TOKEN_INVALID_FAILURE = 12,
|
| // Unbox of Source-address token failed.
|
| - SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE = 15,
|
| + SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE = 13,
|
| // Couldn't parse the unbox'ed Source-address token.
|
| - SOURCE_ADDRESS_TOKEN_PARSE_FAILURE = 16,
|
| + SOURCE_ADDRESS_TOKEN_PARSE_FAILURE = 14,
|
| // Source-address token is for a different IP address.
|
| - SOURCE_ADDRESS_TOKEN_DIFFERENT_IP_ADDRESS_FAILURE = 17,
|
| - // The difference between the time in source-address token and |now| is more
|
| - // than |source_address_token_future_secs_|.
|
| - SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE = 18,
|
| - // The difference between the time in source-address token and |now| is more
|
| - // than |source_address_token_lifetime_secs_|.
|
| - SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE = 19,
|
| -
|
| - MAX_FAILURE_REASONS,
|
| + SOURCE_ADDRESS_TOKEN_DIFFERENT_IP_ADDRESS_FAILURE = 15,
|
| + // The source-address token has a timestamp in the future.
|
| + SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE = 16,
|
| + // The source-address token has expired.
|
| + SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE = 17,
|
| +
|
| + MAX_FAILURE_REASON,
|
| };
|
|
|
| -// These errors will be packed into an uint32 and HANDSHAKE_OK is not used in
|
| -// UMA histograms.
|
| -COMPILE_ASSERT(MAX_FAILURE_REASONS <= 32, failure_reason_out_of_sync);
|
| +// These errors will be packed into an uint32 and we don't want to set the most
|
| +// significant bit, which may be misinterpreted as the sign bit.
|
| +COMPILE_ASSERT(MAX_FAILURE_REASON <= 32, failure_reason_out_of_sync);
|
|
|
| // A CrypterPair contains the encrypter and decrypter for an encryption level.
|
| struct NET_EXPORT_PRIVATE CrypterPair {
|
|
|