summaryrefslogtreecommitdiffstats
path: root/crypto/engine
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2008-04-28 21:39:09 +0000
committerGeoff Thorpe <geoff@openssl.org>2008-04-28 21:39:09 +0000
commite7b097f5589447fbc1d3530065df56d10c5d134b (patch)
tree7516bd68ead1c36c76d874b93b8c23d3001178fd /crypto/engine
parent5ee6f96cea73f39b2b391b001d755b94c763e2d4 (diff)
Fix auto-discovery of ENGINEs. See the CHANGES entry for details (and/or
ticket #1668). PR: 1668 Submitted by: Ian Lister Reviewed by: Geoff Thorpe
Diffstat (limited to 'crypto/engine')
-rw-r--r--crypto/engine/eng_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/engine/eng_table.c b/crypto/engine/eng_table.c
index 3e892c8a62..1f0fff6180 100644
--- a/crypto/engine/eng_table.c
+++ b/crypto/engine/eng_table.c
@@ -143,7 +143,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
{
fnd = OPENSSL_malloc(sizeof(ENGINE_PILE));
if(!fnd) goto end;
- fnd->uptodate = 0;
+ fnd->uptodate = 1;
fnd->nid = *nids;
fnd->sk = sk_ENGINE_new_null();
if(!fnd->sk)
@@ -160,7 +160,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
if(!sk_ENGINE_push(fnd->sk, e))
goto end;
/* "touch" this ENGINE_PILE */
- fnd->uptodate = 1;
+ fnd->uptodate = 0;
if(setdefault)
{
if(!engine_unlocked_init(e))
@@ -172,6 +172,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
if(fnd->funct)
engine_unlocked_finish(fnd->funct, 0);
fnd->funct = e;
+ fnd->uptodate = 1;
}
nids++;
}
@@ -187,8 +188,7 @@ static void int_unregister_cb(ENGINE_PILE *pile, ENGINE *e)
while((n = sk_ENGINE_find(pile->sk, e)) >= 0)
{
(void)sk_ENGINE_delete(pile->sk, n);
- /* "touch" this ENGINE_CIPHER */
- pile->uptodate = 1;
+ pile->uptodate = 0;
}
if(pile->funct == e)
{