mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
instead of ipv6 like 2001:db8:0:0:0:0:0:1 rather produce 2001:0db8:0000:0000:0000:0000:0000:0001 (it will be less surprising)
This commit is contained in:
parent
f7b1553a68
commit
4b627b9084
1 changed files with 4 additions and 4 deletions
|
|
@ -182,10 +182,10 @@ static int s_get_general_name(const ltc_asn1_list *seq, ltc_x509_string *name)
|
|||
err = CRYPT_MEM;
|
||||
break;
|
||||
}
|
||||
nbytes = snprintf(str, 40, "%x:%x:%x:%x:%x:%x:%x:%x", LTC_NTOHS(&ip[0]), LTC_NTOHS(&ip[2]),
|
||||
LTC_NTOHS(&ip[4]), LTC_NTOHS(&ip[6]),
|
||||
LTC_NTOHS(&ip[8]), LTC_NTOHS(&ip[10]),
|
||||
LTC_NTOHS(&ip[12]), LTC_NTOHS(&ip[14]));
|
||||
nbytes = snprintf(str, 40, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x", LTC_NTOHS(&ip[0]), LTC_NTOHS(&ip[2]),
|
||||
LTC_NTOHS(&ip[4]), LTC_NTOHS(&ip[6]),
|
||||
LTC_NTOHS(&ip[8]), LTC_NTOHS(&ip[10]),
|
||||
LTC_NTOHS(&ip[12]), LTC_NTOHS(&ip[14]));
|
||||
if (nbytes < 0) {
|
||||
err = CRYPT_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue