Lines 1-10
Link Here
|
1 |
--- src/imapcommon.c.orig |
1 |
--- src/imapcommon.c.orig 2005-02-01 15:21:28 UTC |
2 |
+++ src/imapcommon.c |
2 |
+++ src/imapcommon.c |
3 |
@@ -121,6 +121,7 @@ |
3 |
@@ -295,16 +295,24 @@ extern ICD_Struct *Get_Server_conn( char *Username, |
4 |
#include <errno.h> |
4 |
int rc; |
|
|
5 |
unsigned int Expiration; |
5 |
|
6 |
|
6 |
#include <openssl/evp.h> |
7 |
- EVP_MD_CTX mdctx; |
7 |
+#include <openssl/md5.h> |
8 |
+ EVP_MD_CTX *mdctx; |
|
|
9 |
int md_len; |
8 |
|
10 |
|
9 |
#include <pthread.h> |
11 |
+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
10 |
#include <sys/types.h> |
12 |
+ EVP_MD_CTX mdctx_; |
|
|
13 |
+#define EVP_MD_CTX_new(x) &mdctx_ |
14 |
+#define EVP_MD_CTX_free(x) |
15 |
+#endif |
16 |
+ |
17 |
Expiration = PC_Struct.cache_expiration_time; |
18 |
memset( &Server, 0, sizeof Server ); |
19 |
|
20 |
/* need to md5 the passwd regardless, so do that now */ |
21 |
- EVP_DigestInit(&mdctx, EVP_md5()); |
22 |
- EVP_DigestUpdate(&mdctx, Password, strlen(Password)); |
23 |
- EVP_DigestFinal(&mdctx, md5pw, &md_len); |
24 |
+ mdctx = EVP_MD_CTX_new(); |
25 |
+ EVP_DigestInit(mdctx, EVP_md5()); |
26 |
+ EVP_DigestUpdate(mdctx, Password, strlen(Password)); |
27 |
+ EVP_DigestFinal(mdctx, md5pw, &md_len); |
28 |
+ EVP_MD_CTX_free(mdctx); |
29 |
|
30 |
/* see if we have a reusable connection available */ |
31 |
ICC_Active = NULL; |