1999-07-12 20:08:42 +00:00
|
|
|
/*
|
2001-01-09 22:01:04 +00:00
|
|
|
* Portions Copyright (C) 1999-2001 Internet Software Consortium.
|
2000-06-09 20:58:39 +00:00
|
|
|
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
|
2000-08-01 01:33:37 +00:00
|
|
|
*
|
2000-05-08 14:38:29 +00:00
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
1999-07-12 20:08:42 +00:00
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
2000-08-01 01:33:37 +00:00
|
|
|
*
|
2000-05-08 14:38:29 +00:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM AND
|
|
|
|
* NETWORK ASSOCIATES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
|
|
|
* SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
* FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM OR NETWORK
|
|
|
|
* ASSOCIATES BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
|
|
|
|
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
1999-07-12 20:08:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Principal Author: Brian Wellington
|
2001-11-06 20:47:59 +00:00
|
|
|
* $Id: hmac_link.c,v 1.55 2001/11/06 20:47:55 bwelling Exp $
|
1999-07-12 20:08:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2000-07-18 18:15:27 +00:00
|
|
|
#include <isc/buffer.h>
|
|
|
|
#include <isc/hmacmd5.h>
|
2000-06-07 17:22:31 +00:00
|
|
|
#include <isc/md5.h>
|
2000-05-08 14:38:29 +00:00
|
|
|
#include <isc/mem.h>
|
|
|
|
#include <isc/string.h>
|
2000-04-28 01:12:23 +00:00
|
|
|
#include <isc/util.h>
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-05-02 03:54:17 +00:00
|
|
|
#include <dst/result.h>
|
|
|
|
|
1999-07-12 20:08:42 +00:00
|
|
|
#include "dst_internal.h"
|
|
|
|
#include "dst_parse.h"
|
|
|
|
|
|
|
|
#define HMAC_LEN 64
|
|
|
|
#define HMAC_IPAD 0x36
|
|
|
|
#define HMAC_OPAD 0x5c
|
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
static isc_result_t hmacmd5_fromdns(dst_key_t *key, isc_buffer_t *data);
|
|
|
|
|
1999-07-12 20:08:42 +00:00
|
|
|
typedef struct hmackey {
|
2000-06-05 19:10:58 +00:00
|
|
|
unsigned char key[HMAC_LEN];
|
1999-07-12 20:08:42 +00:00
|
|
|
} HMAC_Key;
|
|
|
|
|
2000-05-02 03:54:17 +00:00
|
|
|
static isc_result_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_createctx(dst_key_t *key, dst_context_t *dctx) {
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_t *hmacmd5ctx;
|
2000-06-02 18:57:51 +00:00
|
|
|
HMAC_Key *hkey = key->opaque;
|
|
|
|
|
2000-07-18 18:15:27 +00:00
|
|
|
hmacmd5ctx = isc_mem_get(dctx->mctx, sizeof(isc_hmacmd5_t));
|
|
|
|
if (hmacmd5ctx == NULL)
|
2000-06-07 17:22:31 +00:00
|
|
|
return (ISC_R_NOMEMORY);
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_init(hmacmd5ctx, hkey->key, HMAC_LEN);
|
|
|
|
dctx->opaque = hmacmd5ctx;
|
2000-06-02 18:57:51 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
|
|
|
}
|
2000-05-02 03:54:17 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
static void
|
|
|
|
hmacmd5_destroyctx(dst_context_t *dctx) {
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_t *hmacmd5ctx = dctx->opaque;
|
2000-05-02 03:54:17 +00:00
|
|
|
|
2000-07-18 18:15:27 +00:00
|
|
|
if (hmacmd5ctx != NULL) {
|
|
|
|
isc_hmacmd5_invalidate(hmacmd5ctx);
|
|
|
|
isc_mem_put(dctx->mctx, hmacmd5ctx, sizeof(isc_hmacmd5_t));
|
2000-06-07 17:22:31 +00:00
|
|
|
dctx->opaque = NULL;
|
|
|
|
}
|
2000-06-02 18:57:51 +00:00
|
|
|
}
|
2000-05-02 03:54:17 +00:00
|
|
|
|
|
|
|
static isc_result_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_adddata(dst_context_t *dctx, const isc_region_t *data) {
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_t *hmacmd5ctx = dctx->opaque;
|
2000-05-02 03:54:17 +00:00
|
|
|
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_update(hmacmd5ctx, data->base, data->length);
|
2000-06-07 17:22:31 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
2000-06-02 18:57:51 +00:00
|
|
|
}
|
2000-05-02 03:54:17 +00:00
|
|
|
|
|
|
|
static isc_result_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_sign(dst_context_t *dctx, isc_buffer_t *sig) {
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_t *hmacmd5ctx = dctx->opaque;
|
2000-08-02 15:33:11 +00:00
|
|
|
unsigned char *digest;
|
2000-07-18 18:15:27 +00:00
|
|
|
|
|
|
|
if (isc_buffer_availablelength(sig) < ISC_MD5_DIGESTLENGTH)
|
|
|
|
return (ISC_R_NOSPACE);
|
|
|
|
digest = isc_buffer_used(sig);
|
|
|
|
isc_hmacmd5_sign(hmacmd5ctx, digest);
|
2000-06-07 17:22:31 +00:00
|
|
|
isc_buffer_add(sig, ISC_MD5_DIGESTLENGTH);
|
2000-06-02 18:57:51 +00:00
|
|
|
|
2000-06-07 17:22:31 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
2000-03-06 20:06:01 +00:00
|
|
|
static isc_result_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_verify(dst_context_t *dctx, const isc_region_t *sig) {
|
2000-07-18 18:15:27 +00:00
|
|
|
isc_hmacmd5_t *hmacmd5ctx = dctx->opaque;
|
1999-10-26 19:43:25 +00:00
|
|
|
|
2000-06-07 17:22:31 +00:00
|
|
|
if (sig->length < ISC_MD5_DIGESTLENGTH)
|
2000-06-05 19:10:58 +00:00
|
|
|
return (DST_R_VERIFYFAILURE);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-07-18 18:15:27 +00:00
|
|
|
if (isc_hmacmd5_verify(hmacmd5ctx, sig->base))
|
|
|
|
return (ISC_R_SUCCESS);
|
|
|
|
else
|
2000-06-02 18:57:51 +00:00
|
|
|
return (DST_R_VERIFYFAILURE);
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
static isc_boolean_t
|
|
|
|
hmacmd5_compare(const dst_key_t *key1, const dst_key_t *key2) {
|
|
|
|
HMAC_Key *hkey1, *hkey2;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
hkey1 = (HMAC_Key *)key1->opaque;
|
|
|
|
hkey2 = (HMAC_Key *)key2->opaque;
|
1999-10-26 19:43:25 +00:00
|
|
|
|
2000-08-01 01:33:37 +00:00
|
|
|
if (hkey1 == NULL && hkey2 == NULL)
|
2000-06-02 18:57:51 +00:00
|
|
|
return (ISC_TRUE);
|
|
|
|
else if (hkey1 == NULL || hkey2 == NULL)
|
|
|
|
return (ISC_FALSE);
|
1999-10-26 19:43:25 +00:00
|
|
|
|
2000-06-05 19:10:58 +00:00
|
|
|
if (memcmp(hkey1->key, hkey2->key, HMAC_LEN) == 0)
|
2000-06-02 18:57:51 +00:00
|
|
|
return (ISC_TRUE);
|
|
|
|
else
|
|
|
|
return (ISC_FALSE);
|
|
|
|
}
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
static isc_result_t
|
2001-05-31 18:34:51 +00:00
|
|
|
hmacmd5_generate(dst_key_t *key, int pseudorandom_ok) {
|
2000-06-02 18:57:51 +00:00
|
|
|
isc_buffer_t b;
|
|
|
|
isc_result_t ret;
|
|
|
|
int bytes;
|
|
|
|
unsigned char data[HMAC_LEN];
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
bytes = (key->key_size + 7) / 8;
|
|
|
|
if (bytes > 64) {
|
|
|
|
bytes = 64;
|
|
|
|
key->key_size = 512;
|
|
|
|
}
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
memset(data, 0, HMAC_LEN);
|
2001-05-31 18:34:51 +00:00
|
|
|
ret = dst__entropy_getdata(data, bytes, ISC_TF(pseudorandom_ok != 0));
|
2001-05-31 10:49:28 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
if (ret != ISC_R_SUCCESS)
|
|
|
|
return (ret);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-12 07:07:14 +00:00
|
|
|
isc_buffer_init(&b, data, bytes);
|
|
|
|
isc_buffer_add(&b, bytes);
|
2000-06-02 18:57:51 +00:00
|
|
|
ret = hmacmd5_fromdns(key, &b);
|
|
|
|
memset(data, 0, HMAC_LEN);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
return (ret);
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
1999-09-27 16:55:45 +00:00
|
|
|
static isc_boolean_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_isprivate(const dst_key_t *key) {
|
2000-05-02 03:54:17 +00:00
|
|
|
UNUSED(key);
|
1999-09-23 20:54:38 +00:00
|
|
|
return (ISC_TRUE);
|
|
|
|
}
|
|
|
|
|
2000-06-02 18:57:51 +00:00
|
|
|
static void
|
|
|
|
hmacmd5_destroy(dst_key_t *key) {
|
|
|
|
HMAC_Key *hkey = key->opaque;
|
|
|
|
memset(hkey, 0, sizeof(HMAC_Key));
|
|
|
|
isc_mem_put(key->mctx, hkey, sizeof(HMAC_Key));
|
2000-08-16 00:30:56 +00:00
|
|
|
key->opaque = NULL;
|
2000-06-02 18:57:51 +00:00
|
|
|
}
|
|
|
|
|
2000-03-06 20:06:01 +00:00
|
|
|
static isc_result_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_todns(const dst_key_t *key, isc_buffer_t *data) {
|
1999-07-12 20:08:42 +00:00
|
|
|
HMAC_Key *hkey;
|
2000-06-05 19:10:58 +00:00
|
|
|
unsigned int bytes;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
REQUIRE(key->opaque != NULL);
|
|
|
|
|
|
|
|
hkey = (HMAC_Key *) key->opaque;
|
|
|
|
|
|
|
|
bytes = (key->key_size + 7) / 8;
|
2000-06-05 19:10:58 +00:00
|
|
|
if (isc_buffer_availablelength(data) < bytes)
|
1999-10-20 22:14:15 +00:00
|
|
|
return (ISC_R_NOSPACE);
|
2000-06-05 19:10:58 +00:00
|
|
|
isc_buffer_putmem(data, hkey->key, bytes);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
1999-10-20 22:14:15 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
2000-03-06 20:06:01 +00:00
|
|
|
static isc_result_t
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_fromdns(dst_key_t *key, isc_buffer_t *data) {
|
1999-07-12 20:08:42 +00:00
|
|
|
HMAC_Key *hkey;
|
2000-06-05 19:10:58 +00:00
|
|
|
int keylen;
|
1999-07-12 20:08:42 +00:00
|
|
|
isc_region_t r;
|
2000-06-07 17:22:31 +00:00
|
|
|
isc_md5_t md5ctx;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
103. [func] libisc buffer API changes for <isc/buffer.h>:
Added:
isc_buffer_base(b) (pointer)
isc_buffer_current(b) (pointer)
isc_buffer_active(b) (pointer)
isc_buffer_used(b) (pointer)
isc_buffer_length(b) (int)
isc_buffer_usedlength(b) (int)
isc_buffer_consumedlength(b) (int)
isc_buffer_remaininglength(b) (int)
isc_buffer_activelength(b) (int)
isc_buffer_availablelength(b) (int)
Removed:
ISC_BUFFER_USEDCOUNT(b)
ISC_BUFFER_AVAILABLECOUNT(b)
isc_buffer_type(b)
Changed names:
isc_buffer_used(b, r) ->
isc_buffer_usedregion(b, r)
isc_buffer_available(b, r) ->
isc_buffer_available_region(b, r)
isc_buffer_consumed(b, r) ->
isc_buffer_consumedregion(b, r)
isc_buffer_active(b, r) ->
isc_buffer_activeregion(b, r)
isc_buffer_remaining(b, r) ->
isc_buffer_remainingregion(b, r)
Buffer types were removed, so the ISC_BUFFERTYPE_*
macros are no more, and the type argument to
isc_buffer_init and isc_buffer_allocate were removed.
isc_buffer_putstr is now void (instead of isc_result_t)
and requires that the caller ensure that there
is enough available buffer space for the string.
2000-04-27 00:03:12 +00:00
|
|
|
isc_buffer_remainingregion(data, &r);
|
1999-07-12 20:08:42 +00:00
|
|
|
if (r.length == 0)
|
1999-10-20 22:14:15 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-05 19:10:58 +00:00
|
|
|
hkey = (HMAC_Key *) isc_mem_get(key->mctx, sizeof(HMAC_Key));
|
1999-07-12 20:08:42 +00:00
|
|
|
if (hkey == NULL)
|
1999-10-20 22:14:15 +00:00
|
|
|
return (ISC_R_NOMEMORY);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-05 19:10:58 +00:00
|
|
|
memset(hkey->key, 0, sizeof(hkey->key));
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
if (r.length > HMAC_LEN) {
|
2000-06-07 17:22:31 +00:00
|
|
|
isc_md5_init(&md5ctx);
|
|
|
|
isc_md5_update(&md5ctx, r.base, r.length);
|
|
|
|
isc_md5_final(&md5ctx, hkey->key);
|
|
|
|
keylen = ISC_MD5_DIGESTLENGTH;
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
else {
|
2000-06-05 19:10:58 +00:00
|
|
|
memcpy(hkey->key, r.base, r.length);
|
1999-07-12 20:08:42 +00:00
|
|
|
keylen = r.length;
|
|
|
|
}
|
2000-07-31 19:44:21 +00:00
|
|
|
|
1999-07-12 20:08:42 +00:00
|
|
|
key->key_size = keylen * 8;
|
|
|
|
key->opaque = hkey;
|
|
|
|
|
1999-10-20 22:14:15 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
2000-03-06 20:06:01 +00:00
|
|
|
static isc_result_t
|
2000-06-06 21:58:16 +00:00
|
|
|
hmacmd5_tofile(const dst_key_t *key, const char *directory) {
|
2000-06-05 19:10:58 +00:00
|
|
|
int cnt = 0;
|
1999-07-12 20:08:42 +00:00
|
|
|
HMAC_Key *hkey;
|
|
|
|
dst_private_t priv;
|
2000-03-15 18:52:23 +00:00
|
|
|
int bytes = (key->key_size + 7) / 8;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
if (key->opaque == NULL)
|
1999-09-01 18:56:19 +00:00
|
|
|
return (DST_R_NULLKEY);
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
hkey = (HMAC_Key *) key->opaque;
|
|
|
|
|
|
|
|
priv.elements[cnt].tag = TAG_HMACMD5_KEY;
|
2000-03-15 18:52:23 +00:00
|
|
|
priv.elements[cnt].length = bytes;
|
2000-06-05 19:10:58 +00:00
|
|
|
priv.elements[cnt++].data = hkey->key;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
priv.nelements = cnt;
|
2000-06-06 21:58:16 +00:00
|
|
|
return (dst__privstruct_writefile(key, &priv, directory));
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
2000-08-01 01:33:37 +00:00
|
|
|
static isc_result_t
|
2001-05-10 19:07:18 +00:00
|
|
|
hmacmd5_fromfile(dst_key_t *key, const char *filename) {
|
1999-07-12 20:08:42 +00:00
|
|
|
dst_private_t priv;
|
2000-03-06 20:06:01 +00:00
|
|
|
isc_result_t ret;
|
1999-07-12 20:08:42 +00:00
|
|
|
isc_buffer_t b;
|
2000-06-02 18:57:51 +00:00
|
|
|
isc_mem_t *mctx = key->mctx;
|
1999-07-12 20:08:42 +00:00
|
|
|
|
|
|
|
/* read private key file */
|
2001-09-15 00:01:58 +00:00
|
|
|
ret = dst__privstruct_parsefile(key, DST_ALG_HMACMD5, filename, mctx,
|
|
|
|
&priv);
|
1999-10-20 22:14:15 +00:00
|
|
|
if (ret != ISC_R_SUCCESS)
|
1999-07-12 20:08:42 +00:00
|
|
|
return (ret);
|
|
|
|
|
103. [func] libisc buffer API changes for <isc/buffer.h>:
Added:
isc_buffer_base(b) (pointer)
isc_buffer_current(b) (pointer)
isc_buffer_active(b) (pointer)
isc_buffer_used(b) (pointer)
isc_buffer_length(b) (int)
isc_buffer_usedlength(b) (int)
isc_buffer_consumedlength(b) (int)
isc_buffer_remaininglength(b) (int)
isc_buffer_activelength(b) (int)
isc_buffer_availablelength(b) (int)
Removed:
ISC_BUFFER_USEDCOUNT(b)
ISC_BUFFER_AVAILABLECOUNT(b)
isc_buffer_type(b)
Changed names:
isc_buffer_used(b, r) ->
isc_buffer_usedregion(b, r)
isc_buffer_available(b, r) ->
isc_buffer_available_region(b, r)
isc_buffer_consumed(b, r) ->
isc_buffer_consumedregion(b, r)
isc_buffer_active(b, r) ->
isc_buffer_activeregion(b, r)
isc_buffer_remaining(b, r) ->
isc_buffer_remainingregion(b, r)
Buffer types were removed, so the ISC_BUFFERTYPE_*
macros are no more, and the type argument to
isc_buffer_init and isc_buffer_allocate were removed.
isc_buffer_putstr is now void (instead of isc_result_t)
and requires that the caller ensure that there
is enough available buffer space for the string.
2000-04-27 00:03:12 +00:00
|
|
|
isc_buffer_init(&b, priv.elements[0].data, priv.elements[0].length);
|
2000-06-01 02:33:26 +00:00
|
|
|
isc_buffer_add(&b, priv.elements[0].length);
|
2000-07-03 23:27:45 +00:00
|
|
|
ret = hmacmd5_fromdns(key, &b);
|
2000-06-02 23:36:14 +00:00
|
|
|
dst__privstruct_free(&priv, mctx);
|
1999-07-12 20:08:42 +00:00
|
|
|
memset(&priv, 0, sizeof(priv));
|
2000-07-03 23:27:45 +00:00
|
|
|
return (ret);
|
1999-07-12 20:08:42 +00:00
|
|
|
}
|
|
|
|
|
2000-06-02 23:36:14 +00:00
|
|
|
static dst_func_t hmacmd5_functions = {
|
2000-06-02 18:57:51 +00:00
|
|
|
hmacmd5_createctx,
|
|
|
|
hmacmd5_destroyctx,
|
|
|
|
hmacmd5_adddata,
|
|
|
|
hmacmd5_sign,
|
|
|
|
hmacmd5_verify,
|
|
|
|
NULL, /* computesecret */
|
|
|
|
hmacmd5_compare,
|
|
|
|
NULL, /* paramcompare */
|
|
|
|
hmacmd5_generate,
|
|
|
|
hmacmd5_isprivate,
|
|
|
|
hmacmd5_destroy,
|
|
|
|
hmacmd5_todns,
|
|
|
|
hmacmd5_fromdns,
|
|
|
|
hmacmd5_tofile,
|
|
|
|
hmacmd5_fromfile,
|
2001-11-06 20:47:59 +00:00
|
|
|
NULL, /* cleanup */
|
2000-06-02 18:57:51 +00:00
|
|
|
};
|
1999-07-12 20:08:42 +00:00
|
|
|
|
2000-06-06 21:58:16 +00:00
|
|
|
isc_result_t
|
2000-06-02 23:36:14 +00:00
|
|
|
dst__hmacmd5_init(dst_func_t **funcp) {
|
2000-06-02 18:57:51 +00:00
|
|
|
REQUIRE(funcp != NULL && *funcp == NULL);
|
|
|
|
*funcp = &hmacmd5_functions;
|
2000-06-06 21:58:16 +00:00
|
|
|
return (ISC_R_SUCCESS);
|
|
|
|
}
|