]> andersk Git - openssh.git/blobdiff - dns.c
- stevesk@cvs.openbsd.org 2006/07/22 19:08:54
[openssh.git] / dns.c
diff --git a/dns.c b/dns.c
index d73fdb256b658d1a3519c612e75b8c9213e51e3f..16954a6a1f0ebc131b7d8ec119768edf3764dd32 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dns.c,v 1.15 2005/10/17 14:01:28 stevesk Exp $        */
+/* $OpenBSD: dns.c,v 1.20 2006/07/08 21:47:12 stevesk Exp $ */
 
 /*
  * Copyright (c) 2003 Wesley Griffin. All rights reserved.
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
 #include "includes.h"
 
-#include <openssl/bn.h>
-#include <netdb.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#if defined(HAVE_NETDB_H)
+# include <netdb.h>
+#endif
 
 #include "xmalloc.h"
 #include "key.h"
 #include "dns.h"
 #include "log.h"
 
-RCSID("$OpenBSD: dns.c,v 1.15 2005/10/17 14:01:28 stevesk Exp $");
-
 static const char *errset_text[] = {
        "success",              /* 0 ERRSET_SUCCESS */
        "out of memory",        /* 1 ERRSET_NOMEMORY */
@@ -125,7 +126,7 @@ dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type,
                        *digest = (u_char *) xmalloc(*digest_len);
                        memcpy(*digest, rdata + 2, *digest_len);
                } else {
-                       *digest = xstrdup("");
+                       *digest = (u_char *)xstrdup("");
                }
 
                success = 1;
@@ -179,7 +180,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
 
        *flags = 0;
 
-       debug3("verify_hostkey_dns");
+       debug3("verify_host_key_dns");
        if (hostkey == NULL)
                fatal("No key to look up!");
 
@@ -256,7 +257,6 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
        return 0;
 }
 
-
 /*
  * Export the fingerprint of a key as a DNS resource record
  */
@@ -272,7 +272,7 @@ export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic)
        int success = 0;
 
        if (dns_read_key(&rdata_pubkey_algorithm, &rdata_digest_type,
-                        &rdata_digest, &rdata_digest_len, key)) {
+           &rdata_digest, &rdata_digest_len, key)) {
 
                if (generic)
                        fprintf(f, "%s IN TYPE%d \\# %d %02x %02x ", hostname,
@@ -288,7 +288,7 @@ export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic)
                xfree(rdata_digest); /* from key_fingerprint_raw() */
                success = 1;
        } else {
-               error("dns_export_rr: unsupported algorithm");
+               error("export_dns_rr: unsupported algorithm");
        }
 
        return success;
This page took 0.03497 seconds and 4 git commands to generate.