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

Diff for /src/usr.bin/ssh/sshkey.c between version 1.11 and 1.12

version 1.11, 2015/01/13 07:39:19 version 1.12, 2015/01/14 10:46:28
Line 29 
Line 29 
 #include <sys/types.h>  #include <sys/types.h>
 #include <netinet/in.h>  #include <netinet/in.h>
   
   #ifdef WITH_OPENSSL
 #include <openssl/evp.h>  #include <openssl/evp.h>
 #include <openssl/err.h>  #include <openssl/err.h>
 #include <openssl/pem.h>  #include <openssl/pem.h>
   #endif
   
 #include "crypto_api.h"  #include "crypto_api.h"
   
Line 1918 
Line 1920 
     struct sshkey **keyp, int allow_cert)      struct sshkey **keyp, int allow_cert)
 {  {
         struct sshbuf *b = NULL;          struct sshbuf *b = NULL;
         int type, nid = -1, ret = SSH_ERR_INTERNAL_ERROR;          int type, ret = SSH_ERR_INTERNAL_ERROR;
         char *ktype = NULL, *curve = NULL;          char *ktype = NULL, *curve = NULL;
         struct sshkey *key = NULL;          struct sshkey *key = NULL;
         size_t len;          size_t len;
Line 1939 
Line 1941 
         }          }
   
         type = sshkey_type_from_name(ktype);          type = sshkey_type_from_name(ktype);
         if (sshkey_type_plain(type) == KEY_ECDSA)  
                 nid = sshkey_ecdsa_nid_from_name(ktype);  
         if (!allow_cert && sshkey_type_is_cert(type)) {          if (!allow_cert && sshkey_type_is_cert(type)) {
                 ret = SSH_ERR_KEY_CERT_INVALID_SIGN_KEY;                  ret = SSH_ERR_KEY_CERT_INVALID_SIGN_KEY;
                 goto out;                  goto out;
Line 2002 
Line 2002 
                         ret = SSH_ERR_ALLOC_FAIL;                          ret = SSH_ERR_ALLOC_FAIL;
                         goto out;                          goto out;
                 }                  }
                 key->ecdsa_nid = nid;                  key->ecdsa_nid = sshkey_ecdsa_nid_from_name(ktype);
                 if (sshbuf_get_cstring(b, &curve, NULL) != 0) {                  if (sshbuf_get_cstring(b, &curve, NULL) != 0) {
                         ret = SSH_ERR_INVALID_FORMAT;                          ret = SSH_ERR_INVALID_FORMAT;
                         goto out;                          goto out;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12