summaryrefslogtreecommitdiffstats
path: root/authfd.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-14 21:05:27 +0100
committerDamien Miller <djm@mindrot.org>2015-01-15 11:37:34 +0100
commit141efe49542f7156cdbc2e4cd0a041d8b1aab622 (patch)
treea9142350f2b8689f4d42548ca272ed577b32a881 /authfd.h
parentupstream commit (diff)
downloadopenssh-141efe49542f7156cdbc2e4cd0a041d8b1aab622.tar.xz
openssh-141efe49542f7156cdbc2e4cd0a041d8b1aab622.zip
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.h60
1 files changed, 28 insertions, 32 deletions
diff --git a/authfd.h b/authfd.h
index 2582a27aa..bea20c26b 100644
--- a/authfd.h
+++ b/authfd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfd.h,v 1.37 2009/08/27 17:44:52 djm Exp $ */
+/* $OpenBSD: authfd.h,v 1.38 2015/01/14 20:05:27 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,6 +16,33 @@
#ifndef AUTHFD_H
#define AUTHFD_H
+/* List of identities returned by ssh_fetch_identitylist() */
+struct ssh_identitylist {
+ size_t nkeys;
+ struct sshkey **keys;
+ char **comments;
+};
+
+int ssh_get_authentication_socket(int *fdp);
+void ssh_close_authentication_socket(int sock);
+
+int ssh_lock_agent(int sock, int lock, const char *password);
+int ssh_fetch_identitylist(int sock, int version,
+ struct ssh_identitylist **idlp);
+void ssh_free_identitylist(struct ssh_identitylist *idl);
+int ssh_add_identity_constrained(int sock, struct sshkey *key,
+ const char *comment, u_int life, u_int confirm);
+int ssh_remove_identity(int sock, struct sshkey *key);
+int ssh_update_card(int sock, int add, const char *reader_id,
+ const char *pin, u_int life, u_int confirm);
+int ssh_remove_all_identities(int sock, int version);
+
+int ssh_decrypt_challenge(int sock, struct sshkey* key, BIGNUM *challenge,
+ u_char session_id[16], u_char response[16]);
+int ssh_agent_sign(int sock, struct sshkey *key,
+ u_char **sigp, size_t *lenp,
+ const u_char *data, size_t datalen, u_int compat);
+
/* Messages for the authentication agent connection. */
#define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1
#define SSH_AGENT_RSA_IDENTITIES_ANSWER 2
@@ -60,35 +87,4 @@
#define SSH_AGENT_OLD_SIGNATURE 0x01
-typedef struct {
- int fd;
- Buffer identities;
- int howmany;
-} AuthenticationConnection;
-
-int ssh_agent_present(void);
-int ssh_get_authentication_socket(void);
-void ssh_close_authentication_socket(int);
-
-AuthenticationConnection *ssh_get_authentication_connection(void);
-void ssh_close_authentication_connection(AuthenticationConnection *);
-int ssh_get_num_identities(AuthenticationConnection *, int);
-Key *ssh_get_first_identity(AuthenticationConnection *, char **, int);
-Key *ssh_get_next_identity(AuthenticationConnection *, char **, int);
-int ssh_add_identity_constrained(AuthenticationConnection *, Key *,
- const char *, u_int, u_int);
-int ssh_remove_identity(AuthenticationConnection *, Key *);
-int ssh_remove_all_identities(AuthenticationConnection *, int);
-int ssh_lock_agent(AuthenticationConnection *, int, const char *);
-int ssh_update_card(AuthenticationConnection *, int, const char *,
- const char *, u_int, u_int);
-
-int
-ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16],
- u_int, u_char[16]);
-
-int
-ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, u_int *, u_char *,
- u_int);
-
#endif /* AUTHFD_H */