Azure C SDKs common code
Перейти к файлу
Cristian Pop 2cf8776669
Upgrading the Raspberry PI image to use OpenSSL>1.0.2 (#491)
Backporting Raspberry PI Buster scripts.
2020-12-08 15:21:50 -08:00
adapters [LTS_02_2020] Fixing OpenSSL and WolfSSL hostname validation. Removing ESP adapters. (#489) 2020-12-08 13:49:15 -08:00
archive/cyclonessl Fix OptionHandler_AddOption result check in tlsio_wolfssl.c, use MU_DEFINE_ENUM_WITHOUT_INVALID in OptionHandler 2019-11-13 14:20:51 -08:00
build Upgrading the Raspberry PI image to use OpenSSL>1.0.2 (#491) 2020-12-08 15:21:50 -08:00
build_all Fix some base64/32 related files. (#308) 2019-05-07 09:45:48 -07:00
configs remove manifest based logging capability (#403) 2019-10-23 08:44:33 -07:00
deps Use PRI_MU_ENUM for printing enum values 2019-10-28 09:41:54 -07:00
devdoc Fixing porting guide broken link (#408) 2019-12-04 15:31:36 -08:00
inc/azure_c_shared_utility Fix OptionHandler_AddOption result check in tlsio_wolfssl.c, use MU_DEFINE_ENUM_WITHOUT_INVALID in OptionHandler 2019-11-13 14:20:51 -08:00
jenkins Upgrading the Raspberry PI image to use OpenSSL>1.0.2 (#491) 2020-12-08 15:21:50 -08:00
pal Fix for #1624 iOS 14 send temeletry fix (#477) 2020-11-19 15:00:12 -08:00
samples Merge branch 'master' into sqm_info3 2019-03-22 12:53:24 -07:00
src Removed length check 2020-11-23 17:38:57 -08:00
tests [LTS_02_2020] Fixing OpenSSL and WolfSSL hostname validation. Removing ESP adapters. (#489) 2020-12-08 13:49:15 -08:00
testtools Use PRI_MU_ENUM for printing enum values 2019-10-28 09:41:54 -07:00
tools Remove old generator for macro utils and kick jenkins script (#346) 2019-08-27 08:52:31 -07:00
.gitattributes Normalized linux line endings 2016-03-23 07:42:53 -07:00
.gitignore Added newer files to ignore in the gitignore file 2018-11-09 08:58:08 -08:00
.gitmodules Update umock repo and renamed files that have changed (#297) 2019-04-10 17:36:08 -07:00
CMakeLists.txt remove manifest based logging capability (#403) 2019-10-23 08:44:33 -07:00
LICENSE Initial project commit file 2015-10-30 11:35:32 -07:00
README.md fix link in readme 2018-03-14 16:03:41 -07:00
SECURITY.MD Adding SECURITY.MD file to the repository. (#407) 2019-11-05 18:10:57 -08:00
dependencies-test.cmake Makes azure-c-shared-utility installable and a find module in CMake. Adds a flag for using installed packages instead of adding submodules. 2016-11-08 10:53:23 -08:00
dependencies.cmake Attempt to fix again dependencies 2019-05-24 13:50:45 -07:00
version.txt Replace %zu with %lu for mbed builds (#254) 2019-01-14 09:27:15 -08:00

README.md

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Azure C Shared Utility

azure-c-shared-utility is a C library providing common functionality for basic tasks (like string, list manipulation, IO, etc.).

Dependencies

azure-c-shared-utility provides 3 tlsio implementations:

  • tlsio_schannel - runs only on Windows
  • tlsio_openssl - depends on OpenSSL being installed
  • tlsio_wolfssl - depends on WolfSSL being installed

azure-c-shared-utility depends on curl for HTTPAPI for Linux.

azure-c-shared-utility uses cmake for configuring build files.

Setup

  1. Clone azure-c-shared-utility using the recursive option:
git clone --recursive https://github.com/Azure/azure-c-shared-utility.git
  1. Create a folder called cmake under azure-c-shared-utility

  2. Switch to the cmake folder and run

cmake ..
  1. Build
cmake --build .

Installation and Use

Optionally, you may choose to install azure-c-shared-utility on your machine:

  1. Switch to the cmake folder and run

    cmake -Duse_installed_dependencies=ON ../
    
    cmake --build . --target install
    

    or install using the follow commands for each platform:

    On Linux:

    sudo make install
    

    On Windows:

    msbuild /m INSTALL.vcxproj
    
  2. Use it in your project (if installed)

    find_package(azure_c_shared_utility REQUIRED CONFIG)
    target_link_library(yourlib aziotsharedutil)
    

If running tests, this requires that umock-c, azure-ctest, and azure-c-testrunnerswitcher are installed (through CMake) on your machine.

Building the tests

In order to build the tests use:

cmake .. -Drun_unittests:bool=ON

Configuration options

In order to turn on/off the tlsio implementations use the following CMAKE options:

  • -Duse_schannel:bool={ON/OFF} - turns on/off the SChannel support
  • -Duse_openssl:bool={ON/OFF} - turns on/off the OpenSSL support. If this option is use an environment variable name OpenSSLDir should be set to point to the OpenSSL folder.
  • -Duse_wolfssl:bool={ON/OFF} - turns on/off the WolfSSL support. If this option is use an environment variable name WolfSSLDir should be set to point to the WolfSSL folder.
  • -Duse_http:bool={ON/OFF} - turns on/off the HTTP API support.
  • -Duse_installed_dependencies:bool={ON/OFF} - turns on/off building azure-c-shared-utility using installed dependencies. This package may only be installed if this flag is ON.
  • -Drun_unittests:bool={ON/OFF} - enables building of unit tests. Default is OFF.

Porting to new devices

Instructions for porting the Azure IoT C SDK to new devices are located here.