|
1 | 1 | # This file is part of ssh-python. |
2 | 2 | # Copyright (C) 2018 Panos Kittenis |
3 | | - |
| 3 | +# |
4 | 4 | # This library is free software; you can redistribute it and/or |
5 | 5 | # modify it under the terms of the GNU Lesser General Public |
6 | 6 | # License as published by the Free Software Foundation, version 2.1. |
7 | | - |
| 7 | +# |
8 | 8 | # This library is distributed in the hope that it will be useful, |
9 | 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | 11 | # Lesser General Public License for more details. |
12 | | - |
| 12 | +# |
13 | 13 | # You should have received a copy of the GNU Lesser General Public |
14 | 14 | # License along with this library; if not, write to the Free Software |
15 | 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 |
16 | 16 |
|
| 17 | +cimport c_ssh |
17 | 18 |
|
18 | 19 | cdef extern from "libssh/include/agent.h" nogil: |
19 | | - pass |
| 20 | + # Messages for the authentication agent connection. |
| 21 | + enum: |
| 22 | + SSH_AGENTC_REQUEST_RSA_IDENTITIES |
| 23 | + SSH_AGENT_RSA_IDENTITIES_ANSWER |
| 24 | + SSH_AGENTC_RSA_CHALLENGE |
| 25 | + SSH_AGENT_RSA_RESPONSE |
| 26 | + SSH_AGENT_FAILURE |
| 27 | + SSH_AGENT_SUCCESS |
| 28 | + SSH_AGENTC_ADD_RSA_IDENTITY |
| 29 | + SSH_AGENTC_REMOVE_RSA_IDENTITY |
| 30 | + SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES |
| 31 | + |
| 32 | + # private OpenSSH extensions for SSH2 |
| 33 | + enum: |
| 34 | + SSH2_AGENTC_REQUEST_IDENTITIES |
| 35 | + SSH2_AGENT_IDENTITIES_ANSWER |
| 36 | + SSH2_AGENTC_SIGN_REQUEST |
| 37 | + SSH2_AGENT_SIGN_RESPONSE |
| 38 | + SSH2_AGENTC_ADD_IDENTITY |
| 39 | + SSH2_AGENTC_REMOVE_IDENTITY |
| 40 | + SSH2_AGENTC_REMOVE_ALL_IDENTITIES |
| 41 | + |
| 42 | + enum: |
| 43 | + SSH_AGENTC_ADD_SMARTCARD_KEY |
| 44 | + SSH_AGENTC_REMOVE_SMARTCARD_KEY |
| 45 | + SSH_AGENTC_LOCK |
| 46 | + SSH_AGENTC_UNLOCK |
| 47 | + SSH_AGENTC_ADD_RSA_ID_CONSTRAINED |
| 48 | + SSH2_AGENTC_ADD_ID_CONSTRAINED |
| 49 | + SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED |
| 50 | + SSH_AGENT_CONSTRAIN_LIFETIME |
| 51 | + SSH_AGENT_CONSTRAIN_CONFIRM |
| 52 | + SSH2_AGENT_FAILURE |
| 53 | + SSH_COM_AGENT2_FAILURE |
| 54 | + SSH_AGENT_OLD_SIGNATURE |
| 55 | + |
| 56 | + struct ssh_socket_struct: |
| 57 | + pass |
| 58 | + |
| 59 | + struct ssh_agent_struct: |
| 60 | + ssh_socket_struct *sock |
| 61 | + c_ssh.ssh_buffer ident |
| 62 | + unsigned int count |
| 63 | + c_ssh.ssh_channel channel |
| 64 | + |
| 65 | + ssh_agent_struct *ssh_agent_new(c_ssh.ssh_session_struct *session) |
| 66 | + void ssh_agent_close(c_ssh.ssh_agent_struct *agent) |
| 67 | + void ssh_agent_free(c_ssh.ssh_agent_struct *agent) |
| 68 | + int ssh_agent_is_running(c_ssh.ssh_session_struct *session) |
| 69 | + int ssh_agent_get_ident_count(c_ssh.ssh_session_struct *session) |
| 70 | + c_ssh.ssh_key ssh_agent_get_next_ident(c_ssh.ssh_session_struct *session, |
| 71 | + char **comment) |
| 72 | + c_ssh.ssh_key ssh_agent_get_first_ident(c_ssh.ssh_session_struct *session, |
| 73 | + char **comment) |
| 74 | + c_ssh.ssh_string ssh_agent_sign_data(c_ssh.ssh_session session, |
| 75 | + const c_ssh.ssh_key pubkey, |
| 76 | + c_ssh.ssh_buffer_struct *data) |
0 commit comments