mirror of https://github.com/getdnsapi/getdns.git
Changed output to JSON, added jq to test infrastructure
This commit is contained in:
parent
224629ba1e
commit
0dd26f5310
|
@ -10,16 +10,16 @@ function FAIL () {
|
|||
}
|
||||
|
||||
"${GETDNS_VALIDATE}" -k root.ds -s root.keys -d 2019-11-19 www.test.heggggg.A www.test.heggggg \
|
||||
| grep ^400 || FAIL -k root.ds -s root.keys -d 2019-11-19 www.test.heggggg.A www.test.heggggg
|
||||
| jq ".code" | grep 400 || FAIL -k root.ds -s root.keys -d 2019-11-19 www.test.heggggg.A www.test.heggggg
|
||||
|
||||
"${GETDNS_VALIDATE}" -k root.ds -s root.keys -d 2019-11-19 nl.DS \
|
||||
| grep ^400 || FAIL -k root.ds -s root.keys -d 2019-11-19 nl.DS
|
||||
| jq ".code" | grep 400 || FAIL -k root.ds -s root.keys -d 2019-11-19 nl.DS
|
||||
|
||||
cat root.keys nl.DS nl.keys >support
|
||||
"${GETDNS_VALIDATE}" -k root.ds -s support -d 2019-11-19 nlnetlabs.DS \
|
||||
| grep ^400 || FAIL -k root.ds -s support -d 2019-11-19 nlnetlabs.DS
|
||||
| jq ".code" | grep 400 || FAIL -k root.ds -s support -d 2019-11-19 nlnetlabs.DS
|
||||
|
||||
cat root.keys nl.DS nl.keys nlnetlabs.DS nlnetlabs.keys >support
|
||||
"${GETDNS_VALIDATE}" -k root.ds -s support -d 2019-11-19 www.nlnetlabs.nl.AAAA \
|
||||
| grep ^400 || FAIL -k root.ds -s support -d 2019-11-19 www.nlnetlabs.nl.AAAA
|
||||
| jq ".code" | grep 400 || FAIL -k root.ds -s support -d 2019-11-19 www.nlnetlabs.nl.AAAA
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ getdns_return_t print_dnssec_status(int status)
|
|||
case GETDNS_DNSSEC_INSECURE:
|
||||
case GETDNS_DNSSEC_INDETERMINATE:
|
||||
case GETDNS_DNSSEC_BOGUS:
|
||||
printf("%i %s\n", status, getdns_get_errorstr_by_id(status));
|
||||
/* printf("%i %s\n", status, getdns_get_errorstr_by_id(status)); */
|
||||
printf("{\"code\": %i, \"desc\": \"%s\"}\n", status, getdns_get_errorstr_by_id(status));
|
||||
return GETDNS_RETURN_GOOD;
|
||||
default:
|
||||
fprintf(stderr, "Error validating");
|
||||
|
|
Loading…
Reference in New Issue