mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-27 12:16:07 +00:00
programs_dh_client/server: Changed mdlen type to unsigned integer.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
7c8448842d
commit
db8915287e
@ -59,7 +59,8 @@ int main(void)
|
||||
|
||||
int ret = 1;
|
||||
int exit_code = MBEDTLS_EXIT_FAILURE;
|
||||
size_t n, buflen, mdlen;
|
||||
unsigned int mdlen;
|
||||
size_t n, buflen;
|
||||
mbedtls_net_context server_fd;
|
||||
|
||||
unsigned char *p, *end;
|
||||
@ -186,7 +187,7 @@ int main(void)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
mdlen = mbedtls_md_get_size(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256));
|
||||
mdlen = (unsigned int) mbedtls_md_get_size(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256));
|
||||
if (mdlen == 0) {
|
||||
mbedtls_printf(" failed\n ! Invalid digest type\n\n");
|
||||
goto exit;
|
||||
|
@ -51,7 +51,8 @@ int main(void)
|
||||
|
||||
int ret = 1;
|
||||
int exit_code = MBEDTLS_EXIT_FAILURE;
|
||||
size_t n, buflen, mdlen;
|
||||
unsigned int mdlen;
|
||||
size_t n, buflen;
|
||||
mbedtls_net_context listen_fd, client_fd;
|
||||
|
||||
unsigned char buf[2048];
|
||||
@ -185,7 +186,7 @@ int main(void)
|
||||
* 5. Sign the parameters and send them
|
||||
*/
|
||||
|
||||
mdlen = mbedtls_md_get_size(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256));
|
||||
mdlen = (unsigned int) mbedtls_md_get_size(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256));
|
||||
if (mdlen == 0) {
|
||||
mbedtls_printf(" failed\n ! Invalid digest type\n\n");
|
||||
goto exit;
|
||||
|
Loading…
Reference in New Issue
Block a user