From d2681d82e226d28d033390b61e94af04f0248dff Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Sun, 30 Jun 2013 14:49:12 +0200
Subject: [PATCH] Renamed sha2.{c,h} to sha256.{c,h} and sha4.{c,h} to
sha512.{c,h}
---
include/polarssl/entropy.h | 2 +-
include/polarssl/{sha2.h => sha256.h} | 10 +++++-----
include/polarssl/{sha4.h => sha512.h} | 10 +++++-----
include/polarssl/ssl.h | 4 ++--
library/CMakeLists.txt | 4 ++--
library/Makefile | 4 ++--
library/error.c | 4 ++--
library/md_wrap.c | 4 ++--
library/{sha2.c => sha256.c} | 2 +-
library/{sha4.c => sha512.c} | 2 +-
library/ssl_tls.c | 2 +-
library/x509parse.c | 4 ++--
programs/aes/aescrypt2.c | 2 +-
programs/hash/sha2sum.c | 4 ++--
programs/test/benchmark.c | 6 +++---
programs/test/selftest.c | 6 +++---
tests/suites/test_suite_hmac_shax.function | 4 ++--
tests/suites/test_suite_md.function | 4 ++--
tests/suites/test_suite_pkcs1_v21.function | 4 ++--
tests/suites/test_suite_rsa.function | 4 ++--
tests/suites/test_suite_shax.function | 4 ++--
21 files changed, 45 insertions(+), 45 deletions(-)
rename include/polarssl/{sha2.h => sha256.h} (97%)
rename include/polarssl/{sha4.h => sha512.h} (97%)
rename library/{sha2.c => sha256.c} (99%)
rename library/{sha4.c => sha512.c} (99%)
diff --git a/include/polarssl/entropy.h b/include/polarssl/entropy.h
index 539e5cb2c..69d5b3b6e 100644
--- a/include/polarssl/entropy.h
+++ b/include/polarssl/entropy.h
@@ -31,7 +31,7 @@
#include "config.h"
-#include "sha4.h"
+#include "sha512.h"
#if defined(POLARSSL_HAVEGE_C)
#include "havege.h"
#endif
diff --git a/include/polarssl/sha2.h b/include/polarssl/sha256.h
similarity index 97%
rename from include/polarssl/sha2.h
rename to include/polarssl/sha256.h
index 09ba87cdf..7d964b810 100644
--- a/include/polarssl/sha2.h
+++ b/include/polarssl/sha256.h
@@ -1,5 +1,5 @@
/**
- * \file sha2.h
+ * \file sha256.h
*
* \brief SHA-224 and SHA-256 cryptographic hash function
*
@@ -24,8 +24,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef POLARSSL_SHA2_H
-#define POLARSSL_SHA2_H
+#ifndef POLARSSL_SHA256_H
+#define POLARSSL_SHA256_H
#include "config.h"
@@ -96,7 +96,7 @@ void sha256_process( sha256_context *ctx, const unsigned char data[64] );
#endif
#else /* POLARSSL_SHA256_ALT */
-#include "sha2_alt.h"
+#include "sha256_alt.h"
#endif /* POLARSSL_SHA256_ALT */
#ifdef __cplusplus
@@ -185,4 +185,4 @@ int sha256_self_test( int verbose );
}
#endif
-#endif /* sha2.h */
+#endif /* sha256.h */
diff --git a/include/polarssl/sha4.h b/include/polarssl/sha512.h
similarity index 97%
rename from include/polarssl/sha4.h
rename to include/polarssl/sha512.h
index 711353a38..2c61637ee 100644
--- a/include/polarssl/sha4.h
+++ b/include/polarssl/sha512.h
@@ -1,5 +1,5 @@
/**
- * \file sha4.h
+ * \file sha512.h
*
* \brief SHA-384 and SHA-512 cryptographic hash function
*
@@ -24,8 +24,8 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef POLARSSL_SHA4_H
-#define POLARSSL_SHA4_H
+#ifndef POLARSSL_SHA512_H
+#define POLARSSL_SHA512_H
#include "config.h"
@@ -94,7 +94,7 @@ void sha512_finish( sha512_context *ctx, unsigned char output[64] );
#endif
#else /* POLARSSL_SHA512_ALT */
-#include "sha4_alt.h"
+#include "sha512_alt.h"
#endif /* POLARSSL_SHA512_ALT */
#ifdef __cplusplus
@@ -186,4 +186,4 @@ void sha512_process( sha512_context *ctx, const unsigned char data[128] );
}
#endif
-#endif /* sha4.h */
+#endif /* sha512.h */
diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h
index 01d883927..4bc0fad8e 100644
--- a/include/polarssl/ssl.h
+++ b/include/polarssl/ssl.h
@@ -35,8 +35,8 @@
#include "md5.h"
#include "sha1.h"
-#include "sha2.h"
-#include "sha4.h"
+#include "sha256.h"
+#include "sha512.h"
#include "ssl_ciphersuites.h"
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index bb80500be..f702ea76e 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -39,8 +39,8 @@ set(src
pkcs12.c
rsa.c
sha1.c
- sha2.c
- sha4.c
+ sha256.c
+ sha512.c
ssl_cache.c
ssl_ciphersuites.c
ssl_cli.c
diff --git a/library/Makefile b/library/Makefile
index dcc747791..a0e310504 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -48,8 +48,8 @@ OBJS= aes.o arc4.o asn1parse.o \
oid.o \
padlock.o pbkdf2.o pem.o \
pkcs5.o pkcs11.o pkcs12.o \
- rsa.o sha1.o sha2.o \
- sha4.o ssl_cache.o ssl_cli.o \
+ rsa.o sha1.o sha256.o \
+ sha512.o ssl_cache.o ssl_cli.o \
ssl_srv.o ssl_ciphersuites.o \
ssl_tls.o timing.o version.o \
x509parse.o x509write.o xtea.o
diff --git a/library/error.c b/library/error.c
index 22a637112..7042bbd1b 100644
--- a/library/error.c
+++ b/library/error.c
@@ -130,11 +130,11 @@
#endif
#if defined(POLARSSL_SHA256_C)
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#endif
#if defined(POLARSSL_SHA512_C)
-#include "polarssl/sha4.h"
+#include "polarssl/sha512.h"
#endif
#if defined(POLARSSL_SSL_TLS_C)
diff --git a/library/md_wrap.c b/library/md_wrap.c
index 2621d222e..d72852be7 100644
--- a/library/md_wrap.c
+++ b/library/md_wrap.c
@@ -50,11 +50,11 @@
#endif
#if defined(POLARSSL_SHA256_C)
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#endif
#if defined(POLARSSL_SHA512_C)
-#include "polarssl/sha4.h"
+#include "polarssl/sha512.h"
#endif
#include
diff --git a/library/sha2.c b/library/sha256.c
similarity index 99%
rename from library/sha2.c
rename to library/sha256.c
index ffd00fcfc..e4d48427d 100644
--- a/library/sha2.c
+++ b/library/sha256.c
@@ -32,7 +32,7 @@
#if defined(POLARSSL_SHA256_C)
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#if defined(POLARSSL_FS_IO) || defined(POLARSSL_SELF_TEST)
#include
diff --git a/library/sha4.c b/library/sha512.c
similarity index 99%
rename from library/sha4.c
rename to library/sha512.c
index 0710fab77..2366e7c2c 100644
--- a/library/sha4.c
+++ b/library/sha512.c
@@ -32,7 +32,7 @@
#if defined(POLARSSL_SHA512_C)
-#include "polarssl/sha4.h"
+#include "polarssl/sha512.h"
#if defined(POLARSSL_FS_IO) || defined(POLARSSL_SELF_TEST)
#include
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 6eeafc736..64d662efa 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -41,7 +41,7 @@
#include "polarssl/des.h"
#include "polarssl/debug.h"
#include "polarssl/ssl.h"
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#if defined(POLARSSL_GCM_C)
#include "polarssl/gcm.h"
diff --git a/library/x509parse.c b/library/x509parse.c
index 6e37a8549..3bc78c04c 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -56,10 +56,10 @@
#include "polarssl/sha1.h"
#endif
#if defined(POLARSSL_SHA256_C)
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#endif
#if defined(POLARSSL_SHA512_C)
-#include "polarssl/sha4.h"
+#include "polarssl/sha512.h"
#endif
#include "polarssl/dhm.h"
#if defined(POLARSSL_PKCS5_C)
diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c
index e9207ef77..457b85e47 100644
--- a/programs/aes/aescrypt2.c
+++ b/programs/aes/aescrypt2.c
@@ -45,7 +45,7 @@
#include "polarssl/config.h"
#include "polarssl/aes.h"
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#define MODE_ENCRYPT 0
#define MODE_DECRYPT 1
diff --git a/programs/hash/sha2sum.c b/programs/hash/sha2sum.c
index 81a80588f..446d60b2a 100644
--- a/programs/hash/sha2sum.c
+++ b/programs/hash/sha2sum.c
@@ -1,7 +1,7 @@
/*
* sha256sum demonstration program
*
- * Copyright (C) 2006-2011, Brainspark B.V.
+ * Copyright (C) 2006-2013, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker
@@ -32,7 +32,7 @@
#include "polarssl/config.h"
-#include "polarssl/sha2.h"
+#include "polarssl/sha256.h"
#if !defined(POLARSSL_SHA256_C) || !defined(POLARSSL_FS_IO)
int main( int argc, char *argv[] )
diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c
index acccd014c..7c73e61aa 100644
--- a/programs/test/benchmark.c
+++ b/programs/test/benchmark.c
@@ -1,7 +1,7 @@
/*
* Benchmark demonstration program
*
- * Copyright (C) 2006-2011, Brainspark B.V.
+ * Copyright (C) 2006-2013, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker
@@ -36,8 +36,8 @@
#include "polarssl/md4.h"
#include "polarssl/md5.h"
#include "polarssl/sha1.h"
-#include "polarssl/sha2.h"
-#include "polarssl/sha4.h"
+#include "polarssl/sha256.h"
+#include "polarssl/sha512.h"
#include "polarssl/arc4.h"
#include "polarssl/des.h"
#include "polarssl/aes.h"
diff --git a/programs/test/selftest.c b/programs/test/selftest.c
index 006879341..909111e99 100644
--- a/programs/test/selftest.c
+++ b/programs/test/selftest.c
@@ -1,7 +1,7 @@
/*
* Self-test demonstration program
*
- * Copyright (C) 2006-2011, Brainspark B.V.
+ * Copyright (C) 2006-2013, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker
@@ -38,8 +38,8 @@
#include "polarssl/md4.h"
#include "polarssl/md5.h"
#include "polarssl/sha1.h"
-#include "polarssl/sha2.h"
-#include "polarssl/sha4.h"
+#include "polarssl/sha256.h"
+#include "polarssl/sha512.h"
#include "polarssl/arc4.h"
#include "polarssl/des.h"
#include "polarssl/aes.h"
diff --git a/tests/suites/test_suite_hmac_shax.function b/tests/suites/test_suite_hmac_shax.function
index 66c67dbea..214002b59 100644
--- a/tests/suites/test_suite_hmac_shax.function
+++ b/tests/suites/test_suite_hmac_shax.function
@@ -1,7 +1,7 @@
BEGIN_HEADER
#include
-#include
-#include
+#include
+#include
END_HEADER
BEGIN_CASE
diff --git a/tests/suites/test_suite_md.function b/tests/suites/test_suite_md.function
index 31390af87..81d8f0364 100644
--- a/tests/suites/test_suite_md.function
+++ b/tests/suites/test_suite_md.function
@@ -4,8 +4,8 @@ BEGIN_HEADER
#include
#include
#include
-#include
-#include
+#include
+#include
END_HEADER
BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pkcs1_v21.function b/tests/suites/test_suite_pkcs1_v21.function
index b7ff05519..57dd3415a 100644
--- a/tests/suites/test_suite_pkcs1_v21.function
+++ b/tests/suites/test_suite_pkcs1_v21.function
@@ -5,8 +5,8 @@ BEGIN_HEADER
#include
#include
#include
-#include
-#include
+#include
+#include
END_HEADER
BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function
index 72c296744..848ef7607 100644
--- a/tests/suites/test_suite_rsa.function
+++ b/tests/suites/test_suite_rsa.function
@@ -4,8 +4,8 @@ BEGIN_HEADER
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include
END_HEADER
diff --git a/tests/suites/test_suite_shax.function b/tests/suites/test_suite_shax.function
index f5efa48e3..75fad336a 100644
--- a/tests/suites/test_suite_shax.function
+++ b/tests/suites/test_suite_shax.function
@@ -1,7 +1,7 @@
BEGIN_HEADER
#include
-#include
-#include
+#include
+#include
END_HEADER
BEGIN_CASE