summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CONTRIBUTING.md1
-rw-r--r--README.md1
-rw-r--r--src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h12
-rw-r--r--src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h12
-rw-r--r--src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h12
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc21
-rw-r--r--src/components/transport_manager/src/tcp/tcp_client_listener.cc2
-rw-r--r--tools/InterfaceGenerator/generator/generators/PolicyTypes.py10
-rwxr-xr-xtools/InterfaceGenerator/generator/generators/SmartFactoryBase.py14
9 files changed, 50 insertions, 35 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 1da30fbf62..bc90d907c1 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -6,6 +6,7 @@ Third party contributions are essential for making SDL great. However, we do hav
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
* Ubuntu Linux 18.04 with GCC 7.3.x
+* Ubuntu Linux 20.04 with GCC 9.3.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
### Issues
diff --git a/README.md b/README.md
index 0046a0f679..3bc7781268 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ Pull Requests Welcome!
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
* Ubuntu Linux 18.04 with GCC 7.5.x
+* Ubuntu Linux 20.04 with GCC 9.3.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
## Getting Started
diff --git a/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h b/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h
index 93359b6164..5f6ce8dbc7 100644
--- a/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h
+++ b/src/3rd_party-static/gmock-1.7.0/fused-src/gtest/gtest.h
@@ -1823,16 +1823,16 @@ using ::std::tuple_size;
# define GTEST_ATTRIBUTE_UNUSED_
#endif
-// A macro to disallow operator=
+// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+#define GTEST_DISALLOW_ASSIGN_(type) \
+ type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
+ type(type const&) = delete; \
+ type& operator=(type const&) = delete
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations
diff --git a/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h b/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h
index 93359b6164..5f6ce8dbc7 100644
--- a/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h
+++ b/src/3rd_party-static/gmock-1.7.0/gtest/fused-src/gtest/gtest.h
@@ -1823,16 +1823,16 @@ using ::std::tuple_size;
# define GTEST_ATTRIBUTE_UNUSED_
#endif
-// A macro to disallow operator=
+// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+#define GTEST_DISALLOW_ASSIGN_(type) \
+ type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
+ type(type const&) = delete; \
+ type& operator=(type const&) = delete
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations
diff --git a/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h b/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
index 280935daca..307a65d592 100644
--- a/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
+++ b/src/3rd_party-static/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h
@@ -716,16 +716,16 @@ using ::std::tuple_size;
# define GTEST_ATTRIBUTE_UNUSED_
#endif
-// A macro to disallow operator=
+// A macro to disallow copy operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+#define GTEST_DISALLOW_ASSIGN_(type) \
+ type& operator=(type const &) = delete
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
- GTEST_DISALLOW_ASSIGN_(type)
+#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
+ type(type const&) = delete; \
+ type& operator=(type const&) = delete
// Tell the compiler to warn about unused return values for functions declared
// with this macro. The macro should be used on function declarations
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index b4b4d01485..7a0ec6ac97 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -36,20 +36,21 @@
#include <openssl/err.h>
#include <openssl/pkcs12.h>
#include <openssl/ssl.h>
-
#include <stdio.h>
+
#include <algorithm>
#include <ctime>
#include <fstream>
#include <iostream>
-#include "security_manager/security_manager.h"
+#include "security_manager/security_manager.h"
#include "utils/atomic.h"
#include "utils/date_time.h"
#include "utils/logger.h"
#include "utils/macro.h"
#include "utils/scope_guard.h"
+#define OPENSSL1_1_VERSION 0x1010100fL
#define TLS1_1_MINIMAL_VERSION 0x1000103fL
#define CONST_SSL_METHOD_MINIMAL_VERSION 0x00909000L
@@ -174,7 +175,11 @@ bool CryptoManagerImpl::Init() {
#endif
case TLSv1:
SDL_LOG_DEBUG("TLSv1 is used");
+#if OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
+#else
+ method = is_server ? TLS_server_method() : TLS_client_method();
+#endif
break;
case TLSv1_1:
SDL_LOG_DEBUG("TLSv1_1 is used");
@@ -182,8 +187,10 @@ bool CryptoManagerImpl::Init() {
SDL_LOG_WARN(
"OpenSSL has no TLSv1.1 with version lower 1.0.1, set TLSv1.0");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
-#else
+#elseif OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? TLSv1_1_server_method() : TLSv1_1_client_method();
+#else
+ method = is_server ? TLS_server_method() : TLS_client_method();
#endif
break;
case TLSv1_2:
@@ -192,13 +199,19 @@ bool CryptoManagerImpl::Init() {
SDL_LOG_WARN(
"OpenSSL has no TLSv1.2 with version lower 1.0.1, set TLSv1.0");
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
-#else
+#elseif OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? TLSv1_2_server_method() : TLSv1_2_client_method();
+#else
+ method = is_server ? TLS_server_method() : TLS_client_method();
#endif
break;
case DTLSv1:
SDL_LOG_DEBUG("DTLSv1 is used");
+#if OPENSSL_VERSION_NUMBER < OPENSSL1_1_VERSION
method = is_server ? DTLSv1_server_method() : DTLSv1_client_method();
+#else
+ method = is_server ? DTLS_server_method() : DTLS_client_method();
+#endif
break;
default:
SDL_LOG_ERROR("Unknown protocol: "
diff --git a/src/components/transport_manager/src/tcp/tcp_client_listener.cc b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
index 6aaec5d659..7a440d2429 100644
--- a/src/components/transport_manager/src/tcp/tcp_client_listener.cc
+++ b/src/components/transport_manager/src/tcp/tcp_client_listener.cc
@@ -41,7 +41,6 @@
#include <signal.h>
#include <sys/select.h>
#include <sys/socket.h>
-#include <sys/sysctl.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef __linux__
@@ -50,6 +49,7 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/tcp_var.h>
+#include <sys/sysctl.h>
#include <sys/time.h>
#endif // __linux__
diff --git a/tools/InterfaceGenerator/generator/generators/PolicyTypes.py b/tools/InterfaceGenerator/generator/generators/PolicyTypes.py
index 53c3062f30..116273d82c 100644
--- a/tools/InterfaceGenerator/generator/generators/PolicyTypes.py
+++ b/tools/InterfaceGenerator/generator/generators/PolicyTypes.py
@@ -441,7 +441,7 @@ class CodeGenerator(object):
is True else u"// {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.description)])
- if description is not u"":
+ if description != u"":
description = u"".join([u" *\n" if use_doxygen
is True else u"//\n", description])
@@ -451,7 +451,7 @@ class CodeGenerator(object):
self._normalize_multiline_comments(
interface_item_base.
design_description)])
- if design_description is not u"":
+ if design_description != u"":
design_description = u"".join([u" *\n" if use_doxygen is
True else "//\n",
design_description])
@@ -460,7 +460,7 @@ class CodeGenerator(object):
True else u"// Note: {0}\n").format(x)
for x in self._normalize_multiline_comments(
[x.value for x in interface_item_base.issues])])
- if issues is not u"":
+ if issues != u"":
issues = u"".join([u" *\n" if use_doxygen is
True else u"//\n", issues])
@@ -468,7 +468,7 @@ class CodeGenerator(object):
True else u"// ToDo: {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.todos)])
- if todos is not u"":
+ if todos != u"":
todos = u"".join([u" *\n" if use_doxygen is
True else u"//\n", todos])
@@ -505,7 +505,7 @@ class CodeGenerator(object):
return u"".join(
[u"{0}{1}\n".format(
self._indent_template * indent_level,
- x) if x is not u"" else u"\n" for x in code_lines])
+ x) if x != u"" else u"\n" for x in code_lines])
@staticmethod
def _normalize_multiline_comments(initial_strings):
diff --git a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
index 73ab03f205..bec5912d54 100755
--- a/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
+++ b/tools/InterfaceGenerator/generator/generators/SmartFactoryBase.py
@@ -758,7 +758,7 @@ class CodeGenerator(object):
result_array = []
result_array.append(self._impl_code_shared_ptr_vector_template.substitute(var_name = name))
result = u"\n".join(result_array)
- if result is not "":
+ if result != "":
result += u"\n\n"
return result
@@ -789,7 +789,7 @@ class CodeGenerator(object):
count += 1
result = u"\n\n".join(result_array)
- if result is not "":
+ if result != "":
result += u"\n\n"
return result
@@ -1415,7 +1415,7 @@ class CodeGenerator(object):
is True else u"// {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.description)])
- if description is not u"":
+ if description != u"":
description = u"".join([u" *\n" if use_doxygen
is True else u"//\n", description])
@@ -1425,7 +1425,7 @@ class CodeGenerator(object):
self._normalize_multiline_comments(
interface_item_base.
design_description)])
- if design_description is not u"":
+ if design_description != u"":
design_description = u"".join([u" *\n" if use_doxygen is
True else "//\n",
design_description])
@@ -1434,7 +1434,7 @@ class CodeGenerator(object):
True else u"// Note: {0}\n").format(x)
for x in self._normalize_multiline_comments(
[x.value for x in interface_item_base.issues])])
- if issues is not u"":
+ if issues != u"":
issues = u"".join([u" *\n" if use_doxygen is
True else u"//\n", issues])
@@ -1442,7 +1442,7 @@ class CodeGenerator(object):
True else u"// ToDo: {0}\n").format(x)
for x in self._normalize_multiline_comments(
interface_item_base.todos)])
- if todos is not u"":
+ if todos != u"":
todos = u"".join([u" *\n" if use_doxygen is
True else u"//\n", todos])
@@ -1479,7 +1479,7 @@ class CodeGenerator(object):
return u"".join(
[u"{0}{1}\n".format(
self._indent_template * indent_level,
- x) if x is not u"" else u"\n" for x in code_lines])
+ x) if x != u"" else u"\n" for x in code_lines])
@staticmethod
def _normalize_multiline_comments(initial_strings):