summaryrefslogtreecommitdiffstats
path: root/digest-libc.c
diff options
context:
space:
mode:
Diffstat (limited to 'digest-libc.c')
-rw-r--r--digest-libc.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/digest-libc.c b/digest-libc.c
index 169ded07..a216e784 100644
--- a/digest-libc.c
+++ b/digest-libc.c
@@ -18,15 +18,19 @@
#include "includes.h"
+#ifndef WITH_OPENSSL
+
#include <sys/types.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
+#if 0
#include <md5.h>
#include <rmd160.h>
#include <sha1.h>
#include <sha2.h>
+#endif
#include "ssherr.h"
#include "sshbuf.h"
@@ -89,30 +93,30 @@ const struct ssh_digest digests[SSH_DIGEST_MAX] = {
"SHA256",
SHA256_BLOCK_LENGTH,
SHA256_DIGEST_LENGTH,
- sizeof(SHA2_CTX),
- (md_init_fn *) SHA256Init,
- (md_update_fn *) SHA256Update,
- (md_final_fn *) SHA256Final
+ sizeof(SHA256_CTX),
+ (md_init_fn *) SHA256_Init,
+ (md_update_fn *) SHA256_Update,
+ (md_final_fn *) SHA256_Final
},
{
SSH_DIGEST_SHA384,
"SHA384",
SHA384_BLOCK_LENGTH,
SHA384_DIGEST_LENGTH,
- sizeof(SHA2_CTX),
- (md_init_fn *) SHA384Init,
- (md_update_fn *) SHA384Update,
- (md_final_fn *) SHA384Final
+ sizeof(SHA384_CTX),
+ (md_init_fn *) SHA384_Init,
+ (md_update_fn *) SHA384_Update,
+ (md_final_fn *) SHA384_Final
},
{
SSH_DIGEST_SHA512,
"SHA512",
SHA512_BLOCK_LENGTH,
SHA512_DIGEST_LENGTH,
- sizeof(SHA2_CTX),
- (md_init_fn *) SHA512Init,
- (md_update_fn *) SHA512Update,
- (md_final_fn *) SHA512Final
+ sizeof(SHA512_CTX),
+ (md_init_fn *) SHA512_Init,
+ (md_update_fn *) SHA512_Update,
+ (md_final_fn *) SHA512_Final
}
};
@@ -257,3 +261,4 @@ ssh_digest_buffer(int alg, const struct sshbuf *b, u_char *d, size_t dlen)
{
return ssh_digest_memory(alg, sshbuf_ptr(b), sshbuf_len(b), d, dlen);
}
+#endif /* !WITH_OPENSSL */