]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - ssh.h
8d2884712af306ecca81403d4a05f504310c4d27
[PuTTY.git] / ssh.h
1 #include <stdio.h>
2 #include <string.h>
3
4 #include "puttymem.h"
5 #include "tree234.h"
6 #include "network.h"
7 #include "int64.h"
8 #include "misc.h"
9
10 struct ssh_channel;
11
12 extern void sshfwd_close(struct ssh_channel *c);
13 extern int sshfwd_write(struct ssh_channel *c, char *, int);
14 extern void sshfwd_unthrottle(struct ssh_channel *c, int bufsize);
15
16 /*
17  * Useful thing.
18  */
19 #ifndef lenof
20 #define lenof(x) ( (sizeof((x))) / (sizeof(*(x))))
21 #endif
22
23 #define SSH_CIPHER_IDEA         1
24 #define SSH_CIPHER_DES          2
25 #define SSH_CIPHER_3DES         3
26 #define SSH_CIPHER_BLOWFISH     6
27
28 #ifdef MSCRYPTOAPI
29 #define APIEXTRA 8
30 #else
31 #define APIEXTRA 0
32 #endif
33
34 #ifndef BIGNUM_INTERNAL
35 typedef void *Bignum;
36 #endif
37
38 struct RSAKey {
39     int bits;
40     int bytes;
41 #ifdef MSCRYPTOAPI
42     unsigned long exponent;
43     unsigned char *modulus;
44 #else
45     Bignum modulus;
46     Bignum exponent;
47     Bignum private_exponent;
48     Bignum p;
49     Bignum q;
50     Bignum iqmp;
51 #endif
52     char *comment;
53 };
54
55 struct dss_key {
56     Bignum p, q, g, y, x;
57 };
58
59 int makekey(unsigned char *data, int len, struct RSAKey *result,
60             unsigned char **keystr, int order);
61 int makeprivate(unsigned char *data, int len, struct RSAKey *result);
62 int rsaencrypt(unsigned char *data, int length, struct RSAKey *key);
63 Bignum rsadecrypt(Bignum input, struct RSAKey *key);
64 void rsasign(unsigned char *data, int length, struct RSAKey *key);
65 void rsasanitise(struct RSAKey *key);
66 int rsastr_len(struct RSAKey *key);
67 void rsastr_fmt(char *str, struct RSAKey *key);
68 void rsa_fingerprint(char *str, int len, struct RSAKey *key);
69 int rsa_verify(struct RSAKey *key);
70 unsigned char *rsa_public_blob(struct RSAKey *key, int *len);
71 int rsa_public_blob_len(void *data, int maxlen);
72 void freersakey(struct RSAKey *key);
73
74 #ifndef PUTTY_UINT32_DEFINED
75 /* This makes assumptions about the int type. */
76 typedef unsigned int uint32;
77 #define PUTTY_UINT32_DEFINED
78 #endif
79 typedef uint32 word32;
80
81 unsigned long crc32_compute(const void *s, size_t len);
82 unsigned long crc32_update(unsigned long crc_input, const void *s, size_t len);
83
84 /* SSH CRC compensation attack detector */
85 void *crcda_make_context(void);
86 void crcda_free_context(void *handle);
87 int detect_attack(void *handle, unsigned char *buf, uint32 len,
88                   unsigned char *IV);
89
90 /*
91  * SSH2 RSA key exchange functions
92  */
93 struct ssh_hash;
94 void *ssh_rsakex_newkey(char *data, int len);
95 void ssh_rsakex_freekey(void *key);
96 int ssh_rsakex_klen(void *key);
97 void ssh_rsakex_encrypt(const struct ssh_hash *h, unsigned char *in, int inlen,
98                         unsigned char *out, int outlen,
99                         void *key);
100
101 typedef struct {
102     uint32 h[4];
103 } MD5_Core_State;
104
105 struct MD5Context {
106 #ifdef MSCRYPTOAPI
107     unsigned long hHash;
108 #else
109     MD5_Core_State core;
110     unsigned char block[64];
111     int blkused;
112     uint32 lenhi, lenlo;
113 #endif
114 };
115
116 void MD5Init(struct MD5Context *context);
117 void MD5Update(struct MD5Context *context, unsigned char const *buf,
118                unsigned len);
119 void MD5Final(unsigned char digest[16], struct MD5Context *context);
120 void MD5Simple(void const *p, unsigned len, unsigned char output[16]);
121
122 void *hmacmd5_make_context(void);
123 void hmacmd5_free_context(void *handle);
124 void hmacmd5_key(void *handle, void const *key, int len);
125 void hmacmd5_do_hmac(void *handle, unsigned char const *blk, int len,
126                      unsigned char *hmac);
127
128 typedef struct {
129     uint32 h[5];
130     unsigned char block[64];
131     int blkused;
132     uint32 lenhi, lenlo;
133 } SHA_State;
134 void SHA_Init(SHA_State * s);
135 void SHA_Bytes(SHA_State * s, void *p, int len);
136 void SHA_Final(SHA_State * s, unsigned char *output);
137 void SHA_Simple(void *p, int len, unsigned char *output);
138
139 void hmac_sha1_simple(void *key, int keylen, void *data, int datalen,
140                       unsigned char *output);
141 typedef struct {
142     uint32 h[8];
143     unsigned char block[64];
144     int blkused;
145     uint32 lenhi, lenlo;
146 } SHA256_State;
147 void SHA256_Init(SHA256_State * s);
148 void SHA256_Bytes(SHA256_State * s, const void *p, int len);
149 void SHA256_Final(SHA256_State * s, unsigned char *output);
150 void SHA256_Simple(const void *p, int len, unsigned char *output);
151
152 typedef struct {
153     uint64 h[8];
154     unsigned char block[128];
155     int blkused;
156     uint32 len[4];
157 } SHA512_State;
158 void SHA512_Init(SHA512_State * s);
159 void SHA512_Bytes(SHA512_State * s, const void *p, int len);
160 void SHA512_Final(SHA512_State * s, unsigned char *output);
161 void SHA512_Simple(const void *p, int len, unsigned char *output);
162
163 struct ssh_cipher {
164     void *(*make_context)(void);
165     void (*free_context)(void *);
166     void (*sesskey) (void *, unsigned char *key);       /* for SSH-1 */
167     void (*encrypt) (void *, unsigned char *blk, int len);
168     void (*decrypt) (void *, unsigned char *blk, int len);
169     int blksize;
170     char *text_name;
171 };
172
173 struct ssh2_cipher {
174     void *(*make_context)(void);
175     void (*free_context)(void *);
176     void (*setiv) (void *, unsigned char *key); /* for SSH-2 */
177     void (*setkey) (void *, unsigned char *key);/* for SSH-2 */
178     void (*encrypt) (void *, unsigned char *blk, int len);
179     void (*decrypt) (void *, unsigned char *blk, int len);
180     char *name;
181     int blksize;
182     int keylen;
183     unsigned int flags;
184 #define SSH_CIPHER_IS_CBC       1
185     char *text_name;
186 };
187
188 struct ssh2_ciphers {
189     int nciphers;
190     const struct ssh2_cipher *const *list;
191 };
192
193 struct ssh_mac {
194     void *(*make_context)(void);
195     void (*free_context)(void *);
196     void (*setkey) (void *, unsigned char *key);
197     /* whole-packet operations */
198     void (*generate) (void *, unsigned char *blk, int len, unsigned long seq);
199     int (*verify) (void *, unsigned char *blk, int len, unsigned long seq);
200     /* partial-packet operations */
201     void (*start) (void *);
202     void (*bytes) (void *, unsigned char const *, int);
203     void (*genresult) (void *, unsigned char *);
204     int (*verresult) (void *, unsigned char const *);
205     char *name;
206     int len;
207     char *text_name;
208 };
209
210 struct ssh_hash {
211     void *(*init)(void); /* also allocates context */
212     void (*bytes)(void *, void *, int);
213     void (*final)(void *, unsigned char *); /* also frees context */
214     int hlen; /* output length in bytes */
215     char *text_name;
216 };   
217
218 struct ssh_kex {
219     char *name, *groupname;
220     enum { KEXTYPE_DH, KEXTYPE_RSA } main_type;
221     /* For DH */
222     const unsigned char *pdata, *gdata; /* NULL means group exchange */
223     int plen, glen;
224     const struct ssh_hash *hash;
225 };
226
227 struct ssh_kexes {
228     int nkexes;
229     const struct ssh_kex *const *list;
230 };
231
232 struct ssh_signkey {
233     void *(*newkey) (char *data, int len);
234     void (*freekey) (void *key);
235     char *(*fmtkey) (void *key);
236     unsigned char *(*public_blob) (void *key, int *len);
237     unsigned char *(*private_blob) (void *key, int *len);
238     void *(*createkey) (unsigned char *pub_blob, int pub_len,
239                         unsigned char *priv_blob, int priv_len);
240     void *(*openssh_createkey) (unsigned char **blob, int *len);
241     int (*openssh_fmtkey) (void *key, unsigned char *blob, int len);
242     int (*pubkey_bits) (void *blob, int len);
243     char *(*fingerprint) (void *key);
244     int (*verifysig) (void *key, char *sig, int siglen,
245                       char *data, int datalen);
246     unsigned char *(*sign) (void *key, char *data, int datalen,
247                             int *siglen);
248     char *name;
249     char *keytype;                     /* for host key cache */
250 };
251
252 struct ssh_compress {
253     char *name;
254     /* For zlib@openssh.com: if non-NULL, this name will be considered once
255      * userauth has completed successfully. */
256     char *delayed_name;
257     void *(*compress_init) (void);
258     void (*compress_cleanup) (void *);
259     int (*compress) (void *, unsigned char *block, int len,
260                      unsigned char **outblock, int *outlen);
261     void *(*decompress_init) (void);
262     void (*decompress_cleanup) (void *);
263     int (*decompress) (void *, unsigned char *block, int len,
264                        unsigned char **outblock, int *outlen);
265     int (*disable_compression) (void *);
266     char *text_name;
267 };
268
269 struct ssh2_userkey {
270     const struct ssh_signkey *alg;     /* the key algorithm */
271     void *data;                        /* the key data */
272     char *comment;                     /* the key comment */
273 };
274
275 /* The maximum length of any hash algorithm used in kex. (bytes) */
276 #define SSH2_KEX_MAX_HASH_LEN (32) /* SHA-256 */
277
278 extern const struct ssh_cipher ssh_3des;
279 extern const struct ssh_cipher ssh_des;
280 extern const struct ssh_cipher ssh_blowfish_ssh1;
281 extern const struct ssh2_ciphers ssh2_3des;
282 extern const struct ssh2_ciphers ssh2_des;
283 extern const struct ssh2_ciphers ssh2_aes;
284 extern const struct ssh2_ciphers ssh2_blowfish;
285 extern const struct ssh2_ciphers ssh2_arcfour;
286 extern const struct ssh_hash ssh_sha1;
287 extern const struct ssh_hash ssh_sha256;
288 extern const struct ssh_kexes ssh_diffiehellman_group1;
289 extern const struct ssh_kexes ssh_diffiehellman_group14;
290 extern const struct ssh_kexes ssh_diffiehellman_gex;
291 extern const struct ssh_kexes ssh_rsa_kex;
292 extern const struct ssh_signkey ssh_dss;
293 extern const struct ssh_signkey ssh_rsa;
294 extern const struct ssh_mac ssh_hmac_md5;
295 extern const struct ssh_mac ssh_hmac_sha1;
296 extern const struct ssh_mac ssh_hmac_sha1_buggy;
297 extern const struct ssh_mac ssh_hmac_sha1_96;
298 extern const struct ssh_mac ssh_hmac_sha1_96_buggy;
299
300 void *aes_make_context(void);
301 void aes_free_context(void *handle);
302 void aes128_key(void *handle, unsigned char *key);
303 void aes192_key(void *handle, unsigned char *key);
304 void aes256_key(void *handle, unsigned char *key);
305 void aes_iv(void *handle, unsigned char *iv);
306 void aes_ssh2_encrypt_blk(void *handle, unsigned char *blk, int len);
307 void aes_ssh2_decrypt_blk(void *handle, unsigned char *blk, int len);
308
309 /*
310  * PuTTY version number formatted as an SSH version string. 
311  */
312 extern char sshver[];
313
314 /*
315  * Gross hack: pscp will try to start SFTP but fall back to scp1 if
316  * that fails. This variable is the means by which scp.c can reach
317  * into the SSH code and find out which one it got.
318  */
319 extern int ssh_fallback_cmd(void *handle);
320
321 #ifndef MSCRYPTOAPI
322 void SHATransform(word32 * digest, word32 * data);
323 #endif
324
325 int random_byte(void);
326 void random_add_noise(void *noise, int length);
327 void random_add_heavynoise(void *noise, int length);
328
329 void logevent(void *, const char *);
330
331 /* Allocate and register a new channel for port forwarding */
332 void *new_sock_channel(void *handle, Socket s);
333 void ssh_send_port_open(void *channel, char *hostname, int port, char *org);
334
335 /* Exports from portfwd.c */
336 extern const char *pfd_newconnect(Socket * s, char *hostname, int port,
337                                   void *c, Conf *conf, int addressfamily);
338 /* desthost == NULL indicates dynamic (SOCKS) port forwarding */
339 extern const char *pfd_addforward(char *desthost, int destport, char *srcaddr,
340                                   int port, void *backhandle, Conf *conf,
341                                   void **sockdata, int address_family);
342 extern void pfd_close(Socket s);
343 extern void pfd_terminate(void *sockdata);
344 extern int pfd_send(Socket s, char *data, int len);
345 extern void pfd_confirm(Socket s);
346 extern void pfd_unthrottle(Socket s);
347 extern void pfd_override_throttle(Socket s, int enable);
348
349 /* Exports from x11fwd.c */
350 enum {
351     X11_TRANS_IPV4 = 0, X11_TRANS_IPV6 = 6, X11_TRANS_UNIX = 256
352 };
353 struct X11Display {
354     /* Broken-down components of the display name itself */
355     int unixdomain;
356     char *hostname;
357     int displaynum;
358     int screennum;
359     /* OSX sometimes replaces all the above with a full Unix-socket pathname */
360     char *unixsocketpath;
361
362     /* PuTTY networking SockAddr to connect to the display, and associated
363      * gubbins */
364     SockAddr addr;
365     int port;
366     char *realhost;
367
368     /* Auth details we invented for the virtual display on the SSH server. */
369     int remoteauthproto;
370     unsigned char *remoteauthdata;
371     int remoteauthdatalen;
372     char *remoteauthprotoname;
373     char *remoteauthdatastring;
374
375     /* Our local auth details for talking to the real X display. */
376     int localauthproto;
377     unsigned char *localauthdata;
378     int localauthdatalen;
379
380     /*
381      * Used inside x11fwd.c to remember recently seen
382      * XDM-AUTHORIZATION-1 strings, to avoid replay attacks.
383      */
384     tree234 *xdmseen;
385 };
386 /*
387  * x11_setup_display() parses the display variable and fills in an
388  * X11Display structure. Some remote auth details are invented;
389  * the supplied authtype parameter configures the preferred
390  * authorisation protocol to use at the remote end. The local auth
391  * details are looked up by calling platform_get_x11_auth.
392  */
393 extern struct X11Display *x11_setup_display(char *display, int authtype,
394                                             Conf *);
395 void x11_free_display(struct X11Display *disp);
396 extern const char *x11_init(Socket *, struct X11Display *, void *,
397                             const char *, int, Conf *);
398 extern void x11_close(Socket);
399 extern int x11_send(Socket, char *, int);
400 extern void x11_unthrottle(Socket s);
401 extern void x11_override_throttle(Socket s, int enable);
402 char *x11_display(const char *display);
403 /* Platform-dependent X11 functions */
404 extern void platform_get_x11_auth(struct X11Display *display, Conf *);
405     /* examine a mostly-filled-in X11Display and fill in localauth* */
406 extern const int platform_uses_x11_unix_by_default;
407     /* choose default X transport in the absence of a specified one */
408 SockAddr platform_get_x11_unix_address(const char *path, int displaynum);
409     /* make up a SockAddr naming the address for displaynum */
410 char *platform_get_x_display(void);
411     /* allocated local X display string, if any */
412 /* Callbacks in x11.c usable _by_ platform X11 functions */
413 /*
414  * This function does the job of platform_get_x11_auth, provided
415  * it is told where to find a normally formatted .Xauthority file:
416  * it opens that file, parses it to find an auth record which
417  * matches the display details in "display", and fills in the
418  * localauth fields.
419  *
420  * It is expected that most implementations of
421  * platform_get_x11_auth() will work by finding their system's
422  * .Xauthority file, adjusting the display details if necessary
423  * for local oddities like Unix-domain socket transport, and
424  * calling this function to do the rest of the work.
425  */
426 void x11_get_auth_from_authfile(struct X11Display *display,
427                                 const char *authfilename);
428
429 Bignum copybn(Bignum b);
430 Bignum bn_power_2(int n);
431 void bn_restore_invariant(Bignum b);
432 Bignum bignum_from_long(unsigned long n);
433 void freebn(Bignum b);
434 Bignum modpow(Bignum base, Bignum exp, Bignum mod);
435 Bignum modmul(Bignum a, Bignum b, Bignum mod);
436 void decbn(Bignum n);
437 extern Bignum Zero, One;
438 Bignum bignum_from_bytes(const unsigned char *data, int nbytes);
439 int ssh1_read_bignum(const unsigned char *data, int len, Bignum * result);
440 int bignum_bitcount(Bignum bn);
441 int ssh1_bignum_length(Bignum bn);
442 int ssh2_bignum_length(Bignum bn);
443 int bignum_byte(Bignum bn, int i);
444 int bignum_bit(Bignum bn, int i);
445 void bignum_set_bit(Bignum bn, int i, int value);
446 int ssh1_write_bignum(void *data, Bignum bn);
447 Bignum biggcd(Bignum a, Bignum b);
448 unsigned short bignum_mod_short(Bignum number, unsigned short modulus);
449 Bignum bignum_add_long(Bignum number, unsigned long addend);
450 Bignum bigadd(Bignum a, Bignum b);
451 Bignum bigsub(Bignum a, Bignum b);
452 Bignum bigmul(Bignum a, Bignum b);
453 Bignum bigmuladd(Bignum a, Bignum b, Bignum addend);
454 Bignum bigdiv(Bignum a, Bignum b);
455 Bignum bigmod(Bignum a, Bignum b);
456 Bignum modinv(Bignum number, Bignum modulus);
457 Bignum bignum_bitmask(Bignum number);
458 Bignum bignum_rshift(Bignum number, int shift);
459 int bignum_cmp(Bignum a, Bignum b);
460 char *bignum_decimal(Bignum x);
461
462 #ifdef DEBUG
463 void diagbn(char *prefix, Bignum md);
464 #endif
465
466 void *dh_setup_group(const struct ssh_kex *kex);
467 void *dh_setup_gex(Bignum pval, Bignum gval);
468 void dh_cleanup(void *);
469 Bignum dh_create_e(void *, int nbits);
470 Bignum dh_find_K(void *, Bignum f);
471
472 int loadrsakey(const Filename *filename, struct RSAKey *key,
473                char *passphrase, const char **errorstr);
474 int rsakey_encrypted(const Filename *filename, char **comment);
475 int rsakey_pubblob(const Filename *filename, void **blob, int *bloblen,
476                    char **commentptr, const char **errorstr);
477
478 int saversakey(const Filename *filename, struct RSAKey *key, char *passphrase);
479
480 extern int base64_decode_atom(char *atom, unsigned char *out);
481 extern int base64_lines(int datalen);
482 extern void base64_encode_atom(unsigned char *data, int n, char *out);
483 extern void base64_encode(FILE *fp, unsigned char *data, int datalen, int cpl);
484
485 /* ssh2_load_userkey can return this as an error */
486 extern struct ssh2_userkey ssh2_wrong_passphrase;
487 #define SSH2_WRONG_PASSPHRASE (&ssh2_wrong_passphrase)
488
489 int ssh2_userkey_encrypted(const Filename *filename, char **comment);
490 struct ssh2_userkey *ssh2_load_userkey(const Filename *filename,
491                                        char *passphrase, const char **errorstr);
492 unsigned char *ssh2_userkey_loadpub(const Filename *filename, char **algorithm,
493                                     int *pub_blob_len, char **commentptr,
494                                     const char **errorstr);
495 int ssh2_save_userkey(const Filename *filename, struct ssh2_userkey *key,
496                       char *passphrase);
497 const struct ssh_signkey *find_pubkey_alg(const char *name);
498
499 enum {
500     SSH_KEYTYPE_UNOPENABLE,
501     SSH_KEYTYPE_UNKNOWN,
502     SSH_KEYTYPE_SSH1, SSH_KEYTYPE_SSH2,
503     SSH_KEYTYPE_OPENSSH, SSH_KEYTYPE_SSHCOM
504 };
505 int key_type(const Filename *filename);
506 char *key_type_to_str(int type);
507
508 int import_possible(int type);
509 int import_target_type(int type);
510 int import_encrypted(const Filename *filename, int type, char **comment);
511 int import_ssh1(const Filename *filename, int type,
512                 struct RSAKey *key, char *passphrase, const char **errmsg_p);
513 struct ssh2_userkey *import_ssh2(const Filename *filename, int type,
514                                  char *passphrase, const char **errmsg_p);
515 int export_ssh1(const Filename *filename, int type,
516                 struct RSAKey *key, char *passphrase);
517 int export_ssh2(const Filename *filename, int type,
518                 struct ssh2_userkey *key, char *passphrase);
519
520 void des3_decrypt_pubkey(unsigned char *key, unsigned char *blk, int len);
521 void des3_encrypt_pubkey(unsigned char *key, unsigned char *blk, int len);
522 void des3_decrypt_pubkey_ossh(unsigned char *key, unsigned char *iv,
523                               unsigned char *blk, int len);
524 void des3_encrypt_pubkey_ossh(unsigned char *key, unsigned char *iv,
525                               unsigned char *blk, int len);
526 void aes256_encrypt_pubkey(unsigned char *key, unsigned char *blk,
527                            int len);
528 void aes256_decrypt_pubkey(unsigned char *key, unsigned char *blk,
529                            int len);
530
531 void des_encrypt_xdmauth(unsigned char *key, unsigned char *blk, int len);
532 void des_decrypt_xdmauth(unsigned char *key, unsigned char *blk, int len);
533
534 /*
535  * For progress updates in the key generation utility.
536  */
537 #define PROGFN_INITIALISE 1
538 #define PROGFN_LIN_PHASE 2
539 #define PROGFN_EXP_PHASE 3
540 #define PROGFN_PHASE_EXTENT 4
541 #define PROGFN_READY 5
542 #define PROGFN_PROGRESS 6
543 typedef void (*progfn_t) (void *param, int action, int phase, int progress);
544
545 int rsa_generate(struct RSAKey *key, int bits, progfn_t pfn,
546                  void *pfnparam);
547 int dsa_generate(struct dss_key *key, int bits, progfn_t pfn,
548                  void *pfnparam);
549 Bignum primegen(int bits, int modulus, int residue, Bignum factor,
550                 int phase, progfn_t pfn, void *pfnparam);
551
552
553 /*
554  * zlib compression.
555  */
556 void *zlib_compress_init(void);
557 void zlib_compress_cleanup(void *);
558 void *zlib_decompress_init(void);
559 void zlib_decompress_cleanup(void *);
560 int zlib_compress_block(void *, unsigned char *block, int len,
561                         unsigned char **outblock, int *outlen);
562 int zlib_decompress_block(void *, unsigned char *block, int len,
563                           unsigned char **outblock, int *outlen);
564
565 /*
566  * SSH-1 agent messages.
567  */
568 #define SSH1_AGENTC_REQUEST_RSA_IDENTITIES    1
569 #define SSH1_AGENT_RSA_IDENTITIES_ANSWER      2
570 #define SSH1_AGENTC_RSA_CHALLENGE             3
571 #define SSH1_AGENT_RSA_RESPONSE               4
572 #define SSH1_AGENTC_ADD_RSA_IDENTITY          7
573 #define SSH1_AGENTC_REMOVE_RSA_IDENTITY       8
574 #define SSH1_AGENTC_REMOVE_ALL_RSA_IDENTITIES 9 /* openssh private? */
575
576 /*
577  * Messages common to SSH-1 and OpenSSH's SSH-2.
578  */
579 #define SSH_AGENT_FAILURE                    5
580 #define SSH_AGENT_SUCCESS                    6
581
582 /*
583  * OpenSSH's SSH-2 agent messages.
584  */
585 #define SSH2_AGENTC_REQUEST_IDENTITIES          11
586 #define SSH2_AGENT_IDENTITIES_ANSWER            12
587 #define SSH2_AGENTC_SIGN_REQUEST                13
588 #define SSH2_AGENT_SIGN_RESPONSE                14
589 #define SSH2_AGENTC_ADD_IDENTITY                17
590 #define SSH2_AGENTC_REMOVE_IDENTITY             18
591 #define SSH2_AGENTC_REMOVE_ALL_IDENTITIES       19
592
593 /*
594  * Need this to warn about support for the original SSH-2 keyfile
595  * format.
596  */
597 void old_keyfile_warning(void);