Skip to content

Commit 3782a46

Browse files
author
Pan
committed
Added agent definition file.
1 parent 23d686a commit 3782a46

File tree

2 files changed

+62
-4
lines changed

2 files changed

+62
-4
lines changed

ssh/c_agent.pxd

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,76 @@
11
# This file is part of ssh-python.
22
# Copyright (C) 2018 Panos Kittenis
3-
3+
#
44
# This library is free software; you can redistribute it and/or
55
# modify it under the terms of the GNU Lesser General Public
66
# License as published by the Free Software Foundation, version 2.1.
7-
7+
#
88
# This library is distributed in the hope that it will be useful,
99
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1010
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1111
# Lesser General Public License for more details.
12-
12+
#
1313
# You should have received a copy of the GNU Lesser General Public
1414
# License along with this library; if not, write to the Free Software
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1616

17+
cimport c_ssh
1718

1819
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)

ssh/ssh.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616

1717

1818
cimport c_ssh
19+
cimport c_agent

0 commit comments

Comments
 (0)