Hello, I have spotted a problem with the patch of crypto/evp/encode.c done by jsing on May 3. Sometimes decoding of base64 will fail. For example the attached file will fail decodiding (and produce an empty output):
./apps/openssl enc -d -base64 < 34.10-01.key The OpenSSL team has applied another fix: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=fce3821111e3307a599d2378f2cca2ef2097c6c4;hp=12e9f627f9dd9a9f75d4a7beb6baf30a3697d8e0 The attached patch (differing from OpenSSL one) fixes base64 decoding for me. -- With best wishes Dmitry
34.10-01.key
Description: application/iwork-keynote-sffkey
diff --git a/src/lib/libssl/src/crypto/evp/encode.c b/src/lib/libssl/src/crypto/evp/encode.c
index 6c0e08b..9163de3 100644
--- a/src/lib/libssl/src/crypto/evp/encode.c
+++ b/src/lib/libssl/src/crypto/evp/encode.c
@@ -261,7 +261,7 @@ EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
}
/* There should not be base64 data after padding. */
- if (eof && tmp != '=' && tmp != '\r' && tmp != '\n') {
+ if (eof && tmp != '=' && tmp != '\r' && tmp != '\n' && tmp != '-') {
rv = -1;
goto end;
}
