Lines Matching refs:hashctx
682 struct ssh_digest_ctx *hashctx = NULL; in derive_key() local
697 if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL || in derive_key()
698 ssh_digest_update_buffer(hashctx, shared_secret) != 0 || in derive_key()
699 ssh_digest_update(hashctx, hash, hashlen) != 0 || in derive_key()
700 ssh_digest_update(hashctx, &c, 1) != 0 || in derive_key()
701 ssh_digest_update(hashctx, kex->session_id, in derive_key()
703 ssh_digest_final(hashctx, digest, mdsz) != 0) { in derive_key()
707 ssh_digest_free(hashctx); in derive_key()
708 hashctx = NULL; in derive_key()
716 if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL || in derive_key()
717 ssh_digest_update_buffer(hashctx, shared_secret) != 0 || in derive_key()
718 ssh_digest_update(hashctx, hash, hashlen) != 0 || in derive_key()
719 ssh_digest_update(hashctx, digest, have) != 0 || in derive_key()
720 ssh_digest_final(hashctx, digest + have, mdsz) != 0) { in derive_key()
724 ssh_digest_free(hashctx); in derive_key()
725 hashctx = NULL; in derive_key()
737 ssh_digest_free(hashctx); in derive_key()
792 struct ssh_digest_ctx *hashctx = NULL; in derive_ssh1_session_id() local
806 if ((hashctx = ssh_digest_start(SSH_DIGEST_MD5)) == NULL) { in derive_ssh1_session_id()
810 if (ssh_digest_update(hashctx, hbuf, hlen) != 0 || in derive_ssh1_session_id()
811 ssh_digest_update(hashctx, sbuf, slen) != 0 || in derive_ssh1_session_id()
812 ssh_digest_update(hashctx, cookie, 8) != 0 || in derive_ssh1_session_id()
813 ssh_digest_final(hashctx, obuf, sizeof(obuf)) != 0) { in derive_ssh1_session_id()
820 ssh_digest_free(hashctx); in derive_ssh1_session_id()