OpenDNSSEC-libhsm
1.4.1
|
#include <ldns/ldns.h>
Go to the source code of this file.
Data Structures | |
struct | hsm_sign_params_t |
Functions | |
hsm_sign_params_t * | hsm_sign_params_new () |
void | hsm_sign_params_free (hsm_sign_params_t *params) |
ldns_rr * | hsm_sign_rrset (hsm_ctx_t *ctx, const ldns_rr_list *rrset, const hsm_key_t *key, const hsm_sign_params_t *sign_params) |
ldns_rdf * | hsm_nsec3_hash_name (hsm_ctx_t *ctx, ldns_rdf *name, uint8_t algorithm, uint16_t iterations, uint8_t salt_length, uint8_t *salt) |
ldns_rr * | hsm_get_dnskey (hsm_ctx_t *ctx, const hsm_key_t *key, const hsm_sign_params_t *sign_params) |
int | hsm_supported_algorithm (ldns_algorithm algorithm) |
ldns_rr* hsm_get_dnskey | ( | hsm_ctx_t * | ctx, |
const hsm_key_t * | key, | ||
const hsm_sign_params_t * | sign_params | ||
) |
Get DNSKEY RR
The returned ldns_rr structure can be freed with ldns_rr_free()
context | HSM context |
key | Key to get DNSKEY RR from |
sign_params | the signing parameters (flags, algorithm, etc) |
Definition at line 2944 of file libhsm.c.
References _hsm_ctx, hsm_sign_params_t::algorithm, hsm_sign_params_t::flags, hsm_ctx_set_error(), and hsm_sign_params_t::owner.
Referenced by cmd_dnskey(), main(), and sign().
ldns_rdf* hsm_nsec3_hash_name | ( | hsm_ctx_t * | ctx, |
ldns_rdf * | name, | ||
uint8_t | algorithm, | ||
uint16_t | iterations, | ||
uint8_t | salt_length, | ||
uint8_t * | salt | ||
) |
Generate a base32 encoded hashed NSEC3 name
ctx | HSM context |
name | Domain name to hash |
algorithm | NSEC3 algorithm (must be 1 atm) |
iteration | number of hash iterations |
salt_length | the length of the salt |
salt | the salt |
Definition at line 2832 of file libhsm.c.
References _hsm_ctx, CKM_SHA_1, hsm_ctx_set_error(), ck_mechanism::mechanism, hsm_ctx_t::session, and hsm_ctx_t::session_count.
void hsm_sign_params_free | ( | hsm_sign_params_t * | params | ) |
Free the signer parameters structure
If params->owner has been set, ldns_rdf_deep_free() will be called on it.
params | The signer parameters to free |
Definition at line 2207 of file libhsm.c.
References hsm_sign_params_t::owner.
Referenced by cmd_dnskey(), main(), and sign().
hsm_sign_params_t* hsm_sign_params_new | ( | ) |
Returns an allocated hsm_sign_params_t with some defaults
Definition at line 2193 of file libhsm.c.
References hsm_sign_params_t::algorithm, hsm_sign_params_t::expiration, hsm_sign_params_t::flags, hsm_sign_params_t::inception, hsm_sign_params_t::keytag, and hsm_sign_params_t::owner.
Referenced by cmd_dnskey(), main(), and sign().
ldns_rr* hsm_sign_rrset | ( | hsm_ctx_t * | ctx, |
const ldns_rr_list * | rrset, | ||
const hsm_key_t * | key, | ||
const hsm_sign_params_t * | sign_params | ||
) |
Sign RRset using key
The returned ldns_rr structure can be freed with ldns_rr_free()
context | HSM context |
rrset | RRset to sign |
key | Key pair used to sign |
Definition at line 2726 of file libhsm.c.
References hsm_sign_params_t::algorithm.