mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-17 23:54:35 +00:00
Use SHA.*_HMAC_BLOCK_SIZE if needed.
If the platform has a native SHA2, does not define SHA.*_BLOCK_LENGTH but does define SHA.*_HMAC_BLOCK_SIZE (eg Solaris) then use the latter. Should fix --without-openssl build on Solaris.
This commit is contained in:
parent
715c892f0a
commit
1c9853a68b
@ -36,6 +36,16 @@
|
||||
#include <sha2.h>
|
||||
#endif
|
||||
|
||||
#if !defined(SHA256_BLOCK_LENGTH) && defined(SHA256_HMAC_BLOCK_SIZE)
|
||||
#define SHA256_BLOCK_LENGTH SHA256_HMAC_BLOCK_SIZE
|
||||
#endif
|
||||
#if !defined(SHA384_BLOCK_LENGTH) && defined(SHA512_HMAC_BLOCK_SIZE)
|
||||
#define SHA384_BLOCK_LENGTH SHA512_HMAC_BLOCK_SIZE
|
||||
#endif
|
||||
#if !defined(SHA512_BLOCK_LENGTH) && defined(SHA512_HMAC_BLOCK_SIZE)
|
||||
#define SHA512_BLOCK_LENGTH SHA512_HMAC_BLOCK_SIZE
|
||||
#endif
|
||||
|
||||
#include "ssherr.h"
|
||||
#include "sshbuf.h"
|
||||
#include "digest.h"
|
||||
|
Loading…
Reference in New Issue
Block a user