Граф коммитов

2404 Коммитов

Автор SHA1 Сообщение Дата
Eric Wolz ba79c6dede
Update .vsts-ci.yml for Azure Pipelines, remove Win2016 build (#574)
* Update .vsts-ci.yml for Azure Pipelines

* Update build.cmd

* use path macro for %ProgramFiles(x86)%

* validate msbuild path

Co-authored-by: Mollie Munoz <mollie.munoz@microsoft.com>
2021-12-01 15:06:47 -08:00
John Spaith f40f5eb7e9
Add clang builds for embedded TLS adapters (#573) 2021-11-22 20:13:53 -08:00
Dane Walton 045e9eeeba
remove en-us from links (#576) 2021-11-22 13:29:30 -08:00
Dane Walton dab428d3b1
Mbed fix (#572) 2021-11-17 14:10:01 -08:00
Eric Wolz 735be16a94
SDL Fixes (#571)
* SDL Fixes

11065424 - Defect : InvalidParamValue1, Component : c-utility\adapters\tlsio_schannel.c
11065425 - Defect : Unknown, Component : c-utility\src\crt_abstractions.c

* Update tlsio_schannel.c

removed extra line
2021-11-15 17:27:31 -08:00
Dane Walton 68d1640c84
update install paths for cmake (#568) 2021-11-08 10:41:55 -08:00
ewertons 2d74785c2b
Merge pull request #567 from Azure/SE/fix_crash_with_invalid_proxy_config
Fix crash with invalid proxy configuration
2021-11-01 15:17:10 -07:00
Ewerton Scaboro da Silva b2bff8029b Move define to top of http_proxy_io_ut 2021-11-01 14:43:50 -07:00
Ewerton Scaboro da Silva dbc618fde8 Update vm image for checksubmodule job in vsts pipeline 2021-10-29 22:29:25 -07:00
Ewerton Scaboro da Silva 706cd1d6c1 Add unit tests for http_proxy_io clone and destroy options 2021-10-29 22:24:36 -07:00
Hatem Maalla 76bd68ab03 fix crash when the proxy configuration is invalid (proxy is unreachable) 2021-10-29 15:31:12 +01:00
Mollie Munoz 1c41304835
Remerge header install location change (#563)
Co-authored-by: Mollie Munoz <momuno@microsoft.com>
2021-10-12 13:55:56 -07:00
Dane Walton 11dbe6123d
fix warnings in socketio mbed (#561) 2021-09-20 13:47:41 -07:00
Dane Walton 4a3b10850b
use get_difftime (#560) 2021-09-16 19:00:02 -07:00
Eric Wolz f1f54ef5ef
Use PAL time functions in the console logger (#558)
* Use PAL time functions in the console logger

* add platform time to unit tests

* disable time PAL functions in unit tests

* remove dead code

* fix trace logging unit tests

* disable pal on build_test_artifacts()
2021-09-14 18:34:09 -07:00
Dane Walton 2ac851336e
change linux time to use int64_t (#557) 2021-09-10 19:10:29 -07:00
Mollie Munoz 73a2039cc0
Vcpkg CURL fix for build (#555)
Update CURL find-package logic to enable Vcpkg build on linux.
2021-09-08 16:12:39 -07:00
Dane Walton 64ea7a9359
fix possible overflow warning gcc11 (#553) 2021-09-03 13:22:33 -07:00
Dane Walton 92cc8891c5
fix build break for gcc11 (#552) 2021-09-02 14:23:31 -07:00
ODugas 5d72f8adff
crt_abstractions.c: fix error management in mallocAndStrcpy (#545)
It can be demonstrated that the errno_t returned by strcpy_s
(which is described as a regular int by the signature) can
and will contain a positive error code. We therefore need to
check for non-zero returned value instead of strictly
negative integers.

See https://docs.microsoft.com/ for strcpy_s, wcscpy_s, _mbscpy_s
Zero if successful; otherwise, an error.

Co-authored-by: Olivier Dugas Ing <olivier.dugas@axceta.com>
2021-09-02 13:58:34 -07:00
Dane Walton 91789f9819
update log (#549) 2021-09-02 11:31:49 -07:00
Dane Walton c3749db4a7 update misnamed macro 2021-09-02 07:50:14 -07:00
Yulin Li 449a3e3de0
fix #443, a dead loop in read chunk (#444) 2021-09-01 15:30:17 -07:00
Adam Ling (MSFT) b959732483
fix mem leak in tlsio_schannel.c (#540)
Co-authored-by: Dane Walton <dane.walton@microsoft.com>
2021-08-31 17:35:49 -07:00
Mollie Munoz e4d74dce9a
Revert all c-utility install location changes (#543) 2021-08-17 18:19:09 -07:00
Mollie Munoz 5edd3547f7
Fix for vcpkg build (#542) 2021-08-17 11:29:36 -07:00
Eric Wolz eb958fb5b6
Move to devops hosted agent (#539)
* Test windows hosted agent

* Update CMakeLists.txt

* Update CMakeLists.txt

* generate c++ wrappers

* added generate_c_wrapper

* supress 4505

* fix 4505 warning

* vsprintf_wchar_with_empty_string_succeeds test

* fixed warnings and x64 build

* fix unix build

* fix guid tests

* fix win32 unit test

* putback compile_c_test_artifacts_as directive

* added back compile_c_test_artifacts_as

* fixed uniqueid_ut_test_file

* default use_cppunittest to off

x64 build will enable it to test both c and cpp unit tests

* fix cmake warnings

* move to cmake v3.5

* update to use our 1es agents

* pr feedback

* remove guid comment

* fixed EOF
2021-08-12 18:25:51 -07:00
ewertons 74f8c80917
Merge pull request #541 from Azure/ewertons/fix_blob_upload_fail_mbedtls_1995
Fail to upload long Blob using mbedtls+compact(Issue #1995)
2021-08-09 13:31:52 -07:00
ewertons e87f421227
Update adapters/tlsio_mbedtls.c
Co-authored-by: Dane Walton <dane.walton@microsoft.com>
2021-08-09 12:16:42 -07:00
ewertons 77926c0995
Update adapters/httpapi_compact.c
Co-authored-by: Dane Walton <dane.walton@microsoft.com>
2021-08-09 12:16:34 -07:00
Ewerton Scaboro da Silva 026dac6b82 Merge branch 'master' into SE/fix_blob_upload_fail_mbedtls_1995 2021-08-03 16:54:01 -07:00
Francesco Giancane 3a7997af72
hmac.c: fix mismatching function prototype (#537)
The reported function raises a warning when compilers assert the flag
`-Warray-parameter=`, signaling that an array-type argument was promoted
to a pointer-type argument.

While in practice in most C implementations this is correct, fixing the
warning (and, in this case, indicating the maximum size for the array)
would represent a best-practice for finding out-of-bound accesses or
identifying wrongly-sized arrays passed in the function.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>
2021-07-02 11:47:38 -07:00
hatem.maalla 4e65fb0907 fix unit test fail 2021-06-30 04:49:25 +01:00
hatem.maalla 54c387b1cc fix memory leak 2021-06-25 15:02:03 +01:00
Hatem Maalla 010576d74e take in account review pull request remark 2021-06-22 17:04:11 +01:00
Hatem Maalla 7ab493cbb6 Fail to upload long Blob using mbedtls+compact(Issue #1995) 2021-06-17 18:10:33 +01:00
Pierrick Arsenault ff06a49746
Fix HTTPAPIEX_ExecuteRequest failing with HTTPAPI_REQUEST_HEAD (#528)
The HTTPAPI_REQUEST_TYPE enum is defined using the MU_DEFINE_ENUM
macro, which implicitely adds HTTPAPI_REQUEST_TYPE_INVALID as the first
value. This makes checking the validity of requestType with MU_COUNT_ARG
incorrect: HTTPAPI_REQUEST_TYPE_INVALID is accepted and
HTTPAPI_REQUEST_HEAD is rejected.

Unit tests:
- Change all uses of HTTPAPI_REQUEST_PATCH (the previous last value in the
  enum) to HTTPAPI_REQUEST_HEAD (the current last value in the enum) to test
  that it is accepted.
- Change HTTPAPIEX_ExecuteRequest_fails_with_invalid_request_type to use
  a request type outside of the enum.
- Add HTTPAPIEX_ExecuteRequest_fails_with_invalid_request_type_2, which
  explicitely tests that HTTPAPIEX_INVALID_ARG is rejected.

Co-authored-by: Pierrick Arsenault <pierrick.arsenault@stello.ca>
Co-authored-by: Eric Wolz <ericwol@microsoft.com>
2021-05-11 11:22:04 -07:00
ewertons fb2c745c3e
Merge pull request #533 from Azure/ewertons/fixoptionscrash2
Fix websocket xio options clonning
2021-05-11 08:25:42 -07:00
Ewerton Scaboro da Silva 307af34c3b Fix remaining tlsio adapters against underlying options crash 2021-05-11 06:35:23 +00:00
Ewerton Scaboro da Silva 890a8ad8f4 Fix websocket xio options clonning 2021-05-10 17:17:53 -07:00
Eric Wolz 545646f453
Fix uuid memcpy length (#532) 2021-05-10 15:04:51 -07:00
Fanzhe Lyu 97db881593
[Azure Sphere] Add UUID adapter layer for Azure Sphere (#519) 2021-05-10 14:22:18 -07:00
maallahatem 74094f9b83
Add support of tls renegotiation option (#521)
Co-authored-by: hatem.maalla <hatem.maalla@non.se.com>
2021-05-10 08:46:14 -07:00
ewertons 43d0d9edef
Merge pull request #529 from Azure/ewertons/optionscrashfix
Fix for crash in case AddOptionInternal fails adding xio CONCRETE_OPTIONS
2021-05-07 15:41:47 -07:00
ewertons 9beea5fe80
Merge branch 'master' into ewertons/optionscrashfix 2021-05-07 15:35:30 -07:00
Ewerton Scaboro da Silva 12260df4eb Fix xio_ut for changes done in xio (crash with AddOption failure) 2021-05-07 15:34:39 -07:00
Dane Walton ead467b2ee
update install location of cutility headers (#531) 2021-05-07 11:21:25 -07:00
Ewerton Scaboro da Silva 93f02cbc8c [ACR] Fix for crash in case AddOptionInternal fails adding xio CONCRETE_OPTIONS 2021-05-06 15:30:14 -07:00
Ewerton Scaboro da Silva c97d59ad33 Fix for crash in case AddOptionInternal fails adding xio CONCRETE_OPTIONS
This crash occurs for the following callstack:

==31911== Invalid read of size 8
==31911==    at 0x144C04: DestroyInternal (optionhandler.c:111)
==31911==    by 0x14517F: OptionHandler_Destroy (optionhandler.c:278)
==31911==    by 0x144958: xio_retrieveoptions (xio.c:288)
==31911==    by 0x140395: tlsio_openssl_retrieveoptions (tlsio_openssl.c:335)
==31911==    by 0x14488B: xio_retrieveoptions (xio.c:276)
==31911==    by 0x14F12C: ResetConnectionIfNecessary (iothubtransport_mqtt_common.c:1977)
==31911==    by 0x15074B: UpdateMqttConnectionStateIfNeeded (iothubtransport_mqtt_common.c:2585)
==31911==    by 0x15290C: IoTHubTransport_MQTT_Common_DoWork (iothubtransport_mqtt_common.c:3474)
==31911==    by 0x14AD63: IoTHubTransportMqtt_DoWork (iothubtransportmqtt.c:121)
==31911==    by 0x11DD46: IoTHubClientCore_LL_DoWork (iothub_client_core_ll.c:2123)
==31911==    by 0x128F92: ScheduleWork_Thread (iothub_client_core.c:813)
==31911==    by 0x1397D0: ThreadWrapper (threadapi_pthreads.c:35)
==31911==  Address 0x6097008 is 24 bytes inside a block of size 32 free'd
==31911==    at 0x48369AB: free (vg_replace_malloc.c:530)
==31911==    by 0x144C98: DestroyInternal (optionhandler.c:123)
==31911==    by 0x14517F: OptionHandler_Destroy (optionhandler.c:278)
==31911==    by 0x14473A: xio_DestroyOption (xio.c:246)
==31911==    by 0x144BD0: AddOptionInternal (optionhandler.c:91)
==31911==    by 0x144FA6: OptionHandler_AddOption (optionhandler.c:219)
==31911==    by 0x144907: xio_retrieveoptions (xio.c:285)
==31911==    by 0x140395: tlsio_openssl_retrieveoptions (tlsio_openssl.c:335)
==31911==    by 0x14488B: xio_retrieveoptions (xio.c:276)
==31911==    by 0x14F12C: ResetConnectionIfNecessary (iothubtransport_mqtt_common.c:1977)
==31911==    by 0x15074B: UpdateMqttConnectionStateIfNeeded (iothubtransport_mqtt_common.c:2585)
==31911==    by 0x15290C: IoTHubTransport_MQTT_Common_DoWork (iothubtransport_mqtt_common.c:3474)
==31911==  Block was alloc'd at
==31911==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==31911==    by 0x144990: CreateInternal (optionhandler.c:28)
==31911==    by 0x144D37: OptionHandler_Create (optionhandler.c:142)
==31911==    by 0x14543E: socketio_retrieveoptions (socketio_berkeley.c:178)
==31911==    by 0x14488B: xio_retrieveoptions (xio.c:276)
==31911==    by 0x140395: tlsio_openssl_retrieveoptions (tlsio_openssl.c:335)
==31911==    by 0x14488B: xio_retrieveoptions (xio.c:276)
==31911==    by 0x14F12C: ResetConnectionIfNecessary (iothubtransport_mqtt_common.c:1977)
==31911==    by 0x15074B: UpdateMqttConnectionStateIfNeeded (iothubtransport_mqtt_common.c:2585)
==31911==    by 0x15290C: IoTHubTransport_MQTT_Common_DoWork (iothubtransport_mqtt_common.c:3474)
==31911==    by 0x14AD63: IoTHubTransportMqtt_DoWork (iothubtransportmqtt.c:121)
==31911==    by 0x11DD46: IoTHubClientCore_LL_DoWork (iothub_client_core_ll.c:2123)
2021-05-06 11:50:44 -07:00
Darren b6a92c4ceb
Minor fix to root README.md (#523) 2021-05-03 12:19:04 -07:00