File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ struct coap_security_s {
5151#if defined(MBEDTLS_X509_CRT_PARSE_C )
5252 mbedtls_x509_crt _cacert ;
5353 mbedtls_x509_crt _owncert ;
54- #endif
5554 mbedtls_pk_context _pkey ;
55+ #endif
5656
5757 uint8_t _pw [64 ];
5858 uint8_t _pw_len ;
@@ -109,8 +109,8 @@ static int coap_security_handler_init(coap_security_t *sec){
109109#if defined(MBEDTLS_X509_CRT_PARSE_C )
110110 mbedtls_x509_crt_init ( & sec -> _cacert );
111111 mbedtls_x509_crt_init ( & sec -> _owncert );
112- #endif
113112 mbedtls_pk_init ( & sec -> _pkey );
113+ #endif
114114
115115 memset (& sec -> _cookie , 0 , sizeof (simple_cookie_t ));
116116 memset (& sec -> _keyblk , 0 , sizeof (key_block_t ));
@@ -145,9 +145,8 @@ static void coap_security_handler_reset(coap_security_t *sec){
145145#if defined(MBEDTLS_X509_CRT_PARSE_C )
146146 mbedtls_x509_crt_free (& sec -> _cacert );
147147 mbedtls_x509_crt_free (& sec -> _owncert );
148- #endif
149-
150148 mbedtls_pk_free (& sec -> _pkey );
149+ #endif
151150
152151 mbedtls_entropy_free ( & sec -> _entropy );
153152 mbedtls_ctr_drbg_free ( & sec -> _ctr_drbg );
You can’t perform that action at this time.
0 commit comments