mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
Replace ssh_print_hexa() with ssh_log_hexdump()
Replace all occurrences of the deprecated function ssh_print_hexa() with the introduced ssh_log_hexdump(). Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
33927f3ae8
commit
68baebbd62
@@ -196,11 +196,11 @@ unsigned char *ssh_packet_encrypt(ssh_session session, void *data, uint32_t len)
|
||||
hmac_final(ctx, crypto->hmacbuf, &finallen);
|
||||
}
|
||||
#ifdef DEBUG_CRYPTO
|
||||
ssh_print_hexa("mac: ",data,hmac_digest_len(type));
|
||||
ssh_log_hexdump("mac: ",data,hmac_digest_len(type));
|
||||
if (finallen != hmac_digest_len(type)) {
|
||||
printf("Final len is %d\n",finallen);
|
||||
}
|
||||
ssh_print_hexa("Packet hmac", crypto->hmacbuf, hmac_digest_len(type));
|
||||
ssh_log_hexdump("Packet hmac", crypto->hmacbuf, hmac_digest_len(type));
|
||||
#endif
|
||||
}
|
||||
explicit_bzero(out, len);
|
||||
@@ -264,9 +264,9 @@ int ssh_packet_hmac_verify(ssh_session session,
|
||||
hmac_final(ctx, hmacbuf, &hmaclen);
|
||||
|
||||
#ifdef DEBUG_CRYPTO
|
||||
ssh_print_hexa("received mac",mac,hmaclen);
|
||||
ssh_print_hexa("Computed mac",hmacbuf,hmaclen);
|
||||
ssh_print_hexa("seq",(unsigned char *)&seq,sizeof(uint32_t));
|
||||
ssh_log_hexdump("received mac",mac,hmaclen);
|
||||
ssh_log_hexdump("Computed mac",hmacbuf,hmaclen);
|
||||
ssh_log_hexdump("seq",(unsigned char *)&seq,sizeof(uint32_t));
|
||||
#endif
|
||||
if (secure_memcmp(mac, hmacbuf, hmaclen) == 0) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user