Browse Source

Don't pretend to account for RSA_PSK.

RSA_PSK is really weird in that it takes a Certificate, but you're not
expected to verify it. It's just a funny way to transmit an RSA key.
(They probably should have used the RSA_EXPORT ServerKeyExchange
spelling.) Some code now already doesn't account for it right around
certificate verification.

Given ECDHE_PSK exists, hopefully there will never be any need to add
this.

Change-Id: Ia64dac28099eaa9021f8d915d45ccbfd62872317
Reviewed-on: https://boringssl-review.googlesource.com/5941
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 9 years ago
committed by Adam Langley
parent
commit
df0905a803
2 changed files with 6 additions and 7 deletions
  1. +3
    -3
      ssl/internal.h
  2. +3
    -4
      ssl/ssl_cipher.c

+ 3
- 3
ssl/internal.h View File

@@ -260,9 +260,9 @@ int ssl_cipher_has_server_public_key(const SSL_CIPHER *cipher);
/* ssl_cipher_requires_server_key_exchange returns 1 if |cipher| requires a
* ServerKeyExchange message. Otherwise it returns 0.
*
* Unlike ssl_cipher_has_server_public_key, some ciphers take optional
* ServerKeyExchanges. PSK and RSA_PSK only use the ServerKeyExchange to
* communicate a psk_identity_hint, so it is optional. */
* Unlike |ssl_cipher_has_server_public_key|, this function may return zero
* while still allowing |cipher| an optional ServerKeyExchange. This is the
* case for plain PSK ciphers. */
int ssl_cipher_requires_server_key_exchange(const SSL_CIPHER *cipher);

/* ssl_cipher_get_record_split_len, for TLS 1.0 CBC mode ciphers, returns the


+ 3
- 4
ssl/ssl_cipher.c View File

@@ -1698,10 +1698,9 @@ int ssl_cipher_get_key_type(const SSL_CIPHER *cipher) {
}

int ssl_cipher_has_server_public_key(const SSL_CIPHER *cipher) {
/* PSK-authenticated ciphers do not use a public key, except for
* RSA_PSK. */
if ((cipher->algorithm_auth & SSL_aPSK) &&
!(cipher->algorithm_mkey & SSL_kRSA)) {
/* PSK-authenticated ciphers do not use a certificate. (RSA_PSK is not
* supported.) */
if (cipher->algorithm_auth & SSL_aPSK) {
return 0;
}



Loading…
Cancel
Save