40 omapi_auth_key_reference, omapi_auth_key_dereference,
46 return omapi_auth_key_allocate (o,
file,
line);
58 if (auth_key_hash != NULL)
59 omapi_auth_key_hash_delete(auth_key_hash, a->
name, 0,
MDL);
84 omapi_auth_key_hash_lookup (&tk, auth_key_hash,
87 omapi_auth_key_dereference (&tk,
MDL);
91 omapi_auth_key_hash_delete (auth_key_hash,
93 omapi_auth_key_dereference (&tk,
MDL);
96 if (!omapi_auth_key_new_hash(&auth_key_hash,
98 return ISC_R_NOMEMORY;
110 status = dns_tsec_create(
dhcp_gbl_ctx.mctx, dns_tsectype_tsig,
112 dst_key_free(&dstkey);
115 log_error(
"Unable to create tsec structure for %s", a->
name);
117 omapi_auth_key_hash_add (auth_key_hash, a -> name, 0, a,
MDL);
125 return ISC_R_NOTFOUND;
126 if (!omapi_auth_key_hash_lookup (a, auth_key_hash, name, 0,
MDL))
127 return ISC_R_NOTFOUND;
140 return ISC_R_NOTFOUND;
152 return ISC_R_NOTFOUND;
165 return ISC_R_NOTFOUND;
171 name ->
value -> u.buffer.value,
172 name ->
value -> u.buffer.len,
MDL)) {
175 return ISC_R_NOTFOUND;
183 return ISC_R_NOTFOUND;
212 if (a -> algorithm) {
233 return ISC_R_UNEXPECTED;
241 return ISC_R_NOTFOUND;
249 (&(*value) -> name, name,
MDL);
263 memcpy ((*value) ->
value -> u.buffer.value,
264 a -> key ->
value, a -> key -> len);
267 return ISC_R_NOTFOUND;
273 return ISC_R_NOTFOUND;
isc_result_t omapi_auth_key_enter(omapi_auth_key_t *a)
struct hash omapi_auth_hash_t
isc_result_t omapi_auth_key_destroy(omapi_object_t *h, const char *file, int line)
isc_result_t omapi_auth_key_lookup_name(omapi_auth_key_t **a, const char *name)
isc_result_t omapi_auth_key_lookup(omapi_object_t **h, omapi_object_t *id, omapi_object_t *ref)
isc_result_t omapi_auth_key_get_value(omapi_object_t *h, omapi_object_t *id, omapi_data_string_t *name, omapi_value_t **value)
isc_result_t omapi_auth_key_stuff_values(omapi_object_t *c, omapi_object_t *id, omapi_object_t *h)
unsigned do_case_hash(const void *, unsigned, unsigned)
#define HASH_FUNCTIONS_DECL(name, bufarg, type, hashtype)
#define HASH_FUNCTIONS(name, bufarg, type, hashtype, ref, deref, hasher)
dhcp_context_t dhcp_gbl_ctx
isc_result_t isclib_make_dst_key(char *inname, char *algorithm, unsigned char *secret, int length, dst_key_t **dstkey)
isc_result_t omapi_value_dereference(omapi_value_t **, const char *, int)
isc_result_t omapi_connection_put_string(omapi_object_t *, const char *)
#define OMAPI_OBJECT_ALLOC(name, stype, type)
isc_result_t omapi_object_dereference(omapi_object_t **, const char *, int)
int omapi_td_strcasecmp(omapi_typed_data_t *, const char *)
struct __omapi_object omapi_object_t
omapi_object_type_t * omapi_type_auth_key
isc_result_t omapi_make_string_value(omapi_value_t **, omapi_data_string_t *, const char *, const char *, int)
isc_result_t omapi_data_string_dereference(omapi_data_string_t **, const char *, int)
int omapi_ds_strcmp(omapi_data_string_t *, const char *)
isc_result_t omapi_typed_data_new(const char *, int, omapi_typed_data_t **, omapi_datatype_t,...)
isc_result_t omapi_data_string_reference(omapi_data_string_t **, omapi_data_string_t *, const char *, int)
void dfree(void *, const char *, int)
isc_result_t omapi_get_value_str(omapi_object_t *, omapi_object_t *, const char *, omapi_value_t **)
struct auth_key omapi_auth_key_t
isc_result_t omapi_connection_put_name(omapi_object_t *, const char *)
isc_result_t omapi_value_new(omapi_value_t **, const char *, int)
int log_error(const char *,...) __attribute__((__format__(__printf__
#define DHCP_R_INVALIDARG
omapi_data_string_t * key