mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-18 16:14:34 +00:00
04c7e28f83
pass negotiated signing algorithm though to sshkey_verify() and check that the negotiated algorithm matches the type in the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@ OpenBSD-Commit-ID: 735fb15bf4adc060d3bee9d047a4bcaaa81b1af9
24 lines
453 B
C
24 lines
453 B
C
/* $OpenBSD: hash.c,v 1.4 2017/12/14 21:07:39 naddy Exp $ */
|
|
|
|
#include "includes.h"
|
|
|
|
#include "crypto_api.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include "digest.h"
|
|
#include "log.h"
|
|
#include "ssherr.h"
|
|
|
|
int
|
|
crypto_hash_sha512(unsigned char *out, const unsigned char *in,
|
|
unsigned long long inlen)
|
|
{
|
|
int r;
|
|
|
|
if ((r = ssh_digest_memory(SSH_DIGEST_SHA512, in, inlen, out,
|
|
crypto_hash_sha512_BYTES)) != 0)
|
|
fatal("%s: %s", __func__, ssh_err(r));
|
|
return 0;
|
|
}
|