Hi,all

It seems that in 0.9.6k,  there is another misuse of  RSA_size() .

ssl/s3_clnt.c Line  1787-1789

   if (rsa == NULL
       || RSA_size(rsa) > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher))

the above "if sentence"is rarely true, because RSA_size(rsa) is usually less than
or
equals to  256(bytes) while SSL_C_EXPORT_PKEYLENGTH is either 512(bits) or
1024(bit).

The lines should be either

   if (rsa == NULL
       || RSA_size(rsa) *8 > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher))

or

   if (rsa == NULL
       || RSA_size(rsa) > SSL_C_EXPORT_PKEYLENGTH(s->s3->tmp.new_cipher)/8)

If the line would be corrected, there is another question.

the author intended to prohibit the
the use of weak symmetric key encryption(exRC2 40bit)
with strong public key encryption(ex. RSA 1024bit) .

Is this restriction necessary?
So,I think that,  if a server and a client agree with such weak sym. key-strong
pub key combination, there is no problem.

what do you think about it?

Sincerely,
Takeshi Yoneda




______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to