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

Diff for /src/usr.bin/ssh/Attic/key.c between version 1.54 and 1.55

version 1.54, 2003/07/09 13:58:19 version 1.55, 2003/11/10 16:23:41
Line 143 
Line 143 
         }          }
         xfree(k);          xfree(k);
 }  }
   
 int  int
 key_equal(Key *a, Key *b)  key_equal(const Key *a, const Key *b)
 {  {
         if (a == NULL || b == NULL || a->type != b->type)          if (a == NULL || b == NULL || a->type != b->type)
                 return 0;                  return 0;
Line 170 
Line 171 
 }  }
   
 u_char*  u_char*
 key_fingerprint_raw(Key *k, enum fp_type dgst_type, u_int *dgst_raw_length)  key_fingerprint_raw(const Key *k, enum fp_type dgst_type,
       u_int *dgst_raw_length)
 {  {
         const EVP_MD *md = NULL;          const EVP_MD *md = NULL;
         EVP_MD_CTX ctx;          EVP_MD_CTX ctx;
Line 292 
Line 294 
 }  }
   
 char *  char *
 key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)  key_fingerprint(const Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)
 {  {
         char *retval = NULL;          char *retval = NULL;
         u_char *dgst_raw;          u_char *dgst_raw;
Line 490 
Line 492 
 }  }
   
 int  int
 key_write(Key *key, FILE *f)  key_write(const Key *key, FILE *f)
 {  {
         int n, success = 0;          int n, success = 0;
         u_int len, bits = 0;          u_int len, bits = 0;
Line 522 
Line 524 
         return success;          return success;
 }  }
   
 char *  const char *
 key_type(Key *k)  key_type(const Key *k)
 {  {
         switch (k->type) {          switch (k->type) {
         case KEY_RSA1:          case KEY_RSA1:
Line 539 
Line 541 
         return "unknown";          return "unknown";
 }  }
   
 char *  const char *
 key_ssh_name(Key *k)  key_ssh_name(const Key *k)
 {  {
         switch (k->type) {          switch (k->type) {
         case KEY_RSA:          case KEY_RSA:
Line 554 
Line 556 
 }  }
   
 u_int  u_int
 key_size(Key *k)  key_size(const Key *k)
 {  {
         switch (k->type) {          switch (k->type) {
         case KEY_RSA1:          case KEY_RSA1:
Line 611 
Line 613 
 }  }
   
 Key *  Key *
 key_from_private(Key *k)  key_from_private(const Key *k)
 {  {
         Key *n = NULL;          Key *n = NULL;
         switch (k->type) {          switch (k->type) {
Line 676 
Line 678 
 }  }
   
 Key *  Key *
 key_from_blob(u_char *blob, u_int blen)  key_from_blob(const u_char *blob, u_int blen)
 {  {
         Buffer b;          Buffer b;
         char *ktype;          char *ktype;
Line 726 
Line 728 
 }  }
   
 int  int
 key_to_blob(Key *key, u_char **blobp, u_int *lenp)  key_to_blob(const Key *key, u_char **blobp, u_int *lenp)
 {  {
         Buffer b;          Buffer b;
         int len;          int len;
Line 768 
Line 770 
   
 int  int
 key_sign(  key_sign(
     Key *key,      const Key *key,
     u_char **sigp, u_int *lenp,      u_char **sigp, u_int *lenp,
     u_char *data, u_int datalen)      const u_char *data, u_int datalen)
 {  {
         switch (key->type) {          switch (key->type) {
         case KEY_DSA:          case KEY_DSA:
Line 792 
Line 794 
  */   */
 int  int
 key_verify(  key_verify(
     Key *key,      const Key *key,
     u_char *signature, u_int signaturelen,      const u_char *signature, u_int signaturelen,
     u_char *data, u_int datalen)      const u_char *data, u_int datalen)
 {  {
         if (signaturelen == 0)          if (signaturelen == 0)
                 return -1;                  return -1;
Line 815 
Line 817 
   
 /* Converts a private to a public key */  /* Converts a private to a public key */
 Key *  Key *
 key_demote(Key *k)  key_demote(const Key *k)
 {  {
         Key *pk;          Key *pk;
   

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55