summaryrefslogtreecommitdiff
path: root/src/lib/libssl/t1_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
-rw-r--r--src/lib/libssl/t1_enc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
index fc313efc2c..620da6ddd0 100644
--- a/src/lib/libssl/t1_enc.c
+++ b/src/lib/libssl/t1_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_enc.c,v 1.72 2014/11/16 14:12:47 jsing Exp $ */ 1/* $OpenBSD: t1_enc.c,v 1.73 2014/11/18 05:33:43 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -448,6 +448,18 @@ tls1_change_cipher_state_cipher(SSL *s, char is_read, char use_client_keys,
448 mac_secret_size, (unsigned char *)mac_secret); 448 mac_secret_size, (unsigned char *)mac_secret);
449 } 449 }
450 450
451 if (s->s3->tmp.new_cipher->algorithm_enc == SSL_eGOST2814789CNT) {
452 int nid;
453 if (s->s3->tmp.new_cipher->algorithm2 & SSL_HANDSHAKE_MAC_GOST94)
454 nid = NID_id_Gost28147_89_CryptoPro_A_ParamSet;
455 else
456 nid = NID_id_tc26_gost_28147_param_Z;
457
458 EVP_CIPHER_CTX_ctrl(cipher_ctx, EVP_CTRL_GOST_SET_SBOX, nid, 0);
459 if (s->s3->tmp.new_cipher->algorithm_mac == SSL_GOST89MAC)
460 EVP_MD_CTX_ctrl(mac_ctx, EVP_MD_CTRL_GOST_SET_SBOX, nid, 0);
461 }
462
451 return (1); 463 return (1);
452 464
453err: 465err: