diff options
Diffstat (limited to 'auth.h')
-rw-r--r-- | auth.h | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -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.82 2015/02/16 22:13:32 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,9 @@ | |||
42 | #include <krb5.h> | 42 | #include <krb5.h> |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | struct ssh; | ||
46 | struct sshkey; | ||
47 | |||
45 | typedef struct Authctxt Authctxt; | 48 | typedef struct Authctxt Authctxt; |
46 | typedef struct Authmethod Authmethod; | 49 | typedef struct Authmethod Authmethod; |
47 | typedef struct KbdintDevice KbdintDevice; | 50 | typedef struct KbdintDevice KbdintDevice; |
@@ -76,6 +79,9 @@ struct Authctxt { | |||
76 | #endif | 79 | #endif |
77 | Buffer *loginmsg; | 80 | Buffer *loginmsg; |
78 | void *methoddata; | 81 | void *methoddata; |
82 | |||
83 | struct sshkey **prev_userkeys; | ||
84 | u_int nprev_userkeys; | ||
79 | }; | 85 | }; |
80 | /* | 86 | /* |
81 | * Every authentication method has to handle authentication requests for | 87 | * Every authentication method has to handle authentication requests for |
@@ -124,6 +130,8 @@ int hostbased_key_allowed(struct passwd *, const char *, char *, Key *); | |||
124 | int user_key_allowed(struct passwd *, Key *); | 130 | int user_key_allowed(struct passwd *, Key *); |
125 | void pubkey_auth_info(Authctxt *, const Key *, const char *, ...) | 131 | void pubkey_auth_info(Authctxt *, const Key *, const char *, ...) |
126 | __attribute__((__format__ (printf, 3, 4))); | 132 | __attribute__((__format__ (printf, 3, 4))); |
133 | void auth2_record_userkey(Authctxt *, struct sshkey *); | ||
134 | int auth2_userkey_already_used(Authctxt *, struct sshkey *); | ||
127 | 135 | ||
128 | struct stat; | 136 | struct stat; |
129 | int auth_secure_path(const char *, struct stat *, const char *, uid_t, | 137 | int auth_secure_path(const char *, struct stat *, const char *, uid_t, |
@@ -196,12 +204,13 @@ check_key_in_hostfiles(struct passwd *, Key *, const char *, | |||
196 | 204 | ||
197 | /* hostkey handling */ | 205 | /* hostkey handling */ |
198 | Key *get_hostkey_by_index(int); | 206 | Key *get_hostkey_by_index(int); |
199 | Key *get_hostkey_public_by_index(int); | 207 | Key *get_hostkey_public_by_index(int, struct ssh *); |
200 | Key *get_hostkey_public_by_type(int); | 208 | Key *get_hostkey_public_by_type(int, int, struct ssh *); |
201 | Key *get_hostkey_private_by_type(int); | 209 | Key *get_hostkey_private_by_type(int, int, struct ssh *); |
202 | int get_hostkey_index(Key *); | 210 | int get_hostkey_index(Key *, int, struct ssh *); |
203 | int ssh1_session_key(BIGNUM *); | 211 | int ssh1_session_key(BIGNUM *); |
204 | void sshd_hostkey_sign(Key *, Key *, u_char **, u_int *, u_char *, u_int); | 212 | int sshd_hostkey_sign(Key *, Key *, u_char **, size_t *, |
213 | const u_char *, size_t, u_int); | ||
205 | 214 | ||
206 | /* debug messages during authentication */ | 215 | /* debug messages during authentication */ |
207 | void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 216 | void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2))); |