hsm_key_factory.h
Go to the documentation of this file.
/*
* Copyright (c) 2014 .SE (The Internet Infrastructure Foundation).
* Copyright (c) 2014 OpenDNSSEC AB (svb)
* 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 _HSM_KEY_FACTORY_H_
#define _HSM_KEY_FACTORY_H_
#include "db/hsm_key.h"
#include "db/policy_key.h"
#include "daemon/engine.h"
#include <time.h>
extern void hsm_key_factory_deinit(void);
int hsm_key_factory_generate(engine_type* engine,
const db_connection_t* connection, const policy_t* policy, const policy_key_t* policy_key,
time_t duration);
int hsm_key_factory_generate_policy(engine_type* engine,
const db_connection_t* connection, const policy_t* policy, time_t duration);
int hsm_key_factory_generate_all(engine_type* engine,
const db_connection_t* connection, time_t duration);
int hsm_key_factory_schedule_generate_policy(engine_type* engine,
const policy_t* policy_orig, time_t duration);
int hsm_key_factory_schedule_generate_all(engine_type* engine, time_t duration);
extern hsm_key_t* hsm_key_factory_get_key(engine_type* engine,
const db_connection_t* connection, const policy_key_t* policy_key,
hsm_key_state_t hsm_key_state);
extern int hsm_key_factory_release_key_id(const db_value_t* hsm_key_id,
const db_connection_t* connection);
extern int hsm_key_factory_release_key(hsm_key_t* hsm_key,
const db_connection_t* connection);
extern int hsm_key_factory_delete_key(const db_connection_t* connection);
#endif /* _HSM_KEY_FACTORY_H_ */
db_connection_t
struct db_connection db_connection_t
Definition db_connection.h:34
db_value_t
struct db_value db_value_t
Definition db_value.h:35
engine.h
engine_type
struct engine_struct engine_type
Definition engine.h:38
hsm_key_id
const db_value_t * hsm_key_id(const hsm_key_t *hsm_key)
Definition hsm_key.c:504
hsm_key.h
hsm_key_state_t
enum hsm_key_state hsm_key_state_t
hsm_key_state
hsm_key_state
Definition hsm_key.h:40
hsm_key_t
struct hsm_key hsm_key_t
Definition hsm_key.h:37
hsm_key_factory_schedule_generate_policy
int hsm_key_factory_schedule_generate_policy(engine_type *engine, const policy_t *policy_orig, time_t duration)
Definition hsm_key_factory.c:560
hsm_key_factory_generate
int hsm_key_factory_generate(engine_type *engine, const db_connection_t *connection, const policy_t *policy, const policy_key_t *policy_key, time_t duration)
Definition hsm_key_factory.c:94
hsm_key_factory_delete_key
int hsm_key_factory_delete_key(const db_connection_t *connection)
Definition hsm_key_factory.c:810
hsm_key_factory_release_key_id
int hsm_key_factory_release_key_id(const db_value_t *hsm_key_id, const db_connection_t *connection)
Definition hsm_key_factory.c:704
hsm_key_factory_generate_all
int hsm_key_factory_generate_all(engine_type *engine, const db_connection_t *connection, time_t duration)
Definition hsm_key_factory.c:386
hsm_key_factory_generate_policy
int hsm_key_factory_generate_policy(engine_type *engine, const db_connection_t *connection, const policy_t *policy, time_t duration)
Definition hsm_key_factory.c:346
hsm_key_factory_deinit
void hsm_key_factory_deinit(void)
Definition hsm_key_factory.c:84
hsm_key_factory_release_key
int hsm_key_factory_release_key(hsm_key_t *hsm_key, const db_connection_t *connection)
Definition hsm_key_factory.c:763
hsm_key_factory_schedule_generate_all
int hsm_key_factory_schedule_generate_all(engine_type *engine, time_t duration)
Definition hsm_key_factory.c:598
hsm_key_factory_get_key
hsm_key_t * hsm_key_factory_get_key(engine_type *engine, const db_connection_t *connection, const policy_key_t *policy_key, hsm_key_state_t hsm_key_state)
Definition hsm_key_factory.c:629
policy_t
struct policy policy_t
Definition policy.h:37
policy_key.h
policy_key_t
struct policy_key policy_key_t
Definition policy_key.h:37
hsm_key
Definition hsm_key.h:79
policy_key
Definition policy_key.h:54
policy
Definition policy.h:60