diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-05-31 10:34:43 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-05-31 10:34:43 +0000 |
commit | 1b2047c5c0deb9970016e51ee0ab6a9381ba497c (patch) | |
tree | 24b6b476840cb787a6e6c3af3df4385d70b17766 | |
parent | eda3766b53a5511a0a09ae801d6a0bd74f740b72 (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.
-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++) { |