Commit Diff
Diff:
0592427416f9e50cdb62dcda76fae48ba8e55c6c
521247c21a75758f14560cc86137be6bbd16d06e
Commit:
521247c21a75758f14560cc86137be6bbd16d06e
Tree:
c2fb6b28c0bffb249163516085693b3e0688242a
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Fri Jun 28 06:44:07 2019 UTC
Message:
revert the _conceal changes, my production machine is still at 6.5 and this isn't in the system yet. As soon as 6.6 comes out I'll be bringing it back.
blob - 0a69ae582ba4ba5ca40b7c130d7d0fde5e125eea
blob + 81bbeee61f1b7598e8e3e42e4623d3897c83605e
--- parse.y
+++ parse.y
@@ -21,7 +21,7 @@
*/
/*
- * $Id: parse.y,v 1.71 2019/06/28 05:45:35 pjp Exp $
+ * $Id: parse.y,v 1.72 2019/06/28 06:44:07 pjp Exp $
*/
%{
@@ -397,22 +397,11 @@ quotedfilename:
tsigauth:
TSIGAUTH STRING QUOTEDSTRING SEMICOLON CRLF {
- char *key;
+ char key[512];
char *keyname;
int keylen, keynamelen;
-
-
-#if __OpenBSD__
- key = calloc_conceal(512, 1);
-#else
- key = calloc(512, 1);
-#endif
- if (key == NULL) {
- dolog(LOG_ERR, "calloc: %s\n", strerror(errno));
- return -1;
- }
- if ((keylen = mybase64_decode($3, key, 512)) < 0) {
+ if ((keylen = mybase64_decode($3, key, sizeof(key))) < 0) {
dolog(LOG_ERR, "can't decode tsig base64\n");
return -1;
}
@@ -422,14 +411,8 @@ tsigauth:
insert_tsig_key(key, keylen, keyname, keynamelen);
free($2);
-#ifdef __OpenBSD__
- freezero($3, strlen($3)); /* sensitive material */
-#else
free($3);
-#endif
- free(key);
free(keyname);
-
}
;
mzone:
blob - f00bfefbfc2ed92f519241f185b06fb333ccfa8b
blob + d199e58589f66899451d2fee3094e3d41e9cb796
--- tsig.c
+++ tsig.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: tsig.c,v 1.3 2019/06/28 05:45:35 pjp Exp $
+ * $Id: tsig.c,v 1.4 2019/06/28 06:44:07 pjp Exp $
*/
@@ -254,11 +254,7 @@ init_tsig_key(void)
int
insert_tsig_key(char *key, int keylen, char *keyname, int keynamelen)
{
-#if __OpenBSD__
- tk2 = malloc_conceal(sizeof(struct tsigkeyentry));
-#else
tk2 = malloc(sizeof(struct tsigkeyentry)); /* Insert after. */
-#endif
if (tk2 == NULL)
return -1;
@@ -269,11 +265,7 @@ insert_tsig_key(char *key, int keylen, char *keyname,
memcpy(tk2->key, key, keylen);
tk2->keylen = keylen;
-#if __OpenBSD__
- tk2->keyname = malloc_conceal(keynamelen);
-#else
tk2->keyname = malloc(keynamelen);
-#endif
if (tk2->keyname == NULL) {
return -1;
}
repomaster@centroid.eu