diff options
-rw-r--r-- | lib/libcrypto/evp/m_dss.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_dss1.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_ecdsa.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_md4.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_md5.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_mdc2.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_null.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_ripemd.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_sha.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_sha1.c | 49 | ||||
-rw-r--r-- | lib/libcrypto/evp/m_wp.c | 9 |
11 files changed, 94 insertions, 45 deletions
diff --git a/lib/libcrypto/evp/m_dss.c b/lib/libcrypto/evp/m_dss.c index 1516b9da3f8..9066b7b88f9 100644 --- a/lib/libcrypto/evp/m_dss.c +++ b/lib/libcrypto/evp/m_dss.c @@ -67,17 +67,20 @@ #ifndef OPENSSL_NO_SHA -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return SHA1_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA1_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return SHA1_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_dss1.c b/lib/libcrypto/evp/m_dss1.c index 2d9feff0959..ec79cd7c8c0 100644 --- a/lib/libcrypto/evp/m_dss1.c +++ b/lib/libcrypto/evp/m_dss1.c @@ -68,17 +68,20 @@ #include <openssl/dsa.h> #endif -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return SHA1_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA1_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return SHA1_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_ecdsa.c b/lib/libcrypto/evp/m_ecdsa.c index 1d7714571c5..a2dc889b86b 100644 --- a/lib/libcrypto/evp/m_ecdsa.c +++ b/lib/libcrypto/evp/m_ecdsa.c @@ -117,17 +117,20 @@ #ifndef OPENSSL_NO_SHA -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return SHA1_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA1_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return SHA1_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_md4.c b/lib/libcrypto/evp/m_md4.c index 5a944e3c16b..9d7dda26f33 100644 --- a/lib/libcrypto/evp/m_md4.c +++ b/lib/libcrypto/evp/m_md4.c @@ -71,17 +71,20 @@ #include "evp_locl.h" -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return MD4_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return MD4_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return MD4_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_md5.c b/lib/libcrypto/evp/m_md5.c index 4ac9829886f..03c78df9e80 100644 --- a/lib/libcrypto/evp/m_md5.c +++ b/lib/libcrypto/evp/m_md5.c @@ -70,17 +70,20 @@ #endif #include "evp_locl.h" -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return MD5_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return MD5_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return MD5_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_mdc2.c b/lib/libcrypto/evp/m_mdc2.c index 70ce53bee80..7983ed6acbb 100644 --- a/lib/libcrypto/evp/m_mdc2.c +++ b/lib/libcrypto/evp/m_mdc2.c @@ -71,17 +71,20 @@ #include "evp_locl.h" -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return MDC2_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return MDC2_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return MDC2_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_null.c b/lib/libcrypto/evp/m_null.c index f3c00ad5c8f..ad658e7045e 100644 --- a/lib/libcrypto/evp/m_null.c +++ b/lib/libcrypto/evp/m_null.c @@ -62,17 +62,20 @@ #include <openssl/objects.h> #include <openssl/x509.h> -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return 1; } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return 1; } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return 1; } diff --git a/lib/libcrypto/evp/m_ripemd.c b/lib/libcrypto/evp/m_ripemd.c index 69f30eb9831..5c48e3a8d6d 100644 --- a/lib/libcrypto/evp/m_ripemd.c +++ b/lib/libcrypto/evp/m_ripemd.c @@ -70,17 +70,20 @@ #endif #include "evp_locl.h" -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return RIPEMD160_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return RIPEMD160_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return RIPEMD160_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_sha.c b/lib/libcrypto/evp/m_sha.c index d2d275f8331..1b82e61c266 100644 --- a/lib/libcrypto/evp/m_sha.c +++ b/lib/libcrypto/evp/m_sha.c @@ -69,17 +69,20 @@ #endif #include "evp_locl.h" -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return SHA_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return SHA_Final(md, ctx->md_data); } diff --git a/lib/libcrypto/evp/m_sha1.c b/lib/libcrypto/evp/m_sha1.c index 8c7e4eb2224..e4af84acd27 100644 --- a/lib/libcrypto/evp/m_sha1.c +++ b/lib/libcrypto/evp/m_sha1.c @@ -69,17 +69,20 @@ #endif -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return SHA1_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA1_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return SHA1_Final(md, ctx->md_data); } @@ -107,11 +110,14 @@ EVP_sha1(void) #endif #ifndef OPENSSL_NO_SHA256 -static int init224(EVP_MD_CTX *ctx) +static int +init224(EVP_MD_CTX *ctx) { return SHA224_Init(ctx->md_data); } -static int init256(EVP_MD_CTX *ctx) + +static int +init256(EVP_MD_CTX *ctx) { return SHA256_Init(ctx->md_data); } @@ -120,11 +126,14 @@ static int init256(EVP_MD_CTX *ctx) * SHA256 functions even in SHA224 context. This is what happens * there anyway, so we can spare few CPU cycles:-) */ -static int update256(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update256(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA256_Update(ctx->md_data, data, count); } -static int final256(EVP_MD_CTX *ctx, unsigned char *md) + +static int +final256(EVP_MD_CTX *ctx, unsigned char *md) { return SHA256_Final(md, ctx->md_data); } @@ -144,7 +153,8 @@ static const EVP_MD sha224_md = { sizeof(EVP_MD *) + sizeof(SHA256_CTX), }; -const EVP_MD *EVP_sha224(void) +const EVP_MD * +EVP_sha224(void) { return (&sha224_md); } @@ -164,27 +174,34 @@ static const EVP_MD sha256_md = { sizeof(EVP_MD *) + sizeof(SHA256_CTX), }; -const EVP_MD *EVP_sha256(void) +const EVP_MD * +EVP_sha256(void) { return (&sha256_md); } #endif /* ifndef OPENSSL_NO_SHA256 */ #ifndef OPENSSL_NO_SHA512 -static int init384(EVP_MD_CTX *ctx) +static int +init384(EVP_MD_CTX *ctx) { return SHA384_Init(ctx->md_data); } -static int init512(EVP_MD_CTX *ctx) + +static int +init512(EVP_MD_CTX *ctx) { return SHA512_Init(ctx->md_data); } /* See comment in SHA224/256 section */ -static int update512(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update512(EVP_MD_CTX *ctx, const void *data, size_t count) { return SHA512_Update(ctx->md_data, data, count); } -static int final512(EVP_MD_CTX *ctx, unsigned char *md) + +static int +final512(EVP_MD_CTX *ctx, unsigned char *md) { return SHA512_Final(md, ctx->md_data); } @@ -204,7 +221,8 @@ static const EVP_MD sha384_md = { sizeof(EVP_MD *) + sizeof(SHA512_CTX), }; -const EVP_MD *EVP_sha384(void) +const EVP_MD * +EVP_sha384(void) { return (&sha384_md); } @@ -224,7 +242,8 @@ static const EVP_MD sha512_md = { sizeof(EVP_MD *) + sizeof(SHA512_CTX), }; -const EVP_MD *EVP_sha512(void) +const EVP_MD * +EVP_sha512(void) { return (&sha512_md); } diff --git a/lib/libcrypto/evp/m_wp.c b/lib/libcrypto/evp/m_wp.c index 3991a71c177..ca53be6abbb 100644 --- a/lib/libcrypto/evp/m_wp.c +++ b/lib/libcrypto/evp/m_wp.c @@ -11,17 +11,20 @@ #include <openssl/whrlpool.h> #include "evp_locl.h" -static int init(EVP_MD_CTX *ctx) +static int +init(EVP_MD_CTX *ctx) { return WHIRLPOOL_Init(ctx->md_data); } -static int update(EVP_MD_CTX *ctx, const void *data, size_t count) +static int +update(EVP_MD_CTX *ctx, const void *data, size_t count) { return WHIRLPOOL_Update(ctx->md_data, data, count); } -static int final(EVP_MD_CTX *ctx, unsigned char *md) +static int +final(EVP_MD_CTX *ctx, unsigned char *md) { return WHIRLPOOL_Final(md, ctx->md_data); } |