1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Remove functions deprecated in 1.3

This commit is contained in:
Manuel Pégourié-Gonnard
2015-03-20 18:15:57 +00:00
parent 48d3cef31a
commit 47723147f5
9 changed files with 1 additions and 207 deletions

View File

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

View File

@ -203,13 +203,6 @@ int md_init_ctx( md_context_t *ctx, const md_info_t *md_info )
return( 0 );
}
int md_free_ctx( md_context_t *ctx )
{
md_free( ctx );
return( 0 );
}
int md_starts( md_context_t *ctx )
{
if( ctx == NULL || ctx->md_info == NULL )

View File

@ -5392,64 +5392,6 @@ int ssl_set_own_cert( ssl_context *ssl, x509_crt *own_cert,
return( 0 );
}
#if defined(POLARSSL_RSA_C)
int ssl_set_own_cert_rsa( ssl_context *ssl, x509_crt *own_cert,
rsa_context *rsa_key )
{
int ret;
ssl_key_cert *key_cert = ssl_add_key_cert( ssl );
if( key_cert == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
key_cert->key = polarssl_malloc( sizeof(pk_context) );
if( key_cert->key == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
pk_init( key_cert->key );
ret = pk_init_ctx( key_cert->key, pk_info_from_type( POLARSSL_PK_RSA ) );
if( ret != 0 )
return( ret );
if( ( ret = rsa_copy( pk_rsa( *key_cert->key ), rsa_key ) ) != 0 )
return( ret );
key_cert->cert = own_cert;
key_cert->key_own_alloc = 1;
return( 0 );
}
#endif /* POLARSSL_RSA_C */
int ssl_set_own_cert_alt( ssl_context *ssl, x509_crt *own_cert,
void *rsa_key,
rsa_decrypt_func rsa_decrypt,
rsa_sign_func rsa_sign,
rsa_key_len_func rsa_key_len )
{
int ret;
ssl_key_cert *key_cert = ssl_add_key_cert( ssl );
if( key_cert == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
key_cert->key = polarssl_malloc( sizeof(pk_context) );
if( key_cert->key == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
pk_init( key_cert->key );
if( ( ret = pk_init_ctx_rsa_alt( key_cert->key, rsa_key,
rsa_decrypt, rsa_sign, rsa_key_len ) ) != 0 )
return( ret );
key_cert->cert = own_cert;
key_cert->key_own_alloc = 1;
return( 0 );
}
#endif /* POLARSSL_X509_CRT_PARSE_C */
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)

View File

@ -877,28 +877,6 @@ int x509_key_size_helper( char *buf, size_t size, const char *name )
return( 0 );
}
/*
* Return an informational string describing the given OID
*/
const char *x509_oid_get_description( x509_buf *oid )
{
const char *desc = NULL;
int ret;
ret = oid_get_extended_key_usage( oid, &desc );
if( ret != 0 )
return( NULL );
return( desc );
}
/* Return the x.y.z.... style numeric string for the given OID */
int x509_oid_get_numeric_string( char *buf, size_t size, x509_buf *oid )
{
return oid_get_numeric_string( buf, size, oid );
}
/*
* Return 0 if the x509_time is still valid, or 1 otherwise.
*/