Home
last modified time | relevance | path

Searched refs:dnskey (Results 1 – 9 of 9) sorted by relevance

/systemd-251/src/resolve/
Dtest-dnssec.c47 … _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *dnskey = NULL, *ds1 = NULL, *ds2 = NULL; in TEST()
74 dnskey = dns_resource_record_new_full(DNS_CLASS_IN, DNS_TYPE_DNSKEY, "nasa.GOV"); in TEST()
75 assert_se(dnskey); in TEST()
77 dnskey->dnskey.flags = 257; in TEST()
78 dnskey->dnskey.protocol = 3; in TEST()
79 dnskey->dnskey.algorithm = DNSSEC_ALGORITHM_RSASHA256; in TEST()
80 dnskey->dnskey.key_size = sizeof(dnskey_blob); in TEST()
81 dnskey->dnskey.key = memdup(dnskey_blob, sizeof(dnskey_blob)); in TEST()
82 assert_se(dnskey->dnskey.key); in TEST()
84 log_info("DNSKEY: %s", strna(dns_resource_record_to_string(dnskey))); in TEST()
[all …]
Dresolved-dns-dnssec.c44 uint16_t dnssec_keytag(DnsResourceRecord *dnskey, bool mask_revoke) { in dnssec_keytag() argument
50 assert(dnskey); in dnssec_keytag()
51 assert(dnskey->key->type == DNS_TYPE_DNSKEY); in dnssec_keytag()
53 f = (uint32_t) dnskey->dnskey.flags; in dnssec_keytag()
58 … sum = f + ((((uint32_t) dnskey->dnskey.protocol) << 8) + (uint32_t) dnskey->dnskey.algorithm); in dnssec_keytag()
60 p = dnskey->dnskey.key; in dnssec_keytag()
62 for (size_t i = 0; i < dnskey->dnskey.key_size; i++) in dnssec_keytag()
242 DnsResourceRecord *dnskey) { in dnssec_rsa_verify() argument
251 assert(dnskey); in dnssec_rsa_verify()
253 if (*(uint8_t*) dnskey->dnskey.key == 0) { in dnssec_rsa_verify()
[all …]
Dresolved-dns-trust-anchor.c342 rr->dnskey.flags = f; in dns_trust_anchor_load_positive()
343 rr->dnskey.protocol = 3; in dns_trust_anchor_load_positive()
344 rr->dnskey.algorithm = a; in dns_trust_anchor_load_positive()
345 rr->dnskey.key_size = l; in dns_trust_anchor_load_positive()
346 rr->dnskey.key = TAKE_PTR(k); in dns_trust_anchor_load_positive()
652 assert(revoked_dnskey->dnskey.flags & DNSKEY_FLAG_REVOKE); in dns_trust_anchor_check_revoked_one()
662 if (anchor->dnskey.protocol != revoked_dnskey->dnskey.protocol) in dns_trust_anchor_check_revoked_one()
665 if (anchor->dnskey.algorithm != revoked_dnskey->dnskey.algorithm) in dns_trust_anchor_check_revoked_one()
668 if (anchor->dnskey.key_size != revoked_dnskey->dnskey.key_size) in dns_trust_anchor_check_revoked_one()
674 …if (((anchor->dnskey.flags ^ revoked_dnskey->dnskey.flags) | DNSKEY_FLAG_REVOKE) != DNSKEY_FLAG_RE… in dns_trust_anchor_check_revoked_one()
[all …]
Dresolved-dns-dnssec.h48 int dnssec_rrsig_match_dnskey(DnsResourceRecord *rrsig, DnsResourceRecord *dnskey, bool revoked_ok);
51 … const DnsResourceKey *key, DnsResourceRecord *rrsig, DnsResourceRecord *dnskey, usec_t realtime, …
54 int dnssec_verify_dnskey_by_ds(DnsResourceRecord *dnskey, DnsResourceRecord *ds, bool mask_revoke);
55 int dnssec_verify_dnskey_by_ds_search(DnsResourceRecord *dnskey, DnsAnswer *validated_ds);
59 uint16_t dnssec_keytag(DnsResourceRecord *dnskey, bool mask_revoke);
Dresolved-dns-rr.c444 free(rr->dnskey.key); in dns_resource_record_free()
644 return a->dnskey.flags == b->dnskey.flags && in dns_resource_record_payload_equal()
645 a->dnskey.protocol == b->dnskey.protocol && in dns_resource_record_payload_equal()
646 a->dnskey.algorithm == b->dnskey.algorithm && in dns_resource_record_payload_equal()
647 FIELD_EQUAL(a->dnskey, b->dnskey, key); in dns_resource_record_payload_equal()
964 r = dnssec_algorithm_to_string_alloc(rr->dnskey.algorithm, &alg); in dns_resource_record_to_string()
970 rr->dnskey.flags, in dns_resource_record_to_string()
971 rr->dnskey.protocol, in dns_resource_record_to_string()
977 rr->dnskey.key, rr->dnskey.key_size, in dns_resource_record_to_string()
986 rr->dnskey.flags & DNSKEY_FLAG_SEP ? " SEP" : "", in dns_resource_record_to_string()
[all …]
Dresolved-dns-packet.c1055 r = dns_packet_append_uint16(p, rr->dnskey.flags, NULL); in dns_packet_append_rr()
1059 r = dns_packet_append_uint8(p, rr->dnskey.protocol, NULL); in dns_packet_append_rr()
1063 r = dns_packet_append_uint8(p, rr->dnskey.algorithm, NULL); in dns_packet_append_rr()
1067 r = dns_packet_append_blob(p, rr->dnskey.key, rr->dnskey.key_size, NULL); in dns_packet_append_rr()
1933 r = dns_packet_read_uint16(p, &rr->dnskey.flags, NULL); in dns_packet_read_rr()
1937 r = dns_packet_read_uint8(p, &rr->dnskey.protocol, NULL); in dns_packet_read_rr()
1941 r = dns_packet_read_uint8(p, &rr->dnskey.algorithm, NULL); in dns_packet_read_rr()
1949 &rr->dnskey.key, &rr->dnskey.key_size, in dns_packet_read_rr()
1952 if (rr->dnskey.key_size <= 0) in dns_packet_read_rr()
Dresolved-dns-trust-anchor.h24 int dns_trust_anchor_check_revoked(DnsTrustAnchor *d, DnsResourceRecord *dnskey, DnsAnswer *rrs);
Dresolved-dns-rr.h190 } dnskey; member
Dresolved-dns-transaction.c2337 _cleanup_(dns_resource_key_unrefp) DnsResourceKey *dnskey = NULL; in dns_transaction_request_dnssec_keys()
2368dnskey = dns_resource_key_new(rr->key->class, DNS_TYPE_DNSKEY, rr->rrsig.signer); in dns_transaction_request_dnssec_keys()
2369 if (!dnskey) in dns_transaction_request_dnssec_keys()
2374 r = dns_transaction_request_dnssec_rr(t, dnskey); in dns_transaction_request_dnssec_keys()