CVS commit: src/crypto/dist/openssl/crypto/evp

2009-06-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Jun 14 14:18:35 UTC 2009

Modified Files:
src/crypto/dist/openssl/crypto/evp: m_sha1.c

Log Message:
Don't take short cuts and use the SHA224 functions to compute SHA224.
At least for Final it makes a difference in some situation.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/crypto/dist/openssl/crypto/evp/m_sha1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/openssl/crypto/evp/m_sha1.c
diff -u src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.5 src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.2
--- src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.5	Fri May  9 21:34:29 2008
+++ src/crypto/dist/openssl/crypto/evp/m_sha1.c	Sun Jun 14 14:18:35 2009
@@ -104,13 +104,12 @@
 	{ return SHA224_Init(ctx->md_data); }
 static int init256(EVP_MD_CTX *ctx)
 	{ return SHA256_Init(ctx->md_data); }
-/*
- * Even though there're separate SHA224_[Update|Final], we call
- * SHA256 functions even in SHA224 context. This is what happens
- * there anyway, so we can spare few CPU cycles:-)
- */
+static int update224(EVP_MD_CTX *ctx,const void *data,size_t count)
+	{ return SHA224_Update(ctx->md_data,data,count); }
 static int update256(EVP_MD_CTX *ctx,const void *data,size_t count)
 	{ return SHA256_Update(ctx->md_data,data,count); }
+static int final224(EVP_MD_CTX *ctx,unsigned char *md)
+	{ return SHA224_Final(md,ctx->md_data); }
 static int final256(EVP_MD_CTX *ctx,unsigned char *md)
 	{ return SHA256_Final(md,ctx->md_data); }
 



CVS commit: src/crypto/dist/openssl/crypto/evp

2009-06-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 16 11:15:29 UTC 2009

Modified Files:
src/crypto/dist/openssl/crypto/evp: m_sha1.c

Log Message:
Actually use the new (non-shortcut) functions for SHA224


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/openssl/crypto/evp/m_sha1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/openssl/crypto/evp/m_sha1.c
diff -u src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.2 src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.3
--- src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.2	Sun Jun 14 14:18:35 2009
+++ src/crypto/dist/openssl/crypto/evp/m_sha1.c	Tue Jun 16 11:15:29 2009
@@ -120,8 +120,8 @@
 	SHA224_DIGEST_LENGTH,
 	EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT,
 	init224,
-	update256,
-	final256,
+	update224,
+	final224,
 	NULL,
 	NULL,
 	EVP_PKEY_RSA_method,