Commit 734ae1f7 authored by Brian Wellington's avatar Brian Wellington

isc_{base64|hex}_decodestring took an unused mctx. Remove the mctx.

parent 72d9655b
......@@ -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));
......
......@@ -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,
......
......@@ -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 <config.h>
......@@ -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;
......
......@@ -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 <config.h>
......@@ -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);
......
......@@ -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 <config.h>
......@@ -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));
......
......@@ -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));
......
......@@ -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 <config.h>
......@@ -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);
......
......@@ -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 <config.h>
......@@ -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++;
......
......@@ -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 <config.h>
......@@ -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++;
......
......@@ -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.
*
......
......@@ -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.
*
......
Markdown is supported
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