diff options
author | Damien Miller <djm@mindrot.org> | 2010-04-16 15:56:21 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-04-16 15:56:21 +1000 |
commit | 4e270b05dd9d850fb9e2e0ac43f33cb4090d3ebc (patch) | |
tree | 4fc84942b5966e9f38f18a1257ac43ddbed336be /auth2-pubkey.c | |
parent | 031c9100dfe3ee65a29084ebbd61965a76b3ad26 (diff) |
- djm@cvs.openbsd.org 2010/04/16 01:47:26
[PROTOCOL.certkeys auth-options.c auth-options.h auth-rsa.c]
[auth2-pubkey.c authfd.c key.c key.h myproposal.h ssh-add.c]
[ssh-agent.c ssh-dss.c ssh-keygen.1 ssh-keygen.c ssh-rsa.c]
[sshconnect.c sshconnect2.c sshd.c]
revised certificate format ssh-{dss,rsa}-cert-v01@openssh.com with the
following changes:
move the nonce field to the beginning of the certificate where it can
better protect against chosen-prefix attacks on the signature hash
Rename "constraints" field to "critical options"
Add a new non-critical "extensions" field
Add a serial number
The older format is still support for authentication and cert generation
(use "ssh-keygen -t v00 -s ca_key ..." to generate a v00 certificate)
ok markus@
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r-- | auth2-pubkey.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c index c4cadf4e7..83ecd6590 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-pubkey.c,v 1.22 2010/03/10 23:27:17 djm Exp $ */ | 1 | /* $OpenBSD: auth2-pubkey.c,v 1.23 2010/04/16 01:47:26 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -235,7 +235,7 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file) | |||
235 | } | 235 | } |
236 | if (auth_parse_options(pw, key_options, file, linenum) != 1) | 236 | if (auth_parse_options(pw, key_options, file, linenum) != 1) |
237 | continue; | 237 | continue; |
238 | if (key->type == KEY_RSA_CERT || key->type == KEY_DSA_CERT) { | 238 | if (key_is_cert(key)) { |
239 | if (!key_is_cert_authority) | 239 | if (!key_is_cert_authority) |
240 | continue; | 240 | continue; |
241 | if (!key_equal(found, key->cert->signature_key)) | 241 | if (!key_equal(found, key->cert->signature_key)) |
@@ -251,8 +251,7 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file) | |||
251 | auth_debug_add("%s", reason); | 251 | auth_debug_add("%s", reason); |
252 | continue; | 252 | continue; |
253 | } | 253 | } |
254 | if (auth_cert_constraints(&key->cert->constraints, | 254 | if (auth_cert_options(key, pw) != 0) { |
255 | pw) != 0) { | ||
256 | xfree(fp); | 255 | xfree(fp); |
257 | continue; | 256 | continue; |
258 | } | 257 | } |
@@ -307,7 +306,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key) | |||
307 | auth_debug_add("%s", reason); | 306 | auth_debug_add("%s", reason); |
308 | goto out; | 307 | goto out; |
309 | } | 308 | } |
310 | if (auth_cert_constraints(&key->cert->constraints, pw) != 0) | 309 | if (auth_cert_options(key, pw) != 0) |
311 | goto out; | 310 | goto out; |
312 | 311 | ||
313 | verbose("Accepted certificate ID \"%s\" signed by %s CA %s via %s", | 312 | verbose("Accepted certificate ID \"%s\" signed by %s CA %s via %s", |