Lines Matching refs:hashctx

888 	struct ssh_digest_ctx *hashctx = NULL;  in derive_key()  local
903 if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL || in derive_key()
904 ssh_digest_update_buffer(hashctx, shared_secret) != 0 || in derive_key()
905 ssh_digest_update(hashctx, hash, hashlen) != 0 || in derive_key()
906 ssh_digest_update(hashctx, &c, 1) != 0 || in derive_key()
907 ssh_digest_update(hashctx, kex->session_id, in derive_key()
909 ssh_digest_final(hashctx, digest, mdsz) != 0) { in derive_key()
913 ssh_digest_free(hashctx); in derive_key()
914 hashctx = NULL; in derive_key()
922 if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL || in derive_key()
923 ssh_digest_update_buffer(hashctx, shared_secret) != 0 || in derive_key()
924 ssh_digest_update(hashctx, hash, hashlen) != 0 || in derive_key()
925 ssh_digest_update(hashctx, digest, have) != 0 || in derive_key()
926 ssh_digest_final(hashctx, digest + have, mdsz) != 0) { in derive_key()
930 ssh_digest_free(hashctx); in derive_key()
931 hashctx = NULL; in derive_key()
942 ssh_digest_free(hashctx); in derive_key()
997 struct ssh_digest_ctx *hashctx = NULL; in derive_ssh1_session_id() local
1011 if ((hashctx = ssh_digest_start(SSH_DIGEST_MD5)) == NULL) { in derive_ssh1_session_id()
1015 if (ssh_digest_update(hashctx, hbuf, hlen) != 0 || in derive_ssh1_session_id()
1016 ssh_digest_update(hashctx, sbuf, slen) != 0 || in derive_ssh1_session_id()
1017 ssh_digest_update(hashctx, cookie, 8) != 0 || in derive_ssh1_session_id()
1018 ssh_digest_final(hashctx, obuf, sizeof(obuf)) != 0) { in derive_ssh1_session_id()
1025 ssh_digest_free(hashctx); in derive_ssh1_session_id()