Skip to content

Instantly share code, notes, and snippets.

@camilasan
Created January 25, 2019 17:08
Show Gist options
  • Save camilasan/1a4c09fc169f41d8f87d8a35efaa5be7 to your computer and use it in GitHub Desktop.
Save camilasan/1a4c09fc169f41d8f87d8a35efaa5be7 to your computer and use it in GitHub Desktop.
on cmake:
find_package(OpenSSL 1.1 REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
list(APPEND openssling_LIBRARIES ${OPENSSL_LIBRARIES})
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network ${OPENSSL_LIBRARIES} ${QTKEYCHAIN_LIBRARY})
on the cpp:
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/engine.h>
#include <openssl/...whatever you need>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment