mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-03 21:25:31 +01:00
Introduced x509_crt_init(), x509_crl_init() and x509_csr_init()
This commit is contained in:
parent
86d0c1949e
commit
369d2eb2a2
20 changed files with 79 additions and 34 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue