Go to the source code of this file.
Data Structures | |
| struct | ldns_struct_key |
| general key structure, can contain all types of keys More... | |
| struct | ldns_struct_key_list |
| same as rr_list, but now for keys More... | |
Defines | |
| #define | LDNS_KEY_ZONE_KEY 0x0100 |
| #define | LDNS_KEY_SEP_KEY 0x0001 |
Typedefs | |
| typedef enum ldns_enum_algorithm | ldns_algorithm |
| typedef enum ldns_enum_signing_algorithm | ldns_signing_algorithm |
| typedef ldns_struct_key | ldns_key |
| typedef ldns_struct_key_list | ldns_key_list |
Enumerations | |
| enum | ldns_enum_algorithm { LDNS_RSAMD5 = 1, LDNS_DH = 2, LDNS_DSA = 3, LDNS_ECC = 4, LDNS_RSASHA1 = 5, LDNS_INDIRECT = 252, LDNS_PRIVATEDNS = 253, LDNS_PRIVATEOID = 254 } |
| algorithms used in dns More... | |
| enum | ldns_enum_signing_algorithm { LDNS_SIGN_RSAMD5 = LDNS_RSAMD5, LDNS_SIGN_RSASHA1 = LDNS_RSASHA1, LDNS_SIGN_DSA = LDNS_DSA, LDNS_SIGN_HMACMD5 = 150 } |
| algorithms used in dns for signing More... | |
Functions | |
| ldns_key_list * | ldns_key_list_new () |
| creates a new empty key list | |
| ldns_key * | ldns_key_new () |
| creates a new empty key structure | |
| ldns_key * | ldns_key_new_frm_algorithm (ldns_signing_algorithm a, uint16_t size) |
| creates a new key based on the algorithm | |
| ldns_key * | ldns_key_new_frm_fp (FILE *fp) |
| creates a new priv key based on the contents of the file pointed by fp | |
| ldns_key * | ldns_key_new_frm_fp_l (FILE *fp, int *line_nr) |
| creates a new priv key based on the contents of the file pointed by fp | |
| RSA * | ldns_key_new_frm_fp_rsa (FILE *fp) |
| frm_fp helper function. | |
| RSA * | ldns_key_new_frm_fp_rsa_l (FILE *fp, int *line_nr) |
| frm_fp helper function. | |
| DSA * | ldns_key_new_frm_fp_dsa (FILE *fp) |
| frm_fp helper function. | |
| DSA * | ldns_key_new_frm_fp_dsa_l (FILE *fp, int *line_nr) |
| frm_fp helper function. | |
| void | ldns_key_set_algorithm (ldns_key *k, ldns_signing_algorithm l) |
| void | ldns_key_set_rsa_key (ldns_key *k, RSA *r) |
| void | ldns_key_set_dsa_key (ldns_key *k, DSA *d) |
| void | ldns_key_set_hmac_key (ldns_key *k, unsigned char *hmac) |
| void | ldns_key_set_origttl (ldns_key *k, uint32_t t) |
| void | ldns_key_set_inception (ldns_key *k, uint32_t i) |
| void | ldns_key_set_expiration (ldns_key *k, uint32_t e) |
| void | ldns_key_set_pubkey_owner (ldns_key *k, ldns_rdf *r) |
| void | ldns_key_set_keytag (ldns_key *k, uint16_t tag) |
| void | ldns_key_set_flags (ldns_key *k, uint16_t flags) |
| void | ldns_key_list_set_key_count (ldns_key_list *key, size_t count) |
| bool | ldns_key_list_push_key (ldns_key_list *key_list, ldns_key *key) |
| pushes a key to a keylist | |
| size_t | ldns_key_list_key_count (ldns_key_list *key_list) |
| returns the number of keys in the key list | |
| ldns_key * | ldns_key_list_key (ldns_key_list *key, size_t nr) |
| returns a pointer to the key in the list at the given position | |
| RSA * | ldns_key_rsa_key (ldns_key *k) |
| returns the (openssl) RSA struct contained in the key | |
| DSA * | ldns_key_dsa_key (ldns_key *k) |
| returns the (openssl) DSA struct contained in the key | |
| ldns_signing_algorithm | ldns_key_algorithm (ldns_key *k) |
| unsigned char * | ldns_key_hmac_key (ldns_key *k) |
| uint32_t | ldns_key_origttl (ldns_key *k) |
| uint32_t | ldns_key_inception (ldns_key *k) |
| uint32_t | ldns_key_expiration (ldns_key *k) |
| uint16_t | ldns_key_keytag (ldns_key *k) |
| ldns_rdf * | ldns_key_pubkey_owner (ldns_key *k) |
| uint16_t | ldns_key_flags (ldns_key *k) |
| ldns_key * | ldns_key_list_pop_key (ldns_key_list *key_list) |
| pops the last rr from a keylist | |
| ldns_rr * | ldns_key2rr (ldns_key *k) |
| converts a ldns_key to a public key rr | |
| void | ldns_key_print (FILE *output, ldns_key *k) |
| print a private key to the file ouput | |
| void | ldns_key_free (ldns_key *key) |
| frees a key structure | |
| void | ldns_key_deep_free (ldns_key *key) |
| frees a key structure and all it's internal data | |
| void | ldns_key_list_free (ldns_key_list *key_list) |
| Frees a key list structure. | |
Variables | |
| ldns_lookup_table | ldns_signing_algorithms [] |
| typedef enum ldns_enum_algorithm ldns_algorithm |
| typedef struct ldns_struct_key ldns_key |
| typedef struct ldns_struct_key_list ldns_key_list |
| typedef enum ldns_enum_signing_algorithm ldns_signing_algorithm |
| enum ldns_enum_algorithm |
converts a ldns_key to a public key rr
| [in] | k | the ldns_key to convert |
| ldns_signing_algorithm ldns_key_algorithm | ( | ldns_key * | k | ) |
| void ldns_key_deep_free | ( | ldns_key * | key | ) |
frees a key structure and all it's internal data
| [in] | key | the key object to free |
| DSA* ldns_key_dsa_key | ( | ldns_key * | k | ) |
returns the (openssl) DSA struct contained in the key
| uint32_t ldns_key_expiration | ( | ldns_key * | k | ) |
| uint16_t ldns_key_flags | ( | ldns_key * | k | ) |
| void ldns_key_free | ( | ldns_key * | key | ) |
frees a key structure
| [in] | key | the key object to free |
| unsigned char* ldns_key_hmac_key | ( | ldns_key * | k | ) |
| uint32_t ldns_key_inception | ( | ldns_key * | k | ) |
| uint16_t ldns_key_keytag | ( | ldns_key * | k | ) |
| void ldns_key_list_free | ( | ldns_key_list * | key_list | ) |
Frees a key list structure.
| [in] | key_list | the key list object to free |
| ldns_key* ldns_key_list_key | ( | ldns_key_list * | key, | |
| size_t | nr | |||
| ) |
returns a pointer to the key in the list at the given position
| size_t ldns_key_list_key_count | ( | ldns_key_list * | key_list | ) |
returns the number of keys in the key list
| ldns_key_list* ldns_key_list_new | ( | ) |
creates a new empty key list
| ldns_key* ldns_key_list_pop_key | ( | ldns_key_list * | key_list | ) |
pops the last rr from a keylist
| [in] | key_list | the rr_list to pop from |
| bool ldns_key_list_push_key | ( | ldns_key_list * | key_list, | |
| ldns_key * | key | |||
| ) |
pushes a key to a keylist
| [in] | key_list | the key_list to push to |
| [in] | key | the key to push |
| void ldns_key_list_set_key_count | ( | ldns_key_list * | key, | |
| size_t | count | |||
| ) |
| ldns_key* ldns_key_new | ( | ) |
creates a new empty key structure
| ldns_key* ldns_key_new_frm_algorithm | ( | ldns_signing_algorithm | a, | |
| uint16_t | size | |||
| ) |
creates a new key based on the algorithm
| [in] | a | The algorithm to use |
| [in] | size | the number of bytes for the keysize |
| ldns_key* ldns_key_new_frm_fp | ( | FILE * | fp | ) |
creates a new priv key based on the contents of the file pointed by fp
| [in] | fp | the file pointer to use |
| DSA* ldns_key_new_frm_fp_dsa | ( | FILE * | fp | ) |
frm_fp helper function.
This function parsed the remainder of the (DSA) priv. key file generated from bind9
| [in] | fp | the file to parse |
| DSA* ldns_key_new_frm_fp_dsa_l | ( | FILE * | fp, | |
| int * | line_nr | |||
| ) |
frm_fp helper function.
This function parsed the remainder of the (DSA) priv. key file generated from bind9
| [in] | fp | the file to parse |
| [in] | line_nr | pointer to an integer containing the current line number (for debugging purposes) |
| ldns_key* ldns_key_new_frm_fp_l | ( | FILE * | fp, | |
| int * | line_nr | |||
| ) |
creates a new priv key based on the contents of the file pointed by fp
| [in] | fp | the file pointer to use |
| [in] | line_nr | pointer to an integer containing the current line number (for debugging purposes) |
| RSA* ldns_key_new_frm_fp_rsa | ( | FILE * | fp | ) |
frm_fp helper function.
This function parsed the remainder of the (RSA) priv. key file generated from bind9
| [in] | fp | the file to parse |
| RSA* ldns_key_new_frm_fp_rsa_l | ( | FILE * | fp, | |
| int * | line_nr | |||
| ) |
frm_fp helper function.
This function parsed the remainder of the (RSA) priv. key file generated from bind9
| [in] | fp | the file to parse |
| [in] | line_nr | pointer to an integer containing the current line number (for debugging purposes) |
| uint32_t ldns_key_origttl | ( | ldns_key * | k | ) |
| void ldns_key_print | ( | FILE * | output, | |
| ldns_key * | k | |||
| ) |
print a private key to the file ouput
| [in] | output | the FILE descriptor where to print to |
| [in] | k | the ldns_key to print |
| RSA* ldns_key_rsa_key | ( | ldns_key * | k | ) |
returns the (openssl) RSA struct contained in the key
| void ldns_key_set_algorithm | ( | ldns_key * | k, | |
| ldns_signing_algorithm | l | |||
| ) |
| void ldns_key_set_dsa_key | ( | ldns_key * | k, | |
| DSA * | d | |||
| ) |
| void ldns_key_set_expiration | ( | ldns_key * | k, | |
| uint32_t | e | |||
| ) |
| void ldns_key_set_flags | ( | ldns_key * | k, | |
| uint16_t | flags | |||
| ) |
| void ldns_key_set_hmac_key | ( | ldns_key * | k, | |
| unsigned char * | hmac | |||
| ) |
| void ldns_key_set_inception | ( | ldns_key * | k, | |
| uint32_t | i | |||
| ) |
| void ldns_key_set_keytag | ( | ldns_key * | k, | |
| uint16_t | tag | |||
| ) |
| void ldns_key_set_origttl | ( | ldns_key * | k, | |
| uint32_t | t | |||
| ) |
| void ldns_key_set_rsa_key | ( | ldns_key * | k, | |
| RSA * | r | |||
| ) |
1.5.1