Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ compile_commands.json

# macOS
.DS_Store

# CLion
.idea/
12 changes: 8 additions & 4 deletions cpr/ssl_ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/pemerr.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <openssl/x509_vfy.h>

// openssl/types.h was added in later version of openssl and is therefore not always available.
// This is for example the case on Ubuntu 20.04.
// openssl/types.h was added in later version of openssl (starting from 3.0.0) and is therefore not always available.
// This is for example the case on Ubuntu 20.04 or Centos 7.
// We try to include it if available to satisfy clang-tidy.
// Ref: https://github.com/openssl/openssl/commit/50cd4768c6b89c757645f28519236bb989216f8d
#if __has_include(<openssl/types.h>)
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/types.h>
#else
#include <openssl/ossl_typ.h>
#endif

// openssl/pemerr.h was added in 1.1.1a
#if OPENSSL_VERSION_NUMBER >= 0x1010101fL
#include <openssl/pemerr.h>
#endif

namespace cpr {

/**
Expand Down
Loading