summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_pkt.c
diff options
context:
space:
mode:
authorjsing <>2018-09-08 14:39:41 +0000
committerjsing <>2018-09-08 14:39:41 +0000
commit55621332fb7374cfcfccae0561ed84e62513e575 (patch)
tree6575e237fe417d9d145ecd40fd08fbe4f2e17ad5 /src/lib/libssl/ssl_pkt.c
parent37780a3087c4121c983c377ecfec97a37da0ce5f (diff)
downloadopenbsd-55621332fb7374cfcfccae0561ed84e62513e575.tar.gz
openbsd-55621332fb7374cfcfccae0561ed84e62513e575.tar.bz2
openbsd-55621332fb7374cfcfccae0561ed84e62513e575.zip
Remove now unused code for EVP_CIPH_FLAG_AEAD_CIPHER and EVP_CIPH_GCM_MODE.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_pkt.c')
-rw-r--r--src/lib/libssl/ssl_pkt.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/libssl/ssl_pkt.c b/src/lib/libssl/ssl_pkt.c
index 163b0292af..4e3ac7722a 100644
--- a/src/lib/libssl/ssl_pkt.c
+++ b/src/lib/libssl/ssl_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_pkt.c,v 1.12 2017/05/07 04:22:24 beck Exp $ */ 1/* $OpenBSD: ssl_pkt.c,v 1.13 2018/09/08 14:39:41 jsing 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 *
@@ -739,6 +739,7 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf,
739 p += 2; 739 p += 2;
740 740
741 /* Explicit IV length. */ 741 /* Explicit IV length. */
742 eivlen = 0;
742 if (s->internal->enc_write_ctx && SSL_USE_EXPLICIT_IV(s)) { 743 if (s->internal->enc_write_ctx && SSL_USE_EXPLICIT_IV(s)) {
743 int mode = EVP_CIPHER_CTX_mode(s->internal->enc_write_ctx); 744 int mode = EVP_CIPHER_CTX_mode(s->internal->enc_write_ctx);
744 if (mode == EVP_CIPH_CBC_MODE) { 745 if (mode == EVP_CIPH_CBC_MODE) {
@@ -746,16 +747,10 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf,
746 if (eivlen <= 1) 747 if (eivlen <= 1)
747 eivlen = 0; 748 eivlen = 0;
748 } 749 }
749 /* Need explicit part of IV for GCM mode */
750 else if (mode == EVP_CIPH_GCM_MODE)
751 eivlen = EVP_GCM_TLS_EXPLICIT_IV_LEN;
752 else
753 eivlen = 0;
754 } else if (s->internal->aead_write_ctx != NULL && 750 } else if (s->internal->aead_write_ctx != NULL &&
755 s->internal->aead_write_ctx->variable_nonce_in_record) { 751 s->internal->aead_write_ctx->variable_nonce_in_record) {
756 eivlen = s->internal->aead_write_ctx->variable_nonce_len; 752 eivlen = s->internal->aead_write_ctx->variable_nonce_len;
757 } else 753 }
758 eivlen = 0;
759 754
760 /* lets setup the record stuff. */ 755 /* lets setup the record stuff. */
761 wr->data = p + eivlen; 756 wr->data = p + eivlen;