Remove EVP_CHECK_DES_KEY
Thanks to the OpenBSD community for bringing this to our attention. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
b84939cc96
commit
6f73d28c20
2
CHANGES
2
CHANGES
@ -3,6 +3,8 @@
|
|||||||
_______________
|
_______________
|
||||||
|
|
||||||
Changes between 1.0.2 and 1.1.0 [xx XXX xxxx]
|
Changes between 1.0.2 and 1.1.0 [xx XXX xxxx]
|
||||||
|
*) Remove EVP_CHECK_DES_KEY, a compile-time option that never compiled.
|
||||||
|
[Emilia Käsper]
|
||||||
|
|
||||||
*) Removed DES and RC4 ciphersuites from DEFAULT. Also removed RC2 although
|
*) Removed DES and RC4 ciphersuites from DEFAULT. Also removed RC2 although
|
||||||
in 1.0.2 EXPORT was already removed and the only RC2 ciphersuite is also
|
in 1.0.2 EXPORT was already removed and the only RC2 ciphersuite is also
|
||||||
|
@ -241,12 +241,7 @@ static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
# ifdef EVP_CHECK_DES_KEY
|
|
||||||
if (DES_set_key_checked(deskey, dat->ks.ks) != 0)
|
|
||||||
return 0;
|
|
||||||
# else
|
|
||||||
DES_set_key_unchecked(deskey, ctx->cipher_data);
|
DES_set_key_unchecked(deskey, ctx->cipher_data);
|
||||||
# endif
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,14 +269,8 @@ static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
# ifdef EVP_CHECK_DES_KEY
|
|
||||||
if (DES_set_key_checked(&deskey[0], &dat->ks1)
|
|
||||||
|| DES_set_key_checked(&deskey[1], &dat->ks2))
|
|
||||||
return 0;
|
|
||||||
# else
|
|
||||||
DES_set_key_unchecked(&deskey[0], &dat->ks1);
|
DES_set_key_unchecked(&deskey[0], &dat->ks1);
|
||||||
DES_set_key_unchecked(&deskey[1], &dat->ks2);
|
DES_set_key_unchecked(&deskey[1], &dat->ks2);
|
||||||
# endif
|
|
||||||
memcpy(&dat->ks3, &dat->ks1, sizeof(dat->ks1));
|
memcpy(&dat->ks3, &dat->ks1, sizeof(dat->ks1));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -302,16 +296,9 @@ static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
# ifdef EVP_CHECK_DES_KEY
|
|
||||||
if (DES_set_key_checked(&deskey[0], &dat->ks1)
|
|
||||||
|| DES_set_key_checked(&deskey[1], &dat->ks2)
|
|
||||||
|| DES_set_key_checked(&deskey[2], &dat->ks3))
|
|
||||||
return 0;
|
|
||||||
# else
|
|
||||||
DES_set_key_unchecked(&deskey[0], &dat->ks1);
|
DES_set_key_unchecked(&deskey[0], &dat->ks1);
|
||||||
DES_set_key_unchecked(&deskey[1], &dat->ks2);
|
DES_set_key_unchecked(&deskey[1], &dat->ks2);
|
||||||
DES_set_key_unchecked(&deskey[2], &dat->ks3);
|
DES_set_key_unchecked(&deskey[2], &dat->ks3);
|
||||||
# endif
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user