summaryrefslogtreecommitdiff
path: root/authfd.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-25 00:26:21 +1100
committerDamien Miller <djm@mindrot.org>1999-11-25 00:26:21 +1100
commit95def09838fc61b37b6ea7cd5c234a465b4b129b (patch)
tree042744f76f40a326b873cb1c3690a6d7d966bc3e /authfd.h
parent4d2f15f895f4c795afc008aeff3fd2ceffbc44f4 (diff)
- Merged very large OpenBSD source code reformat
- OpenBSD CVS updates - [channels.c cipher.c compat.c log-client.c scp.c serverloop.c] [ssh.h sshd.8 sshd.c] syslog changes: * Unified Logmessage for all auth-types, for success and for failed * Standard connections get only ONE line in the LOG when level==LOG: Auth-attempts are logged only, if authentication is: a) successfull or b) with passwd or c) we had more than AUTH_FAIL_LOG failues * many log() became verbose() * old behaviour with level=VERBOSE - [readconf.c readconf.h ssh.1 ssh.h sshconnect.c sshd.c] tranfer s/key challenge/response data in SSH_SMSG_AUTH_TIS_CHALLENGE messages. allows use of s/key in windows (ttssh, securecrt) and ssh-1.2.27 clients without 'ssh -v', ok: niels@ - [sshd.8] -V, for fallback to openssh in SSH2 compatibility mode - [sshd.c] fix sigchld race; cjc5@po.cwru.edu
Diffstat (limited to 'authfd.h')
-rw-r--r--authfd.h89
1 files changed, 45 insertions, 44 deletions
diff --git a/authfd.h b/authfd.h
index df589b1c4..bddb8bab8 100644
--- a/authfd.h
+++ b/authfd.h
@@ -1,19 +1,19 @@
1/* 1/*
2 2 *
3authfd.h 3 * authfd.h
4 4 *
5Author: Tatu Ylonen <ylo@cs.hut.fi> 5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 6 *
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 All rights reserved 8 * All rights reserved
9 9 *
10Created: Wed Mar 29 01:17:41 1995 ylo 10 * Created: Wed Mar 29 01:17:41 1995 ylo
11 11 *
12Functions to interface with the SSH_AUTHENTICATION_FD socket. 12 * Functions to interface with the SSH_AUTHENTICATION_FD socket.
13 13 *
14*/ 14 */
15 15
16/* RCSID("$Id: authfd.h,v 1.2 1999/11/16 02:37:16 damien Exp $"); */ 16/* RCSID("$Id: authfd.h,v 1.3 1999/11/24 13:26:22 damien Exp $"); */
17 17
18#ifndef AUTHFD_H 18#ifndef AUTHFD_H
19#define AUTHFD_H 19#define AUTHFD_H
@@ -31,72 +31,73 @@ Functions to interface with the SSH_AUTHENTICATION_FD socket.
31#define SSH_AGENTC_REMOVE_RSA_IDENTITY 8 31#define SSH_AGENTC_REMOVE_RSA_IDENTITY 8
32#define SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES 9 32#define SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES 9
33 33
34typedef struct 34typedef struct {
35{ 35 int fd;
36 int fd; 36 Buffer packet;
37 Buffer packet; 37 Buffer identities;
38 Buffer identities; 38 int howmany;
39 int howmany; 39} AuthenticationConnection;
40} AuthenticationConnection;
41
42/* Returns the number of the authentication fd, or -1 if there is none. */ 40/* Returns the number of the authentication fd, or -1 if there is none. */
43int ssh_get_authentication_socket(); 41int ssh_get_authentication_socket();
44 42
45/* This should be called for any descriptor returned by 43/* This should be called for any descriptor returned by
46 ssh_get_authentication_socket(). Depending on the way the descriptor was 44 ssh_get_authentication_socket(). Depending on the way the descriptor was
47 obtained, this may close the descriptor. */ 45 obtained, this may close the descriptor. */
48void ssh_close_authentication_socket(int authfd); 46void ssh_close_authentication_socket(int authfd);
49 47
50/* Opens and connects a private socket for communication with the 48/* Opens and connects a private socket for communication with the
51 authentication agent. Returns NULL if an error occurred and the 49 authentication agent. Returns NULL if an error occurred and the
52 connection could not be opened. The connection should be closed by 50 connection could not be opened. The connection should be closed by
53 the caller by calling ssh_close_authentication_connection(). */ 51 the caller by calling ssh_close_authentication_connection(). */
54AuthenticationConnection *ssh_get_authentication_connection(); 52AuthenticationConnection *ssh_get_authentication_connection();
55 53
56/* Closes the connection to the authentication agent and frees any associated 54/* Closes the connection to the authentication agent and frees any associated
57 memory. */ 55 memory. */
58void ssh_close_authentication_connection(AuthenticationConnection *ac); 56void ssh_close_authentication_connection(AuthenticationConnection * ac);
59 57
60/* Returns the first authentication identity held by the agent. 58/* Returns the first authentication identity held by the agent.
61 Returns true if an identity is available, 0 otherwise. 59 Returns true if an identity is available, 0 otherwise.
62 The caller must initialize the integers before the call, and free the 60 The caller must initialize the integers before the call, and free the
63 comment after a successful call (before calling ssh_get_next_identity). */ 61 comment after a successful call (before calling ssh_get_next_identity). */
64int ssh_get_first_identity(AuthenticationConnection *connection, 62int
65 BIGNUM *e, BIGNUM *n, char **comment); 63ssh_get_first_identity(AuthenticationConnection * connection,
64 BIGNUM * e, BIGNUM * n, char **comment);
66 65
67/* Returns the next authentication identity for the agent. Other functions 66/* Returns the next authentication identity for the agent. Other functions
68 can be called between this and ssh_get_first_identity or two calls of this 67 can be called between this and ssh_get_first_identity or two calls of this
69 function. This returns 0 if there are no more identities. The caller 68 function. This returns 0 if there are no more identities. The caller
70 must free comment after a successful return. */ 69 must free comment after a successful return. */
71int ssh_get_next_identity(AuthenticationConnection *connection, 70int
72 BIGNUM *e, BIGNUM *n, char **comment); 71ssh_get_next_identity(AuthenticationConnection * connection,
72 BIGNUM * e, BIGNUM * n, char **comment);
73 73
74/* Requests the agent to decrypt the given challenge. Returns true if 74/* Requests the agent to decrypt the given challenge. Returns true if
75 the agent claims it was able to decrypt it. */ 75 the agent claims it was able to decrypt it. */
76int ssh_decrypt_challenge(AuthenticationConnection *auth, 76int
77 BIGNUM *e, BIGNUM *n, BIGNUM *challenge, 77ssh_decrypt_challenge(AuthenticationConnection * auth,
78 unsigned char session_id[16], 78 BIGNUM * e, BIGNUM * n, BIGNUM * challenge,
79 unsigned int response_type, 79 unsigned char session_id[16],
80 unsigned char response[16]); 80 unsigned int response_type,
81 unsigned char response[16]);
81 82
82/* Adds an identity to the authentication server. This call is not meant to 83/* Adds an identity to the authentication server. This call is not meant to
83 be used by normal applications. This returns true if the identity 84 be used by normal applications. This returns true if the identity
84 was successfully added. */ 85 was successfully added. */
85int ssh_add_identity(AuthenticationConnection *connection, 86 int ssh_add_identity(AuthenticationConnection * connection,
86 RSA *key, const char *comment); 87 RSA * key, const char *comment);
87 88
88/* Removes the identity from the authentication server. This call is 89/* Removes the identity from the authentication server. This call is
89 not meant to be used by normal applications. This returns true if the 90 not meant to be used by normal applications. This returns true if the
90 identity was successfully added. */ 91 identity was successfully added. */
91int ssh_remove_identity(AuthenticationConnection *connection, 92 int ssh_remove_identity(AuthenticationConnection * connection,
92 RSA *key); 93 RSA * key);
93 94
94/* Removes all identities from the authentication agent. This call is not 95/* Removes all identities from the authentication agent. This call is not
95 meant to be used by normal applications. This returns true if the 96 meant to be used by normal applications. This returns true if the
96 operation was successful. */ 97 operation was successful. */
97int ssh_remove_all_identities(AuthenticationConnection *connection); 98 int ssh_remove_all_identities(AuthenticationConnection * connection);
98 99
99/* Closes the connection to the authentication agent. */ 100/* Closes the connection to the authentication agent. */
100void ssh_close_authentication(AuthenticationConnection *connection); 101 void ssh_close_authentication(AuthenticationConnection * connection);
101 102
102#endif /* AUTHFD_H */ 103#endif /* AUTHFD_H */