2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

only emit a single space between mac length and the orginal id if the mac length is zero

This commit is contained in:
Mark Andrews 2018-09-14 15:49:51 +10:00 committed by Evan Hunt
parent 26699ac57e
commit ac1c3aaa27

View File

@ -187,22 +187,26 @@ totext_any_tsig(ARGS_TOTEXT) {
/* /*
* Signature. * Signature.
*/ */
REQUIRE(n <= sr.length); if (n != 0U) {
sigr = sr; REQUIRE(n <= sr.length);
sigr.length = n; sigr = sr;
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) sigr.length = n;
RETERR(str_totext(" (", target)); if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
RETERR(str_totext(tctx->linebreak, target)); RETERR(str_totext(" (", target));
if (tctx->width == 0) /* No splitting */ RETERR(str_totext(tctx->linebreak, target));
RETERR(isc_base64_totext(&sigr, 60, "", target)); if (tctx->width == 0) /* No splitting */
else RETERR(isc_base64_totext(&sigr, 60, "", target));
RETERR(isc_base64_totext(&sigr, tctx->width - 2, else
tctx->linebreak, target)); RETERR(isc_base64_totext(&sigr, tctx->width - 2,
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) tctx->linebreak, target));
RETERR(str_totext(" ) ", target)); if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
else RETERR(str_totext(" ) ", target));
else
RETERR(str_totext(" ", target));
isc_region_consume(&sr, n);
} else {
RETERR(str_totext(" ", target)); RETERR(str_totext(" ", target));
isc_region_consume(&sr, n); }
/* /*
* Original ID. * Original ID.