Browse Source

remove unused initialisations

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13577)
master
Pauli 1 year ago
parent
commit
e442cdaea2
3 changed files with 7 additions and 13 deletions
  1. +1
    -3
      crypto/aes/aes_ige.c
  2. +0
    -1
      crypto/x509/by_dir.c
  3. +6
    -9
      providers/implementations/keymgmt/rsa_kmgmt.c

+ 1
- 3
crypto/aes/aes_ige.c View File

@ -50,7 +50,7 @@ void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
unsigned char *ivec, const int enc)
{
size_t n;
size_t len = length;
size_t len = length / AES_BLOCK_SIZE;
if (length == 0)
return;
@ -59,8 +59,6 @@ void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
OPENSSL_assert((AES_ENCRYPT == enc) || (AES_DECRYPT == enc));
OPENSSL_assert((length % AES_BLOCK_SIZE) == 0);
len = length / AES_BLOCK_SIZE;
if (AES_ENCRYPT == enc) {
if (in != out &&
(UNALIGNED_MEMOPS_ARE_FAST


+ 0
- 1
crypto/x509/by_dir.c View File

@ -237,7 +237,6 @@ static int get_cert_by_subject_ex(X509_LOOKUP *xl, X509_LOOKUP_TYPE type,
if (type == X509_LU_X509) {
data.st_x509.cert_info.subject = (X509_NAME *)name; /* won't modify it */
stmp.data.x509 = &data.st_x509;
postfix = "";
} else if (type == X509_LU_CRL) {
data.crl.crl.issuer = (X509_NAME *)name; /* won't modify it */
stmp.data.crl = &data.crl;


+ 6
- 9
providers/implementations/keymgmt/rsa_kmgmt.c View File

@ -327,16 +327,13 @@ static int rsa_get_params(void *key, OSSL_PARAM params[])
*/
if ((p = OSSL_PARAM_locate(params,
OSSL_PKEY_PARAM_MANDATORY_DIGEST)) != NULL
&& rsa_type == RSA_FLAG_TYPE_RSASSAPSS) {
const char *mdname = RSA_PSS_DEFAULT_MD;
&& rsa_type == RSA_FLAG_TYPE_RSASSAPSS
&& !ossl_rsa_pss_params_30_is_unrestricted(pss_params)) {
const char *mdname =
ossl_rsa_oaeppss_nid2name(ossl_rsa_pss_params_30_hashalg(pss_params));
if (!ossl_rsa_pss_params_30_is_unrestricted(pss_params)) {
mdname =
ossl_rsa_oaeppss_nid2name(ossl_rsa_pss_params_30_hashalg(pss_params));
if (mdname == NULL || !OSSL_PARAM_set_utf8_string(p, mdname))
return 0;
}
if (mdname == NULL || !OSSL_PARAM_set_utf8_string(p, mdname))
return 0;
}
return (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
|| ossl_rsa_pss_params_30_todata(pss_params, NULL, params))


Loading…
Cancel
Save