summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2014-12-22 07:51:30 +0000
committerDamien Miller <djm@mindrot.org>2014-12-22 19:06:52 +1100
commitf69b69b8625be447b8826b21d87713874dac25a6 (patch)
treead29e7621445860c76e02f7f2384b0198bfc27e5 /auth.h
parent46ac2ed4677968224c4ca825bc98fc68dae183f0 (diff)
upstream commit
remember which public keys have been used for authentication and refuse to accept previously-used keys. This allows AuthenticationMethods=publickey,publickey to require that users authenticate using two _different_ pubkeys. ok markus@
Diffstat (limited to 'auth.h')
-rw-r--r--auth.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/auth.h b/auth.h
index d081c94a6..c67e4a4d4 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.78 2014/07/03 11:16:55 djm Exp $ */ 1/* $OpenBSD: auth.h,v 1.79 2014/12/22 07:51:30 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -42,6 +42,8 @@
42#include <krb5.h> 42#include <krb5.h>
43#endif 43#endif
44 44
45struct sshkey;
46
45typedef struct Authctxt Authctxt; 47typedef struct Authctxt Authctxt;
46typedef struct Authmethod Authmethod; 48typedef struct Authmethod Authmethod;
47typedef struct KbdintDevice KbdintDevice; 49typedef struct KbdintDevice KbdintDevice;
@@ -75,6 +77,9 @@ struct Authctxt {
75#endif 77#endif
76 Buffer *loginmsg; 78 Buffer *loginmsg;
77 void *methoddata; 79 void *methoddata;
80
81 struct sshkey **prev_userkeys;
82 u_int nprev_userkeys;
78}; 83};
79/* 84/*
80 * Every authentication method has to handle authentication requests for 85 * Every authentication method has to handle authentication requests for
@@ -123,6 +128,8 @@ int hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
123int user_key_allowed(struct passwd *, Key *); 128int user_key_allowed(struct passwd *, Key *);
124void pubkey_auth_info(Authctxt *, const Key *, const char *, ...) 129void pubkey_auth_info(Authctxt *, const Key *, const char *, ...)
125 __attribute__((__format__ (printf, 3, 4))); 130 __attribute__((__format__ (printf, 3, 4)));
131void auth2_record_userkey(Authctxt *, struct sshkey *);
132int auth2_userkey_already_used(Authctxt *, struct sshkey *);
126 133
127struct stat; 134struct stat;
128int auth_secure_path(const char *, struct stat *, const char *, uid_t, 135int auth_secure_path(const char *, struct stat *, const char *, uid_t,