mirror of https://github.com/getdnsapi/getdns.git
Print getdns_validate_dnssec3 result chain
for development of the feature
This commit is contained in:
parent
7c40b716c4
commit
0e125ceaee
|
@ -249,6 +249,7 @@ static getdns_return_t validate_chain(getdns_dict *response)
|
||||||
getdns_dict *reply;
|
getdns_dict *reply;
|
||||||
getdns_list *to_validate;
|
getdns_list *to_validate;
|
||||||
getdns_list *trust_anchor;
|
getdns_list *trust_anchor;
|
||||||
|
getdns_list *new_chain = getdns_list_create();
|
||||||
size_t i;
|
size_t i;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
|
@ -267,8 +268,9 @@ static getdns_return_t validate_chain(getdns_dict *response)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
fprintf(stdout, "replies_tree dnssec_status: ");
|
fprintf(stdout, "replies_tree dnssec_status: ");
|
||||||
switch ((s = getdns_validate_dnssec(
|
switch ((s = getdns_validate_dnssec3(
|
||||||
replies_tree, validation_chain, trust_anchor))) {
|
replies_tree, validation_chain, trust_anchor,
|
||||||
|
time(NULL), 0, new_chain))) {
|
||||||
|
|
||||||
case GETDNS_DNSSEC_SECURE:
|
case GETDNS_DNSSEC_SECURE:
|
||||||
fprintf(stdout, "GETDNS_DNSSEC_SECURE\n");
|
fprintf(stdout, "GETDNS_DNSSEC_SECURE\n");
|
||||||
|
@ -288,7 +290,11 @@ static getdns_return_t validate_chain(getdns_dict *response)
|
||||||
default:
|
default:
|
||||||
fprintf(stdout, "%d\n", (int)s);
|
fprintf(stdout, "%d\n", (int)s);
|
||||||
}
|
}
|
||||||
|
if (new_chain) {
|
||||||
|
char *new_chain_str = getdns_pretty_print_list(new_chain);
|
||||||
|
printf("new canonicalized chain: %s\n", new_chain_str);
|
||||||
|
free(new_chain_str);
|
||||||
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
while (!(r = getdns_list_get_dict(replies_tree, i++, &reply))) {
|
while (!(r = getdns_list_get_dict(replies_tree, i++, &reply))) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue