Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ssh.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3040 - (show annotations) (download) (as text)
Wed Oct 17 04:06:57 2007 UTC (16 years, 5 months ago) by maya
Original Path: ttssh2/trunk/ttxssh/ssh.h
File MIME type: text/x-chdr
File size: 16338 byte(s)
SSH2 の暗号方式として AES192 をサポートした。

1 /*
2 Copyright (c) 1998-2001, Robert O'Callahan
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without modification,
6 are permitted provided that the following conditions are met:
7
8 Redistributions of source code must retain the above copyright notice, this list of
9 conditions and the following disclaimer.
10
11 Redistributions in binary form must reproduce the above copyright notice, this list
12 of conditions and the following disclaimer in the documentation and/or other materials
13 provided with the distribution.
14
15 The name of Robert O'Callahan may not be used to endorse or promote products derived from
16 this software without specific prior written permission.
17
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
19 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
21 THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 /*
30 This code is copyright (C) 1998-1999 Robert O'Callahan.
31 See LICENSE.TXT for the license.
32 */
33
34 #ifndef __SSH_H
35 #define __SSH_H
36
37 #include "zlib.h"
38 #include <openssl/evp.h>
39
40
41 #define DEBUG_PRINT_TO_FILE(base, msg, len) { \
42 static int count = 0; \
43 debug_print(count + base, msg, len); \
44 count++; \
45 }
46
47
48 // yutaka
49 #define SSH2_USE
50
51
52 /* Some of this code has been adapted from Ian Goldberg's Pilot SSH */
53
54 typedef enum {
55 SSH_MSG_NONE, SSH_MSG_DISCONNECT, SSH_SMSG_PUBLIC_KEY, //2
56 SSH_CMSG_SESSION_KEY, SSH_CMSG_USER, SSH_CMSG_AUTH_RHOSTS, // 5
57 SSH_CMSG_AUTH_RSA, SSH_SMSG_AUTH_RSA_CHALLENGE,
58 SSH_CMSG_AUTH_RSA_RESPONSE, SSH_CMSG_AUTH_PASSWORD,
59 SSH_CMSG_REQUEST_PTY, // 10
60 SSH_CMSG_WINDOW_SIZE, SSH_CMSG_EXEC_SHELL,
61 SSH_CMSG_EXEC_CMD, SSH_SMSG_SUCCESS, SSH_SMSG_FAILURE,
62 SSH_CMSG_STDIN_DATA, SSH_SMSG_STDOUT_DATA, SSH_SMSG_STDERR_DATA,
63 SSH_CMSG_EOF, SSH_SMSG_EXITSTATUS,
64 SSH_MSG_CHANNEL_OPEN_CONFIRMATION, SSH_MSG_CHANNEL_OPEN_FAILURE,
65 SSH_MSG_CHANNEL_DATA, SSH_MSG_CHANNEL_INPUT_EOF,
66 SSH_MSG_CHANNEL_OUTPUT_CLOSED, SSH_MSG_OBSOLETED0,
67 SSH_SMSG_X11_OPEN, SSH_CMSG_PORT_FORWARD_REQUEST, SSH_MSG_PORT_OPEN,
68 SSH_CMSG_AGENT_REQUEST_FORWARDING, SSH_SMSG_AGENT_OPEN,
69 SSH_MSG_IGNORE, SSH_CMSG_EXIT_CONFIRMATION,
70 SSH_CMSG_X11_REQUEST_FORWARDING, SSH_CMSG_AUTH_RHOSTS_RSA,
71 SSH_MSG_DEBUG, SSH_CMSG_REQUEST_COMPRESSION,
72 SSH_CMSG_MAX_PACKET_SIZE, SSH_CMSG_AUTH_TIS,
73 SSH_SMSG_AUTH_TIS_CHALLENGE, SSH_CMSG_AUTH_TIS_RESPONSE,
74 SSH_CMSG_AUTH_KERBEROS, SSH_SMSG_AUTH_KERBEROS_RESPONSE
75 } SSHMessage;
76
77 typedef enum {
78 SSH_CIPHER_NONE, SSH_CIPHER_IDEA, SSH_CIPHER_DES, SSH_CIPHER_3DES,
79 SSH_CIPHER_TSS, SSH_CIPHER_RC4, SSH_CIPHER_BLOWFISH,
80 // for SSH2
81 SSH_CIPHER_3DES_CBC, SSH_CIPHER_AES128,
82 SSH_CIPHER_AES192,SSH_CIPHER_AES256,
83 } SSHCipher;
84
85 #define SSH_CIPHER_MAX SSH_CIPHER_AES256
86
87 typedef enum {
88 SSH_AUTH_NONE, SSH_AUTH_RHOSTS, SSH_AUTH_RSA, SSH_AUTH_PASSWORD,
89 SSH_AUTH_RHOSTS_RSA, SSH_AUTH_TIS, SSH_AUTH_KERBEROS,
90 } SSHAuthMethod;
91
92 /* we don't support Kerberos at this time */
93 #define SSH_AUTH_MAX SSH_AUTH_TIS
94
95 typedef enum {
96 SSH_GENERIC_AUTHENTICATION, SSH_TIS_AUTHENTICATION
97 } SSHAuthMode;
98
99 #define SSH_PROTOFLAG_SCREEN_NUMBER 1
100 #define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 2
101
102 #define SSH_MAX_SEND_PACKET_SIZE 250000
103
104
105 /* SSH2 constants */
106
107 /* SSH2 messages */
108 #define SSH2_MSG_DISCONNECT 1
109 #define SSH2_MSG_IGNORE 2
110 #define SSH2_MSG_UNIMPLEMENTED 3
111 #define SSH2_MSG_DEBUG 4
112 #define SSH2_MSG_SERVICE_REQUEST 5
113 #define SSH2_MSG_SERVICE_ACCEPT 6
114
115 #define SSH2_MSG_KEXINIT 20
116 #define SSH2_MSG_NEWKEYS 21
117
118 #define SSH2_MSG_KEXDH_INIT 30
119 #define SSH2_MSG_KEXDH_REPLY 31
120
121 #define SSH2_MSG_KEX_DH_GEX_GROUP 31
122 #define SSH2_MSG_KEX_DH_GEX_INIT 32
123 #define SSH2_MSG_KEX_DH_GEX_REPLY 33
124 #define SSH2_MSG_KEX_DH_GEX_REQUEST 34
125
126 #define SSH2_MSG_USERAUTH_REQUEST 50
127 #define SSH2_MSG_USERAUTH_FAILURE 51
128 #define SSH2_MSG_USERAUTH_SUCCESS 52
129 #define SSH2_MSG_USERAUTH_BANNER 53
130
131 #define SSH2_MSG_USERAUTH_PK_OK 60
132 #define SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ 60
133 #define SSH2_MSG_USERAUTH_INFO_REQUEST 60
134 #define SSH2_MSG_USERAUTH_INFO_RESPONSE 61
135
136 #define SSH2_MSG_GLOBAL_REQUEST 80
137 #define SSH2_MSG_REQUEST_SUCCESS 81
138 #define SSH2_MSG_REQUEST_FAILURE 82
139 #define SSH2_MSG_CHANNEL_OPEN 90
140 #define SSH2_MSG_CHANNEL_OPEN_CONFIRMATION 91
141 #define SSH2_MSG_CHANNEL_OPEN_FAILURE 92
142 #define SSH2_MSG_CHANNEL_WINDOW_ADJUST 93
143 #define SSH2_MSG_CHANNEL_DATA 94
144 #define SSH2_MSG_CHANNEL_EXTENDED_DATA 95
145 #define SSH2_MSG_CHANNEL_EOF 96
146 #define SSH2_MSG_CHANNEL_CLOSE 97
147 #define SSH2_MSG_CHANNEL_REQUEST 98
148 #define SSH2_MSG_CHANNEL_SUCCESS 99
149 #define SSH2_MSG_CHANNEL_FAILURE 100
150
151 /* SSH2 miscellaneous constants */
152 #define SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT 1
153 #define SSH2_DISCONNECT_PROTOCOL_ERROR 2
154 #define SSH2_DISCONNECT_KEY_EXCHANGE_FAILED 3
155 #define SSH2_DISCONNECT_HOST_AUTHENTICATION_FAILED 4
156 #define SSH2_DISCONNECT_MAC_ERROR 5
157 #define SSH2_DISCONNECT_COMPRESSION_ERROR 6
158 #define SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE 7
159 #define SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED 8
160 #define SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE 9
161 #define SSH2_DISCONNECT_CONNECTION_LOST 10
162 #define SSH2_DISCONNECT_BY_APPLICATION 11
163
164 #define SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED 1
165 #define SSH2_OPEN_CONNECT_FAILED 2
166 #define SSH2_OPEN_UNKNOWN_CHANNEL_TYPE 3
167 #define SSH2_OPEN_RESOURCE_SHORTAGE 4
168
169 // �L�[�����A���S���Y��
170 #define KEX_DH1 "diffie-hellman-group1-sha1"
171 #define KEX_DH14 "diffie-hellman-group14-sha1"
172 #define KEX_DHGEX "diffie-hellman-group-exchange-sha1"
173
174 // support of "Compression delayed" (2006.6.23 maya)
175 enum compression_algorithm {
176 COMP_NONE,
177 COMP_ZLIB,
178 COMP_DELAYED,
179 COMP_UNKNOWN
180 };
181
182 enum kex_exchange {
183 KEX_DH_GRP1_SHA1,
184 KEX_DH_GRP14_SHA1,
185 KEX_DH_GEX_SHA1,
186 KEX_MAX
187 };
188
189 enum hostkey_type {
190 KEY_RSA1,
191 KEY_RSA,
192 KEY_DSA,
193 KEY_UNSPEC,
194 };
195
196 // ���L���C���f�b�N�X�� ssh2_macs[] ���������������B
197 enum hmac_type {
198 HMAC_SHA1,
199 HMAC_MD5,
200 HMAC_UNKNOWN
201 };
202
203 #define KEX_DEFAULT_KEX "diffie-hellman-group-exchange-sha1," \
204 "diffie-hellman-group14-sha1," \
205 "diffie-hellman-group1-sha1"
206 #define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss"
207 #ifdef SSH2_BLOWFISH
208 #define KEX_DEFAULT_ENCRYPT "aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc"
209 #else
210 #define KEX_DEFAULT_ENCRYPT "aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc"
211 #endif
212 #define KEX_DEFAULT_MAC "hmac-sha1,hmac-md5"
213 // support of "Compression delayed" (2006.6.23 maya)
214 #define KEX_DEFAULT_COMP "none,zlib@openssh.com,zlib"
215 #define KEX_DEFAULT_LANG ""
216
217 /* Minimum modulus size (n) for RSA keys. */
218 #define SSH_RSA_MINIMUM_MODULUS_SIZE 768
219
220 enum kex_init_proposals {
221 PROPOSAL_KEX_ALGS,
222 PROPOSAL_SERVER_HOST_KEY_ALGS,
223 PROPOSAL_ENC_ALGS_CTOS,
224 PROPOSAL_ENC_ALGS_STOC,
225 PROPOSAL_MAC_ALGS_CTOS,
226 PROPOSAL_MAC_ALGS_STOC,
227 PROPOSAL_COMP_ALGS_CTOS,
228 PROPOSAL_COMP_ALGS_STOC,
229 PROPOSAL_LANG_CTOS,
230 PROPOSAL_LANG_STOC,
231 PROPOSAL_MAX
232 };
233
234
235 // �N���C�A���g�����T�[�o������������
236 #ifdef SSH2_DEBUG
237 static char *myproposal[PROPOSAL_MAX] = {
238 // KEX_DEFAULT_KEX,
239 "diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1",
240 KEX_DEFAULT_PK_ALG,
241 // "ssh-dss,ssh-rsa",
242 KEX_DEFAULT_ENCRYPT,
243 KEX_DEFAULT_ENCRYPT,
244 "hmac-md5,hmac-sha1",
245 "hmac-md5,hmac-sha1",
246 // "hmac-sha1",
247 // "hmac-sha1",
248 // KEX_DEFAULT_MAC,
249 // KEX_DEFAULT_MAC,
250 KEX_DEFAULT_COMP,
251 KEX_DEFAULT_COMP,
252 KEX_DEFAULT_LANG,
253 KEX_DEFAULT_LANG,
254 };
255 #else
256 static char *myproposal[PROPOSAL_MAX] = {
257 KEX_DEFAULT_KEX,
258 KEX_DEFAULT_PK_ALG,
259 KEX_DEFAULT_ENCRYPT,
260 KEX_DEFAULT_ENCRYPT,
261 KEX_DEFAULT_MAC,
262 KEX_DEFAULT_MAC,
263 KEX_DEFAULT_COMP,
264 KEX_DEFAULT_COMP,
265 KEX_DEFAULT_LANG,
266 KEX_DEFAULT_LANG,
267 };
268 #endif
269
270
271 typedef struct ssh2_cipher {
272 SSHCipher cipher;
273 char *name;
274 int block_size;
275 int key_len;
276 const EVP_CIPHER *(*func)(void);
277 } ssh2_cipher_t;
278
279 static ssh2_cipher_t ssh2_ciphers[] = {
280 {SSH_CIPHER_3DES_CBC, "3des-cbc", 8, 24, EVP_des_ede3_cbc},
281 {SSH_CIPHER_AES128, "aes128-cbc", 16, 16, EVP_aes_128_cbc},
282 {SSH_CIPHER_AES256, "aes192-cbc", 16, 24, EVP_aes_192_cbc},
283 {SSH_CIPHER_AES256, "aes256-cbc", 16, 32, EVP_aes_256_cbc},
284 #ifdef SSH2_BLOWFISH
285 {SSH_CIPHER_BLOWFISH, "blowfish-cbc", 8, 32, EVP_enc_null}, // func ���g�p��������
286 #endif
287 {SSH_CIPHER_NONE, NULL, 0, 0, NULL},
288 };
289
290
291 typedef struct ssh2_mac {
292 char *name;
293 const EVP_MD *(*func)(void);
294 int truncatebits;
295 } ssh2_mac_t;
296
297 static ssh2_mac_t ssh2_macs[] = {
298 {"hmac-sha1", EVP_sha1, 0},
299 {"hmac-md5", EVP_md5, 0},
300 {NULL, NULL, 0},
301 };
302
303 static char *ssh_comp[] = {
304 "none",
305 "zlib",
306 "zlib@openssh.com",
307 };
308
309
310 struct Enc {
311 u_char *key;
312 u_char *iv;
313 unsigned int key_len;
314 unsigned int block_size;
315 };
316
317 struct Mac {
318 char *name;
319 int enabled;
320 const EVP_MD *md;
321 int mac_len;
322 u_char *key;
323 int key_len;
324 };
325
326 struct Comp {
327 int type;
328 int enabled;
329 char *name;
330 };
331
332 typedef struct {
333 struct Enc enc;
334 struct Mac mac;
335 struct Comp comp;
336 } Newkeys;
337
338 #define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
339
340 enum kex_modes {
341 MODE_IN,
342 MODE_OUT,
343 MODE_MAX
344 };
345
346
347 // �z�X�g�L�[(SSH1, SSH2����)���f�[�^�\�� (2006.3.21 yutaka)
348 typedef struct Key {
349 // host key type
350 enum hostkey_type type;
351 // SSH2 RSA
352 RSA *rsa;
353 // SSH2 DSA
354 DSA *dsa;
355 // SSH1 RSA
356 int bits;
357 unsigned char *exp;
358 unsigned char *mod;
359 } Key;
360
361
362 /* The packet handler returns TRUE to keep the handler in place,
363 FALSE to remove the handler. */
364 typedef BOOL (* SSHPacketHandler)(PTInstVar pvar);
365
366 typedef struct _SSHPacketHandlerItem SSHPacketHandlerItem;
367 struct _SSHPacketHandlerItem {
368 SSHPacketHandler handler;
369 /* Circular list of handlers for given message */
370 SSHPacketHandlerItem FAR * next_for_message;
371 SSHPacketHandlerItem FAR * last_for_message;
372 /* Circular list of handlers in set */
373 SSHPacketHandlerItem FAR * next_in_set;
374 int active_for_message;
375 };
376
377 typedef struct {
378 char FAR * hostname;
379
380 int server_protocol_flags;
381 char FAR * server_ID;
382
383 /* This buffer is used to hold the outgoing data, and encrypted in-place
384 here if necessary. */
385 unsigned char FAR * outbuf;
386 long outbuflen;
387 /* This buffer is used by the SSH protocol processing to store uncompressed
388 packet data for compression. User data is never streamed through here;
389 it is compressed directly from the user's buffer. */
390 unsigned char FAR * precompress_outbuf;
391 long precompress_outbuflen;
392 /* this is the length of the packet data, including the type header */
393 long outgoing_packet_len;
394
395 /* This buffer is used by the SSH protocol processing to store decompressed
396 packet data. User data is never streamed through here; it is decompressed
397 directly to the user's buffer. */
398 unsigned char FAR * postdecompress_inbuf;
399 long postdecompress_inbuflen;
400
401 unsigned char FAR * payload;
402 long payload_grabbed;
403 long payloadlen;
404 long payload_datastart;
405 long payload_datalen;
406
407 uint32 receiver_sequence_number;
408 uint32 sender_sequence_number;
409
410 z_stream compress_stream;
411 z_stream decompress_stream;
412 BOOL compressing;
413 BOOL decompressing;
414 int compression_level;
415
416 SSHPacketHandlerItem FAR * packet_handlers[256];
417 int status_flags;
418
419 int win_cols;
420 int win_rows;
421 } SSHState;
422
423 #define STATUS_DONT_SEND_USER_NAME 0x01
424 #define STATUS_EXPECTING_COMPRESSION_RESPONSE 0x02
425 #define STATUS_DONT_SEND_CREDENTIALS 0x04
426 #define STATUS_HOST_OK 0x08
427 #define STATUS_INTERACTIVE 0x10
428 #define STATUS_IN_PARTIAL_ID_STRING 0x20
429
430 void SSH_init(PTInstVar pvar);
431 void SSH_open(PTInstVar pvar);
432 void SSH_notify_disconnecting(PTInstVar pvar, char FAR * reason);
433 /* SSH_handle_server_ID returns TRUE iff a valid ID string has been
434 received. If it returns FALSE, we need to keep looking for another
435 ID string. */
436 BOOL SSH_handle_server_ID(PTInstVar pvar, char FAR * ID, int ID_len);
437 /* SSH_handle_packet requires NO PAYLOAD on entry.
438 'len' is the size of the packet: payload + padding (+ CRC for SSHv1)
439 'padding' is the size of the padding.
440 'data' points to the start of the packet data (the length field)
441 */
442 void SSH_handle_packet(PTInstVar pvar, char FAR * data, int len, int padding);
443 void SSH_notify_win_size(PTInstVar pvar, int cols, int rows);
444 void SSH_notify_user_name(PTInstVar pvar);
445 void SSH_notify_cred(PTInstVar pvar);
446 void SSH_notify_host_OK(PTInstVar pvar);
447 void SSH_send(PTInstVar pvar, unsigned char const FAR * buf, int buflen);
448 /* SSH_extract_payload returns number of bytes extracted */
449 int SSH_extract_payload(PTInstVar pvar, unsigned char FAR * dest, int len);
450 void SSH_end(PTInstVar pvar);
451
452 void SSH_get_server_ID_info(PTInstVar pvar, char FAR * dest, int len);
453 void SSH_get_protocol_version_info(PTInstVar pvar, char FAR * dest, int len);
454 void SSH_get_compression_info(PTInstVar pvar, char FAR * dest, int len);
455
456 /* len must be <= SSH_MAX_SEND_PACKET_SIZE */
457 void SSH_channel_send(PTInstVar pvar, int channel_num,
458 uint32 remote_channel_num,
459 unsigned char FAR * buf, int len);
460 void SSH_fail_channel_open(PTInstVar pvar, uint32 remote_channel_num);
461 void SSH_confirm_channel_open(PTInstVar pvar, uint32 remote_channel_num, uint32 local_channel_num);
462 void SSH_channel_output_eof(PTInstVar pvar, uint32 remote_channel_num);
463 void SSH_channel_input_eof(PTInstVar pvar, uint32 remote_channel_num, uint32 local_channel_num);
464 void SSH_request_forwarding(PTInstVar pvar, int from_server_port,
465 char FAR * to_local_host, int to_local_port);
466 void SSH_request_X11_forwarding(PTInstVar pvar,
467 char FAR * auth_protocol, unsigned char FAR * auth_data, int auth_data_len, int screen_num);
468 void SSH_open_channel(PTInstVar pvar, uint32 local_channel_num,
469 char FAR * to_remote_host, int to_remote_port,
470 char FAR * originator, unsigned short originator_port);
471
472 /* auxiliary SSH2 interfaces for pkt.c */
473 int SSH_get_min_packet_size(PTInstVar pvar);
474 /* data is guaranteed to be at least SSH_get_min_packet_size bytes long
475 at least 5 bytes must be decrypted */
476 void SSH_predecrpyt_packet(PTInstVar pvar, char FAR * data);
477 int SSH_get_clear_MAC_size(PTInstVar pvar);
478
479 #define SSH_is_any_payload(pvar) ((pvar)->ssh_state.payload_datalen > 0)
480 #define SSH_get_host_name(pvar) ((pvar)->ssh_state.hostname)
481 #define SSH_get_compression_level(pvar) ((pvar)->ssh_state.compressing ? (pvar)->ts_SSH_CompressionLevel : 0)
482
483 void SSH2_send_kexinit(PTInstVar pvar);
484 BOOL do_SSH2_userauth(PTInstVar pvar);
485 void debug_print(int no, char *msg, int len);
486 int get_cipher_block_size(SSHCipher cipher);
487 int get_cipher_key_len(SSHCipher cipher);
488 const EVP_CIPHER * (*get_cipher_EVP_CIPHER(SSHCipher cipher))(void);
489 void ssh_heartbeat_lock_initialize(void);
490 void ssh_heartbeat_lock_finalize(void);
491 void ssh_heartbeat_lock(void);
492 void ssh_heartbeat_unlock(void);
493 void halt_ssh_heartbeat_thread(PTInstVar pvar);
494 void ssh2_channel_free(void);
495 BOOL handle_SSH2_userauth_inforeq(PTInstVar pvar);
496 void SSH2_update_compression_myproposal(PTInstVar pvar);
497 void SSH2_update_cipher_myproposal(PTInstVar pvar);
498
499 enum hostkey_type get_keytype_from_name(char *name);
500 char *get_sshname_from_key(Key *key);
501 int key_to_blob(Key *key, char **blobp, int *lenp);
502 Key *key_from_blob(char *data, int blen);
503 void key_free(Key *key);
504 RSA *duplicate_RSA(RSA *src);
505 DSA *duplicate_DSA(DSA *src);
506 char *key_fingerprint(Key *key);
507
508 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26