diff --git a/include/openssl/sha.h b/include/openssl/sha.h index 501274f4a..28a579e48 100644 --- a/include/openssl/sha.h +++ b/include/openssl/sha.h @@ -21,6 +21,11 @@ void SHA_Init(SHA_CTX*); void SHA_Update(SHA_CTX*, const void*, unsigned long); void SHA_Final(unsigned char*, SHA_CTX*); +/* SHA1 points to above, shouldn't use SHA0 ever */ +void SHA1_Init(SHA_CTX*); +void SHA1_Update(SHA_CTX*, const void*, unsigned long); +void SHA1_Final(unsigned char*, SHA_CTX*); + #ifdef __cplusplus diff --git a/src/ssl.c b/src/ssl.c index 71697284e..832168961 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -2453,6 +2453,24 @@ int CyaSSL_set_compression(SSL* ssl) } + void SHA1_Init(SHA_CTX* sha) + { + SHA_Init(sha); + } + + + void SHA1_Update(SHA_CTX* sha, const void* input, unsigned long sz) + { + SHA_Update(sha, input, sz); + } + + + void SHA1_Final(byte* input, SHA_CTX* sha) + { + SHA_Final(input, sha); + } + + const EVP_MD* EVP_md5(void) { static const char* type = "MD5";