diff --git a/lib/dns/include/dns/tkey.h b/lib/dns/include/dns/tkey.h index 6e7092cc0e..a9bfd8a8af 100644 --- a/lib/dns/include/dns/tkey.h +++ b/lib/dns/include/dns/tkey.h @@ -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 diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c index 00ee7fdf04..6b20251d16 100644 --- a/lib/dns/tkey.c +++ b/lib/dns/tkey.c @@ -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 @@ -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);