From c5012d6788e0ccf34b3ce513a00667abfbee731a Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Fri, 22 Jun 2018 17:54:42 -0300 Subject: [PATCH] seafile-ccnet: fixed deprecated API patch RSA key generation failure check was backwards. Signed-off-by: Eneas U de Queiroz --- .../020-Remove-API-deprecated-in-openssl-1.1.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch b/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch index 8d1d73c211..df8e9906aa 100644 --- a/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch +++ b/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch @@ -46,14 +46,14 @@ index 7cca150..23abb82 100644 + private = RSA_new(); + e = BN_new(); + if (private == NULL || e == NULL || !BN_set_word(e, 35) || -+ !RSA_generate_key_ex(private, bits, e, NULL)) { ++ !RSA_generate_key_ex(private, bits, e, NULL)) { ++ RSA_free(private); + BN_free(e); -+ return private; ++ g_error ("rsa_generate_private_key: key generation failed."); ++ return NULL; + } + BN_free(e); -+ RSA_free(private); -+ g_error ("rsa_generate_private_key: key generation failed."); -+ return NULL; ++ return private; } diff --git a/net/common/processors/keepalive-proc.c b/net/common/processors/keepalive-proc.c index 609d102..42a0c23 100644 -- 2.30.2