Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
734ae1f7
Commit
734ae1f7
authored
Mar 22, 2001
by
Brian Wellington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isc_{base64|hex}_decodestring took an unused mctx. Remove the mctx.
parent
72d9655b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
33 deletions
+22
-33
bin/dig/dighost.c
bin/dig/dighost.c
+2
-3
bin/named/omapiconf.c
bin/named/omapiconf.c
+2
-3
bin/named/server.c
bin/named/server.c
+2
-2
bin/named/tsigconf.c
bin/named/tsigconf.c
+2
-2
bin/nsupdate/nsupdate.c
bin/nsupdate/nsupdate.c
+2
-2
bin/rndc/rndc.c
bin/rndc/rndc.c
+2
-2
bin/tests/system/tkey/keycreate.c
bin/tests/system/tkey/keycreate.c
+2
-2
lib/isc/base64.c
lib/isc/base64.c
+2
-6
lib/isc/hex.c
lib/isc/hex.c
+2
-4
lib/isc/include/isc/base64.h
lib/isc/include/isc/base64.h
+2
-4
lib/isc/include/isc/hex.h
lib/isc/include/isc/hex.h
+2
-3
No files found.
bin/dig/dighost.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.19
6
2001/03/
14 23:13:57 gson
Exp $ */
/* $Id: dighost.c,v 1.19
7
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
));
...
...
bin/named/omapiconf.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: omapiconf.c,v 1.1
6
2001/03/
04 21:21:24
bwelling Exp $ */
/* $Id: omapiconf.c,v 1.1
7
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
,
...
...
bin/named/server.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.30
7
2001/03/
19 22:34:0
6 bwelling Exp $ */
/* $Id: server.c,v 1.30
8
2001/03/
22 00:06:5
6 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
;
...
...
bin/named/tsigconf.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tsigconf.c,v 1.1
6
2001/03/
04 21:21:28
bwelling Exp $ */
/* $Id: tsigconf.c,v 1.1
7
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
);
...
...
bin/nsupdate/nsupdate.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsupdate.c,v 1.8
3
2001/03/
09 18:18:42
bwelling Exp $ */
/* $Id: nsupdate.c,v 1.8
4
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
));
...
...
bin/rndc/rndc.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rndc.c,v 1.4
2
2001/0
2/16 00:41:43
bwelling Exp $ */
/* $Id: rndc.c,v 1.4
3
2001/0
3/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
));
...
...
bin/tests/system/tkey/keycreate.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: keycreate.c,v 1.
5
2001/0
2
/2
8
0
3:05:00
bwelling Exp $ */
/* $Id: keycreate.c,v 1.
6
2001/0
3
/2
2
0
0: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
);
...
...
lib/isc/base64.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: base64.c,v 1.2
2
2001/0
2/15 23:21:46
bwelling Exp $ */
/* $Id: base64.c,v 1.2
3
2001/0
3/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
++
;
...
...
lib/isc/hex.c
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: hex.c,v 1.
7
2001/0
1/09 21:56
:0
4
bwelling Exp $ */
/* $Id: hex.c,v 1.
8
2001/0
3/22 00:07
:0
5
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
++
;
...
...
lib/isc/include/isc/base64.h
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: base64.h,v 1.1
4
2001/0
2/15 23:21:47
bwelling Exp $ */
/* $Id: base64.h,v 1.1
5
2001/0
3/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.
*
...
...
lib/isc/include/isc/hex.h
View file @
734ae1f7
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: hex.h,v 1.
3
2001/0
1/09 21:56:59
bwelling Exp $ */
/* $Id: hex.h,v 1.
4
2001/0
3/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.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment