remove deprecated files.
This commit is contained in:
@@ -1,141 +0,0 @@
|
|||||||
diff --git a/src/crypto/include/scy/crypto/hash.h b/src/crypto/include/scy/crypto/hash.h
|
|
||||||
index a93fdde9..1d65c374 100644
|
|
||||||
--- a/src/crypto/include/scy/crypto/hash.h
|
|
||||||
+++ b/src/crypto/include/scy/crypto/hash.h
|
|
||||||
@@ -53,7 +53,11 @@ public:
|
|
||||||
protected:
|
|
||||||
Hash& operator=(Hash const&);
|
|
||||||
|
|
||||||
- EVP_MD_CTX _ctx;
|
|
||||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
+ EVP_MD_CTX _ctx;
|
|
||||||
+#else
|
|
||||||
+ EVP_MD_CTX* _ctxPtr;
|
|
||||||
+#endif
|
|
||||||
const EVP_MD* _md;
|
|
||||||
crypto::ByteVec _digest;
|
|
||||||
std::string _algorithm;
|
|
||||||
diff --git a/src/crypto/src/crypto.cpp b/src/crypto/src/crypto.cpp
|
|
||||||
index 729fa615..6113c02f 100644
|
|
||||||
--- a/src/crypto/src/crypto.cpp
|
|
||||||
+++ b/src/crypto/src/crypto.cpp
|
|
||||||
@@ -120,7 +120,9 @@ void init()
|
|
||||||
|
|
||||||
if (++_refCount == 1) {
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x0907000L
|
|
||||||
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
OPENSSL_config(NULL);
|
|
||||||
+ #endif
|
|
||||||
#endif
|
|
||||||
SSL_library_init();
|
|
||||||
SSL_load_error_strings();
|
|
||||||
diff --git a/src/crypto/src/hash.cpp b/src/crypto/src/hash.cpp
|
|
||||||
index 1a0fad34..d132be3b 100644
|
|
||||||
--- a/src/crypto/src/hash.cpp
|
|
||||||
+++ b/src/crypto/src/hash.cpp
|
|
||||||
@@ -32,7 +32,11 @@ Hash::Hash(const std::string& algorithm)
|
|
||||||
if (!_md)
|
|
||||||
throw std::runtime_error("Algorithm not supported: " + algorithm);
|
|
||||||
|
|
||||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
EVP_DigestInit(&_ctx, _md);
|
|
||||||
+#else
|
|
||||||
+ EVP_DigestInit(_ctxPtr, _md);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +44,11 @@ Hash::~Hash()
|
|
||||||
{
|
|
||||||
crypto::uninitializeEngine();
|
|
||||||
|
|
||||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
EVP_MD_CTX_cleanup(&_ctx);
|
|
||||||
+#else
|
|
||||||
+ EVP_MD_CTX_free(_ctxPtr);
|
|
||||||
+#endif
|
|
||||||
//EVP_MD_CTX_free(_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -49,15 +57,24 @@ void Hash::reset()
|
|
||||||
{
|
|
||||||
//EVP_MD_CTX_free(_ctx);
|
|
||||||
//_ctx = EVP_MD_CTX_new();
|
|
||||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
internal::api(EVP_MD_CTX_cleanup(&_ctx));
|
|
||||||
internal::api(EVP_DigestInit(&_ctx, _md));
|
|
||||||
+#else
|
|
||||||
+ internal::api(EVP_MD_CTX_reset(_ctxPtr));
|
|
||||||
+ internal::api(EVP_DigestInit(_ctxPtr, _md));
|
|
||||||
+#endif
|
|
||||||
_digest.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Hash::update(const void* data, size_t length)
|
|
||||||
{
|
|
||||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
internal::api(EVP_DigestUpdate(&_ctx, data, length));
|
|
||||||
+#else
|
|
||||||
+ internal::api(EVP_DigestUpdate(_ctxPtr, data, length));
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -79,7 +96,11 @@ const ByteVec& Hash::digest()
|
|
||||||
if (_digest.size() == 0) {
|
|
||||||
_digest.resize(EVP_MAX_MD_SIZE); // TODO: Get actual algorithm size
|
|
||||||
unsigned int len = 0;
|
|
||||||
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
internal::api(EVP_DigestFinal(&_ctx, &_digest[0], &len));
|
|
||||||
+ #else
|
|
||||||
+ internal::api(EVP_DigestFinal(_ctxPtr, &_digest[0], &len));
|
|
||||||
+ #endif
|
|
||||||
_digest.resize(len);
|
|
||||||
}
|
|
||||||
return _digest;
|
|
||||||
diff --git a/src/crypto/src/x509certificate.cpp b/src/crypto/src/x509certificate.cpp
|
|
||||||
index 76f5e799..d362fada 100644
|
|
||||||
--- a/src/crypto/src/x509certificate.cpp
|
|
||||||
+++ b/src/crypto/src/x509certificate.cpp
|
|
||||||
@@ -58,10 +58,14 @@ X509Certificate::X509Certificate(X509* pCert, bool shared)
|
|
||||||
{
|
|
||||||
assert(_certificate);
|
|
||||||
|
|
||||||
- if (shared)
|
|
||||||
+ if (shared) {
|
|
||||||
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
_certificate->references++;
|
|
||||||
// X509_up_ref(_certificate); // OpenSSL >= 1.1.0
|
|
||||||
-
|
|
||||||
+ #else
|
|
||||||
+ X509_up_ref(_certificate); // OpenSSL >= 1.1.0
|
|
||||||
+ #endif
|
|
||||||
+ }
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -241,8 +245,15 @@ void X509Certificate::extractNames(std::string& cmnName,
|
|
||||||
for (int i = 0; i < sk_GENERAL_NAME_num(names); ++i) {
|
|
||||||
const GENERAL_NAME* name = sk_GENERAL_NAME_value(names, i);
|
|
||||||
if (name->type == GEN_DNS) {
|
|
||||||
- const char* data =
|
|
||||||
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
||||||
+ const char* data =
|
|
||||||
reinterpret_cast<char*>(ASN1_STRING_data(name->d.ia5));
|
|
||||||
+ #else
|
|
||||||
+ const char* data =
|
|
||||||
+ reinterpret_cast<const char*>(ASN1_STRING_get0_data(name->d.ia5));
|
|
||||||
+ #endif
|
|
||||||
+
|
|
||||||
+
|
|
||||||
size_t len = ASN1_STRING_length(name->d.ia5);
|
|
||||||
domainNames.insert(std::string(data, len));
|
|
||||||
}
|
|
||||||
@@ -310,4 +321,4 @@ const X509* X509Certificate::certificate() const
|
|
||||||
} // namespace scy
|
|
||||||
|
|
||||||
|
|
||||||
-/// @\}
|
|
||||||
\ No newline at end of file
|
|
||||||
+/// @\}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 888f65e8..50198586 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -780,7 +780,7 @@ endif()
|
|
||||||
# top of the build tree rather than in hard-to-find leaf directories.
|
|
||||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
|
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
|
||||||
-SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
|
||||||
+#SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
|
|
||||||
|
|
||||||
SET(LWS_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
|
|
||||||
@@ -1853,7 +1853,7 @@ endif(LWS_WITH_LIBEV)
|
|
||||||
if (LWS_WITH_LIBUV)
|
|
||||||
if (NOT LIBUV_FOUND)
|
|
||||||
find_path(LIBUV_INCLUDE_DIRS NAMES uv.h)
|
|
||||||
- find_library(LIBUV_LIBRARIES NAMES uv)
|
|
||||||
+ find_library(LIBUV_LIBRARIES NAMES uv_a)
|
|
||||||
if(LIBUV_INCLUDE_DIRS AND LIBUV_LIBRARIES)
|
|
||||||
set(LIBUV_FOUND 1)
|
|
||||||
endif()
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
go get github.com/nats-io/go-nats-examples/tools/nats-pub
|
|
||||||
${HOME}/go/bin/nats-pub -s nats://nats.nadal-fr.com:4222 "$1" "$2"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
BUILD_DIR=$1
|
|
||||||
|
|
||||||
analyse_file () {
|
|
||||||
DIRNAME=`dirname $1`
|
|
||||||
echo "Analyse directory: $DIRNAME"
|
|
||||||
cd $DIRNAME
|
|
||||||
pvs-studio-analyzer analyze -o analyse.log --compiler gcc --compiler g++
|
|
||||||
plog-converter -a GA:1,2 -t tasklist -o report.tasks analyse.log
|
|
||||||
echo -e "\n**********************************\n"
|
|
||||||
cat report.tasks
|
|
||||||
echo -e "\n**********************************\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main
|
|
||||||
find ${BUILD_DIR} -name compile_commands.json | while read file; do analyse_file $file; done
|
|
||||||
Reference in New Issue
Block a user