]> andersk Git - openssh.git/blobdiff - md-sha256.c
- (dtucker) [sftp.c] Expand ifdef for libedit to cover complete_is_remote
[openssh.git] / md-sha256.c
index 82c526d33ed9995165de95f07d824f051096818a..8c1b3b92da9b33b3d32bed4ff5d2739e7b4efe9b 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenBSD: md-sha256.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
 /*
  * Copyright (c) 2005 Damien Miller <djm@openbsd.org>
  *
 
 #include "includes.h"
 
-#ifndef HAVE_EVP_SHA256
+#include <sys/types.h>
+#include <openssl/opensslv.h>
 
-#include <openssl/evp.h>
+#if !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L)
 
-RCSID("$OpenBSD: md-sha256.c,v 1.1 2006/03/07 09:07:40 djm Exp $");
+#include <string.h>
+#include <openssl/evp.h>
+#ifdef HAVE_SHA256_UPDATE
+# ifdef HAVE_SHA2_H
+#  include <sha2.h>
+# elif defined(HAVE_CRYPTO_SHA2_H)
+#  include <crypto/sha2.h>
+# endif
+#endif
 
 const EVP_MD *evp_ssh_sha256(void);
 
@@ -72,5 +82,5 @@ evp_ssh_sha256(void)
        return (&ssh_sha256);
 }
 
-#endif /* HAVE_EVP_SHA256 */
+#endif /* !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) */
 
This page took 0.243345 seconds and 4 git commands to generate.