Index: openssl/ssl/s3_pkt.c |
diff --git a/openssl/ssl/s3_pkt.c b/openssl/ssl/s3_pkt.c |
index 804291e27c32b9190dd68c99b8a60acfd64683c7..9f117d17331d3d60bae1ce4c017c960c17ba9c66 100644 |
--- a/openssl/ssl/s3_pkt.c |
+++ b/openssl/ssl/s3_pkt.c |
@@ -773,7 +773,12 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, |
else |
eivlen = 0; |
} |
- else |
+ else if (s->aead_write_ctx != NULL && |
+ s->aead_write_ctx->variable_nonce_included_in_record) |
+ { |
+ eivlen = s->aead_write_ctx->variable_nonce_len; |
+ } |
+ else |
eivlen = 0; |
/* lets setup the record stuff. */ |