Merge #15919: Remove unused OpenSSL includes to make it more clear where OpenSSL is used

a34081b7c3 Remove unused OpenSSL includes to make it more clear where OpenSSL is used (practicalswift)

Pull request description:

  Remove unused OpenSSL includes to make it more clear where OpenSSL is used.

  Before this patch:

  ```
  $ git grep '#include <openssl/' -- "*.cpp" "*.h"
  src/init.cpp:#include <openssl/crypto.h>
  src/qt/paymentrequestplus.cpp:#include <openssl/x509_vfy.h>
  src/qt/paymentrequestplus.h:#include <openssl/x509.h>
  src/qt/paymentserver.cpp:#include <openssl/x509_vfy.h>
  src/qt/rpcconsole.cpp:#include <openssl/crypto.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509_vfy.h>
  src/qt/test/test_main.cpp:#include <openssl/ssl.h>
  src/qt/winshutdownmonitor.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/err.h>
  src/random.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/conf.h>
  src/test/crypto_tests.cpp:#include <openssl/aes.h>
  src/test/crypto_tests.cpp:#include <openssl/evp.h>
  ```

  After this patch:

  ```
  $ git grep '#include <openssl/' -- "*.cpp" "*.h"
  src/qt/paymentrequestplus.cpp:#include <openssl/x509_vfy.h>
  src/qt/paymentrequestplus.h:#include <openssl/x509.h>
  src/qt/paymentserver.cpp:#include <openssl/x509_vfy.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509.h>
  src/qt/test/paymentservertests.cpp:#include <openssl/x509_vfy.h>
  src/qt/test/test_main.cpp:#include <openssl/ssl.h>
  src/qt/winshutdownmonitor.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/err.h>
  src/random.cpp:#include <openssl/rand.h>
  src/random.cpp:#include <openssl/conf.h>
  ```

  Removed:
  * `src/init.cpp:#include <openssl/crypto.h>` (unused since 5ecfa36fd0 (2016))
  * `src/qt/rpcconsole.cpp:#include <openssl/crypto.h>` (unused since 5ecfa36fd0 (2016))
  * `src/test/crypto_tests.cpp:#include <openssl/aes.h>` (introduced unused in daa384120a (2015))
  * `src/test/crypto_tests.cpp:#include <openssl/evp.h>` (introduced unused in daa384120a (2015))

ACKs for commit a34081:
  MarcoFalke:
    utACK a34081b7c3
  real-or-random:
    utACK a34081b
  fanquake:
    utACK a34081b

Tree-SHA512: 8ab9699c063f2d0ed2d71738f20ac5c21336585f7f62fd3a4b23199a125ea3224725591d64171347465762181788fac1bc4ce13d8824090bf1a5ac71a66d6538
This commit is contained in:
MarcoFalke 2019-04-29 08:51:01 -04:00
commit 5873e9a3e8
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25
3 changed files with 0 additions and 5 deletions

View file

@ -66,7 +66,6 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/thread.hpp>
#include <openssl/crypto.h>
#if ENABLE_ZMQ
#include <zmq/zmqabstractnotifier.h>

View file

@ -21,8 +21,6 @@
#include <util/strencodings.h>
#include <util/system.h>
#include <openssl/crypto.h>
#include <univalue.h>
#ifdef ENABLE_WALLET

View file

@ -18,8 +18,6 @@
#include <vector>
#include <boost/test/unit_test.hpp>
#include <openssl/aes.h>
#include <openssl/evp.h>
BOOST_FIXTURE_TEST_SUITE(crypto_tests, BasicTestingSetup)