hmac_link.c revision af5073d03288a53b646ec3b807ac25ced64d7879
/*
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2002 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
*/
/*
* Principal Author: Brian Wellington
* $Id: hmac_link.c,v 1.60 2004/03/05 05:48:24 marka Exp $
*/
#include <config.h>
#include "dst_internal.h"
#include "dst_parse.h"
#define HMAC_LEN 64
#define HMAC_IPAD 0x36
#define HMAC_OPAD 0x5c
typedef struct hmackey {
} HMAC_Key;
static isc_result_t
if (hmacmd5ctx == NULL)
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
}
static void
if (hmacmd5ctx != NULL) {
}
}
static isc_result_t
return (ISC_R_SUCCESS);
}
static isc_result_t
unsigned char *digest;
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
}
static isc_result_t
return (DST_R_VERIFYFAILURE);
return (ISC_R_SUCCESS);
else
return (DST_R_VERIFYFAILURE);
}
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_TRUE);
else
return (ISC_FALSE);
}
static isc_result_t
isc_buffer_t b;
int bytes;
if (bytes > 64) {
bytes = 64;
}
if (ret != ISC_R_SUCCESS)
return (ret);
isc_buffer_add(&b, bytes);
return (ret);
}
static isc_boolean_t
return (ISC_TRUE);
}
static void
}
static isc_result_t
unsigned int bytes;
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
}
static isc_result_t
int keylen;
isc_region_t r;
if (r.length == 0)
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
}
else {
}
return (ISC_R_SUCCESS);
}
static isc_result_t
int cnt = 0;
return (DST_R_NULLKEY);
}
static isc_result_t
isc_buffer_t b;
/* read private key file */
if (ret != ISC_R_SUCCESS)
return (ret);
return (ret);
}
static dst_func_t hmacmd5_functions = {
NULL, /* computesecret */
NULL, /* paramcompare */
NULL, /* cleanup */
};
*funcp = &hmacmd5_functions;
return (ISC_R_SUCCESS);
}