The output function called sha512_digest() instead of sha384_digest(),
which caused the hash context to be reinitialized for SHA512 instead of
SHA384 and all following digests using the hash handle were wrong.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
case GNUTLS_DIG_SHA384:
sha384_init(&ctx->ctx.sha384);
ctx->update = (update_func) x86_sha512_update;
- ctx->digest = (digest_func) sha512_digest;
+ ctx->digest = (digest_func) sha384_digest;
ctx->init = (init_func) sha384_init;
ctx->ctx_ptr = &ctx->ctx.sha384;
ctx->length = SHA384_DIGEST_SIZE;