mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
- stevesk@cvs.openbsd.org 2005/10/17 14:13:35
[dns.c dns.h] more cleanups; ok jakob@
This commit is contained in:
parent
7e8795d308
commit
319550a52b
@ -51,6 +51,9 @@
|
|||||||
- stevesk@cvs.openbsd.org 2005/10/17 14:01:28
|
- stevesk@cvs.openbsd.org 2005/10/17 14:01:28
|
||||||
[dns.c]
|
[dns.c]
|
||||||
remove #ifdef LWRES; ok jakob@
|
remove #ifdef LWRES; ok jakob@
|
||||||
|
- stevesk@cvs.openbsd.org 2005/10/17 14:13:35
|
||||||
|
[dns.c dns.h]
|
||||||
|
more cleanups; ok jakob@
|
||||||
|
|
||||||
20051102
|
20051102
|
||||||
- (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup().
|
- (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup().
|
||||||
@ -3184,4 +3187,4 @@
|
|||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3938 2005/11/05 04:10:42 djm Exp $
|
$Id: ChangeLog,v 1.3939 2005/11/05 04:11:15 djm Exp $
|
||||||
|
14
dns.c
14
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.16 2005/10/17 14:13:35 stevesk Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
|
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
|
||||||
@ -25,10 +25,9 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
@ -36,8 +35,6 @@
|
|||||||
#include "dns.h"
|
#include "dns.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
RCSID("$OpenBSD: dns.c,v 1.15 2005/10/17 14:01:28 stevesk Exp $");
|
|
||||||
|
|
||||||
static const char *errset_text[] = {
|
static const char *errset_text[] = {
|
||||||
"success", /* 0 ERRSET_SUCCESS */
|
"success", /* 0 ERRSET_SUCCESS */
|
||||||
"out of memory", /* 1 ERRSET_NOMEMORY */
|
"out of memory", /* 1 ERRSET_NOMEMORY */
|
||||||
@ -179,7 +176,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
|
|||||||
|
|
||||||
*flags = 0;
|
*flags = 0;
|
||||||
|
|
||||||
debug3("verify_hostkey_dns");
|
debug3("verify_host_key_dns");
|
||||||
if (hostkey == NULL)
|
if (hostkey == NULL)
|
||||||
fatal("No key to look up!");
|
fatal("No key to look up!");
|
||||||
|
|
||||||
@ -256,7 +253,6 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Export the fingerprint of a key as a DNS resource record
|
* Export the fingerprint of a key as a DNS resource record
|
||||||
*/
|
*/
|
||||||
@ -272,7 +268,7 @@ export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic)
|
|||||||
int success = 0;
|
int success = 0;
|
||||||
|
|
||||||
if (dns_read_key(&rdata_pubkey_algorithm, &rdata_digest_type,
|
if (dns_read_key(&rdata_pubkey_algorithm, &rdata_digest_type,
|
||||||
&rdata_digest, &rdata_digest_len, key)) {
|
&rdata_digest, &rdata_digest_len, key)) {
|
||||||
|
|
||||||
if (generic)
|
if (generic)
|
||||||
fprintf(f, "%s IN TYPE%d \\# %d %02x %02x ", hostname,
|
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)
|
|||||||
xfree(rdata_digest); /* from key_fingerprint_raw() */
|
xfree(rdata_digest); /* from key_fingerprint_raw() */
|
||||||
success = 1;
|
success = 1;
|
||||||
} else {
|
} else {
|
||||||
error("dns_export_rr: unsupported algorithm");
|
error("export_dns_rr: unsupported algorithm");
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
4
dns.h
4
dns.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: dns.h,v 1.5 2003/11/12 16:39:58 jakob Exp $ */
|
/* $OpenBSD: dns.h,v 1.6 2005/10/17 14:13:35 stevesk Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
|
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
|
||||||
@ -25,7 +25,6 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
|
||||||
#ifndef DNS_H
|
#ifndef DNS_H
|
||||||
@ -49,7 +48,6 @@ enum sshfp_hashes {
|
|||||||
#define DNS_VERIFY_MATCH 0x00000002
|
#define DNS_VERIFY_MATCH 0x00000002
|
||||||
#define DNS_VERIFY_SECURE 0x00000004
|
#define DNS_VERIFY_SECURE 0x00000004
|
||||||
|
|
||||||
|
|
||||||
int verify_host_key_dns(const char *, struct sockaddr *, const Key *, int *);
|
int verify_host_key_dns(const char *, struct sockaddr *, const Key *, int *);
|
||||||
int export_dns_rr(const char *, const Key *, FILE *, int);
|
int export_dns_rr(const char *, const Key *, FILE *, int);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user