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>
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index f6518c4..cdbc6c3 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c
@@ -937,7 +937,7 @@ for (i = 0; i < sk_SSL_CIPHER_num(cipher_stack); i++) { - SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i); + const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i); alg_k = c->algorithm_mkey; alg_a = c->algorithm_auth;