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

Diff for /src/usr.bin/ssh/Attic/key.h between version 1.5.2.6 and 1.6

version 1.5.2.6, 2002/03/08 17:04:42 version 1.6, 2000/11/12 19:50:37
Line 1 
Line 1 
 /*      $OpenBSD$       */  
   
 /*  /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.   * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions   * modification, are permitted provided that the following conditions
Line 26 
Line 24 
 #ifndef KEY_H  #ifndef KEY_H
 #define KEY_H  #define KEY_H
   
 #include <openssl/rsa.h>  
 #include <openssl/dsa.h>  
   
 typedef struct Key Key;  typedef struct Key Key;
 enum types {  enum types {
         KEY_RSA1,          KEY_RSA1,
Line 36 
Line 31 
         KEY_DSA,          KEY_DSA,
         KEY_UNSPEC          KEY_UNSPEC
 };  };
 enum fp_type {  
         SSH_FP_SHA1,  
         SSH_FP_MD5  
 };  
 enum fp_rep {  
         SSH_FP_HEX,  
         SSH_FP_BUBBLEBABBLE  
 };  
   
 /* key is stored in external hardware */  
 #define KEY_FLAG_EXT            0x0001  
   
 struct Key {  struct Key {
         int      type;          int     type;
         int      flags;  
         RSA     *rsa;          RSA     *rsa;
         DSA     *dsa;          DSA     *dsa;
 };  };
   
 Key     *key_new(int);  Key     *key_new(int type);
 Key     *key_new_private(int);  Key     *key_new_private(int type);
 void     key_free(Key *);  void    key_free(Key *k);
 int      key_equal(Key *, Key *);  int     key_equal(Key *a, Key *b);
 char    *key_fingerprint(Key *, enum fp_type, enum fp_rep);  char    *key_fingerprint(Key *k);
 char    *key_type(Key *);  char    *key_type(Key *k);
 int      key_write(Key *, FILE *);  int     key_write(Key *key, FILE *f);
 int      key_read(Key *, char **);  int     key_read(Key *key, char **cpp);
 u_int    key_size(Key *);  u_int   key_size(Key *k);
   
 Key     *key_generate(int, u_int);  Key     *key_generate(int type, unsigned int bits);
 Key     *key_from_private(Key *);  Key     *key_from_private(Key *k);
 int      key_type_from_name(char *);  int     key_type_from_name(char *name);
   
 Key     *key_from_blob(u_char *, int);  Key     *key_from_blob(char *blob, int blen);
 int      key_to_blob(Key *, u_char **, u_int *);  int     key_to_blob(Key *key, unsigned char **blobp, unsigned int *lenp);
 char    *key_ssh_name(Key *);  char    *key_ssh_name(Key *k);
 int      key_names_valid2(const char *);  
   
 int      key_sign(Key *, u_char **, u_int *, u_char *, u_int);  int
 int      key_verify(Key *, u_char *, u_int, u_char *, u_int);  key_sign(
       Key *key,
       unsigned char **sigp, int *lenp,
       unsigned char *data, int datalen);
   
   int
   key_verify(
       Key *key,
       unsigned char *signature, int signaturelen,
       unsigned char *data, int datalen);
   
 #endif  #endif

Legend:
Removed from v.1.5.2.6  
changed lines
  Added in v.1.6