Openssl fix deprecation warnings
ClosedPublic

Authored by nib952051 on Mar 23 2018, 3:43 PM.

Details

Summary

Openssl fix deprecation warnings

Removed unused function: X509_SIG_getm

deprecated warnings for:
ASN1_STRING_data
DSA_generate_parameters
RSA_generate_key
RAND_pseudo_bytes

Tested with openssl-1.0.2l on ubuntu:14.04
Deprecation warning spotted with openssl-1.1.0.g-1

one deprecation warning left: TLSv1_client_method

Diff Detail

Repository
R486 QCA Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nib952051 requested review of this revision.Mar 23 2018, 3:43 PM
nib952051 created this revision.
fvogt added a comment.Mar 23 2018, 7:30 PM

Looks good to me otherwise.

plugins/qca-ossl/qca-ossl.cpp
544

ossl110-compat.h is for this purpose.

nib952051 updated this revision to Diff 30537.Mar 25 2018, 5:43 PM
fvogt added a comment.Mar 25 2018, 7:29 PM

I missed two minor issues - but then it should be good to go.

plugins/qca-ossl/qca-ossl.cpp
1655

Missing error check here.

1888

Missing error check here.

nib952051 updated this revision to Diff 31483.Apr 6 2018, 12:35 PM
nib952051 marked an inline comment as done.

Added error checks for exit code, sorry for delay

fvogt added a comment.Apr 6 2018, 12:39 PM

Looks good to me, except for the unnecessary checks for nullptr.

plugins/qca-ossl/qca-ossl.cpp
1842

Useless nullptr checks?

nib952051 added inline comments.Apr 6 2018, 12:45 PM
plugins/qca-ossl/qca-ossl.cpp
1842

It is copypasted from QScopedPointerPodDeleter

SO claims that free(NULL) is noop, https://stackoverflow.com/questions/1912325/checking-for-null-before-calling-free

I will remove checks

fvogt added inline comments.Apr 6 2018, 12:46 PM
plugins/qca-ossl/qca-ossl.cpp
1842

If this method can get invoked with nullptr, they are necessary. RSA_free(nullptr) is not a noop.

nib952051 updated this revision to Diff 31484.Apr 6 2018, 12:48 PM

removed nullptr check in QScopedPointer deleters

nib952051 updated this revision to Diff 31485.Apr 6 2018, 12:57 PM

Reverted previous patch set

fvogt accepted this revision.Jun 19 2018, 9:25 AM
This revision is now accepted and ready to land.Jun 19 2018, 9:25 AM
sitter updated this revision to Diff 36315.Jun 19 2018, 9:43 AM

refresh against master

sitter retitled this revision from Qca to Openssl fix deprecation warnings.Jun 19 2018, 9:45 AM
This revision was automatically updated to reflect the committed changes.