version 1.4, 2014/12/21 22:27:56 |
version 1.5, 2015/05/05 02:48:17 |
|
|
const struct ssh_digest *digest = ssh_digest_by_alg(alg); |
const struct ssh_digest *digest = ssh_digest_by_alg(alg); |
struct ssh_digest_ctx *ret; |
struct ssh_digest_ctx *ret; |
|
|
if (digest == NULL || (ret = calloc(1, sizeof(ret))) == NULL) |
if (digest == NULL || (ret = calloc(1, sizeof(*ret))) == NULL) |
return NULL; |
return NULL; |
if ((ret->mdctx = calloc(1, digest->ctx_len)) == NULL) { |
if ((ret->mdctx = calloc(1, digest->ctx_len)) == NULL) { |
free(ret); |
free(ret); |