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

Const correctness

This commit is contained in:
Paul Bakker
2013-10-28 21:19:10 +01:00
parent 6a6087e71d
commit 50dc850c52
7 changed files with 21 additions and 14 deletions

View File

@ -81,12 +81,14 @@ void x509write_crt_set_issuer_key( x509write_cert *ctx, pk_context *key )
ctx->issuer_key = key;
}
int x509write_crt_set_subject_name( x509write_cert *ctx, char *subject_name )
int x509write_crt_set_subject_name( x509write_cert *ctx,
const char *subject_name )
{
return x509_string_to_names( &ctx->subject, subject_name );
}
int x509write_crt_set_issuer_name( x509write_cert *ctx, char *issuer_name )
int x509write_crt_set_issuer_name( x509write_cert *ctx,
const char *issuer_name )
{
return x509_string_to_names( &ctx->issuer, issuer_name );
}
@ -101,8 +103,8 @@ int x509write_crt_set_serial( x509write_cert *ctx, const mpi *serial )
return( 0 );
}
int x509write_crt_set_validity( x509write_cert *ctx, char *not_before,
char *not_after )
int x509write_crt_set_validity( x509write_cert *ctx, const char *not_before,
const char *not_after )
{
if( strlen(not_before) != X509_RFC5280_UTC_TIME_LEN - 1 ||
strlen(not_after) != X509_RFC5280_UTC_TIME_LEN - 1 )