Commit d92543b3 authored by Brian Wellington's avatar Brian Wellington
Browse files

more constant renaming

parent 1d23294e
......@@ -126,7 +126,7 @@ main() {
generate(DST_ALG_RSA, mctx);
generate(DST_ALG_DSA, mctx);
generate(DST_ALG_HMAC_MD5, mctx);
generate(DST_ALG_HMACMD5, mctx);
get_random();
......
......@@ -274,7 +274,7 @@ t1() {
t_info("testing use of generated keys\n");
generate(DST_ALG_RSA, mctx, &nfails);
generate(DST_ALG_DSA, mctx, &nfails);
generate(DST_ALG_HMAC_MD5, mctx, &nfails);
generate(DST_ALG_HMACMD5, mctx, &nfails);
t_info("testing random number sequence generation\n");
get_random(&nfails);
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.8 1999/09/01 18:56:19 bwelling Exp $
* $Id: dst_api.c,v 1.9 1999/09/02 15:56:32 bwelling Exp $
*/
#include <config.h>
......@@ -599,9 +599,9 @@ dst_sig_size(const dst_key_t *key) {
return (key->key_size + 7) / 8;
case DST_ALG_DSA:
return (DNS_SIG_DSASIGSIZE);
case DST_ALG_HMAC_MD5:
case DST_ALG_HMACMD5:
return (16);
case DST_ALG_HMAC_SHA1:
case DST_ALG_HMACSHA1:
return (20);
default:
REQUIRE(ISC_FALSE);
......@@ -728,7 +728,7 @@ read_public_key(const char *name, const isc_uint16_t id, int alg,
isc_mem_t *mctx, dst_key_t **keyp)
{
char filename[PATH_MAX];
u_char rdatabuf[DST_MAX_KEY_SIZE];
u_char rdatabuf[DST_KEY_MAXSIZE];
isc_buffer_t b;
isc_lex_t *lex = NULL;
isc_token_t token;
......@@ -824,8 +824,8 @@ write_public_key(const dst_key_t *key) {
isc_buffer_t keyb, textb;
isc_region_t r;
char filename[PATH_MAX];
unsigned char key_array[DST_MAX_KEY_SIZE];
char text_array[DST_MAX_KEY_SIZE];
unsigned char key_array[DST_KEY_MAXSIZE];
char text_array[DST_KEY_MAXSIZE];
dst_result_t ret;
dns_result_t dnsret;
dns_rdata_t rdata;
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_parse.c,v 1.3 1999/09/01 18:56:19 bwelling Exp $
* $Id: dst_parse.c,v 1.4 1999/09/02 15:56:32 bwelling Exp $
*/
#include <config.h>
......@@ -48,7 +48,7 @@
#define ALGORITHM_STR "Algorithm:"
#define RSA_STR "RSA"
#define DSA_STR "DSA"
#define HMAC_MD5_STR "HMAC_MD5"
#define HMACMD5_STR "HMAC_MD5"
struct parse_map {
int value;
......@@ -145,7 +145,7 @@ check_data(const dst_private_t *priv, const int alg) {
return (check_rsa(priv));
case DST_ALG_DSA:
return (check_dsa(priv));
case DST_ALG_HMAC_MD5:
case DST_ALG_HMACMD5:
return (check_hmac_md5(priv));
default:
return (DST_R_UNSUPPORTEDALG);
......@@ -331,7 +331,7 @@ dst_s_write_private_key_file(const char *name, const int alg, const int id,
switch (alg) {
case DST_ALG_RSA: fprintf(fp, "(RSA)\n"); break;
case DST_ALG_DSA: fprintf(fp, "(DSA)\n"); break;
case DST_ALG_HMAC_MD5: fprintf(fp, "(HMAC_MD5)\n"); break;
case DST_ALG_HMACMD5: fprintf(fp, "(HMAC_MD5)\n"); break;
default : fprintf(fp, "(?)\n"); break;
}
......
......@@ -51,7 +51,7 @@ ISC_LANG_BEGINDECLS
#define TAG_DSA_PUBLIC ((DST_ALG_DSA << TAG_SHIFT) + 4)
#define HMACMD5_NTAGS 1
#define TAG_HMACMD5_KEY ((DST_ALG_HMAC_MD5 << TAG_SHIFT) + 0)
#define TAG_HMACMD5_KEY ((DST_ALG_HMACMD5 << TAG_SHIFT) + 0)
struct dst_private_element {
unsigned short tag;
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: hmac_link.c,v 1.5 1999/09/01 18:56:19 bwelling Exp $
* $Id: hmac_link.c,v 1.6 1999/09/02 15:56:33 bwelling Exp $
*/
#include <config.h>
......@@ -81,8 +81,8 @@ static dst_result_t dst_hmacmd5_from_file(dst_key_t *key, const int id,
void
dst_s_hmacmd5_init()
{
REQUIRE(dst_t_func[DST_ALG_HMAC_MD5] == NULL);
dst_t_func[DST_ALG_HMAC_MD5] = &hmacmd5_functions;
REQUIRE(dst_t_func[DST_ALG_HMACMD5] == NULL);
dst_t_func[DST_ALG_HMACMD5] = &hmacmd5_functions;
memset(&hmacmd5_functions, 0, sizeof(struct dst_func));
hmacmd5_functions.sign = dst_hmacmd5_sign;
hmacmd5_functions.verify = dst_hmacmd5_verify;
......
......@@ -30,11 +30,11 @@ typedef void * dst_context_t;
#define DST_ALG_RSA 1
#define DST_ALG_DH 2
#define DST_ALG_DSA 3
#define DST_ALG_HMAC_MD5 157
#define DST_ALG_HMAC_SHA1 158 /* not implemented */
#define DST_ALG_HMACMD5 157
#define DST_ALG_HMACSHA1 158 /* not implemented */
#define DST_ALG_PRIVATE 254
#define DST_ALG_EXPAND 255
#define DST_MAX_ALGS DST_ALG_HMAC_SHA1
#define DST_MAX_ALGS DST_ALG_HMACSHA1
/* 'Mode' passed into dst_sign() and dst_verify() */
#define DST_SIGMODE_INIT 1 /* initialize digest */
......@@ -45,7 +45,7 @@ typedef void * dst_context_t;
DST_SIGMODE_FINAL)
/* A buffer of this size is large enough to hold any key */
#define DST_MAX_KEY_SIZE 1024
#define DST_KEY_MAXSIZE 1024
/* 'Type' for dst_read_key() */
#define DST_TYPE_PRIVATE 0x2000000
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: tsig.c,v 1.7 1999/09/02 02:10:43 explorer Exp $
* $Id: tsig.c,v 1.8 1999/09/02 15:56:32 bwelling Exp $
* Principal Author: Brian Wellington
*/
......@@ -82,7 +82,7 @@ dns_tsig_key_create(dns_name_t *name, dns_name_t *algorithm,
if (!dns_name_equal(algorithm, DNS_TSIG_HMACMD5_NAME))
return (ISC_R_NOTFOUND);
else
alg = DST_ALG_HMAC_MD5;
alg = DST_ALG_HMACMD5;
*key = (dns_tsig_key_t *) isc_mem_get(mctx, sizeof(dns_tsig_key_t));
if (*key == NULL)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment