More updatdes from stable branch.

This commit is contained in:
Dr. Stephen Henson 2008-09-13 22:09:48 +00:00
parent 7486fb6550
commit 3d3fd6beb2
3 changed files with 16 additions and 3 deletions

View File

@ -384,7 +384,11 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[])
if (zz == 0) break; if (zz == 0) break;
d1 = BN_BITS2 - d0; d1 = BN_BITS2 - d0;
if (d0) z[dN] = (z[dN] << d1) >> d1; /* clear up the top d1 bits */ /* clear up the top d1 bits */
if (d0)
z[dN] = (z[dN] << d1) >> d1;
else
z[dN] = 0;
z[0] ^= zz; /* reduction t^0 component */ z[0] ^= zz; /* reduction t^0 component */
for (k = 1; p[k] != 0; k++) for (k = 1; p[k] != 0; k++)

View File

@ -98,6 +98,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
CONF_VALUE *ecmd; CONF_VALUE *ecmd;
char *ctrlname, *ctrlvalue; char *ctrlname, *ctrlvalue;
ENGINE *e = NULL; ENGINE *e = NULL;
int soft = 0;
name = skip_dot(name); name = skip_dot(name);
#ifdef ENGINE_CONF_DEBUG #ifdef ENGINE_CONF_DEBUG
fprintf(stderr, "Configuring engine %s\n", name); fprintf(stderr, "Configuring engine %s\n", name);
@ -125,6 +127,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
/* Override engine name to use */ /* Override engine name to use */
if (!strcmp(ctrlname, "engine_id")) if (!strcmp(ctrlname, "engine_id"))
name = ctrlvalue; name = ctrlvalue;
else if (!strcmp(ctrlname, "soft_load"))
soft = 1;
/* Load a dynamic ENGINE */ /* Load a dynamic ENGINE */
else if (!strcmp(ctrlname, "dynamic_path")) else if (!strcmp(ctrlname, "dynamic_path"))
{ {
@ -147,6 +151,11 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
if (!e) if (!e)
{ {
e = ENGINE_by_id(name); e = ENGINE_by_id(name);
if (!e && soft)
{
ERR_clear_error();
return 1;
}
if (!e) if (!e)
return 0; return 0;
} }

View File

@ -234,8 +234,8 @@ padlock_bind_fn(ENGINE *e, const char *id)
return 1; return 1;
} }
IMPLEMENT_DYNAMIC_CHECK_FN() IMPLEMENT_DYNAMIC_CHECK_FN ();
IMPLEMENT_DYNAMIC_BIND_FN(padlock_bind_fn) IMPLEMENT_DYNAMIC_BIND_FN (padlock_bind_fn);
#endif /* DYNAMIC_ENGINE */ #endif /* DYNAMIC_ENGINE */
/* ===== Here comes the "real" engine ===== */ /* ===== Here comes the "real" engine ===== */