OpenSSL CVS Repository
http://cvs.openssl.org/
____________________________________________________________
________________
Server: cvs.openssl.org Name: Andy
Polyakov
Root: /v/openssl/cvs Email: appro openssl.org
Module: openssl Date:
01-Oct-2007 00:01:36
Branch: HEAD Handle:
2007093023013600
Modified files:
openssl/ssl d1_pkt.c
Log:
Basic idea behind explicit IV is to make it
unpredictable for attacker.
Until now it was xor between CBC residue and 1st block
from last datagram,
or in other words still predictable.
Summary:
Revision Changes Path
1.20 +9 -2 openssl/ssl/d1_pkt.c
____________________________________________________________
________________
patch -p0 <<' .'
Index: openssl/ssl/d1_pkt.c
============================================================
================
$ cvs diff -u -r1.19 -r1.20 d1_pkt.c
--- openssl/ssl/d1_pkt.c 30 Sep 2007 21:19:30 -0000 1.19
+++ openssl/ssl/d1_pkt.c 30 Sep 2007 22:01:36 -0000 1.20
 -120,6 +120,7 
#include <openssl/evp.h>
#include <openssl/buffer.h>
#include <openssl/pqueue.h>
+#include <openssl/rand.h>
/* mod 128 saturating subtract of two 64-bit values in
big-endian order */
static int satsub64be(const unsigned char *v1,const
unsigned char *v2)
 -1430,8 +1431,14 
/* ssl3_enc can only have an error on read */
- wr->length += bs; /* bs != 0 in case of CBC. The
enc fn provides
- * the randomness */
+ if (bs) /* bs != 0 in case of CBC */
+ {
+ RAND_pseudo_bytes(p,bs);
+ /* master IV and last CBC residue stand for
+ * the rest of randomness */
+ wr->length += bs;
+ }
+
s->method->ssl3_enc->enc(s,1);
/* record length after mac and block padding */
 .
____________________________________________________________
__________
OpenSSL Project http://www.openssl.org
CVS Repository Commit List
openssl-cvs openssl.org
Automated List Manager
majordomo openssl.org
|