mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 09:05:40 +00:00
Change dns_tsigkey_identity from macro to a function and const argument and result
This commit is contained in:
@@ -643,6 +643,20 @@ dns_tsigkeyring_dumpanddetach(dns_tsig_keyring_t **ringp, FILE *fp) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
const dns_name_t *
|
||||
dns_tsigkey_identity(const dns_tsigkey_t *tsigkey) {
|
||||
REQUIRE(tsigkey == NULL || VALID_TSIG_KEY(tsigkey));
|
||||
|
||||
if (tsigkey == NULL) {
|
||||
return (NULL);
|
||||
}
|
||||
if (tsigkey->generated) {
|
||||
return (tsigkey->creator);
|
||||
} else {
|
||||
return (&tsigkey->name);
|
||||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_tsigkey_create(const dns_name_t *name, const dns_name_t *algorithm,
|
||||
unsigned char *secret, int length, bool generated,
|
||||
|
Reference in New Issue
Block a user