Fixed an uninitialized variable, removed a dead line of code, and changed

several response processing functions to not require keyrings.
This commit is contained in:
Brian Wellington 2001-01-11 19:09:47 +00:00
parent 90bffb134e
commit f847f8208c
2 changed files with 4 additions and 8 deletions

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tkey.h,v 1.17 2001/01/09 21:53:35 bwelling Exp $ */
/* $Id: tkey.h,v 1.18 2001/01/11 19:09:47 bwelling Exp $ */
#ifndef DNS_TKEY_H
#define DNS_TKEY_H 1
@ -155,7 +155,7 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
* 'rmsg' is a valid message (the response)
* 'key' is a valid Diffie Hellman dst key
* 'outkey' is either NULL or a pointer to NULL
* 'ring' is not NULL
* 'ring' is a valid keyring or NULL
*
* Returns:
* ISC_R_SUCCESS the shared key was successfully added

View file

@ -16,7 +16,7 @@
*/
/*
* $Id: tkey.c,v 1.61 2001/01/11 07:28:30 bwelling Exp $
* $Id: tkey.c,v 1.62 2001/01/11 19:09:46 bwelling Exp $
*/
#include <config.h>
@ -1049,7 +1049,7 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
dns_name_t keyname, *tkeyname, *theirkeyname, *ourkeyname, *tempname;
dns_rdataset_t *theirkeyset = NULL, *ourkeyset = NULL;
dns_rdata_t theirkeyrdata = DNS_RDATA_INIT;
dst_key_t *theirkey;
dst_key_t *theirkey = NULL;
dns_rdata_tkey_t qtkey, rtkey;
unsigned char secretdata[256];
unsigned int sharedsize;
@ -1065,7 +1065,6 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
REQUIRE(dst_key_isprivate(key));
if (outkey != NULL)
REQUIRE(*outkey == NULL);
REQUIRE(ring != NULL);
if (rmsg->rcode != dns_rcode_noerror)
return (ISC_RESULTCLASS_DNSRCODE + rmsg->rcode);
@ -1122,13 +1121,11 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
if (theirkeyset == NULL) {
tkey_log("dns_tkey_processdhresponse: failed to find server "
"key");
result = DNS_R_INVALIDTKEY;
result = ISC_R_NOTFOUND;
goto failure;
}
dns_rdataset_current(theirkeyset, &theirkeyrdata);
theirkey = NULL;
RETERR(dns_dnssec_keyfromrdata(theirkeyname, &theirkeyrdata,
rmsg->mctx, &theirkey));
@ -1193,7 +1190,6 @@ dns_tkey_processgssresponse(dns_message_t *qmsg, dns_message_t *rmsg,
REQUIRE(gname != NULL);
if (outkey != NULL)
REQUIRE(*outkey == NULL);
REQUIRE(ring != NULL);
if (rmsg->rcode != dns_rcode_noerror)
return (ISC_RESULTCLASS_DNSRCODE + rmsg->rcode);