diff options
| author | beck <> | 2001-08-01 19:51:17 +0000 |
|---|---|---|
| committer | beck <> | 2001-08-01 19:51:17 +0000 |
| commit | 4b790f68539c49ef91f5e82506c2624900c92106 (patch) | |
| tree | d14ff9f79630cb04ad006cd2730646f44f62d786 /src/lib/libcrypto/cryptlib.c | |
| parent | edbfd6c7e91e15e92ef0df548474ac76b6dddca0 (diff) | |
| download | openbsd-4b790f68539c49ef91f5e82506c2624900c92106.tar.gz openbsd-4b790f68539c49ef91f5e82506c2624900c92106.tar.bz2 openbsd-4b790f68539c49ef91f5e82506c2624900c92106.zip | |
merge openssl 0.9.6b-engine
Note that this is a maintenence release, API's appear *not* to have changed.
As such, I have only increased the minor number on these libraries
Diffstat (limited to 'src/lib/libcrypto/cryptlib.c')
| -rw-r--r-- | src/lib/libcrypto/cryptlib.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index 9de60fd528..a7a9262133 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
| @@ -241,7 +241,7 @@ void CRYPTO_destroy_dynlockid(int i) | |||
| 241 | } | 241 | } |
| 242 | else | 242 | else |
| 243 | #endif | 243 | #endif |
| 244 | if (--(pointer->references) <= 0) | 244 | if (pointer->references <= 0) |
| 245 | { | 245 | { |
| 246 | sk_CRYPTO_dynlock_set(dyn_locks, i, NULL); | 246 | sk_CRYPTO_dynlock_set(dyn_locks, i, NULL); |
| 247 | } | 247 | } |
| @@ -396,16 +396,15 @@ void CRYPTO_lock(int mode, int type, const char *file, int line) | |||
| 396 | #endif | 396 | #endif |
| 397 | if (type < 0) | 397 | if (type < 0) |
| 398 | { | 398 | { |
| 399 | int i = -type - 1; | ||
| 400 | struct CRYPTO_dynlock_value *pointer | 399 | struct CRYPTO_dynlock_value *pointer |
| 401 | = CRYPTO_get_dynlock_value(i); | 400 | = CRYPTO_get_dynlock_value(type); |
| 402 | 401 | ||
| 403 | if (pointer) | 402 | if (pointer && dynlock_lock_callback) |
| 404 | { | 403 | { |
| 405 | dynlock_lock_callback(mode, pointer, file, line); | 404 | dynlock_lock_callback(mode, pointer, file, line); |
| 406 | } | 405 | } |
| 407 | 406 | ||
| 408 | CRYPTO_destroy_dynlockid(i); | 407 | CRYPTO_destroy_dynlockid(type); |
| 409 | } | 408 | } |
| 410 | else | 409 | else |
| 411 | if (locking_callback != NULL) | 410 | if (locking_callback != NULL) |
| @@ -431,7 +430,6 @@ int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file, | |||
| 431 | CRYPTO_get_lock_name(type), | 430 | CRYPTO_get_lock_name(type), |
| 432 | file,line); | 431 | file,line); |
| 433 | #endif | 432 | #endif |
| 434 | *pointer=ret; | ||
| 435 | } | 433 | } |
| 436 | else | 434 | else |
| 437 | { | 435 | { |
