summaryrefslogtreecommitdiff
path: root/dns.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-02-27 07:55:05 +1100
committerDamien Miller <djm@mindrot.org>2010-02-27 07:55:05 +1100
commit0a80ca190a39943029719facf7edb990def7ae62 (patch)
treee423e30d8412de67170b8240ba919df10ed8e391 /dns.c
parentd27d85d5320bb946d4bb734dcf45a8d20bad6020 (diff)
- OpenBSD CVS Sync
- djm@cvs.openbsd.org 2010/02/26 20:29:54 [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys addrmatch.c auth-options.c] [auth-options.h auth.h auth2-pubkey.c authfd.c dns.c dns.h hostfile.c] [hostfile.h kex.h kexdhs.c kexgexs.c key.c key.h match.h monitor.c] [myproposal.h servconf.c servconf.h ssh-add.c ssh-agent.c ssh-dss.c] [ssh-keygen.1 ssh-keygen.c ssh-rsa.c ssh.1 ssh.c ssh2.h sshconnect.c] [sshconnect2.c sshd.8 sshd.c sshd_config.5] 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 sh/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 'dns.c')
-rw-r--r--dns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dns.c b/dns.c
index a7da03fa3..2e7bb5aae 100644
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.c,v 1.25 2008/06/12 00:03:49 dtucker Exp $ */ 1/* $OpenBSD: dns.c,v 1.26 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -75,7 +75,7 @@ dns_result_totext(unsigned int res)
75 */ 75 */
76static int 76static int
77dns_read_key(u_int8_t *algorithm, u_int8_t *digest_type, 77dns_read_key(u_int8_t *algorithm, u_int8_t *digest_type,
78 u_char **digest, u_int *digest_len, const Key *key) 78 u_char **digest, u_int *digest_len, Key *key)
79{ 79{
80 int success = 0; 80 int success = 0;
81 81
@@ -172,7 +172,7 @@ is_numeric_hostname(const char *hostname)
172 */ 172 */
173int 173int
174verify_host_key_dns(const char *hostname, struct sockaddr *address, 174verify_host_key_dns(const char *hostname, struct sockaddr *address,
175 const Key *hostkey, int *flags) 175 Key *hostkey, int *flags)
176{ 176{
177 u_int counter; 177 u_int counter;
178 int result; 178 int result;
@@ -271,7 +271,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
271 * Export the fingerprint of a key as a DNS resource record 271 * Export the fingerprint of a key as a DNS resource record
272 */ 272 */
273int 273int
274export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic) 274export_dns_rr(const char *hostname, Key *key, FILE *f, int generic)
275{ 275{
276 u_int8_t rdata_pubkey_algorithm = 0; 276 u_int8_t rdata_pubkey_algorithm = 0;
277 u_int8_t rdata_digest_type = SSHFP_HASH_SHA1; 277 u_int8_t rdata_digest_type = SSHFP_HASH_SHA1;