Skip to content

Commit 23fda0d

Browse files
Fix unused variables (#2001)
* Fixed unused variable warning. (OPENSSL_VERSION_MAJOR >= 3) * Fixed unused variable warning. (OPENSSL_VERSION_MAJOR >= 3)
1 parent c2638bb commit 23fda0d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/iperf_auth.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ int encrypt_rsa_message(const char *plaintext, EVP_PKEY *public_key, unsigned ch
291291
}
292292

293293
int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedtext_len, EVP_PKEY *private_key, unsigned char **plaintext, int use_pkcs1_padding) {
294-
int ret =0;
295294
#if OPENSSL_VERSION_MAJOR >= 3
296295
EVP_PKEY_CTX *ctx;
297296
#else
@@ -328,7 +327,7 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt
328327
padding = RSA_PKCS1_PADDING;
329328
}
330329
#if OPENSSL_VERSION_MAJOR >= 3
331-
330+
int ret = 0;
332331
plaintext_len = output_buffer_len;
333332
EVP_PKEY_decrypt_init(ctx);
334333

@@ -353,9 +352,11 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt
353352

354353
return plaintext_len;
355354

355+
#if OPENSSL_VERSION_MAJOR >= 3
356356
errreturn:
357357
fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL));
358358
return 0;
359+
#endif
359360
}
360361

361362
int encode_auth_setting(const char *username, const char *password, EVP_PKEY *public_key, char **authtoken, int use_pkcs1_padding){

0 commit comments

Comments
 (0)