[BACK]Return to key.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

File: [local] / src / usr.bin / ssh / Attic / key.h (download)

Revision 1.2, Wed Apr 26 20:56:29 2000 UTC (24 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.1: +2 -1 lines

add DSA pubkey auth and other SSH2 fixes.  use ssh-keygen -[xX]
for trading keys with the real and the original SSH, directly from the
people who invented the SSH protocol.

#ifndef KEY_H
#define KEY_H

typedef struct Key Key;
enum types {
	KEY_RSA,
	KEY_DSA,
	KEY_EMPTY
};
struct Key {
	int	type;
	RSA	*rsa;
	DSA	*dsa;
};

Key	*key_new(int type);
void	key_free(Key *k);
int	key_equal(Key *a, Key *b);
char	*key_fingerprint(Key *k);
int	key_write(Key *key, FILE *f);
unsigned int
key_read(Key *key, char **cpp);

#endif