@@ -2006,7 +2006,7 @@ static int wp_ecc_decode_params(wp_Ecc* ecc, unsigned char* data, word32 len)
20062006 int rc ;
20072007 word32 oidLen ;
20082008
2009- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_decode_params" );
2009+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
20102010
20112011 /* TODO: manually decoding as wolfSSL doesn't offer API to do this. */
20122012 if (len < 3 ) {
@@ -2047,16 +2047,26 @@ static int wp_ecc_decode_params(wp_Ecc* ecc, unsigned char* data, word32 len)
20472047 ok = 0 ;
20482048 }
20492049
2050- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
2050+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
2051+ ok );
20512052 return ok ;
20522053}
20532054
2055+ /**
2056+ * Decode the DER encoded ECC parameters (OID) into the ECC key object.
2057+ *
2058+ * @param [in, out] ecc ECC key object.
2059+ * @param [in] data DER encoding of the parameters (OID).
2060+ * @param [in] len Length, in bytes, of DER encoding.
2061+ * @return 1 on success.
2062+ * @return 0 on failure.
2063+ */
20542064static int wp_ecc_decode_x963_pub (wp_Ecc * ecc , unsigned char * data , word32 len )
20552065{
20562066 int ok = 1 ;
20572067 int rc ;
20582068
2059- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_decode_x963_pub" );
2069+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
20602070
20612071 rc = wc_ecc_import_x963 ((const byte * )data , len , & ecc -> key );
20622072 if (rc != 0 ) {
@@ -2071,7 +2081,8 @@ static int wp_ecc_decode_x963_pub(wp_Ecc* ecc, unsigned char* data, word32 len)
20712081 }
20722082 }
20732083
2074- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
2084+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
2085+ ok );
20752086 return ok ;
20762087}
20772088
@@ -2090,7 +2101,7 @@ static int wp_ecc_decode_spki(wp_Ecc* ecc, unsigned char* data, word32 len)
20902101 int rc ;
20912102 word32 idx = 0 ;
20922103
2093- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_decode_spki" );
2104+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
20942105
20952106 if (!wolfssl_prov_is_running ()) {
20962107 ok = 0 ;
@@ -2110,7 +2121,8 @@ static int wp_ecc_decode_spki(wp_Ecc* ecc, unsigned char* data, word32 len)
21102121 }
21112122 }
21122123
2113- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
2124+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
2125+ ok );
21142126 return ok ;
21152127}
21162128
@@ -2129,7 +2141,7 @@ static int wp_ecc_decode_pki(wp_Ecc* ecc, unsigned char* data, word32 len)
21292141 int rc ;
21302142 word32 idx = 0 ;
21312143
2132- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_decode_pki" );
2144+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
21332145
21342146 if (!wolfssl_prov_is_running ()) {
21352147 ok = 0 ;
@@ -2171,7 +2183,8 @@ static int wp_ecc_decode_pki(wp_Ecc* ecc, unsigned char* data, word32 len)
21712183 ecc -> hasPub = 1 ;
21722184 }
21732185
2174- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
2186+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
2187+ ok );
21752188 return ok ;
21762189}
21772190
@@ -2236,7 +2249,7 @@ static int wp_ecc_decode(wp_EccEncDecCtx* ctx, OSSL_CORE_BIO *cBio,
22362249 unsigned char * data = NULL ;
22372250 word32 len = 0 ;
22382251
2239- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_decode" );
2252+ WOLFPROV_ENTER (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
22402253
22412254 (void )pwCb ;
22422255 (void )pwCbArg ;
@@ -2921,7 +2934,7 @@ static int wp_ecc_type_specific_does_selection(WOLFPROV_CTX* provCtx,
29212934{
29222935 int ok ;
29232936
2924- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_type_specific_does_selection" );
2937+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
29252938
29262939 (void )provCtx ;
29272940
@@ -2932,7 +2945,8 @@ static int wp_ecc_type_specific_does_selection(WOLFPROV_CTX* provCtx,
29322945 ok = (selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS ) != 0 ;
29332946 }
29342947
2935- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
2948+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
2949+ ok );
29362950 return ok ;
29372951}
29382952
@@ -3038,7 +3052,7 @@ static int wp_ecc_spki_does_selection(WOLFPROV_CTX* provCtx, int selection)
30383052{
30393053 int ok ;
30403054
3041- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_spki_does_selection" );
3055+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
30423056
30433057 (void )provCtx ;
30443058
@@ -3049,7 +3063,8 @@ static int wp_ecc_spki_does_selection(WOLFPROV_CTX* provCtx, int selection)
30493063 ok = (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY ) != 0 ;
30503064 }
30513065
3052- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
3066+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
3067+ ok );
30533068 return ok ;
30543069}
30553070
@@ -3149,7 +3164,7 @@ static int wp_ecc_pki_does_selection(WOLFPROV_CTX* provCtx, int selection)
31493164{
31503165 int ok ;
31513166
3152- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_pki_does_selection" );
3167+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
31533168
31543169 (void )provCtx ;
31553170
@@ -3160,7 +3175,8 @@ static int wp_ecc_pki_does_selection(WOLFPROV_CTX* provCtx, int selection)
31603175 ok = (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ) != 0 ;
31613176 }
31623177
3163- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
3178+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
3179+ ok );
31643180 return ok ;
31653181}
31663182
@@ -3321,7 +3337,7 @@ static int wp_ecc_x9_62_does_selection(WOLFPROV_CTX* provCtx,
33213337{
33223338 int ok ;
33233339
3324- WOLFPROV_ENTER (WP_LOG_ECC , "wp_ecc_x9_62_does_selection" );
3340+ WOLFPROV_ENTER_SILENT (WP_LOG_ECC , WOLFPROV_FUNC_NAME );
33253341
33263342 (void )provCtx ;
33273343
@@ -3333,7 +3349,8 @@ static int wp_ecc_x9_62_does_selection(WOLFPROV_CTX* provCtx,
33333349 OSSL_KEYMGMT_SELECT_PRIVATE_KEY )) != 0 ;
33343350 }
33353351
3336- WOLFPROV_LEAVE (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ), ok );
3352+ WOLFPROV_LEAVE_SILENT (WP_LOG_ECC , __FILE__ ":" WOLFPROV_STRINGIZE (__LINE__ ),
3353+ ok );
33373354 return ok ;
33383355}
33393356
0 commit comments