@@ -61,45 +61,45 @@ static inline void ns_sha256_clone(ns_sha256_context *dst,
61
61
62
62
static inline void ns_sha256_starts (ns_sha256_context * ctx )
63
63
{
64
- mbedtls_sha256_starts (ctx , 0 );
64
+ ( void ) mbedtls_sha256_starts_ret (ctx , 0 );
65
65
}
66
66
67
67
static inline void ns_sha256_update (ns_sha256_context * ctx , const void * input ,
68
68
size_t ilen )
69
69
{
70
- mbedtls_sha256_update (ctx , input , ilen );
70
+ ( void ) mbedtls_sha256_update_ret (ctx , input , ilen );
71
71
}
72
72
73
73
static inline void ns_sha256_finish (ns_sha256_context * ctx , void * output )
74
74
{
75
- mbedtls_sha256_finish (ctx , output );
75
+ ( void ) mbedtls_sha256_finish_ret (ctx , output );
76
76
}
77
77
78
78
static inline void ns_sha256 (const void * input , size_t ilen , void * output )
79
79
{
80
- mbedtls_sha256 (input , ilen , output , 0 );
80
+ ( void ) mbedtls_sha256_ret (input , ilen , output , 0 );
81
81
}
82
82
83
83
/* Extensions to standard mbed TLS - output the first bits of a hash only */
84
84
/* Number of bits must be a multiple of 32, and <=256 */
85
85
static inline void ns_sha256_finish_nbits (ns_sha256_context * ctx , void * output , unsigned obits )
86
86
{
87
87
if (obits == 256 ) {
88
- mbedtls_sha256_finish (ctx , output );
88
+ ( void ) mbedtls_sha256_finish_ret (ctx , output );
89
89
} else {
90
90
uint8_t sha256 [32 ];
91
- mbedtls_sha256_finish (ctx , sha256 );
91
+ ( void ) mbedtls_sha256_finish_ret (ctx , sha256 );
92
92
memcpy (output , sha256 , obits / 8 );
93
93
}
94
94
}
95
95
96
96
static inline void ns_sha256_nbits (const void * input , size_t ilen , void * output , unsigned obits )
97
97
{
98
98
if (obits == 256 ) {
99
- mbedtls_sha256 (input , ilen , output , 0 );
99
+ ( void ) mbedtls_sha256_ret (input , ilen , output , 0 );
100
100
} else {
101
101
uint8_t sha256 [32 ];
102
- mbedtls_sha256 (input , ilen , sha256 , 0 );
102
+ ( void ) mbedtls_sha256_ret (input , ilen , sha256 , 0 );
103
103
memcpy (output , sha256 , obits / 8 );
104
104
}
105
105
}
0 commit comments