diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2014-04-20 18:41:15 -0300 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-12-31 11:13:48 +0100 |
commit | d97ed219860b3188b833a130a61d2438f3f249cf (patch) | |
tree | ba7e96cde56843fe50577c44dce2ae2788f5ad44 | |
parent | 97d5809c2b70fdd240990b940c564bcbd77a19c6 (diff) |
constify tls 1.2 lookup tables.
None of this should live in writable memory
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
-rw-r--r-- | ssl/t1_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 31b1c360ab..fec7ace0a1 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -935,7 +935,7 @@ static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md) tlsext_sigalg_dsa(md) \ tlsext_sigalg_ecdsa(md) -static unsigned char tls12_sigalgs[] = { +static const unsigned char tls12_sigalgs[] = { #ifndef OPENSSL_NO_SHA512 tlsext_sigalg(TLSEXT_hash_sha512) tlsext_sigalg(TLSEXT_hash_sha384) @@ -949,7 +949,7 @@ static unsigned char tls12_sigalgs[] = { #endif }; #ifndef OPENSSL_NO_ECDSA -static unsigned char suiteb_sigalgs[] = { +static const unsigned char suiteb_sigalgs[] = { tlsext_sigalg_ecdsa(TLSEXT_hash_sha256) tlsext_sigalg_ecdsa(TLSEXT_hash_sha384) }; @@ -3508,7 +3508,7 @@ typedef struct int id; } tls12_lookup; -static tls12_lookup tls12_md[] = { +static const tls12_lookup tls12_md[] = { {NID_md5, TLSEXT_hash_md5}, {NID_sha1, TLSEXT_hash_sha1}, {NID_sha224, TLSEXT_hash_sha224}, @@ -3517,13 +3517,13 @@ static tls12_lookup tls12_md[] = { {NID_sha512, TLSEXT_hash_sha512} }; -static tls12_lookup tls12_sig[] = { +static const tls12_lookup tls12_sig[] = { {EVP_PKEY_RSA, TLSEXT_signature_rsa}, {EVP_PKEY_DSA, TLSEXT_signature_dsa}, {EVP_PKEY_EC, TLSEXT_signature_ecdsa} }; -static int tls12_find_id(int nid, tls12_lookup *table, size_t tlen) +static int tls12_find_id(int nid, const tls12_lookup *table, size_t tlen) { size_t i; for (i = 0; i < tlen; i++) @@ -3534,7 +3534,7 @@ static int tls12_find_id(int nid, tls12_lookup *table, size_t tlen) return -1; } -static int tls12_find_nid(int id, tls12_lookup *table, size_t tlen) +static int tls12_find_nid(int id, const tls12_lookup *table, size_t tlen) { size_t i; for (i = 0; i < tlen; i++) |