diff options
author | David Benjamin <davidben@chromium.org> | 2014-08-15 21:49:12 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-08-18 21:55:05 +0400 |
commit | 6f2600199c82330240de9a7f65a801b6f606b7b3 (patch) | |
tree | 4bac211624f6854a0294d89d9ce6ca640fe3742e /ssl/s3_lib.c | |
parent | fb4ea28bb84875a844cd65a9e4a2167ec884cd48 (diff) |
Mark all SSL_CIPHERs as const.
This lets us put the SSL_CIPHER table in the data section. For type-checking,
make STACK_OF(SSL_CIPHER) cast everything to const SSL_CIPHER*.
Note that this will require some changes in consumers which weren't using a
const SSL_CIPHER *.
Change-Id: Iff734ac0e36f9e5c4a0f3c8411c7f727b820469c
Reviewed-on: https://boringssl-review.googlesource.com/1541
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 4e98f33d..9a29bf8a 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -165,7 +165,7 @@ #define FIXED_NONCE_LEN(x) ((x/2)<<24) /* list of available SSLv3 ciphers (sorted by id) */ -SSL_CIPHER ssl3_ciphers[]={ +const SSL_CIPHER ssl3_ciphers[]={ /* The RSA ciphers */ /* Cipher 04 */ @@ -2671,10 +2671,10 @@ struct ssl_cipher_preference_list_st* ssl_get_cipher_preferences(SSL *s) return NULL; } -SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, +const SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, struct ssl_cipher_preference_list_st *server_pref) { - SSL_CIPHER *c,*ret=NULL; + const SSL_CIPHER *c,*ret=NULL; STACK_OF(SSL_CIPHER) *srvr = server_pref->ciphers, *prio, *allow; int i,ok; size_t cipher_index; |