Merge branch 'master' into dev/change-code-causing-arm-compiler-warnings
This commit is contained in:
Коммит
9726af1e47
|
@ -451,6 +451,18 @@ endif()
|
|||
FILE(GLOB aziotsharedutil_md_files "devdoc/*.md")
|
||||
SOURCE_GROUP(devdoc FILES ${aziotsharedutil_md_files})
|
||||
|
||||
# Add ignore deprecated functions so we may use 1.1.1 APIs
|
||||
# in OpenSSL 3
|
||||
if(LINUX)
|
||||
set_property(
|
||||
SOURCE
|
||||
${CMAKE_CURRENT_LIST_DIR}/adapters/tlsio_openssl.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/adapters/x509_openssl.c
|
||||
PROPERTY COMPILE_OPTIONS
|
||||
-Wno-deprecated-declarations
|
||||
)
|
||||
endif()
|
||||
|
||||
#this is the product (a library)
|
||||
add_library(aziotsharedutil ${source_c_files} ${source_h_files} ${aziotsharedutil_md_files})
|
||||
setTargetBuildProperties(aziotsharedutil)
|
||||
|
|
|
@ -953,7 +953,7 @@ static int add_certificate_to_store(TLS_IO_INSTANCE* tls_io_instance, const char
|
|||
}
|
||||
else
|
||||
{
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
const BIO_METHOD* bio_method;
|
||||
#else
|
||||
BIO_METHOD* bio_method;
|
||||
|
@ -1238,7 +1238,7 @@ void tlsio_openssl_deinit(void)
|
|||
{
|
||||
openssl_dynamic_locks_uninstall();
|
||||
openssl_static_locks_uninstall();
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) && (FIPS_mode_set)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L) && (FIPS_mode_set)
|
||||
FIPS_mode_set(0);
|
||||
#endif
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
|
|
|
@ -75,7 +75,7 @@ static int load_certificate_chain(SSL_CTX* ssl_ctx, const char* certificate)
|
|||
// certificates.
|
||||
|
||||
/* Codes_SRS_X509_OPENSSL_07_006: [ If successful x509_openssl_add_ecc_credentials shall to import each certificate in the cert chain. ] */
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
SSL_CTX_clear_extra_chain_certs(ssl_ctx);
|
||||
#else
|
||||
if (ssl_ctx->extra_certs != NULL)
|
||||
|
@ -345,7 +345,7 @@ int x509_openssl_add_certificates(SSL_CTX* ssl_ctx, const char* certificates)
|
|||
else
|
||||
{
|
||||
/*Codes_SRS_X509_OPENSSL_02_012: [ x509_openssl_add_certificates shall get the memory BIO method function by calling BIO_s_mem. ]*/
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
const BIO_METHOD* bio_method;
|
||||
#else
|
||||
BIO_METHOD* bio_method;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
name: $(BuildID)_$(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
|
||||
resources:
|
||||
containers:
|
||||
- container: linux-c-ubuntu-2204
|
||||
endpoint: csdk-containers
|
||||
image: csdkcontainerregistry.azurecr.io/linux-c-ubuntu-2204:latest
|
||||
- container: linux-c-ubuntu-2004
|
||||
endpoint: csdk-containers
|
||||
image: csdkcontainerregistry.azurecr.io/linux-c-ubuntu-2004:latest
|
||||
|
@ -257,6 +260,44 @@ jobs:
|
|||
- script: sudo rm -rf $(Agent.BuildDirectory)/*
|
||||
displayName: 'Cleanup'
|
||||
condition: always()
|
||||
- job: ubuntu2204
|
||||
container: linux-c-ubuntu-2204
|
||||
pool:
|
||||
name: 'sdk-c--ubuntu-18'
|
||||
displayName: 'Linux Ubuntu 22.04'
|
||||
steps:
|
||||
- script: |
|
||||
if [ -f "jenkins/ubuntu_c.sh" ]
|
||||
then
|
||||
export OPENSSL_ia32cap=0x00000000
|
||||
sudo chmod -R 755 .
|
||||
sudo -E ./jenkins/ubuntu_c.sh
|
||||
fi
|
||||
displayName: 'Build'
|
||||
- script: |
|
||||
cd cmake && sudo -E ../build_all/linux/run_tests.sh
|
||||
displayName: "Run Tests"
|
||||
env:
|
||||
IOTHUB_CONNECTION_STRING: $(IOTHUB-CONNECTION-STRING)
|
||||
IOTHUB_EVENTHUB_CONNECTION_STRING: $(IOTHUB-EVENTHUB-CONNECTION-STRING)
|
||||
IOTHUB_E2E_X509_CERT_BASE64: $(IOTHUB-E2E-X509-CERT-BASE64)
|
||||
IOTHUB_E2E_X509_PRIVATE_KEY_BASE64: $(IOTHUB-E2E-X509-PRIVATE-KEY-BASE64)
|
||||
IOTHUB_E2E_X509_THUMBPRINT: $(IOTHUB-E2E-X509-THUMBPRINT)
|
||||
IOTHUB_POLICY_KEY: $(IOTHUB-POLICY-KEY)
|
||||
IOTHUB_PARTITION_COUNT: $(IOTHUB-PARTITION-COUNT)
|
||||
STORAGE_ACCOUNT_CONNECTION_STRING: $(STORAGE-ACCOUNT-CONNECTION-STRING)
|
||||
IOT_DPS_CONNECTION_STRING: $(IOT-DPS-CONNECTION-STRING)
|
||||
IOT_DPS_ID_SCOPE: $(IOT-DPS-ID-SCOPE)
|
||||
IOTHUB_CA_ROOT_CERT: $(IOTHUB-CA-ROOT-CERT)
|
||||
IOTHUB_CA_ROOT_CERT_KEY: $(IOTHUB-CA-ROOT-CERT-KEY)
|
||||
IOT_DPS_GLOBAL_ENDPOINT: $(IOT-DPS-GLOBAL-ENDPOINT)
|
||||
IOTHUB_DEVICE_CONN_STRING_INVALIDCERT: $(IOTHUB-DEVICE-CONN-STRING-INVALIDCERT)
|
||||
IOTHUB_CONN_STRING_INVALIDCERT: $(IOTHUB-CONN-STRING-INVALIDCERT)
|
||||
DPS_GLOBALDEVICEENDPOINT_INVALIDCERT: $(DPS-GLOBALDEVICEENDPOINT-INVALIDCERT)
|
||||
PROVISIONING_CONNECTION_STRING_INVALIDCERT: $(PROVISIONING-CONNECTION-STRING-INVALIDCERT)
|
||||
- script: sudo rm -rf $(Agent.BuildDirectory)/*
|
||||
displayName: 'Cleanup'
|
||||
condition: always()
|
||||
- job: linuxoptions
|
||||
displayName: 'Linux Ubuntu 20.04 with Options'
|
||||
container: linux-c-ubuntu-2004
|
||||
|
|
|
@ -9,6 +9,15 @@ set(${theseTestsName}_test_files
|
|||
${theseTestsName}.c
|
||||
)
|
||||
|
||||
if(LINUX)
|
||||
set_property(
|
||||
SOURCE
|
||||
../../adapters/x509_openssl.c
|
||||
PROPERTY COMPILE_OPTIONS
|
||||
-Wno-deprecated-declarations
|
||||
)
|
||||
endif()
|
||||
|
||||
set(${theseTestsName}_c_files
|
||||
../../adapters/x509_openssl.c
|
||||
)
|
||||
|
|
|
@ -348,7 +348,7 @@ BEGIN_TEST_SUITE(x509_openssl_unittests)
|
|||
STRICT_EXPECTED_CALL(BIO_new_mem_buf((void*)TEST_PUBLIC_CERTIFICATE, -1));
|
||||
STRICT_EXPECTED_CALL(PEM_read_bio_X509_AUX(IGNORED_PTR_ARG, NULL, NULL, NULL));
|
||||
STRICT_EXPECTED_CALL(SSL_CTX_use_certificate(IGNORED_PTR_ARG, IGNORED_PTR_ARG));
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
// Actual macro name: SSL_CTX_clear_extra_chain_certs:
|
||||
STRICT_EXPECTED_CALL(SSL_CTX_ctrl(TEST_SSL_CTX_STRUCTURE, SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS, 0, NULL));
|
||||
#endif
|
||||
|
@ -537,7 +537,7 @@ BEGIN_TEST_SUITE(x509_openssl_unittests)
|
|||
|
||||
umock_c_negative_tests_snapshot();
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#ifdef __APPLE__
|
||||
size_t calls_cannot_fail_rsa[] = { 4, 5, 6, 10, 12, 13, 14 };
|
||||
size_t calls_cannot_fail_ecc[] = { 3, 4, 8, 10, 11, 12} ;
|
||||
|
|
Загрузка…
Ссылка в новой задаче