[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.57 and 1.58

version 1.57, 2017/10/13 06:24:51 version 1.58, 2017/12/18 02:22:29
Line 2012 
Line 2012 
 }  }
   
 int  int
   sshkey_sigtype(const u_char *sig, size_t siglen, char **sigtypep)
   {
           int r;
           struct sshbuf *b = NULL;
           char *sigtype = NULL;
   
           if (sigtypep != NULL)
                   *sigtypep = NULL;
           if ((b = sshbuf_from(sig, siglen)) == NULL)
                   return SSH_ERR_ALLOC_FAIL;
           if ((r = sshbuf_get_cstring(b, &sigtype, NULL)) != 0)
                   goto out;
           /* success */
           if (sigtypep != NULL) {
                   *sigtypep = sigtype;
                   sigtype = NULL;
           }
           r = 0;
    out:
           free(sigtype);
           sshbuf_free(b);
           return r;
   }
   
   int
 sshkey_sign(const struct sshkey *key,  sshkey_sign(const struct sshkey *key,
     u_char **sigp, size_t *lenp,      u_char **sigp, size_t *lenp,
     const u_char *data, size_t datalen, const char *alg, u_int compat)      const u_char *data, size_t datalen, const char *alg, u_int compat)

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58