summaryrefslogtreecommitdiff
path: root/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'dns.c')
-rw-r--r--dns.c14
1 files changed, 5 insertions, 9 deletions
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;