[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 and 1.5.2.5

version 1.5, 2000/09/07 20:27:51 version 1.5.2.5, 2001/09/27 00:15:42
Line 1 
Line 1 
   /*      $OpenBSD$       */
   
 /*  /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.   * Copyright (c) 2000, 2001 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 24 
Line 26 
 #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_RSA,          KEY_RSA,
         KEY_DSA,          KEY_DSA,
         KEY_EMPTY          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 type);  Key     *key_new(int);
 void    key_free(Key *k);  Key     *key_new_private(int);
 int     key_equal(Key *a, Key *b);  void     key_free(Key *);
 char    *key_fingerprint(Key *k);  int      key_equal(Key *, Key *);
 char    *key_type(Key *k);  char    *key_fingerprint(Key *, enum fp_type, enum fp_rep);
 int     key_write(Key *key, FILE *f);  char    *key_type(Key *);
 unsigned int    key_read(Key *key, char **cpp);  int      key_write(Key *, FILE *);
 unsigned int    key_size(Key *k);  int      key_read(Key *, char **);
   u_int    key_size(Key *);
   
   Key     *key_generate(int, u_int);
   Key     *key_from_private(Key *);
   int      key_type_from_name(char *);
   
   Key     *key_from_blob(u_char *, int);
   int      key_to_blob(Key *, u_char **, u_int *);
   char    *key_ssh_name(Key *);
   int      key_names_valid2(const char *);
   
   int      key_sign(Key *, u_char **, int *, u_char *, int);
   int      key_verify(Key *, u_char *, int, u_char *, int);
   
 #endif  #endif

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.2.5