search for: ssh_digest_upd

Displaying 2 results from an estimated 2 matches for "ssh_digest_upd".

2015 Aug 05
2
[PATCH 1/1] uid for expansion in ControlPath
...thost, thishost, sizeof(shorthost)); shorthost[strcspn(thishost, ".")] = '\0'; snprintf(portstr, sizeof(portstr), "%d", options.port); + snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid); if ((md = ssh_digest_start(SSH_DIGEST_SHA1)) == NULL || ssh_digest_update(md, thishost, strlen(thishost)) < 0 || @@ -1164,6 +1166,7 @@ main(int ac, char **av) "p", portstr, "r", options.user, "u", pw->pw_name, + "i", uidstr, (char *)NULL); free(cp); } diff --git a/ssh_config.5 b/ssh_co...
2014 Apr 05
0
[PATCH] Use EVP_Digest
...sh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen) { - struct ssh_digest_ctx *ctx = ssh_digest_start(alg); + const struct ssh_digest *digest = ssh_digest_by_alg(alg); - if (ctx == NULL) + if (!EVP_Digest(m, mlen, d, dlen, digest->mdfunc(), NULL)) return -1; - if (ssh_digest_update(ctx, m, mlen) != 0 || - ssh_digest_final(ctx, d, dlen) != 0) - return -1; - ssh_digest_free(ctx); + return 0; }