diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-14 20:05:27 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-15 21:37:34 +1100 |
commit | 141efe49542f7156cdbc2e4cd0a041d8b1aab622 (patch) | |
tree | a9142350f2b8689f4d42548ca272ed577b32a881 /authfd.h | |
parent | 0088c57af302cda278bd26d8c3ae81d5b6f7c289 (diff) |
upstream commit
move authfd.c and its tentacles to the new buffer/key
API; ok markus@
Diffstat (limited to 'authfd.h')
-rw-r--r-- | authfd.h | 60 |
1 files changed, 28 insertions, 32 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfd.h,v 1.37 2009/08/27 17:44:52 djm Exp $ */ | 1 | /* $OpenBSD: authfd.h,v 1.38 2015/01/14 20:05:27 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -16,6 +16,33 @@ | |||
16 | #ifndef AUTHFD_H | 16 | #ifndef AUTHFD_H |
17 | #define AUTHFD_H | 17 | #define AUTHFD_H |
18 | 18 | ||
19 | /* List of identities returned by ssh_fetch_identitylist() */ | ||
20 | struct ssh_identitylist { | ||
21 | size_t nkeys; | ||
22 | struct sshkey **keys; | ||
23 | char **comments; | ||
24 | }; | ||
25 | |||
26 | int ssh_get_authentication_socket(int *fdp); | ||
27 | void ssh_close_authentication_socket(int sock); | ||
28 | |||
29 | int ssh_lock_agent(int sock, int lock, const char *password); | ||
30 | int ssh_fetch_identitylist(int sock, int version, | ||
31 | struct ssh_identitylist **idlp); | ||
32 | void ssh_free_identitylist(struct ssh_identitylist *idl); | ||
33 | int ssh_add_identity_constrained(int sock, struct sshkey *key, | ||
34 | const char *comment, u_int life, u_int confirm); | ||
35 | int ssh_remove_identity(int sock, struct sshkey *key); | ||
36 | int ssh_update_card(int sock, int add, const char *reader_id, | ||
37 | const char *pin, u_int life, u_int confirm); | ||
38 | int ssh_remove_all_identities(int sock, int version); | ||
39 | |||
40 | int ssh_decrypt_challenge(int sock, struct sshkey* key, BIGNUM *challenge, | ||
41 | u_char session_id[16], u_char response[16]); | ||
42 | int ssh_agent_sign(int sock, struct sshkey *key, | ||
43 | u_char **sigp, size_t *lenp, | ||
44 | const u_char *data, size_t datalen, u_int compat); | ||
45 | |||
19 | /* Messages for the authentication agent connection. */ | 46 | /* Messages for the authentication agent connection. */ |
20 | #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 | 47 | #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 |
21 | #define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 | 48 | #define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 |
@@ -60,35 +87,4 @@ | |||
60 | 87 | ||
61 | #define SSH_AGENT_OLD_SIGNATURE 0x01 | 88 | #define SSH_AGENT_OLD_SIGNATURE 0x01 |
62 | 89 | ||
63 | typedef struct { | ||
64 | int fd; | ||
65 | Buffer identities; | ||
66 | int howmany; | ||
67 | } AuthenticationConnection; | ||
68 | |||
69 | int ssh_agent_present(void); | ||
70 | int ssh_get_authentication_socket(void); | ||
71 | void ssh_close_authentication_socket(int); | ||
72 | |||
73 | AuthenticationConnection *ssh_get_authentication_connection(void); | ||
74 | void ssh_close_authentication_connection(AuthenticationConnection *); | ||
75 | int ssh_get_num_identities(AuthenticationConnection *, int); | ||
76 | Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); | ||
77 | Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); | ||
78 | int ssh_add_identity_constrained(AuthenticationConnection *, Key *, | ||
79 | const char *, u_int, u_int); | ||
80 | int ssh_remove_identity(AuthenticationConnection *, Key *); | ||
81 | int ssh_remove_all_identities(AuthenticationConnection *, int); | ||
82 | int ssh_lock_agent(AuthenticationConnection *, int, const char *); | ||
83 | int ssh_update_card(AuthenticationConnection *, int, const char *, | ||
84 | const char *, u_int, u_int); | ||
85 | |||
86 | int | ||
87 | ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16], | ||
88 | u_int, u_char[16]); | ||
89 | |||
90 | int | ||
91 | ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, u_int *, u_char *, | ||
92 | u_int); | ||
93 | |||
94 | #endif /* AUTHFD_H */ | 90 | #endif /* AUTHFD_H */ |