cryptlib.c: fix logical error.
This commit is contained in:
parent
9282c33596
commit
f91926a240
@ -152,13 +152,16 @@ void OPENSSL_cpuid_setup(void)
|
|||||||
if (!sscanf(env+off,"%lli",(long long *)&vec)) vec = strtoul(env+off,NULL,0);
|
if (!sscanf(env+off,"%lli",(long long *)&vec)) vec = strtoul(env+off,NULL,0);
|
||||||
#endif
|
#endif
|
||||||
if (off) vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P)&~vec;
|
if (off) vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P)&~vec;
|
||||||
|
else if (env[0]==':') vec = OPENSSL_ia32_cpuid(OPENSSL_ia32cap_P);
|
||||||
|
|
||||||
OPENSSL_ia32cap_P[2] = 0;
|
OPENSSL_ia32cap_P[2] = 0;
|
||||||
if ((env=strchr(env,':'))) {
|
if ((env=strchr(env,':'))) {
|
||||||
off = (env[1]=='~')?2:1;
|
unsigned int vecx;
|
||||||
vec = strtoul(env+off,NULL,0);
|
env++;
|
||||||
if (off>1) OPENSSL_ia32cap_P[2] &= ~vec;
|
off = (env[0]=='~')?1:0;
|
||||||
else OPENSSL_ia32cap_P[2] = vec;
|
vecx = strtoul(env+off,NULL,0);
|
||||||
|
if (off) OPENSSL_ia32cap_P[2] &= ~vecx;
|
||||||
|
else OPENSSL_ia32cap_P[2] = vecx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user