diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 4ca82ad0c8..700440dcc9 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.196 2001/03/14 23:13:57 gson Exp $ */ +/* $Id: dighost.c,v 1.197 2001/03/22 00:06:50 bwelling Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -515,8 +515,7 @@ setup_text_key(void) { fatal("Memory allocation failure in %s:%d", __FILE__, __LINE__); isc_buffer_init(&secretbuf, secretstore, secretsize); - result = isc_base64_decodestring(mctx, keysecret, - &secretbuf); + result = isc_base64_decodestring(keysecret, &secretbuf); if (result != ISC_R_SUCCESS) { printf(";; Couldn't create key %s: %s\n", keynametext, isc_result_totext(result)); diff --git a/bin/named/omapiconf.c b/bin/named/omapiconf.c index bb54d39543..6060da55bc 100644 --- a/bin/named/omapiconf.c +++ b/bin/named/omapiconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: omapiconf.c,v 1.16 2001/03/04 21:21:24 bwelling Exp $ */ +/* $Id: omapiconf.c,v 1.17 2001/03/22 00:06:51 bwelling Exp $ */ /* * Principal Author: DCL @@ -352,8 +352,7 @@ register_keys(cfg_obj_t *control, cfg_obj_t *keylist, char *socktext) { } isc_buffer_init(&b, secret, sizeof(secret)); - result = isc_base64_decodestring(ns_g_mctx, - secretstr, &b); + result = isc_base64_decodestring(secretstr, &b); if (result != ISC_R_SUCCESS) { cfg_obj_log(keydef, ns_g_lctx, ISC_LOG_WARNING, diff --git a/bin/named/server.c b/bin/named/server.c index 06b7130735..70011fd11e 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.307 2001/03/19 22:34:06 bwelling Exp $ */ +/* $Id: server.c,v 1.308 2001/03/22 00:06:56 bwelling Exp $ */ #include @@ -214,7 +214,7 @@ configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key, isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata)); keystr = cfg_obj_asstring(cfg_tuple_get(key, "key")); - CHECK(isc_base64_decodestring(mctx, keystr, &keydatabuf)); + CHECK(isc_base64_decodestring(keystr, &keydatabuf)); isc_buffer_usedregion(&keydatabuf, &r); keystruct.datalen = r.length; keystruct.data = r.base; diff --git a/bin/named/tsigconf.c b/bin/named/tsigconf.c index 884df841ec..a6e1c24716 100644 --- a/bin/named/tsigconf.c +++ b/bin/named/tsigconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tsigconf.c,v 1.16 2001/03/04 21:21:28 bwelling Exp $ */ +/* $Id: tsigconf.c,v 1.17 2001/03/22 00:06:57 bwelling Exp $ */ #include @@ -99,7 +99,7 @@ add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) { goto failure; } isc_buffer_init(&secretbuf, secret, secretlen); - ret = isc_base64_decodestring(mctx, secretstr, &secretbuf); + ret = isc_base64_decodestring(secretstr, &secretbuf); if (ret != ISC_R_SUCCESS) goto failure; secretlen = isc_buffer_usedlength(&secretbuf); diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index cfb77a8870..171dc6496f 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.83 2001/03/09 18:18:42 bwelling Exp $ */ +/* $Id: nsupdate.c,v 1.84 2001/03/22 00:06:59 bwelling Exp $ */ #include @@ -295,7 +295,7 @@ setup_key(void) { fatal("out of memory"); isc_buffer_init(&secretbuf, secret, secretlen); - result = isc_base64_decodestring(mctx, secretstr, &secretbuf); + result = isc_base64_decodestring(secretstr, &secretbuf); if (result != ISC_R_SUCCESS) { fprintf(stderr, "Couldn't create key from %s: %s\n", keystr, isc_result_totext(result)); diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 5d01864a96..e9e6437911 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.42 2001/02/16 00:41:43 bwelling Exp $ */ +/* $Id: rndc.c,v 1.43 2001/03/22 00:07:01 bwelling Exp $ */ /* * Principal Author: DCL @@ -488,7 +488,7 @@ main(int argc, char **argv) { isc_buffer_init(&secretbuf, secretarray, sizeof(secretarray)); DO("decode base64 secret", - isc_base64_decodestring(mctx, secret, &secretbuf)); + isc_base64_decodestring(secret, &secretbuf)); DO("initialize omapi", omapi_lib_init(mctx, taskmgr, socketmgr)); diff --git a/bin/tests/system/tkey/keycreate.c b/bin/tests/system/tkey/keycreate.c index f8fc0122e3..38c44984c3 100644 --- a/bin/tests/system/tkey/keycreate.c +++ b/bin/tests/system/tkey/keycreate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: keycreate.c,v 1.5 2001/02/28 03:05:00 bwelling Exp $ */ +/* $Id: keycreate.c,v 1.6 2001/03/22 00:07:02 bwelling Exp $ */ #include @@ -151,7 +151,7 @@ sendquery(isc_task_t *task, isc_event_t *event) { CHECK("dns_name_fromtext", result); isc_buffer_init(&keybuf, keydata, 9); - result = isc_base64_decodestring(mctx, keystr, &keybuf); + result = isc_base64_decodestring(keystr, &keybuf); CHECK("isc_base64_decodestring", result); isc_buffer_usedregion(&keybuf, &r); diff --git a/lib/isc/base64.c b/lib/isc/base64.c index 7316543ceb..183e822fe1 100644 --- a/lib/isc/base64.c +++ b/lib/isc/base64.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: base64.c,v 1.22 2001/02/15 23:21:46 bwelling Exp $ */ +/* $Id: base64.c,v 1.23 2001/03/22 00:07:04 bwelling Exp $ */ #include @@ -190,13 +190,9 @@ isc_base64_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) { } isc_result_t -isc_base64_decodestring(isc_mem_t *mctx, const char *cstr, - isc_buffer_t *target) -{ +isc_base64_decodestring(const char *cstr, isc_buffer_t *target) { base64_decode_ctx_t ctx; - UNUSED(mctx); - base64_decode_init(&ctx, -1, target); for (;;) { int c = *cstr++; diff --git a/lib/isc/hex.c b/lib/isc/hex.c index dfd1c16572..84a608f2a2 100644 --- a/lib/isc/hex.c +++ b/lib/isc/hex.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: hex.c,v 1.7 2001/01/09 21:56:04 bwelling Exp $ */ +/* $Id: hex.c,v 1.8 2001/03/22 00:07:05 bwelling Exp $ */ #include @@ -152,11 +152,9 @@ isc_hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length) { } isc_result_t -isc_hex_decodestring(isc_mem_t *mctx, char *cstr, isc_buffer_t *target) { +isc_hex_decodestring(char *cstr, isc_buffer_t *target) { hex_decode_ctx_t ctx; - UNUSED(mctx); - hex_decode_init(&ctx, -1, target); for (;;) { int c = *cstr++; diff --git a/lib/isc/include/isc/base64.h b/lib/isc/include/isc/base64.h index b21cce7007..6b37e512c8 100644 --- a/lib/isc/include/isc/base64.h +++ b/lib/isc/include/isc/base64.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: base64.h,v 1.14 2001/02/15 23:21:47 bwelling Exp $ */ +/* $Id: base64.h,v 1.15 2001/03/22 00:07:06 bwelling Exp $ */ #ifndef ISC_BASE64_H #define ISC_BASE64_H 1 @@ -54,13 +54,11 @@ isc_base64_totext(isc_region_t *source, int wordlength, */ isc_result_t -isc_base64_decodestring(isc_mem_t *mctx, const char *cstr, - isc_buffer_t *target); +isc_base64_decodestring(const char *cstr, isc_buffer_t *target); /* * Decode a null-terminated base64 string. * * Requires: - * 'mctx' is non-null. * 'cstr' is non-null. * 'target' is a valid buffer. * diff --git a/lib/isc/include/isc/hex.h b/lib/isc/include/isc/hex.h index 0b3cf8d449..806b86a54a 100644 --- a/lib/isc/include/isc/hex.h +++ b/lib/isc/include/isc/hex.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: hex.h,v 1.3 2001/01/09 21:56:59 bwelling Exp $ */ +/* $Id: hex.h,v 1.4 2001/03/22 00:07:07 bwelling Exp $ */ #ifndef ISC_HEX_H #define ISC_HEX_H 1 @@ -54,12 +54,11 @@ isc_hex_totext(isc_region_t *source, int wordlength, */ isc_result_t -isc_hex_decodestring(isc_mem_t *mctx, char *cstr, isc_buffer_t *target); +isc_hex_decodestring(char *cstr, isc_buffer_t *target); /* * Decode a null-terminated hex string. * * Requires: - * 'mctx' is non-null. * 'cstr' is non-null. * 'target' is a valid buffer. *