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
This commit is contained in:
parent
5ee6f96cea
commit
e7b097f558
12
CHANGES
12
CHANGES
@ -681,6 +681,18 @@
|
|||||||
|
|
||||||
Changes between 0.9.8g and 0.9.8h [xx XXX xxxx]
|
Changes between 0.9.8g and 0.9.8h [xx XXX xxxx]
|
||||||
|
|
||||||
|
*) Reverse ENGINE-internal logic for caching default ENGINE handles.
|
||||||
|
This was broken until now in 0.9.8 releases, such that the only way
|
||||||
|
a registered ENGINE could be used (assuming it initialises
|
||||||
|
successfully on the host) was to explicitly set it as the default
|
||||||
|
for the relevant algorithms. This is in contradiction with 0.9.7
|
||||||
|
behaviour and the documentation. With this fix, when an ENGINE is
|
||||||
|
registered into a given algorithm's table of implementations, the
|
||||||
|
'uptodate' flag is reset so that auto-discovery will be used next
|
||||||
|
time a new context for that algorithm attempts to select an
|
||||||
|
implementation.
|
||||||
|
[Ian Lister (tweaked by Geoff Thorpe)]
|
||||||
|
|
||||||
*) Update the GMP engine glue to do direct copies between BIGNUM and
|
*) Update the GMP engine glue to do direct copies between BIGNUM and
|
||||||
mpz_t when openssl and GMP use the same limb size. Otherwise the
|
mpz_t when openssl and GMP use the same limb size. Otherwise the
|
||||||
existing "conversion via a text string export" trick is still used.
|
existing "conversion via a text string export" trick is still used.
|
||||||
|
@ -143,7 +143,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
|
|||||||
{
|
{
|
||||||
fnd = OPENSSL_malloc(sizeof(ENGINE_PILE));
|
fnd = OPENSSL_malloc(sizeof(ENGINE_PILE));
|
||||||
if(!fnd) goto end;
|
if(!fnd) goto end;
|
||||||
fnd->uptodate = 0;
|
fnd->uptodate = 1;
|
||||||
fnd->nid = *nids;
|
fnd->nid = *nids;
|
||||||
fnd->sk = sk_ENGINE_new_null();
|
fnd->sk = sk_ENGINE_new_null();
|
||||||
if(!fnd->sk)
|
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))
|
if(!sk_ENGINE_push(fnd->sk, e))
|
||||||
goto end;
|
goto end;
|
||||||
/* "touch" this ENGINE_PILE */
|
/* "touch" this ENGINE_PILE */
|
||||||
fnd->uptodate = 1;
|
fnd->uptodate = 0;
|
||||||
if(setdefault)
|
if(setdefault)
|
||||||
{
|
{
|
||||||
if(!engine_unlocked_init(e))
|
if(!engine_unlocked_init(e))
|
||||||
@ -172,6 +172,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
|
|||||||
if(fnd->funct)
|
if(fnd->funct)
|
||||||
engine_unlocked_finish(fnd->funct, 0);
|
engine_unlocked_finish(fnd->funct, 0);
|
||||||
fnd->funct = e;
|
fnd->funct = e;
|
||||||
|
fnd->uptodate = 1;
|
||||||
}
|
}
|
||||||
nids++;
|
nids++;
|
||||||
}
|
}
|
||||||
@ -187,8 +188,7 @@ static void int_unregister_cb(ENGINE_PILE *pile, ENGINE *e)
|
|||||||
while((n = sk_ENGINE_find(pile->sk, e)) >= 0)
|
while((n = sk_ENGINE_find(pile->sk, e)) >= 0)
|
||||||
{
|
{
|
||||||
(void)sk_ENGINE_delete(pile->sk, n);
|
(void)sk_ENGINE_delete(pile->sk, n);
|
||||||
/* "touch" this ENGINE_CIPHER */
|
pile->uptodate = 0;
|
||||||
pile->uptodate = 1;
|
|
||||||
}
|
}
|
||||||
if(pile->funct == e)
|
if(pile->funct == e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user