diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-07 17:16:40 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-07 17:16:40 +0000 |
commit | 0528e0ae5478c3c69ef9c415e847532e93a28e17 (patch) | |
tree | bc3ff482d30b24f436f5f80d6c9d5fdef10a8d00 /lib | |
parent | 4429cbf8692369d4ad643996b2f386e329014e10 (diff) |
Use !is_read to imply SSL3_CC_WRITE.
While this is not strictly correct (since the presence of SSL3_CC_READ does
not guarantee the absence of SSL3_CC_WRITE), in practice only one of these
flags is set at a time and there is existing logic which already relies on
this behaviour.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/t1_enc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c index 3e90b78468b..fba582d4ad8 100644 --- a/lib/libssl/t1_enc.c +++ b/lib/libssl/t1_enc.c @@ -530,12 +530,11 @@ tls1_change_cipher_state(SSL *s, int which) if (EVP_CIPHER_mode(cipher) == EVP_CIPH_GCM_MODE) { EVP_CipherInit_ex(cipher_ctx, cipher, NULL, key, NULL, - (which & SSL3_CC_WRITE)); + !is_read); EVP_CIPHER_CTX_ctrl(cipher_ctx, EVP_CTRL_GCM_SET_IV_FIXED, iv_len, (unsigned char *)iv); } else - EVP_CipherInit_ex(cipher_ctx, cipher, NULL, key, iv, - (which & SSL3_CC_WRITE)); + EVP_CipherInit_ex(cipher_ctx, cipher, NULL, key, iv, !is_read); /* Needed for "composite" AEADs, such as RC4-HMAC-MD5 */ if ((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) && |