diff options
author | Matt Caswell <matt@openssl.org> | 2017-06-21 11:58:10 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-06-21 14:45:36 +0100 |
commit | adfc37868e2dc406b80ab3111163eb475ef06975 (patch) | |
tree | ffd00c26b9172f5fa54d24cb9dc89a440896dd5a /apps/s_client.c | |
parent | ca8c71ba3586fd0fcf6c011cbf39f5076d18c126 (diff) |
Use constants rather than macros for the cipher bytes in the apps
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3670)
Diffstat (limited to 'apps/s_client.c')
-rw-r--r-- | apps/s_client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index 71e4c1f01f..60ce9c68af 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -172,8 +172,8 @@ static unsigned int psk_client_cb(SSL *ssl, const char *hint, char *identity, } #endif -#define TLS13_AES_128_GCM_SHA256_BYTES ((const unsigned char *)"\x13\x01") -#define TLS13_AES_256_GCM_SHA384_BYTES ((const unsigned char *)"\x13\x02") +const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 }; +const unsigned char tls13_aes256gcmsha384_id[] = { 0x13, 0x02 }; static int psk_use_session_cb(SSL *s, const EVP_MD *md, const unsigned char **id, size_t *idlen, @@ -196,9 +196,9 @@ static int psk_use_session_cb(SSL *s, const EVP_MD *md, } if (key_len == EVP_MD_size(EVP_sha256())) - cipher = SSL_CIPHER_find(s, TLS13_AES_128_GCM_SHA256_BYTES); + cipher = SSL_CIPHER_find(s, tls13_aes128gcmsha256_id); else if(key_len == EVP_MD_size(EVP_sha384())) - cipher = SSL_CIPHER_find(s, TLS13_AES_256_GCM_SHA384_BYTES); + cipher = SSL_CIPHER_find(s, tls13_aes256gcmsha384_id); if (cipher == NULL) { /* Doesn't look like a suitable TLSv1.3 key. Ignore it */ |