From 03edf998fa6142cb5e3d4c28154c9bdfea98105f Mon Sep 17 00:00:00 2001 From: Juhani Puurula Date: Mon, 14 May 2018 17:08:10 +0300 Subject: [PATCH] Squashed 'features/nanostack/coap-service/' changes from 36d36ce..1cb994e 1cb994e Move security _pkey into X.509 condition (#99) git-subtree-dir: features/nanostack/coap-service git-subtree-split: 1cb994e46e4943b44139cd19c5e97b74834e8216 --- source/coap_security_handler.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/coap_security_handler.c b/source/coap_security_handler.c index c83775f223..4271906ba4 100644 --- a/source/coap_security_handler.c +++ b/source/coap_security_handler.c @@ -51,8 +51,8 @@ struct coap_security_s { #if defined(MBEDTLS_X509_CRT_PARSE_C) mbedtls_x509_crt _cacert; mbedtls_x509_crt _owncert; -#endif mbedtls_pk_context _pkey; +#endif uint8_t _pw[64]; uint8_t _pw_len; @@ -109,8 +109,8 @@ static int coap_security_handler_init(coap_security_t *sec){ #if defined(MBEDTLS_X509_CRT_PARSE_C) mbedtls_x509_crt_init( &sec->_cacert ); mbedtls_x509_crt_init( &sec->_owncert ); -#endif mbedtls_pk_init( &sec->_pkey ); +#endif memset(&sec->_cookie, 0, sizeof(simple_cookie_t)); memset(&sec->_keyblk, 0, sizeof(key_block_t)); @@ -145,9 +145,8 @@ static void coap_security_handler_reset(coap_security_t *sec){ #if defined(MBEDTLS_X509_CRT_PARSE_C) mbedtls_x509_crt_free(&sec->_cacert); mbedtls_x509_crt_free(&sec->_owncert); -#endif - mbedtls_pk_free(&sec->_pkey); +#endif mbedtls_entropy_free( &sec->_entropy ); mbedtls_ctr_drbg_free( &sec->_ctr_drbg );