equal
deleted
inserted
replaced
1 --- openssl-0.9.8m/apps/openssl.c Thu Oct 15 19:28:02 2009 |
1 --- openssl-0.9.8m/apps/openssl.c Thu Oct 15 19:28:02 2009 |
2 +++ openssl-0.9.8m/apps/openssl.c Fri Feb 26 16:12:30 2010 |
2 +++ openssl-0.9.8m/apps/openssl.c Fri Feb 26 16:12:30 2010 |
3 @@ -133,6 +133,9 @@ |
3 @@ -134,6 +134,9 @@ |
4 #include <openssl/fips.h> |
4 #include <openssl/fips.h> |
5 #endif |
5 #endif |
6 |
6 |
7 +/* Solaris OpenSSL */ |
7 +/* Solaris OpenSSL */ |
8 +#include <dlfcn.h> |
8 +#include <dlfcn.h> |
9 + |
9 + |
10 /* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the |
10 /* The LHASH callbacks ("hash" & "cmp") have been replaced by functions with the |
11 * base prototypes (we cast each variable inside the function to the required |
11 * base prototypes (we cast each variable inside the function to the required |
12 * type of "FUNCTION*"). This removes the necessity for macro-generated wrapper |
12 * type of "FUNCTION*"). This removes the necessity for macro-generated wrapper |
13 @@ -152,9 +155,10 @@ |
13 @@ -153,9 +156,10 @@ |
14 #endif |
14 #endif |
15 |
15 |
16 |
16 |
17 +static int *modes; |
17 +static int *modes; |
18 + |
18 + |
20 { |
20 { |
21 - static int modes[CRYPTO_NUM_LOCKS]; /* = {0, 0, ... } */ |
21 - static int modes[CRYPTO_NUM_LOCKS]; /* = {0, 0, ... } */ |
22 const char *errstr = NULL; |
22 const char *errstr = NULL; |
23 int rw; |
23 int rw; |
24 |
24 |
25 @@ -165,7 +169,7 @@ |
25 @@ -166,7 +170,7 @@ |
26 goto err; |
26 goto err; |
27 } |
27 } |
28 |
28 |
29 - if (type < 0 || type >= CRYPTO_NUM_LOCKS) |
29 - if (type < 0 || type >= CRYPTO_NUM_LOCKS) |
30 + if (type < 0 || type >= CRYPTO_num_locks()) |
30 + if (type < 0 || type >= CRYPTO_num_locks()) |
31 { |
31 { |
32 errstr = "type out of bounds"; |
32 errstr = "type out of bounds"; |
33 goto err; |
33 goto err; |
34 @@ -310,6 +314,14 @@ |
34 @@ -311,6 +315,14 @@ |
35 if (getenv("OPENSSL_DEBUG_LOCKING") != NULL) |
35 if (getenv("OPENSSL_DEBUG_LOCKING") != NULL) |
36 #endif |
36 #endif |
37 { |
37 { |
38 + modes = OPENSSL_malloc(CRYPTO_num_locks() * sizeof (int)); |
38 + modes = OPENSSL_malloc(CRYPTO_num_locks() * sizeof (int)); |
39 + if (modes == NULL) { |
39 + if (modes == NULL) { |
44 + } |
44 + } |
45 + memset(modes, 0, CRYPTO_num_locks() * sizeof (int)); |
45 + memset(modes, 0, CRYPTO_num_locks() * sizeof (int)); |
46 CRYPTO_set_locking_callback(lock_dbg_cb); |
46 CRYPTO_set_locking_callback(lock_dbg_cb); |
47 } |
47 } |
48 |
48 |
49 @@ -313,18 +325,28 @@ |
49 @@ -314,18 +326,28 @@ |
50 CRYPTO_set_locking_callback(lock_dbg_cb); |
50 CRYPTO_set_locking_callback(lock_dbg_cb); |
51 } |
51 } |
52 |
52 |
53 +/* |
53 +/* |
54 + * Solaris OpenSSL |
54 + * Solaris OpenSSL |