key.c File Reference

#include <config.h>
#include <stddef.h>
#include <stdlib.h>
#include <isc/region.h>
#include <isc/util.h>
#include <dns/keyvalues.h>
#include <dst/dst.h>
#include "dst_internal.h"

Go to the source code of this file.

Functions

isc_uint16_t dst_region_computeid (const isc_region_t *source, unsigned int alg)
isc_uint16_t dst_region_computerid (const isc_region_t *source, unsigned int alg)
 Computes the (revoked) key id of the key stored in the provided region with the given algorithm.
dns_name_tdst_key_name (const dst_key_t *key)
unsigned int dst_key_size (const dst_key_t *key)
unsigned int dst_key_proto (const dst_key_t *key)
unsigned int dst_key_alg (const dst_key_t *key)
isc_uint32_t dst_key_flags (const dst_key_t *key)
dns_keytag_t dst_key_id (const dst_key_t *key)
dns_keytag_t dst_key_rid (const dst_key_t *key)
dns_rdataclass_t dst_key_class (const dst_key_t *key)
isc_boolean_t dst_key_iszonekey (const dst_key_t *key)
isc_boolean_t dst_key_isnullkey (const dst_key_t *key)
void dst_key_setbits (dst_key_t *key, isc_uint16_t bits)
 Set the number of digest bits required (0 == MAX).
isc_uint16_t dst_key_getbits (const dst_key_t *key)
 Get the number of digest bits required (0 == MAX).
void dst_key_setttl (dst_key_t *key, dns_ttl_t ttl)
 Set the default TTL to use when converting the key to a KEY or DNSKEY RR.
dns_ttl_t dst_key_getttl (const dst_key_t *key)
 Get the default TTL to use when converting the key to a KEY or DNSKEY RR.


Detailed Description

Definition in file key.c.


Function Documentation

isc_uint16_t dst_region_computeid ( const isc_region_t source,
unsigned int  alg 
)

Definition at line 35 of file key.c.

References isc_region::base, DST_ALG_RSAMD5, isc_region::length, and REQUIRE.

Referenced by add_signing_records(), compute_keytag(), computeid(), dns_ds_buildrdata(), dst_key_fromdns(), mkey_dumpzone(), totext_cdnskey(), totext_dnskey(), totext_key(), totext_keydata(), and update_action().

isc_uint16_t dst_region_computerid ( const isc_region_t source,
unsigned int  alg 
)

Computes the (revoked) key id of the key stored in the provided region with the given algorithm.

Requires:

Returns:

Definition at line 60 of file key.c.

References isc_region::base, DNS_KEYFLAG_REVOKE, DST_ALG_RSAMD5, isc_region::length, and REQUIRE.

Referenced by computeid(), and dst_key_fromdns().

dns_name_t* dst_key_name ( const dst_key_t key  ) 

Definition at line 87 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by addkey(), create_keydata(), dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_dnssec_verifymessage(), dns_keytable_add(), dns_keytable_deletekeynode(), dns_message_setsig0key(), dns_tkey_builddhquery(), dns_tkey_processdhresponse(), dns_tsec_create(), dst_key_format(), emit(), generate_session_key(), iszonekey(), keythatsigned_unlocked(), load_view_keys(), loadexplicitkeys(), loadkey(), main(), process_dhtkey(), setup_file_key(), setup_keyfile(), start_lookup(), and sync_keyzone().

unsigned int dst_key_size ( const dst_key_t key  ) 

Definition at line 93 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by dns_nsec3_maxiterations(), dns_tsigkey_createfromkey(), and main().

unsigned int dst_key_proto ( const dst_key_t key  ) 

Definition at line 99 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by dns_message_checksig().

unsigned int dst_key_alg ( const dst_key_t key  ) 

Definition at line 105 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by addkey(), del_sigs(), delsig_ok(), dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_dnssec_updatekeys(), dns_keytable_findkeynode(), dns_keytable_findnextkeynode(), dns_message_checksig(), dns_tkey_builddhquery(), dns_tkey_processdhresponse(), dns_tsec_create(), dns_tsig_verify(), dns_tsigkey_createfromkey(), dst__privstruct_parse(), dst__privstruct_writefile(), dst_key_format(), emit(), get_dst_key(), get_key(), key_collision(), keyfetch_done(), keythatsigned_unlocked(), loadexplicitkeys(), main(), mark_active_keys(), process_dhtkey(), publish_key(), remove_key(), revocable(), setup_file_key(), setup_keyfile(), signed_with_key(), signset(), writeset(), and zone_sign().

isc_uint32_t dst_key_flags ( const dst_key_t key  ) 

Definition at line 111 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dns_dnssec_sign(), dns_dnssec_updatekeys(), dns_dnssec_verify3(), dns_dnsseckey_create(), get_hints(), and main().

dns_keytag_t dst_key_id ( const dst_key_t key  ) 

Definition at line 117 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by addkey(), compute_tag(), del_keysigs(), del_sigs(), delsig_ok(), dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dns_dnssec_sign(), dns_dnssec_signmessage(), dns_dnssec_signs(), dns_keytable_findkeynode(), dns_keytable_findnextkeynode(), dns_message_checksig(), dst_key_format(), emit(), get_dst_key(), get_key(), goodsig(), key_collision(), keyfetch_done(), keythatsigned_unlocked(), loadexplicitkeys(), mark_active_keys(), publish_key(), remove_key(), signed_with_key(), and zone_sign().

dns_keytag_t dst_key_rid ( const dst_key_t key  ) 

Definition at line 123 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by key_collision(), main(), and revocable().

dns_rdataclass_t dst_key_class ( const dst_key_t key  ) 

Definition at line 129 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by create_keydata(), loadkey(), and make_dnskey().

isc_boolean_t dst_key_iszonekey ( const dst_key_t key  ) 

Definition at line 135 of file key.c.

References DNS_KEYFLAG_OWNERMASK, DNS_KEYOWNER_ZONE, DNS_KEYPROTO_ANY, DNS_KEYPROTO_DNSSEC, DNS_KEYTYPE_NOAUTH, ISC_FALSE, ISC_TRUE, REQUIRE, and VALID_KEY.

Referenced by get_dst_key(), get_key(), and iszonekey().

isc_boolean_t dst_key_isnullkey ( const dst_key_t key  ) 

Definition at line 149 of file key.c.

References DNS_KEYFLAG_OWNERMASK, DNS_KEYFLAG_TYPEMASK, DNS_KEYOWNER_ZONE, DNS_KEYPROTO_ANY, DNS_KEYPROTO_DNSSEC, DNS_KEYTYPE_NOKEY, ISC_FALSE, ISC_TRUE, REQUIRE, and VALID_KEY.

void dst_key_setbits ( dst_key_t key,
isc_uint16_t  bits 
)

Set the number of digest bits required (0 == MAX).

Requires: "key" is a valid key.

Definition at line 163 of file key.c.

References dst_key_sigsize(), ISC_R_SUCCESS, REQUIRE, RUNTIME_CHECK, and VALID_KEY.

Referenced by add_initial_keys(), evaluate_key(), main(), setup_keystr(), and setup_text_key().

isc_uint16_t dst_key_getbits ( const dst_key_t key  ) 

Get the number of digest bits required (0 == MAX).

Requires: "key" is a valid key.

Definition at line 175 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by dns_tsig_sign(), and dns_tsig_verify().

void dst_key_setttl ( dst_key_t key,
dns_ttl_t  ttl 
)

Set the default TTL to use when converting the key to a KEY or DNSKEY RR.

Requires: "key" is a valid key.

Definition at line 181 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by dns_dnssec_findzonekeys2(), dns_dnssec_keylistfromrdataset(), dst_key_read_public(), emit(), and main().

dns_ttl_t dst_key_getttl ( const dst_key_t key  ) 

Get the default TTL to use when converting the key to a KEY or DNSKEY RR.

Requires: "key" is a valid key.

Definition at line 187 of file key.c.

References REQUIRE, and VALID_KEY.

Referenced by dns_dnssec_keylistfromrdataset(), and dns_dnssec_updatekeys().


Generated on Tue Apr 28 17:41:11 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha