In the 0.9.7 SNAPS, kssl.c, located in the ssl directory has a 
problem on the EVP_DecryptFinal_ex fuction.

The kerberos ticket that is being decryped in lines 2050-2078 was 
encrypted by Kerberos itself, not by OpenSSL.  It would appear that 
the Kerberos padding logic is NOT the same as the current OpenSSL EVP 
padding logic.

In my test case, the kerberos ticket to be decrypted has a length of 
112 bytes, which is a multiple of the DES blocksize.  There is no 
padding on the encrypted data.  OpenSSL expects padding, in this case 
8 bytes, which of course is not present.  The call to 
EVP_DecryptUpdate returns an outl value of 104, then the call to 
EVP_DecryptFinal_Ex fails because of the lack of padding.  If you 
dump the contents of the buffer decrypted by the EVP_DecryptUpdate 
call, the data is correct.  In fact you can comment out the 
EVP_DecryptFinal_ex call, adjust outl to 112 bytes, and everything 
else works as it should  However commenting out the 
EVP_DecryptFinal_ex call will prevent the proper cleanup of the 
structures involved.

Perhaps it would be better to use Kerbers 5 to decrypt the ticket, or 
lower level OpenSSL calls. 

I attempted to use the optional set padding call, but without 
success.

Ken
 __________________________________________________
Support
InterSoft International, Inc.
Voice: 888-823-1541, International 281-398-7060
Fax: 888-823-1542, International 281-560-9170
[EMAIL PROTECTED]
http://www.securenetterm.com

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

Reply via email to