summaryrefslogtreecommitdiff
path: root/src/lib/libssl/t1_enc.c
diff options
context:
space:
mode:
authormarkus <>2002-09-10 16:31:57 +0000
committermarkus <>2002-09-10 16:31:57 +0000
commit7d038e9d4d83e7c7120e78418e108df70b9025d6 (patch)
treebaf775b286ff801a89f746b1938a3c700bba6822 /src/lib/libssl/t1_enc.c
parent3bd21dd4c3a3e3106321a5f6b3641ab9f18a6e3b (diff)
downloadopenbsd-7d038e9d4d83e7c7120e78418e108df70b9025d6.tar.gz
openbsd-7d038e9d4d83e7c7120e78418e108df70b9025d6.tar.bz2
openbsd-7d038e9d4d83e7c7120e78418e108df70b9025d6.zip
merge openssl-0.9.7-beta3, tested on vax by miod@
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
-rw-r--r--src/lib/libssl/t1_enc.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
index b80525f3ba..5290bf6665 100644
--- a/src/lib/libssl/t1_enc.c
+++ b/src/lib/libssl/t1_enc.c
@@ -110,10 +110,10 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include "ssl_locl.h"
113#include <openssl/comp.h> 114#include <openssl/comp.h>
114#include <openssl/evp.h> 115#include <openssl/evp.h>
115#include <openssl/hmac.h> 116#include <openssl/hmac.h>
116#include "ssl_locl.h"
117#include <openssl/md5.h> 117#include <openssl/md5.h>
118 118
119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, 119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
@@ -483,14 +483,25 @@ printf("\nkey block\n");
483{ int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); } 483{ int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); }
484#endif 484#endif
485 485
486 /* enable vulnerability countermeasure for CBC ciphers with 486 if (!(s->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS))
487 * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt) */ 487 {
488 s->s3->need_empty_fragments = 1; 488 /* enable vulnerability countermeasure for CBC ciphers with
489#ifndef NO_RC4 489 * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt)
490 if ((s->session->cipher != NULL) && ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)) 490 */
491 s->s3->need_empty_fragments = 0; 491 s->s3->need_empty_fragments = 1;
492
493 if (s->session->cipher != NULL)
494 {
495 if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_eNULL)
496 s->s3->need_empty_fragments = 0;
497
498#ifndef OPENSSL_NO_RC4
499 if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)
500 s->s3->need_empty_fragments = 0;
492#endif 501#endif
493 502 }
503 }
504
494 return(1); 505 return(1);
495err: 506err:
496 SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,ERR_R_MALLOC_FAILURE); 507 SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,ERR_R_MALLOC_FAILURE);