]> andersk Git - openssh.git/blobdiff - md-sha256.c
- djm@cvs.openbsd.org 2010/01/27 19:21:39
[openssh.git] / md-sha256.c
index 08848f8410df255a996909d812e7ad5147fea100..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>
  *
 /* EVP wrapper for SHA256 */
 
 #include "includes.h"
-#include <openssl/evp.h>
-#include <sha2.h>
 
-RCSID("$OpenBSD: md-sha256.c,v 1.1 2006/03/07 09:07:40 djm Exp $");
+#include <sys/types.h>
+#include <openssl/opensslv.h>
+
+#if !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L)
+
+#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);
 
@@ -69,3 +81,6 @@ evp_ssh_sha256(void)
 
        return (&ssh_sha256);
 }
+
+#endif /* !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) */
+
This page took 0.214595 seconds and 4 git commands to generate.