diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-05-31 10:35:22 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-05-31 10:35:22 +0000 |
commit | f93b03a5e67ef9163a964d6e554ac6069122f55e (patch) | |
tree | 30c53195d1bf60280557aa04e30e2c81ed748b6f /ssl/t1_enc.c | |
parent | 55a47cd30f064284e5b1f477d5a358938b5f71aa (diff) |
Don't round up partitioned premaster secret length if there is only one
digest in use: this caused the PRF to fail for an odd premaster secret
length.
Diffstat (limited to 'ssl/t1_enc.c')
-rw-r--r-- | ssl/t1_enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 36128dcf6b..d180bfc95c 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -265,6 +265,8 @@ static int tls1_PRF(long digest_mask, if ((m<<TLS1_PRF_DGST_SHIFT) & digest_mask) count++; } len=slen/count; + if (count == 1) + slen = 0; S1=sec; memset(out1,0,olen); for (idx=0;ssl_get_handshake_digest(idx,&m,&md);idx++) { |