diff options
Diffstat (limited to 'dns.c')
-rw-r--r-- | dns.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $ */ | 1 | /* $OpenBSD: dns.c,v 1.24 2007/01/03 03:01:40 stevesk Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2003 Wesley Griffin. All rights reserved. | 4 | * Copyright (c) 2003 Wesley Griffin. All rights reserved. |
@@ -26,9 +26,14 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "includes.h" | 28 | #include "includes.h" |
29 | RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $"); | 29 | |
30 | #include <sys/types.h> | ||
31 | #include <sys/socket.h> | ||
30 | 32 | ||
31 | #include <netdb.h> | 33 | #include <netdb.h> |
34 | #include <stdarg.h> | ||
35 | #include <stdio.h> | ||
36 | #include <string.h> | ||
32 | 37 | ||
33 | #include "xmalloc.h" | 38 | #include "xmalloc.h" |
34 | #include "key.h" | 39 | #include "key.h" |
@@ -122,7 +127,7 @@ dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type, | |||
122 | *digest = (u_char *) xmalloc(*digest_len); | 127 | *digest = (u_char *) xmalloc(*digest_len); |
123 | memcpy(*digest, rdata + 2, *digest_len); | 128 | memcpy(*digest, rdata + 2, *digest_len); |
124 | } else { | 129 | } else { |
125 | *digest = xstrdup(""); | 130 | *digest = (u_char *)xstrdup(""); |
126 | } | 131 | } |
127 | 132 | ||
128 | success = 1; | 133 | success = 1; |
@@ -212,7 +217,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address, | |||
212 | if (fingerprints->rri_nrdatas) | 217 | if (fingerprints->rri_nrdatas) |
213 | *flags |= DNS_VERIFY_FOUND; | 218 | *flags |= DNS_VERIFY_FOUND; |
214 | 219 | ||
215 | for (counter = 0; counter < fingerprints->rri_nrdatas; counter++) { | 220 | for (counter = 0; counter < fingerprints->rri_nrdatas; counter++) { |
216 | /* | 221 | /* |
217 | * Extract the key from the answer. Ignore any badly | 222 | * Extract the key from the answer. Ignore any badly |
218 | * formatted fingerprints. | 223 | * formatted fingerprints. |