Fix small bug in base64_encode()

This commit is contained in:
Manuel Pégourié-Gonnard 2015-01-28 16:49:26 +00:00
parent b82f59162c
commit f097400abc
2 changed files with 11 additions and 0 deletions

View file

@ -25,6 +25,14 @@ Bugfix
* Fix unchecked return code in x509_crt_parse_path() on Windows (found by
Peter Vaskovic).
* Fix assembly selection for MIPS64 (thanks to James Cowgill).
* ssl_get_verify_result() now works even if the handshake was aborted due
to a failed verification (found by Fredrik Axelsson).
* Skip writing and parsing signature_algorithm extension if none of the
key exchanges enabled needs certificates. This fixes a possible interop
issue with some servers when a zero-length extension was sent. (Reported
by Peter Dettman.)
* On a 0-length input, base64_encode() did not correctly set output length
(found by Hendrik van den Boogaard).
Changes
* Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined.

View file

@ -72,7 +72,10 @@ int base64_encode( unsigned char *dst, size_t *dlen,
unsigned char *p;
if( slen == 0 )
{
*dlen = 0;
return( 0 );
}
n = (slen << 3) / 6;