summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--dns.c14
-rw-r--r--dns.h4
3 files changed, 10 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 8258b3b9b..6e546e1f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,9 @@
51 - stevesk@cvs.openbsd.org 2005/10/17 14:01:28 51 - stevesk@cvs.openbsd.org 2005/10/17 14:01:28
52 [dns.c] 52 [dns.c]
53 remove #ifdef LWRES; ok jakob@ 53 remove #ifdef LWRES; ok jakob@
54 - stevesk@cvs.openbsd.org 2005/10/17 14:13:35
55 [dns.c dns.h]
56 more cleanups; ok jakob@
54 57
5520051102 5820051102
56 - (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup(). 59 - (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup().
@@ -3184,4 +3187,4 @@
3184 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3187 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3185 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3188 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3186 3189
3187$Id: ChangeLog,v 1.3938 2005/11/05 04:10:42 djm Exp $ 3190$Id: ChangeLog,v 1.3939 2005/11/05 04:11:15 djm Exp $
diff --git a/dns.c b/dns.c
index d73fdb256..a71dd9bff 100644
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.c,v 1.15 2005/10/17 14:01:28 stevesk Exp $ */ 1/* $OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -25,10 +25,9 @@
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28
29#include "includes.h" 28#include "includes.h"
29RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $");
30 30
31#include <openssl/bn.h>
32#include <netdb.h> 31#include <netdb.h>
33 32
34#include "xmalloc.h" 33#include "xmalloc.h"
@@ -36,8 +35,6 @@
36#include "dns.h" 35#include "dns.h"
37#include "log.h" 36#include "log.h"
38 37
39RCSID("$OpenBSD: dns.c,v 1.15 2005/10/17 14:01:28 stevesk Exp $");
40
41static const char *errset_text[] = { 38static const char *errset_text[] = {
42 "success", /* 0 ERRSET_SUCCESS */ 39 "success", /* 0 ERRSET_SUCCESS */
43 "out of memory", /* 1 ERRSET_NOMEMORY */ 40 "out of memory", /* 1 ERRSET_NOMEMORY */
@@ -179,7 +176,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
179 176
180 *flags = 0; 177 *flags = 0;
181 178
182 debug3("verify_hostkey_dns"); 179 debug3("verify_host_key_dns");
183 if (hostkey == NULL) 180 if (hostkey == NULL)
184 fatal("No key to look up!"); 181 fatal("No key to look up!");
185 182
@@ -256,7 +253,6 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
256 return 0; 253 return 0;
257} 254}
258 255
259
260/* 256/*
261 * Export the fingerprint of a key as a DNS resource record 257 * Export the fingerprint of a key as a DNS resource record
262 */ 258 */
@@ -272,7 +268,7 @@ export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic)
272 int success = 0; 268 int success = 0;
273 269
274 if (dns_read_key(&rdata_pubkey_algorithm, &rdata_digest_type, 270 if (dns_read_key(&rdata_pubkey_algorithm, &rdata_digest_type,
275 &rdata_digest, &rdata_digest_len, key)) { 271 &rdata_digest, &rdata_digest_len, key)) {
276 272
277 if (generic) 273 if (generic)
278 fprintf(f, "%s IN TYPE%d \\# %d %02x %02x ", hostname, 274 fprintf(f, "%s IN TYPE%d \\# %d %02x %02x ", hostname,
@@ -288,7 +284,7 @@ export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic)
288 xfree(rdata_digest); /* from key_fingerprint_raw() */ 284 xfree(rdata_digest); /* from key_fingerprint_raw() */
289 success = 1; 285 success = 1;
290 } else { 286 } else {
291 error("dns_export_rr: unsupported algorithm"); 287 error("export_dns_rr: unsupported algorithm");
292 } 288 }
293 289
294 return success; 290 return success;
diff --git a/dns.h b/dns.h
index c5da22ef6..0aa1c28f2 100644
--- a/dns.h
+++ b/dns.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.h,v 1.5 2003/11/12 16:39:58 jakob Exp $ */ 1/* $OpenBSD: dns.h,v 1.6 2005/10/17 14:13:35 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -25,7 +25,6 @@
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28
29#include "includes.h" 28#include "includes.h"
30 29
31#ifndef DNS_H 30#ifndef DNS_H
@@ -49,7 +48,6 @@ enum sshfp_hashes {
49#define DNS_VERIFY_MATCH 0x00000002 48#define DNS_VERIFY_MATCH 0x00000002
50#define DNS_VERIFY_SECURE 0x00000004 49#define DNS_VERIFY_SECURE 0x00000004
51 50
52
53int verify_host_key_dns(const char *, struct sockaddr *, const Key *, int *); 51int verify_host_key_dns(const char *, struct sockaddr *, const Key *, int *);
54int export_dns_rr(const char *, const Key *, FILE *, int); 52int export_dns_rr(const char *, const Key *, FILE *, int);
55 53