Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/iperf_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ int encrypt_rsa_message(const char *plaintext, EVP_PKEY *public_key, unsigned ch
}

int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedtext_len, EVP_PKEY *private_key, unsigned char **plaintext, int use_pkcs1_padding) {
int ret =0;
#if OPENSSL_VERSION_MAJOR >= 3
EVP_PKEY_CTX *ctx;
#else
Expand Down Expand Up @@ -328,7 +327,7 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt
padding = RSA_PKCS1_PADDING;
}
#if OPENSSL_VERSION_MAJOR >= 3

int ret = 0;
plaintext_len = output_buffer_len;
EVP_PKEY_decrypt_init(ctx);

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

return plaintext_len;

#if OPENSSL_VERSION_MAJOR >= 3
errreturn:
fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL));
return 0;
#endif
}

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