mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
[9.18] fix: usr: Fix brid and hhit implementation
Fix bugs in BRID and HHIT implementation and enable the unit tests. Closes #5710 Backport of MR !11491 Merge branch 'backport-5710-fix-hhit-and-brid-issues-9.18' into 'bind-9.18' See merge request isc-projects/bind9!11493
This commit is contained in:
commit
e3caaa16f1
3 changed files with 6 additions and 8 deletions
|
|
@ -28,7 +28,7 @@ fromtext_brid(ARGS_FROMTEXT) {
|
|||
UNUSED(options);
|
||||
UNUSED(callbacks);
|
||||
|
||||
return isc_base64_tobuffer(lexer, target, -1);
|
||||
return isc_base64_tobuffer(lexer, target, -2);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -45,8 +45,6 @@ totext_brid(ARGS_TOTEXT) {
|
|||
RETERR(str_totext(" (", target));
|
||||
}
|
||||
|
||||
RETERR(str_totext(tctx->linebreak, target));
|
||||
|
||||
if (tctx->width == 0) { /* No splitting */
|
||||
RETERR(isc_base64_totext(&sr, 60, "", target));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ fromtext_hhit(ARGS_FROMTEXT) {
|
|||
UNUSED(options);
|
||||
UNUSED(callbacks);
|
||||
|
||||
return isc_base64_tobuffer(lexer, target, -1);
|
||||
return isc_base64_tobuffer(lexer, target, -2);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -45,8 +45,6 @@ totext_hhit(ARGS_TOTEXT) {
|
|||
RETERR(str_totext(" (", target));
|
||||
}
|
||||
|
||||
RETERR(str_totext(tctx->linebreak, target));
|
||||
|
||||
if (tctx->width == 0) { /* No splitting */
|
||||
RETERR(isc_base64_totext(&sr, 60, "", target));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1102,7 +1102,7 @@ ISC_RUN_TEST_IMPL(amtrelay) {
|
|||
}
|
||||
|
||||
/* BRIB RDATA - base64 encoded opaque */
|
||||
ISC_RUN_TEST_IMPL(brib) {
|
||||
ISC_RUN_TEST_IMPL(brid) {
|
||||
text_ok_t text_ok[] = { /* empty */
|
||||
TEXT_INVALID(""),
|
||||
/* valid base64 string */
|
||||
|
|
@ -3280,6 +3280,7 @@ ISC_TEST_LIST_START
|
|||
ISC_TEST_ENTRY(amtrelay)
|
||||
ISC_TEST_ENTRY(apl)
|
||||
ISC_TEST_ENTRY(atma)
|
||||
ISC_TEST_ENTRY(brid)
|
||||
ISC_TEST_ENTRY(cdnskey)
|
||||
ISC_TEST_ENTRY(csync)
|
||||
ISC_TEST_ENTRY(dnskey)
|
||||
|
|
@ -3287,6 +3288,7 @@ ISC_TEST_ENTRY(doa)
|
|||
ISC_TEST_ENTRY(ds)
|
||||
ISC_TEST_ENTRY(dsync)
|
||||
ISC_TEST_ENTRY(eid)
|
||||
ISC_TEST_ENTRY(hhit)
|
||||
ISC_TEST_ENTRY(hip)
|
||||
ISC_TEST_ENTRY(https_svcb)
|
||||
ISC_TEST_ENTRY(isdn)
|
||||
|
|
@ -3296,8 +3298,8 @@ ISC_TEST_ENTRY(nimloc)
|
|||
ISC_TEST_ENTRY(nsec)
|
||||
ISC_TEST_ENTRY(nsec3)
|
||||
ISC_TEST_ENTRY(nxt)
|
||||
ISC_TEST_ENTRY(rkey)
|
||||
ISC_TEST_ENTRY(resinfo)
|
||||
ISC_TEST_ENTRY(rkey)
|
||||
ISC_TEST_ENTRY(sshfp)
|
||||
ISC_TEST_ENTRY(wallet)
|
||||
ISC_TEST_ENTRY(wks)
|
||||
|
|
|
|||
Loading…
Reference in a new issue