diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-03-08 14:04:22 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-03-08 14:04:22 +0000 |
commit | 2dc769a1c17e1e0c7aef6e11496c8ba2c1db2e28 (patch) | |
tree | 47bc3c6bf378e59f79c418f9956b6ed03fc4c805 /crypto/md5 | |
parent | 4f98cbabdeb50d548c83a8ca36014f3011461379 (diff) | |
download | openssl-2dc769a1c17e1e0c7aef6e11496c8ba2c1db2e28.zip openssl-2dc769a1c17e1e0c7aef6e11496c8ba2c1db2e28.tar.gz openssl-2dc769a1c17e1e0c7aef6e11496c8ba2c1db2e28.tar.bz2 |
Make EVP_Digest*() routines return a value.
TODO: update docs, and make soe other routines
which use EVP_Digest*() check return codes.
Diffstat (limited to 'crypto/md5')
-rw-r--r-- | crypto/md5/md5.h | 6 | ||||
-rw-r--r-- | crypto/md5/md5_dgst.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/crypto/md5/md5.h b/crypto/md5/md5.h index c08d509..52cb753 100644 --- a/crypto/md5/md5.h +++ b/crypto/md5/md5.h @@ -102,9 +102,9 @@ typedef struct MD5state_st int num; } MD5_CTX; -void MD5_Init(MD5_CTX *c); -void MD5_Update(MD5_CTX *c, const void *data, unsigned long len); -void MD5_Final(unsigned char *md, MD5_CTX *c); +int MD5_Init(MD5_CTX *c); +int MD5_Update(MD5_CTX *c, const void *data, unsigned long len); +int MD5_Final(unsigned char *md, MD5_CTX *c); unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md); void MD5_Transform(MD5_CTX *c, const unsigned char *b); #ifdef __cplusplus diff --git a/crypto/md5/md5_dgst.c b/crypto/md5/md5_dgst.c index 23d196b..c38a3f0 100644 --- a/crypto/md5/md5_dgst.c +++ b/crypto/md5/md5_dgst.c @@ -70,7 +70,7 @@ const char *MD5_version="MD5" OPENSSL_VERSION_PTEXT; #define INIT_DATA_C (unsigned long)0x98badcfeL #define INIT_DATA_D (unsigned long)0x10325476L -void MD5_Init(MD5_CTX *c) +int MD5_Init(MD5_CTX *c) { c->A=INIT_DATA_A; c->B=INIT_DATA_B; @@ -79,6 +79,7 @@ void MD5_Init(MD5_CTX *c) c->Nl=0; c->Nh=0; c->num=0; + return 1; } #ifndef md5_block_host_order |