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>
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);
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);
int hsm_key_factory_release_key_id(const db_value_t* hsm_key_id,
const db_connection_t* connection);
int hsm_key_factory_release_key(hsm_key_t* hsm_key,
const db_connection_t* connection);
#endif /* _HSM_KEY_FACTORY_H_ */
hsm_key_factory_deinit
void hsm_key_factory_deinit(void)
Definition: hsm_key_factory.c:82
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:619
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:694
engine.h
__hsm_key_factory_task::duration
time_t duration
Definition: hsm_key_factory.c:55
hsm_key_factory_schedule_generate_all
int hsm_key_factory_schedule_generate_all(engine_type *engine, time_t duration)
Definition: hsm_key_factory.c:588
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:92
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:336
db_value
Definition: db_value.h:48
hsm_key
Definition: hsm_key.h:77
hsm_key_state
hsm_key_state
Definition: hsm_key.h:40
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:376
hsm_key_state_t
enum hsm_key_state hsm_key_state_t
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:753
policy_key
Definition: policy_key.h:54
engine_struct
Definition: engine.h:47
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:550
policy
Definition: policy.h:60
__hsm_key_factory_task::engine
engine_type * engine
Definition: hsm_key_factory.c:50
db_connection
Definition: db_connection.h:46
hsm_key.h
hsm_key_id
const db_value_t * hsm_key_id(const hsm_key_t *hsm_key)
Definition: hsm_key.c:504
policy_key.h