OpenDNSSEC-libhsm  1.3.14
Data Structures | Functions
libhsmdns.h File Reference
#include <ldns/ldns.h>
Include dependency graph for libhsmdns.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hsm_sign_params_t
 

Functions

hsm_sign_params_thsm_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)
 

Function Documentation

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()

Parameters
contextHSM context
keyKey to get DNSKEY RR from
sign_paramsthe signing parameters (flags, algorithm, etc)
Returns
ldns_rr*

Definition at line 2494 of file libhsm.c.

References hsm_sign_params_t::algorithm, hsm_sign_params_t::flags, 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
Parameters
ctxHSM context
nameDomain name to hash
algorithmNSEC3 algorithm (must be 1 atm)
iterationnumber of hash iterations
salt_lengththe length of the salt
saltthe salt

Definition at line 2382 of file libhsm.c.

References CKM_SHA_1, 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.

Parameters
paramsThe signer parameters to free

Definition at line 1958 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 ( )
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()

Parameters
contextHSM context
rrsetRRset to sign
keyKey pair used to sign
Returns
ldns_rr* Signed RRset

Definition at line 2276 of file libhsm.c.

References hsm_sign_params_t::algorithm.

Referenced by main(), and sign().

int hsm_supported_algorithm ( ldns_algorithm  algorithm)
Check if a given DNSSEC algorithm is supported
Parameters
ldns_algorithmalgorithm number
Returns
0 if supported, -1 otherwise

Definition at line 2668 of file libhsm.c.