[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.113 and 1.114

version 1.113, 2013/12/29 02:49:52 version 1.114, 2013/12/29 04:20:04
Line 1057 
Line 1057 
         return 0;          return 0;
 }  }
   
   static int
   key_type_is_valid_ca(int type)
   {
           switch (type) {
           case KEY_RSA:
           case KEY_DSA:
           case KEY_ECDSA:
           case KEY_ED25519:
                   return 1;
           default:
                   return 0;
           }
   }
   
 u_int  u_int
 key_size(const Key *k)  key_size(const Key *k)
 {  {
Line 1431 
Line 1445 
                 error("%s: Signature key invalid", __func__);                  error("%s: Signature key invalid", __func__);
                 goto out;                  goto out;
         }          }
         if (key->cert->signature_key->type != KEY_RSA &&          if (!key_type_is_valid_ca(key->cert->signature_key->type)) {
             key->cert->signature_key->type != KEY_DSA &&  
             key->cert->signature_key->type != KEY_ECDSA &&  
             key->cert->signature_key->type != KEY_ED25519) {  
                 error("%s: Invalid signature key type %s (%d)", __func__,                  error("%s: Invalid signature key type %s (%d)", __func__,
                     key_type(key->cert->signature_key),                      key_type(key->cert->signature_key),
                     key->cert->signature_key->type);                      key->cert->signature_key->type);
Line 1915 
Line 1926 
                 return -1;                  return -1;
         }          }
   
         if (ca->type != KEY_RSA && ca->type != KEY_DSA &&          if (!key_type_is_valid_ca(ca->type)) {
             ca->type != KEY_ECDSA && ca->type != KEY_ED25519) {  
                 error("%s: CA key has unsupported type %s", __func__,                  error("%s: CA key has unsupported type %s", __func__,
                     key_type(ca));                      key_type(ca));
                 return -1;                  return -1;

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.114