mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-19 08:43:02 +00:00
Introduced x509_crt_init(), x509_crl_init() and x509_csr_init()
This commit is contained in:
@@ -90,7 +90,7 @@ int main( int argc, char *argv[] )
|
||||
* 0. Initialize the RNG and the session data
|
||||
*/
|
||||
memset( &ssl, 0, sizeof( ssl_context ) );
|
||||
memset( &cacert, 0, sizeof( x509_cert ) );
|
||||
x509_crt_init( &cacert );
|
||||
|
||||
printf( "\n . Seeding the random number generator..." );
|
||||
fflush( stdout );
|
||||
|
||||
@@ -269,8 +269,8 @@ int main( int argc, char *argv[] )
|
||||
memset( &ssl, 0, sizeof( ssl_context ) );
|
||||
memset( &saved_session, 0, sizeof( ssl_session ) );
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
memset( &cacert, 0, sizeof( x509_cert ) );
|
||||
memset( &clicert, 0, sizeof( x509_cert ) );
|
||||
x509_crt_init( &cacert );
|
||||
x509_crt_init( &clicert );
|
||||
pk_init( &pkey );
|
||||
#endif
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ int main( int argc, char *argv[] )
|
||||
printf( " . Loading the server cert. and key..." );
|
||||
fflush( stdout );
|
||||
|
||||
memset( &srvcert, 0, sizeof( x509_cert ) );
|
||||
x509_crt_init( &srvcert );
|
||||
|
||||
/*
|
||||
* This demonstration program uses embedded test certificates.
|
||||
|
||||
@@ -363,8 +363,8 @@ int main( int argc, char *argv[] )
|
||||
* Make sure memory references are valid.
|
||||
*/
|
||||
server_fd = 0;
|
||||
memset( &cacert, 0, sizeof( x509_cert ) );
|
||||
memset( &clicert, 0, sizeof( x509_cert ) );
|
||||
x509_crt_init( &cacert );
|
||||
x509_crt_init( &clicert );
|
||||
pk_init( &pkey );
|
||||
|
||||
if( argc == 0 )
|
||||
|
||||
@@ -114,7 +114,7 @@ int main( int argc, char *argv[] )
|
||||
printf( "\n . Loading the server cert. and key..." );
|
||||
fflush( stdout );
|
||||
|
||||
memset( &srvcert, 0, sizeof( x509_cert ) );
|
||||
x509_crt_init( &srvcert );
|
||||
|
||||
/*
|
||||
* This demonstration program uses embedded test certificates.
|
||||
|
||||
@@ -237,8 +237,8 @@ int main( int argc, char *argv[] )
|
||||
*/
|
||||
listen_fd = 0;
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
memset( &cacert, 0, sizeof( x509_cert ) );
|
||||
memset( &srvcert, 0, sizeof( x509_cert ) );
|
||||
x509_crt_init( &cacert );
|
||||
x509_crt_init( &srvcert );
|
||||
pk_init( &pkey );
|
||||
#endif
|
||||
#if defined(POLARSSL_SSL_CACHE_C)
|
||||
|
||||
Reference in New Issue
Block a user