1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Add POLARSSL_DEPRECATED_{WARNING,REMOVED}

This commit is contained in:
Manuel Pégourié-Gonnard
2015-03-23 13:58:27 +01:00
parent 85b6600ab2
commit c70581c272
13 changed files with 105 additions and 9 deletions

View File

@ -165,13 +165,14 @@ int cipher_init_ctx( cipher_context_t *ctx, const cipher_info_t *cipher_info )
return( 0 );
}
/* compatibility wrapper */
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
int cipher_free_ctx( cipher_context_t *ctx )
{
cipher_free( ctx );
return( 0 );
}
#endif
int cipher_setkey( cipher_context_t *ctx, const unsigned char *key,
int key_length, const operation_t operation )

View File

@ -203,12 +203,14 @@ int md_init_ctx( md_context_t *ctx, const md_info_t *md_info )
return( 0 );
}
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
int md_free_ctx( md_context_t *ctx )
{
md_free( ctx );
return( 0 );
}
#endif
int md_starts( md_context_t *ctx )
{

View File

@ -41,6 +41,7 @@
#include "polarssl/pbkdf2.h"
#include "polarssl/pkcs5.h"
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
int pbkdf2_hmac( md_context_t *ctx, const unsigned char *password, size_t plen,
const unsigned char *salt, size_t slen,
unsigned int iteration_count,
@ -49,12 +50,15 @@ int pbkdf2_hmac( md_context_t *ctx, const unsigned char *password, size_t plen,
return pkcs5_pbkdf2_hmac( ctx, password, plen, salt, slen, iteration_count,
key_length, output );
}
#endif
#if defined(POLARSSL_SELF_TEST)
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
int pbkdf2_self_test( int verbose )
{
return pkcs5_self_test( verbose );
}
#endif
#endif /* POLARSSL_SELF_TEST */
#endif /* POLARSSL_PBKDF2_C */

View File

@ -3976,6 +3976,7 @@ int ssl_set_own_cert( ssl_context *ssl, x509_crt *own_cert,
return( 0 );
}
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
#if defined(POLARSSL_RSA_C)
int ssl_set_own_cert_rsa( ssl_context *ssl, x509_crt *own_cert,
rsa_context *rsa_key )
@ -4033,6 +4034,7 @@ int ssl_set_own_cert_alt( ssl_context *ssl, x509_crt *own_cert,
return( 0 );
}
#endif /* POLARSSL_DEPRECATED_REMOVED */
#endif /* POLARSSL_X509_CRT_PARSE_C */
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)

View File

@ -880,6 +880,7 @@ int x509_key_size_helper( char *buf, size_t size, const char *name )
/*
* Return an informational string describing the given OID
*/
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
const char *x509_oid_get_description( x509_buf *oid )
{
const char *desc = NULL;
@ -892,12 +893,15 @@ const char *x509_oid_get_description( x509_buf *oid )
return( desc );
}
#endif
/* Return the x.y.z.... style numeric string for the given OID */
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
int x509_oid_get_numeric_string( char *buf, size_t size, x509_buf *oid )
{
return oid_get_numeric_string( buf, size, oid );
}
#endif
/*
* Return 0 if the x509_time is still valid, or 1 otherwise.