Fix small bug in base64_encode()
diff --git a/ChangeLog b/ChangeLog
index 597d144..2ab2cab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,14 @@
* 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.
diff --git a/library/base64.c b/library/base64.c
index 05b2d80..139c5cc 100644
--- a/library/base64.c
+++ b/library/base64.c
@@ -72,7 +72,10 @@
unsigned char *p;
if( slen == 0 )
+ {
+ *dlen = 0;
return( 0 );
+ }
n = (slen << 3) / 6;