Deprecate Mbed TLS cryptography API
The PSA Crypto API should be used instead. The Mbed TLS cryptography API
will still remain available under MBEDTLS_DEPRECATED_REMOVED, as Mbed
Crypto (which implements the PSA Crypto API) continues to rely on this
now internal API.
Functions in that are already considered internal and are not deprecated
by this commit. We already have the freedom to change or remove these
internal APIs.
Document the relationship between Mbed Crypto and Mbed TLS, describing
Mbed Crypto's dual purpose of providing both deprecated Mbed TLS
cryptography APIs and the PSA Crypto API.
diff --git a/include/mbedtls/base64.h b/include/mbedtls/base64.h
index 07ae3bf..f7e51b2 100644
--- a/include/mbedtls/base64.h
+++ b/include/mbedtls/base64.h
@@ -30,6 +30,7 @@
#include MBEDTLS_CONFIG_FILE
#endif
+#include "mbedtls/platform_util.h"
#include <stddef.h>
#define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */
@@ -58,6 +59,7 @@
* \note Call this function with dlen = 0 to obtain the
* required buffer size in *olen
*/
+MBEDTLS_DEPRECATED
int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen,
const unsigned char *src, size_t slen );
@@ -78,6 +80,7 @@
* \note Call this function with *dst = NULL or dlen = 0 to obtain
* the required buffer size in *olen
*/
+MBEDTLS_DEPRECATED
int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
const unsigned char *src, size_t slen );
@@ -87,6 +90,7 @@
*
* \return 0 if successful, or 1 if the test failed
*/
+MBEDTLS_DEPRECATED
int mbedtls_base64_self_test( int verbose );
#endif /* MBEDTLS_SELF_TEST */