summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/dns.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-02-26 20:29:55 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-02-26 20:29:55 +0000
commit30ff2be0d9e083583c76524b4c0b3f51263ff251 (patch)
tree813b368b824f5a65ce2436f896735a485904d1d9 /usr.bin/ssh/dns.c
parent2cbfa260b3daf3a0f015bcc5fffabcede8d70c06 (diff)
Add support for certificate key types for users and hosts.
OpenSSH certificate key types are not X.509 certificates, but a much simpler format that encodes a public key, identity information and some validity constraints and signs it with a CA key. CA keys are regular SSH keys. This certificate style avoids the attack surface of X.509 certificates and is very easy to deploy. Certified host keys allow automatic acceptance of new host keys when a CA certificate is marked as trusted in ~/.ssh/known_hosts. see VERIFYING HOST KEYS in ssh(1) for details. Certified user keys allow authentication of users when the signing CA key is marked as trusted in authorized_keys. See "AUTHORIZED_KEYS FILE FORMAT" in sshd(8) for details. Certificates are minted using ssh-keygen(1), documentation is in the "CERTIFICATES" section of that manpage. Documentation on the format of certificates is in the file PROTOCOL.certkeys feedback and ok markus@
Diffstat (limited to 'usr.bin/ssh/dns.c')
-rw-r--r--usr.bin/ssh/dns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/dns.c b/usr.bin/ssh/dns.c
index cb4858694f9..e8bfe76cb64 100644
--- a/usr.bin/ssh/dns.c
+++ b/usr.bin/ssh/dns.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dns.c,v 1.25 2008/06/12 00:03:49 dtucker Exp $ */
+/* $OpenBSD: dns.c,v 1.26 2010/02/26 20:29:54 djm Exp $ */
/*
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -72,7 +72,7 @@ dns_result_totext(unsigned int res)
*/
static int
dns_read_key(u_int8_t *algorithm, u_int8_t *digest_type,
- u_char **digest, u_int *digest_len, const Key *key)
+ u_char **digest, u_int *digest_len, Key *key)
{
int success = 0;
@@ -169,7 +169,7 @@ is_numeric_hostname(const char *hostname)
*/
int
verify_host_key_dns(const char *hostname, struct sockaddr *address,
- const Key *hostkey, int *flags)
+ Key *hostkey, int *flags)
{
u_int counter;
int result;
@@ -268,7 +268,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
* Export the fingerprint of a key as a DNS resource record
*/
int
-export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic)
+export_dns_rr(const char *hostname, Key *key, FILE *f, int generic)
{
u_int8_t rdata_pubkey_algorithm = 0;
u_int8_t rdata_digest_type = SSHFP_HASH_SHA1;