nsec3params.h
Go to the documentation of this file.
/*
* Copyright (c) 2009 NLNet Labs. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef SIGNER_NSEC3PARAMS_H
#define SIGNER_NSEC3PARAMS_H
#include "config.h"
#include <ctype.h>
#include <stdint.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <ldns/ldns.h>
typedef struct nsec3params_struct nsec3params_type;
#include "status.h"
#include "signconf.h"
struct nsec3params_struct {
signconf_type* sc;
uint8_t algorithm;
uint8_t flags;
uint16_t iterations;
uint8_t salt_len;
uint8_t* salt_data;
ldns_rr* rr;
};
ods_status nsec3params_create_salt(const char* salt_str, uint8_t* salt_len,
uint8_t** salt);
nsec3params_type* nsec3params_create(void* sc, uint8_t algo, uint8_t flags,
uint16_t iter, const char* salt);
void nsec3params_backup(FILE* fd, uint8_t algo, uint8_t flags,
uint16_t iter, const char* salt, ldns_rr* rr, const char* version);
void nsec3params_cleanup(nsec3params_type* nsec3params);
#endif /* SIGNER_NSEC3PARAMS_H */
nsec3params_struct::algorithm
uint8_t algorithm
Definition: nsec3params.h:49
nsec3params_struct::iterations
uint16_t iterations
Definition: nsec3params.h:51
signconf_struct
Definition: signconf.h:41
nsec3params_cleanup
void nsec3params_cleanup(nsec3params_type *nsec3params)
Definition: nsec3params.c:165
signconf.h
nsec3params_create_salt
ods_status nsec3params_create_salt(const char *salt_str, uint8_t *salt_len, uint8_t **salt)
Definition: nsec3params.c:52
nsec3params_create
nsec3params_type * nsec3params_create(void *sc, uint8_t algo, uint8_t flags, uint16_t iter, const char *salt)
Definition: nsec3params.c:103
nsec3params_struct::flags
uint8_t flags
Definition: nsec3params.h:50
nsec3params_struct::salt_data
uint8_t * salt_data
Definition: nsec3params.h:53
nsec3params_backup
void nsec3params_backup(FILE *fd, uint8_t algo, uint8_t flags, uint16_t iter, const char *salt, ldns_rr *rr, const char *version)
Definition: nsec3params.c:141
nsec3params_struct::salt_len
uint8_t salt_len
Definition: nsec3params.h:52
nsec3params_struct::rr
ldns_rr * rr
Definition: nsec3params.h:54
nsec3params_struct
Definition: nsec3params.h:47
nsec3params_struct::sc
signconf_type * sc
Definition: nsec3params.h:48