diff options
author | 2014-06-07 17:16:39 +0000 | |
---|---|---|
committer | 2014-06-07 17:16:39 +0000 | |
commit | 58106696c616748a1452588bb95af018790fe95c (patch) | |
tree | 2783c2cdfa6bcbf0896a831aa14655ef32aaf210 /lib/libssl/src | |
parent | Move the export label initialisation into the export handling code, since (diff) | |
download | wireguard-openbsd-58106696c616748a1452588bb95af018790fe95c.tar.xz wireguard-openbsd-58106696c616748a1452588bb95af018790fe95c.zip |
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/libssl/src')
-rw-r--r-- | lib/libssl/src/ssl/t1_enc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/src/ssl/t1_enc.c b/lib/libssl/src/ssl/t1_enc.c index 3e90b78468b..fba582d4ad8 100644 --- a/lib/libssl/src/ssl/t1_enc.c +++ b/lib/libssl/src/ssl/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) && |