fix github issue #40, export Base64_Decode, allow user to export Base64_Encode w/o other options

This commit is contained in:
toddouska
2015-03-18 15:47:19 -07:00
parent bb47dece1f
commit 555eb66292
2 changed files with 11 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)
}
#if defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER)
#if defined(WOLFSSL_BASE64_ENCODE)
static
const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
@@ -324,7 +324,7 @@ int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen)
}
#endif /* defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER) */
#endif /* defined(WOLFSSL_BASE64_ENCODE) */
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS)

View File

@@ -30,11 +30,17 @@
#endif
/* decode needed by wolfSSL */
WOLFSSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out,
WOLFSSL_API int Base64_Decode(const byte* in, word32 inLen, byte* out,
word32* outLen);
#if defined(OPENSSL_EXTRA) || defined(SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER)
#if defined(OPENSSL_EXTRA) || defined(SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER)
#ifndef WOLFSSL_BASE64_ENCODE
#define WOLFSSL_BASE64_ENCODE
#endif
#endif
#ifdef WOLFSSL_BASE64_ENCODE
/* encode isn't */
WOLFSSL_API
int Base64_Encode(const byte* in, word32 inLen, byte* out,