ldns documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

keys.h
Go to the documentation of this file.
1 /*
2 *
3 * keys.h
4 *
5 * priv key definitions
6 *
7 * a Net::DNS like library for C
8 *
9 * (c) NLnet Labs, 2005-2006
10 *
11 * See the file LICENSE for the license
12 */
13
21 #ifndef LDNS_KEYS_H
22 #define LDNS_KEYS_H
23
24 #include <ldns/common.h>
25 #if LDNS_BUILD_CONFIG_HAVE_SSL
26 #include <openssl/ssl.h>
27 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
28 #include <ldns/util.h>
29 #include <errno.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 extern ldns_lookup_table ldns_signing_algorithms[];
36
37 #define LDNS_KEY_ZONE_KEY 0x0100 /* rfc 4034 */
38 #define LDNS_KEY_SEP_KEY 0x0001 /* rfc 4034 */
39 #define LDNS_KEY_REVOKE_KEY 0x0080 /* rfc 5011 */
40
44 enum ldns_enum_algorithm
45 {
46 LDNS_RSAMD5 = 1, /* RFC 4034,4035 */
47 LDNS_DH = 2,
48 LDNS_DSA = 3,
49 LDNS_ECC = 4,
50 LDNS_RSASHA1 = 5,
51 LDNS_DSA_NSEC3 = 6,
52 LDNS_RSASHA1_NSEC3 = 7,
53 LDNS_RSASHA256 = 8, /* RFC 5702 */
54 LDNS_RSASHA512 = 10, /* RFC 5702 */
55 LDNS_ECC_GOST = 12, /* RFC 5933 */
56 LDNS_ECDSAP256SHA256 = 13, /* RFC 6605 */
57 LDNS_ECDSAP384SHA384 = 14, /* RFC 6605 */
58 LDNS_INDIRECT = 252,
59 LDNS_PRIVATEDNS = 253,
60 LDNS_PRIVATEOID = 254
61 };
62 typedef enum ldns_enum_algorithm ldns_algorithm;
63
67 enum ldns_enum_hash
68 {
69 LDNS_SHA1 = 1, /* RFC 4034 */
70 LDNS_SHA256 = 2, /* RFC 4509 */
71 LDNS_HASH_GOST = 3, /* RFC 5933 */
72 LDNS_SHA384 = 4 /* RFC 6605 */
73 };
74 typedef enum ldns_enum_hash ldns_hash;
75
79 enum ldns_enum_signing_algorithm
80 {
81 LDNS_SIGN_RSAMD5 = LDNS_RSAMD5,
82 LDNS_SIGN_RSASHA1 = LDNS_RSASHA1,
83 LDNS_SIGN_DSA = LDNS_DSA,
84 LDNS_SIGN_RSASHA1_NSEC3 = LDNS_RSASHA1_NSEC3,
85 LDNS_SIGN_RSASHA256 = LDNS_RSASHA256,
86 LDNS_SIGN_RSASHA512 = LDNS_RSASHA512,
87 LDNS_SIGN_DSA_NSEC3 = LDNS_DSA_NSEC3,
88 LDNS_SIGN_ECC_GOST = LDNS_ECC_GOST,
89 LDNS_SIGN_ECDSAP256SHA256 = LDNS_ECDSAP256SHA256,
90 LDNS_SIGN_ECDSAP384SHA384 = LDNS_ECDSAP384SHA384,
91 LDNS_SIGN_HMACMD5 = 157, /* not official! This type is for TSIG, not DNSSEC */
92 LDNS_SIGN_HMACSHA1 = 158, /* not official! This type is for TSIG, not DNSSEC */
93 LDNS_SIGN_HMACSHA256 = 159 /* ditto */
94 };
95 typedef enum ldns_enum_signing_algorithm ldns_signing_algorithm;
96
107 struct ldns_struct_key {
108 ldns_signing_algorithm _alg;
110 bool _use;
112 /* TODO remove unions? */
113 struct {
114 #if LDNS_BUILD_CONFIG_HAVE_SSL
115 #ifndef S_SPLINT_S
116 /* The key can be an OpenSSL EVP Key
117 */
118 EVP_PKEY *key;
119 #endif
120 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
121
124 struct {
125 unsigned char *key;
126 size_t size;
127 } hmac;
131 void *external_key;
132 } _key;
134 union {
136 struct {
138 uint32_t orig_ttl;
140 uint32_t inception;
142 uint32_t expiration;
144 uint16_t keytag;
146 uint16_t flags;
147 } dnssec;
148 } _extra;
150 ldns_rdf *_pubkey_owner;
151 };
152 typedef struct ldns_struct_key ldns_key;
153
157 struct ldns_struct_key_list
158 {
159 size_t _key_count;
160 ldns_key **_keys;
161 };
162 typedef struct ldns_struct_key_list ldns_key_list;
163
164
169 ldns_key_list *ldns_key_list_new(void);
170
175 ldns_key *ldns_key_new(void);
176
184 ldns_key *ldns_key_new_frm_algorithm(ldns_signing_algorithm a, uint16_t size);
185
196 ldns_status ldns_key_new_frm_fp(ldns_key **k, FILE *fp);
197
209 ldns_status ldns_key_new_frm_fp_l(ldns_key **k, FILE *fp, int *line_nr);
210
211 #if LDNS_BUILD_CONFIG_HAVE_SSL
212
216 ldns_status ldns_key_new_frm_engine(ldns_key **key, ENGINE *e, char *key_id, ldns_algorithm);
217
218
225 RSA *ldns_key_new_frm_fp_rsa(FILE *fp);
226 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
227
228 #if LDNS_BUILD_CONFIG_HAVE_SSL
229
236 RSA *ldns_key_new_frm_fp_rsa_l(FILE *fp, int *line_nr);
237 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
238
239 #if LDNS_BUILD_CONFIG_HAVE_SSL
240
246 DSA *ldns_key_new_frm_fp_dsa(FILE *fp);
247 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
248
249 #if LDNS_BUILD_CONFIG_HAVE_SSL
250
257 DSA *ldns_key_new_frm_fp_dsa_l(FILE *fp, int *line_nr);
258 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
259
260 #if LDNS_BUILD_CONFIG_HAVE_SSL
261
269 unsigned char *ldns_key_new_frm_fp_hmac(FILE *fp, size_t *hmac_size);
270 #endif
271
272 #if LDNS_BUILD_CONFIG_HAVE_SSL
273
282 unsigned char *ldns_key_new_frm_fp_hmac_l(FILE *fp, int *line_nr, size_t *hmac_size);
283 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
284
285 /* acces write functions */
291 void ldns_key_set_algorithm(ldns_key *k, ldns_signing_algorithm l);
292 #if LDNS_BUILD_CONFIG_HAVE_SSL
293
298 void ldns_key_set_evp_key(ldns_key *k, EVP_PKEY *e);
299
306 void ldns_key_set_rsa_key(ldns_key *k, RSA *r);
307
314 void ldns_key_set_dsa_key(ldns_key *k, DSA *d);
315
322 void ldns_key_assign_rsa_key(ldns_key *k, RSA *r);
323
330 void ldns_key_assign_dsa_key(ldns_key *k, DSA *d);
331
337 int ldns_key_EVP_load_gost_id(void);
338
340 void ldns_key_EVP_unload_gost(void);
341 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
342
348 void ldns_key_set_hmac_key(ldns_key *k, unsigned char *hmac);
349
360 void ldns_key_set_external_key(ldns_key *key, void *external_key);
361
367 void ldns_key_set_hmac_size(ldns_key *k, size_t hmac_size);
373 void ldns_key_set_origttl(ldns_key *k, uint32_t t);
379 void ldns_key_set_inception(ldns_key *k, uint32_t i);
385 void ldns_key_set_expiration(ldns_key *k, uint32_t e);
391 void ldns_key_set_pubkey_owner(ldns_key *k, ldns_rdf *r);
397 void ldns_key_set_keytag(ldns_key *k, uint16_t tag);
403 void ldns_key_set_flags(ldns_key *k, uint16_t flags);
409 void ldns_key_list_set_key_count(ldns_key_list *key, size_t count);
410
417 bool ldns_key_list_push_key(ldns_key_list *key_list, ldns_key *key);
418
424 size_t ldns_key_list_key_count(const ldns_key_list *key_list);
425
432 ldns_key *ldns_key_list_key(const ldns_key_list *key, size_t nr);
433
434 #if LDNS_BUILD_CONFIG_HAVE_SSL
435
440 RSA *ldns_key_rsa_key(const ldns_key *k);
446 EVP_PKEY *ldns_key_evp_key(const ldns_key *k);
447 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
448
452 #if LDNS_BUILD_CONFIG_HAVE_SSL
453 DSA *ldns_key_dsa_key(const ldns_key *k);
454 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
455
461 ldns_signing_algorithm ldns_key_algorithm(const ldns_key *k);
467 void ldns_key_set_use(ldns_key *k, bool v);
473 bool ldns_key_use(const ldns_key *k);
479 unsigned char *ldns_key_hmac_key(const ldns_key *k);
485 void *ldns_key_external_key(const ldns_key *k);
491 size_t ldns_key_hmac_size(const ldns_key *k);
497 uint32_t ldns_key_origttl(const ldns_key *k);
503 uint32_t ldns_key_inception(const ldns_key *k);
509 uint32_t ldns_key_expiration(const ldns_key *k);
515 uint16_t ldns_key_keytag(const ldns_key *k);
521 ldns_rdf *ldns_key_pubkey_owner(const ldns_key *k);
527 void
528 ldns_key_list_set_use(ldns_key_list *keys, bool v);
529
535 uint16_t ldns_key_flags(const ldns_key *k);
536
542 ldns_key *ldns_key_list_pop_key(ldns_key_list *key_list);
543
553 ldns_rr *ldns_key2rr(const ldns_key *k);
554
561 void ldns_key_print(FILE *output, const ldns_key *k);
562
568 void ldns_key_free(ldns_key *key);
569
576 void ldns_key_deep_free(ldns_key *key);
577
582 void ldns_key_list_free(ldns_key_list *key_list);
583
589 ldns_rr * ldns_read_anchor_file(const char *filename);
590
601 char *ldns_key_get_file_base_name(ldns_key *key);
602
608 int ldns_key_algo_supported(int algo);
609
615 ldns_signing_algorithm ldns_get_signing_algorithm_by_name(const char* name);
616
617 #ifdef __cplusplus
618 }
619 #endif
620
621 #endif /* LDNS_KEYS_H */
LDNS_SIGN_RSASHA256
Definition: keys.h:85
LDNS_SIGN_ECDSAP256SHA256
Definition: keys.h:89
ldns_key_origttl
uint32_t ldns_key_origttl(const ldns_key *k)
return the original ttl of the key
Definition: keys.c:1176
ldns_key_new_frm_fp_l
ldns_status ldns_key_new_frm_fp_l(ldns_key **k, FILE *fp, int *line_nr)
Creates a new private key based on the contents of the file pointed by fp.
Definition: keys.c:291
ldns_key_inception
uint32_t ldns_key_inception(const ldns_key *k)
return the key&#39;s inception date
Definition: keys.c:1188
ldns_struct_key::key
unsigned char * key
Definition: keys.h:125
ldns_key_new_frm_engine
ldns_status ldns_key_new_frm_engine(ldns_key **key, ENGINE *e, char *key_id, ldns_algorithm)
Read the key with the given id from the given engine and store it in the given ldns_key structure...
Definition: keys.c:93
ldns_read_anchor_file
ldns_rr * ldns_read_anchor_file(const char *filename)
Instantiates a DNSKEY or DS RR from file.
Definition: keys.c:1605
ldns_struct_key::orig_ttl
uint32_t orig_ttl
The TTL of the rrset that is currently signed.
Definition: keys.h:138
LDNS_RSASHA256
Definition: keys.h:53
ldns_key_new_frm_fp_dsa_l
DSA * ldns_key_new_frm_fp_dsa_l(FILE *fp, int *line_nr)
frm_fp helper function.
LDNS_PRIVATEDNS
Definition: keys.h:59
LDNS_SIGN_DSA_NSEC3
Definition: keys.h:87
LDNS_RSASHA1_NSEC3
Definition: keys.h:52
ldns_struct_key::keytag
uint16_t keytag
The keytag of this key.
Definition: keys.h:144
LDNS_RSAMD5
Definition: keys.h:46
ldns_key_hmac_key
unsigned char * ldns_key_hmac_key(const ldns_key *k)
return the hmac key data
Definition: keys.c:1150
ldns_key_assign_rsa_key
void ldns_key_assign_rsa_key(ldns_key *k, RSA *r)
Assign the key&#39;s rsa data The rsa data will be freed automatically when the key is freed...
Definition: keys.c:1014
ldns_struct_key::flags
uint16_t flags
The dnssec key flags as specified in RFC4035, like ZSK and KSK.
Definition: keys.h:146
ldns_key_get_file_base_name
char * ldns_key_get_file_base_name(ldns_key *key)
Returns the &#39;default base name&#39; for key files; IE.
Definition: keys.c:1657
ldns_key_free
void ldns_key_free(ldns_key *key)
frees a key structure, but not its internal data structures
Definition: keys.c:1569
LDNS_SIGN_ECC_GOST
Definition: keys.h:88
ldns_enum_algorithm
ldns_enum_algorithm
Algorithms used in dns.
Definition: keys.h:44
ldns_key_list_set_key_count
void ldns_key_list_set_key_count(ldns_key_list *key, size_t count)
Set the keylist&#39;s key count to count.
Definition: keys.c:1223
ldns_key_rsa_key
RSA * ldns_key_rsa_key(const ldns_key *k)
returns the (openssl) RSA struct contained in the key
Definition: keys.c:1128
ldns_struct_key_list::_keys
ldns_key ** _keys
Definition: keys.h:160
ldns_key_set_pubkey_owner
void ldns_key_set_pubkey_owner(ldns_key *k, ldns_rdf *r)
Set the key&#39;s pubkey owner.
Definition: keys.c:1068
ldns_key_algo_supported
int ldns_key_algo_supported(int algo)
See if a key algorithm is supported.
Definition: keys.c:1674
LDNS_DSA
Definition: keys.h:48
ldns_key_pubkey_owner
ldns_rdf * ldns_key_pubkey_owner(const ldns_key *k)
return the public key&#39;s owner
Definition: keys.c:1206
LDNS_SHA384
Definition: keys.h:72
ldns_key_use
signed char ldns_key_use(const ldns_key *k)
return the use flag
Definition: keys.c:1111
ldns_hash
enum ldns_enum_hash ldns_hash
Definition: keys.h:74
ldns_struct_key::external_key
void * external_key
the key structure can also just point to some external key data
Definition: keys.h:131
ldns_struct_key::_key
struct ldns_struct_key::@0 _key
Storage pointers for the types of keys supported.
LDNS_SIGN_RSASHA1
Definition: keys.h:82
ldns_key_set_hmac_size
void ldns_key_set_hmac_size(ldns_key *k, size_t hmac_size)
Set the key&#39;s hmac size.
Definition: keys.c:1038
ldns_key_new_frm_fp_dsa
DSA * ldns_key_new_frm_fp_dsa(FILE *fp)
frm_fp helper function.
Definition: keys.c:665
ldns_key_list_key
ldns_key * ldns_key_list_key(const ldns_key_list *key, size_t nr)
returns a pointer to the key in the list at the given position
Definition: keys.c:1087
ldns_struct_key::expiration
uint32_t expiration
The expiration date of signatures made with this key.
Definition: keys.h:142
ldns_struct_key::key
EVP_PKEY * key
Definition: keys.h:118
ldns_key_new_frm_fp_rsa_l
RSA * ldns_key_new_frm_fp_rsa_l(FILE *fp, int *line_nr)
frm_fp helper function.
Definition: keys.c:528
ldns_enum_hash
ldns_enum_hash
Hashing algorithms used in the DS record.
Definition: keys.h:67
ldns_struct_rr
Resource Record.
Definition: rr.h:299
ldns_key_set_external_key
void ldns_key_set_external_key(ldns_key *key, void *external_key)
Set the key id data.
Definition: keys.c:1044
LDNS_SHA256
Definition: keys.h:70
ldns_key_new
ldns_key * ldns_key_new(void)
Creates a new empty key structure.
Definition: keys.c:60
ldns_key_set_hmac_key
void ldns_key_set_hmac_key(ldns_key *k, unsigned char *hmac)
Set the key&#39;s hmac data.
Definition: keys.c:1032
ldns_key2rr
ldns_rr * ldns_key2rr(const ldns_key *k)
converts a ldns_key to a public key rr If the key data exists at an external point, the corresponding rdata field must still be added with ldns_rr_rdf_push() to the result rr of this function
Definition: keys.c:1370
ldns_struct_key::size
size_t size
Definition: keys.h:126
ldns_struct_key::_use
signed char _use
Whether to use this key when signing.
Definition: keys.h:110
ldns_struct_key
General key structure, can contain all types of keys that are used in DNSSEC.
Definition: keys.h:107
LDNS_SIGN_HMACSHA256
Definition: keys.h:93
ldns_key_new_frm_algorithm
ldns_key * ldns_key_new_frm_algorithm(ldns_signing_algorithm a, uint16_t size)
Creates a new key based on the algorithm.
Definition: keys.c:819
ldns_key_list_key_count
size_t ldns_key_list_key_count(const ldns_key_list *key_list)
returns the number of keys in the key list
Definition: keys.c:1081
LDNS_RSASHA1
Definition: keys.h:50
ldns_key_set_expiration
void ldns_key_set_expiration(ldns_key *k, uint32_t e)
Set the key&#39;s expiration date (seconds after epoch)
Definition: keys.c:1062
ldns_signing_algorithm
enum ldns_enum_signing_algorithm ldns_signing_algorithm
Definition: keys.h:95
ldns_key_assign_dsa_key
void ldns_key_assign_dsa_key(ldns_key *k, DSA *d)
Assign the key&#39;s dsa data The dsa data will be freed automatically when the key is freed...
Definition: keys.c:1022
ldns_key_flags
uint16_t ldns_key_flags(const ldns_key *k)
return the flag of the key
Definition: keys.c:1182
ldns_key_print
void ldns_key_print(FILE *output, const ldns_key *k)
print a private key to the file ouput
Definition: keys.c:965
ldns_key_set_rsa_key
void ldns_key_set_rsa_key(ldns_key *k, RSA *r)
Set the key&#39;s rsa data.
Definition: keys.c:998
ldns_struct_key::dnssec
struct ldns_struct_key::@1::@3 dnssec
Some values that influence generated signatures.
ldns_struct_key::inception
uint32_t inception
The inception date of signatures made with this key.
Definition: keys.h:140
ldns_struct_key::_pubkey_owner
ldns_rdf * _pubkey_owner
Owner name of the key.
Definition: keys.h:150
ldns_signing_algorithms
ldns_lookup_table ldns_signing_algorithms[]
Definition: keys.c:23
ldns_key_list_new
ldns_key_list * ldns_key_list_new(void)
Creates a new empty key list.
Definition: keys.c:47
ldns_struct_key::_extra
union ldns_struct_key::@1 _extra
Depending on the key we can have extra data.
ldns_struct_key_list
Same as rr_list, but now for keys.
Definition: keys.h:157
ldns_key_EVP_load_gost_id
int ldns_key_EVP_load_gost_id(void)
Get the PKEY id for GOST, loads GOST into openssl as a side effect.
Definition: keys.c:121
ldns_key_set_use
void ldns_key_set_use(ldns_key *k, signed char v)
set the use flag
ldns_key_external_key
void * ldns_key_external_key(const ldns_key *k)
return the key id key data
Definition: keys.c:1170
util.h
ldns_key_hmac_size
size_t ldns_key_hmac_size(const ldns_key *k)
return the hmac key size
Definition: keys.c:1160
LDNS_SIGN_HMACSHA1
Definition: keys.h:92
LDNS_SIGN_RSASHA512
Definition: keys.h:86
ldns_key_algorithm
ldns_signing_algorithm ldns_key_algorithm(const ldns_key *k)
return the signing alg of the key
Definition: keys.c:1097
ldns_get_signing_algorithm_by_name
ldns_signing_algorithm ldns_get_signing_algorithm_by_name(const char *name)
Get signing algorithm by name.
Definition: keys.c:1685
ldns_status
enum ldns_enum_status ldns_status
Definition: error.h:131
LDNS_DH
Definition: keys.h:47
LDNS_SIGN_RSAMD5
Definition: keys.h:81
ldns_struct_lookup_table
A general purpose lookup table.
Definition: util.h:156
ldns_key_new_frm_fp_hmac
unsigned char * ldns_key_new_frm_fp_hmac(FILE *fp, size_t *hmac_size)
frm_fp helper function.
Definition: keys.c:752
LDNS_ECDSAP384SHA384
Definition: keys.h:57
ldns_struct_key::_alg
ldns_signing_algorithm _alg
Definition: keys.h:108
LDNS_HASH_GOST
Definition: keys.h:71
ldns_key_list_push_key
signed char ldns_key_list_push_key(ldns_key_list *key_list, ldns_key *key)
pushes a key to a keylist
Definition: keys.c:1229
LDNS_SHA1
Definition: keys.h:69
ldns_key_set_inception
void ldns_key_set_inception(ldns_key *k, uint32_t i)
Set the key&#39;s inception date (seconds after epoch)
Definition: keys.c:1056
LDNS_SIGN_RSASHA1_NSEC3
Definition: keys.h:84
ldns_key_list_set_use
void ldns_key_list_set_use(ldns_key_list *keys, signed char v)
Set the &#39;use&#39; flag for all keys in the list.
LDNS_RSASHA512
Definition: keys.h:54
ldns_key_set_dsa_key
void ldns_key_set_dsa_key(ldns_key *k, DSA *d)
Set the key&#39;s dsa data The dsa data should be freed by the user.
Definition: keys.c:1006
ldns_key_expiration
uint32_t ldns_key_expiration(const ldns_key *k)
return the key&#39;s expiration date
Definition: keys.c:1194
ldns_struct_key_list::_key_count
size_t _key_count
Definition: keys.h:159
LDNS_SIGN_DSA
Definition: keys.h:83
LDNS_INDIRECT
Definition: keys.h:58
ldns_key_set_keytag
void ldns_key_set_keytag(ldns_key *k, uint16_t tag)
Set the key&#39;s key tag.
Definition: keys.c:1074
ldns_key_list_free
void ldns_key_list_free(ldns_key_list *key_list)
Frees a key list structure.
Definition: keys.c:1594
ldns_key_set_evp_key
void ldns_key_set_evp_key(ldns_key *k, EVP_PKEY *e)
Set the key&#39;s evp key.
Definition: keys.c:992
ldns_key_dsa_key
DSA * ldns_key_dsa_key(const ldns_key *k)
returns the (openssl) DSA struct contained in the key
Definition: keys.c:1138
ldns_struct_rdf
Resource record data field.
Definition: rdata.h:166
LDNS_ECDSAP256SHA256
Definition: keys.h:56
common.h
Common definitions for LDNS.
ldns_key_deep_free
void ldns_key_deep_free(ldns_key *key)
frees a key structure and all its internal data structures, except the data set by ldns_key_set_exter...
Definition: keys.c:1575
ldns_enum_signing_algorithm
ldns_enum_signing_algorithm
Algorithms used in dns for signing.
Definition: keys.h:79
LDNS_DSA_NSEC3
Definition: keys.h:51
LDNS_SIGN_ECDSAP384SHA384
Definition: keys.h:90
ldns_key_new_frm_fp_hmac_l
unsigned char * ldns_key_new_frm_fp_hmac_l(FILE *fp, int *line_nr, size_t *hmac_size)
frm_fp helper function.
ldns_key_evp_key
EVP_PKEY * ldns_key_evp_key(const ldns_key *k)
returns the (openssl) EVP struct contained in the key
Definition: keys.c:1122
LDNS_SIGN_HMACMD5
Definition: keys.h:91
ldns_key_EVP_unload_gost
void ldns_key_EVP_unload_gost(void)
Release the engine reference held for the GOST engine.
Definition: keys.c:169
ldns_key_list_pop_key
ldns_key * ldns_key_list_pop_key(ldns_key_list *key_list)
pops the last rr from a keylist
Definition: keys.c:1252
LDNS_PRIVATEOID
Definition: keys.h:60
ldns_struct_key::hmac
struct ldns_struct_key::@0::@2 hmac
The key can be an HMAC key.
ldns_key_new_frm_fp_rsa
RSA * ldns_key_new_frm_fp_rsa(FILE *fp)
frm_fp helper function.
Definition: keys.c:522
ldns_key_set_algorithm
void ldns_key_set_algorithm(ldns_key *k, ldns_signing_algorithm l)
Set the key&#39;s algorithm.
Definition: keys.c:978
LDNS_ECC
Definition: keys.h:49
ldns_key_set_origttl
void ldns_key_set_origttl(ldns_key *k, uint32_t t)
Set the key&#39;s original ttl.
Definition: keys.c:1050
ldns_key_new_frm_fp
ldns_status ldns_key_new_frm_fp(ldns_key **k, FILE *fp)
Creates a new priv key based on the contents of the file pointed by fp.
Definition: keys.c:86
LDNS_ECC_GOST
Definition: keys.h:55
ldns_key_set_flags
void ldns_key_set_flags(ldns_key *k, uint16_t flags)
Set the key&#39;s flags.
Definition: keys.c:984
ldns_algorithm
enum ldns_enum_algorithm ldns_algorithm
Definition: keys.h:62
ldns_key_keytag
uint16_t ldns_key_keytag(const ldns_key *k)
return the keytag
Definition: keys.c:1200