diff --git a/CHANGELOG.md b/CHANGELOG.md index cdc442b..fdb3415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# [4.4.0] (2024-09-01) + +## Update dependencies and certificates + +* cJSON library version is upgraded to 1.7.18. +* Minimum required OpenSSL version is updated to 3.0.13 for users using OpenSSL as security library. +* Minimum required libCurl version is updated to 8.6.0 for users using libCurl as http client. +* QuoVadis Root CA 2 G3" certificate will be retired on 2024-10-15T04:00:00.000Z hence code examples are updated to use existing certificate as well as new certificate i.e. "DigiCert Global Root G2". + +# [4.3.4] (2023-04-03) +## Certificate updates +* Insights Hub certificate update information publication + # [4.3.3] (2023-04-03) ## Documentation * Documentation Changes. diff --git a/README.md b/README.md index 8dd117d..6e0a879 100644 --- a/README.md +++ b/README.md @@ -35,14 +35,19 @@ any components that it depends on. - LibCurl is used as the default HTTP client in MCL but developers have the option to easily replace LibCurl with other HTTP client implementations. Make sure LibCurl is installed on your system before building MCL if you are going to use LibCurl as the HTTP client. Steps to build LibCurl for your target system are described in the following sections of this document. - Developers are encouraged to use newer versions of LibCurl but note that MCL is tested with LibCurl version 7.81.0. + Developers are encouraged to use newer versions of LibCurl but note that MCL is tested with LibCurl version 8.6.0. Please make sure your HTTP client implementation is configured to use TLS v1.2 implementation. - OpenSSL is used as the default TLS and cryptography library but developers have the option to easily replace OpenSSL with other implementations. Make sure OpenSSL is installed on your system before building MCL if you are going to use OpenSSL as TLS and cryptography library. Steps to build OpenSSL are described in the following sections of this document. - Developers are encouraged to use newer versions of OpenSSL 1.1.x but note that MCL is tested with OpenSSL version 1.1.1m. + Developers are encouraged to use newer versions of OpenSSL 3.0.x but note that MCL is tested with OpenSSL version 3.0.13. + + +> [!IMPORTANT] +> - Certificates in examples are for demo purpose only. Developers should always refer and use latest certificate published at [Insights Hub Documentation](https://documentation.mindsphere.io/MindSphere/resources/mindconnect-lib-v4/resources-mclib-cacert.html). +> - It is advised to use the system's Trusted Certificate Store or an external certificate file, rather than hardcoding the certificate, to simplify future certificate rotations. For Linux Systems Trusted Certificate Store location is /etc/ssl/certs, certificates present at this location will be referred while establishing connection. To understand more on Trusted Certificate Store, refer the [openssl documentation](https://docs.openssl.org/master/man7/ossl-guide-tls-introduction/#trusted-certificate-store). One of following ciphers must be supported and configured for SSL handshaking: @@ -257,12 +262,12 @@ Both the core component and the connectivity extension will be built. See **MCL These are the steps of the build process in order: ### Building OpenSSL -Download OpenSSL package [openssl-1.1.1m.tar.gz](https://www.openssl.org/source/) and in your download directory run the following commands where +Download OpenSSL package [openssl-3.0.13.tar.gz](https://www.openssl.org/source/) and in your download directory run the following commands where **\** refers to the directory you want to install OpenSSL: ```sh -$ tar -xvzf openssl-1.1.1m.tar.gz -$ cd openssl-1.1.1m +$ tar -xvzf openssl-3.0.13.tar.gz +$ cd openssl-3.0.13 $ ./config --prefix= -Wl,-rpath=/lib shared -fPIC $ sudo make install ``` @@ -270,12 +275,12 @@ $ sudo make install Now, there must be a folder named **openssl** in **\/include** and shared objects named **libcrypto.so** and **libssl.so** in **\/lib**. ### Building Libcurl -Download libcurl package [curl-7.81.0.tar.gz](https://curl.haxx.se/download/) and in your download directory run the following commands where +Download libcurl package [curl-8.6.0.tar.gz](https://curl.haxx.se/download/) and in your download directory run the following commands where **\** refers to the directory you want to install libcurl: ```sh -$ tar -xvzf curl-7.81.0.tar.gz -$ cd curl-7.81.0 +$ tar -xvzf curl-8.6.0.tar.gz +$ cd curl-8.6.0 $ LDFLAGS="-Wl,-R/lib" ./configure --enable-http --with-ssl= --prefix= --without-libssh2 --disable-ftp --disable-tftp --disable-file --disable-ldap --disable-rtsp --disable-dict --disable-telnet --disable-pop3 --disable-imap --disable-smb --disable-scp --disable-sftp --disable-smtp --disable-gopher --disable-manual $ sudo make install ``` diff --git a/ReadMe_OSS.html b/ReadMe_OSS.html new file mode 100644 index 0000000..13f25f8 --- /dev/null +++ b/ReadMe_OSS.html @@ -0,0 +1,247 @@ + + + + Siemens Third-Party Software disclosure document + + + + + + + + +
+ Siemens Third-Party Software Disclosure Document

English / English
Note to Resellers: Please pass on this document to your customers to avoid license infringements.

Third-Party Software Information

This product, solution or service ("Product") contains third-party software components listed in this document. These components are Open Source Software licensed under a license approved by the Open Source Initiative (www.opensource.org) or similar licenses as determined by SIEMENS ("OSS") and/or commercial or freeware software components. With respect to the OSS components, the applicable OSS license conditions prevail over any other terms and conditions covering the Product. The OSS portions of this Product are provided royalty-free and can be used at no charge.
If SIEMENS has combined or linked certain components of the Product with/to OSS components licensed under the GNU LGPL version 2 or later as per the definition of the applicable license, and if use of the corresponding object file is not unrestricted ("LGPL Licensed Module", whereas the LGPL Licensed Module and the components that the LGPL Licensed Module is combined with or linked to is the "Combined Product"), the following additional rights apply, if the relevant LGPL license criteria are met: (i) you are entitled to modify the Combined Product for your own use, including but not limited to the right to modify the Combined Product to relink modified versions of the LGPL Licensed Module, and (ii) you may reverse-engineer the Combined Product, but only to debug your modifications. The modification right does not include the right to distribute such modifications and you shall maintain in confidence any information resulting from such reverse-engineering of a Combined Product.
Certain OSS licenses require SIEMENS to make source code available, for example, the GNU General Public License, the GNU Lesser General Public License and the Mozilla Public License. If such licenses are applicable and this Product is not shipped with the required source code, a copy of this source code can be obtained by anyone in receipt of this information during the period required by the applicable OSS licenses by contacting the following address.
SIEMENS may charge a handling fee of up to 5 Euro to fulfil the request.
Warranty regarding further use of the Open Source Software
SIEMENS' warranty obligations are set forth in your agreement with SIEMENS. SIEMENS does not provide any warranty or technical support for this Product or any OSS components contained in it if they are modified or used in any manner not specified by SIEMENS. The license conditions listed below may contain disclaimers that apply between you and the respective licensor. For the avoidance of doubt, SIEMENS does not make any warranty commitment on behalf of or binding upon any third party licensor.

German / Deutsch
Hinweis an die Vertriebspartner: Bitte geben Sie dieses Dokument an Ihre Kunden weiter, um urheberrechtliche Lizenzverstöße zu vermeiden.
Informationen zu Fremdsoftware
Dieses Produkt, diese Lösung oder dieser Service ("Produkt") enthält die nachfolgend aufgelisteten Fremdsoftwarekomponenten. Bei diesen handelt es sich entweder um Open Source Software, die unter einer von der Open Source Initiative (www.opensource.org) anerkannten Lizenz oder einer durch Siemens als vergleichbar definierten Lizenz ("OSS") lizenziert ist und/oder um kommerzielle Software oder Freeware. Hinsichtlich der OSS Komponenten gelten die einschlägigen OSS Lizenzbedingungen vorrangig vor allen anderen auf dieses Produkt anwendbaren Bedingungen. SIEMENS stellt Ihnen die OSS-Anteile dieses Produkts ohne zusätzliche Kosten zur Verfügung.
Soweit SIEMENS bestimmte Komponenten des Produkts mit OSS Komponenten gemäß der Definition der anwendbaren Lizenz kombiniert oder verlinkt hat, die unter der GNU LGPL Version 2 oder einer späteren Version lizenziert werden und soweit die entsprechende Objektdatei nicht unbeschränkt genutzt werden darf ("LGPL-lizenziertes Modul", wobei das LGPL-lizenzierte Modul und die Komponenten, mit welchen das LGPL-lizenzierte Modul verbunden ist, nachfolgend "verbundenes Produkt" genannt werden) und die entsprechenden LGPL Lizenzkriterien erfüllt sind, dürfen Sie zusätzlich (i) das verbundene Produkt für eigene Verwendungszwecke bearbeiten und erhalten insbesondere das Recht, das verbundene Produkt zu bearbeiten, um es mit einer modifizierten Version des LGPL lizenzierten Moduls zu verlinken und (ii) das verbundene Produkt rückentwickeln, jedoch ausschließlich zum Zwecke der Fehlerkorrektur Ihrer Bearbeitungen. Das Recht zur Bearbeitung schließt nicht das Recht ein, diese zu distribuieren. Sie müssen sämtliche Informationen, die Sie aus dem Reverse Engineering des verbundenen Produktes gewinnen, vertraulich behandeln.
Bestimmte OSS Lizenzen verpflichten SIEMENS zur Herausgabe des Quellcodes, z.B. die GNU General Public License, die GNU Lesser General Public License sowie die Mozilla Public License. Soweit diese Lizenzen Anwendung finden und das Produkt nicht bereits mit dem notwendigen Quellcode ausgeliefert wurde, so kann eine Kopie des Quellcodes von jedermann während des in der anwendbaren OSS Lizenz angegebenen Zeitraums unter der folgenden Anschrift angefordert werden.
SIEMENS kann für die Erfüllung der Anfrage eine Bearbeitungsgebühr von bis zu 5 Euro in Rechnung stellen.
Gewährleistung betreffend Verwendung der Open Source Software
Die Gewährleistungspflichten von SIEMENS sind in dem jeweiligen Vertrag mit SIEMENS geregelt. Soweit Sie das Produkt oder die OSS Komponenten modifizieren oder in einer anderen als der von SIEMENS spezifizierten Weise verwenden, ist die Gewährleistung ausgeschlossen und eine technische Unterstützung erfolgt nicht. Die nachfolgenden Lizenzbedingungen können Haftungsbeschränkungen enthalten, die zwischen Ihnen und dem jeweiligen Lizenzgeber gelten. Klarstellend wird darauf hingewiesen, dass SIEMENS keine Gewährleistungsverpflichtungen im Namen von oder verpflichtend für einen Drittlizenzgeber abgibt.

Chinese / 中文
经销商须知: 请将本文件转发给您的客户,以避免构成对许可证的侵权。
第三方软件信息
本产品、解决方案或服务(统称“本产品”)中包含本文件列出的第三方软件组件。 这些组件是开放源代码促进会 (www.opensource.org) 批准的许可证或西门子确定的类似许可证所许可的开放源代码软件(简称“OSS”)和/或商业或免费软件组件。 针对 OSS组件,适用的 OSS 许可证条件优先于涵盖本产品的任何其他条款和条件。 本产品的 OSS 部分免许可费,可以免费使用。
如果西门子已经按照所适用的许可证的定义,根据第 2版或之后版本的GNU LGPL将本产品的某些组件与获得许可证的 OSS组件相组合或关联,并且如果使用相应的目标文件并非不受限制(“LGPL许可模块”,LGPL 许可模块以及与 LGPL 许可模块相组合或关联的组件统称为“组合产品”),则在符合以下相关LGPL许可标准的前提下,以下附加权利予以适用: (i) 您有权修改组合产品供自己使用,包括但不限于修改组合产品以重新连接 LGPL 许可模块修改版本的权利,并且 (ii) 您可以对组合产品进行逆向工程(但仅限于调试您的修改)。修改权不包括散布此类修改的权利,您应对此类组合产品逆向工程所获得的任何信息予以保密。
某些 OSS 许可证需要西门子提供源代码,例如 GNU 通用公共许可证、GNU 宽通用公共许可证和 Mozilla 公共许可证。如果适用此类许可证并且本产品发货时未随附所需的源代码,收到本信息的任何 人可以在所适用的OSS许可证要求的期限内通过以下地址联系获取这些源代码的副本。
西门子可收取最多 5 欧元的手续费以完成该请求。
关于进一步使用开放源代码软件的保修
您与西门子的协议中规定了西门子的保修义务。如果以西门子未指明的任何方式修改或使用本产品或其中包含的任何 OSS组件,西门子不为其提供任何保修或技术支持服务。下面列出的许可证条件可能包含适用于您和相应许可人之间的免责声明。为了避免产生疑问,西门子不代表或约束任何第三方许可人作出任何保修承诺。

Spanish / Español
Indicación para los distribuidores: Sírvase entregar este documento a sus clientes para prevenir infracciones de licencia sobre los aspectos de los derechos de autor.
Información sobre software de terceros
Este producto, solución o servicio ("producto") contiene los siguientes componentes de software de terceros listados a continuación. Se trata de Open Source Software cuya licencia ha sido otorgada por la Open Source Initiative (www.opensource.org) o que corresponde a una licencia definida por Siemens como comparable ("OSS") y/o de software o freeware comercial. En relación a los componentes OSS prevalecen las condiciones de concesión de licencia OSS pertinentes por sobre todas las demás condiciones aplicables para este producto. SIEMENS le entrega estas partes OSS del producto sin coste adicional.
En la medida en que SIEMENS haya combinado o enlazado determinados componentes del producto con componentes OSS según la definición de la licencia aplicable, cuya licencia está sujeta a la GNU LGPL versión 2 o una versión posterior y que no se puede utilizar sin restricciones ("módulo con licencia LGPL", denominándose a continuación el módulo de licencia LGPL y los componentes combinados con el módulo de licencia LGPL, como "producto integrado") y que se hayan cumplido los criterios de licencia LGPL correspondientes, usted está autorizado para adicionalmente (i) procesar el producto conectado para sus propios fines de uso y obtener particularmente el derecho a procesar el producto conectado para enlazarlo con una versión modificada del módulo de licencia LGPL y (ii) realizar ingeniería inversa para el producto conectado, pero exclusivamente para fines de corrección de errores de sus procesamientos. El derecho al procesamiento no incluye el derecho a su distribución. Está obligado a tratar de manera confidencial toda la información que obtiene en el marco de la ingeniería inversa del producto conectado.
Determinadas licencias OSS obligan a Siemens a la publicación del código fuente, p. ej. la GNU General Public License, la GNU Lesser General Public License así como la Mozilla Public License. En la medida que se apliquen estas licencias y que el producto no se haya suministrado con el código fuente necesario, puede solicitarse una copia del código fuente por parte de cualquier persona durante el período indicado en la licencia OSS, mediante envío de la solicitud correspondiente a la siguiente dirección.
SIEMENS puede facturar una tasa de servicio de hasta 5 Euros para la tramitación de la consulta.
Garantía en relación al uso del Open Source Software
Las obligaciones de Siemens relacionadas a la garantía del Software, están especificados en el contrato correspondiente con SIEMENS. En caso de modificar el producto o los componentes OSS o usarse de una manera que difiera del modo especificado por SIEMENS, dejará de tener vigencia la garantía y no habrá derechoal soporte técnico asociado a ella. Las siguientes condiciones de concesión de licencia pueden contener limitaciones de responsabilidad que rigen entre su parte y el licenciador correspondiente. Se aclara que SIEMENS no asume obligaciones de garantía en nombre de o en forma vinculante para licenciadores de terceros.
French / Français
Note pour les partenaires de distribution: veuillez transmettre ce document à vos clients pour éviter toutes infractions aux dispositions en matière de droits d’auteur.
Informations sur des logiciels de tiers
Le présent produit, solution ou service (« Produit ») contient des éléments de logiciels indiqués ci-après, appartenant à des tiers. Ces logiciels sont des Open Source Software dont l’utilisation est accordée en vertu d’une licence reconnue par la Open Service Initiative (www.opensource.org), ou d’une licence équivalente définie comme telle par Siemens ("OSS"), et/ou en vertu d’un logiciel commercial ou un freeware. En ce qui concerne les composants OSS, les conditions de licence OSS pertinentes priment sur toutes les autres conditions éventuellement applicables au Produit. SIEMENS met à votre disposition gratuitement et sans frais supplémentaires les parties OSS du Produit.
Si SIEMENS a combiné ou relié certains composants du Produit avec des éléments OSS dont l’utilisation est accordée en vertu de la licence GNU LGPL version 2 ou d'une version postérieure, conformément à la licence applicable, et si l’utilisation du fichier objet correspondant est soumise à des restrictions (« Module Sous Licence LGPL », le module sous licence LGPL et les composants avec lesquels ce module est lié, sont dénommés ci-après "Produit Lié"), si les critères de licence LGPL applicables sont respectés, vous avez également les droits suivants : (i) droit de modifier le Produit Lié pour votre propre usage , inclus notamment le droit de modifier le Produit Lié afin de le relier différentes versions modifiées du Module Sous Licence LGPL et (ii) droit de faire de la retro-ingénierie sur le Produit Lié, mais exclusivement afin de corriger les éventuels dysfonctionnements des modifications que vous y avez apportées. Le droit de modifier n’inclut pas le droit de distribuer ces modifications et toutes les informations que vous avez obtenues à l’occasion d’opérations de retro-ingénierie du Produit Lié seront strictement confidentielles.
Certaines licences OSS, comme par exemple la GNU General Public License, la GNU Lesser General Public License, ainsi que la Mozilla Public License, obligent SIEMENS à divulguer le code source. Si ces licences sont applicables et si le Produit n’a pas été préalablement livré avec le code source nécessaire, une copie du code source peut être demandée pendant la durée de la licence OSS applicable, en s’adressant à l’adresse suivante.
SIEMENS peut facturer des frais de traitement allant jusqu’à 5 Euro pour répondre à cette demande.
Garantie relative à l’utilisation du logiciel Open Source
Les obligations de garantie de SIEMENS sont définies dans votre contrat. Si vous modifiez le Produit ou les éléments OSS y contenus ou si vous les utilisez d’une manière autre que celle spécifiée par SIEMENS, vous perdez le bénéfice de la garantie et aucune assistance technique ne vous sera fournie. Les conditions de licence ci-après peuvent contenir des limitations de responsabilités applicables entre vous et le concédant. En tout état de cause, nous vous signalons que SIEMENS ne prend aucun engagement de garantie au nom et pour le compte de tiers concédants.

Italian / Italiano
IMPORTANTE per i partner commerciali: si prega di inoltrare il presente documento ai clienti per evitare violazioni delle condizioni di licenza.
Informazioni relative al software di altri produttori
Il presente prodotto, soluzione o servizio ("Prodotto") contengono componenti software di altri produttori elencati qui di seguito. Questi software di altri produttori possono essere Open Source Software (OSS), concessi in licenza con una licenza riconosciuta dall'Open Source Initiative (www.opensource.org) o ritenuta equivalente da Siemens ("OSS"), e/o software o freeware commerciali. Per quanto riguarda i componenti dell'OSS, le relative condizioni di licenza pertinenti prevalgono rispetto a tutte le altre condizioni applicabili al presente Prodotto. SIEMENS mette a disposizione i componenti dell'OSS contenuti nel presente Prodotto senza costi aggiuntivi.
Se SIEMENS ha combinato o linkato determinati componenti del Prodotto con prodotti dell'OSS secondo la definizione indicata nella licenza applicabile e concessa ai sensi della licenza GNU LGPL Version 2 o successiva, se il relativo file di oggetto non può essere utilizzato in maniera illimitata ("modulo concesso con licenza LGPL", vale a dire il modulo con licenza LGPL e i componenti a cui detto modello è collegato, denominati qui di seguito "Prodotto Collegato") e, infine, se i relativi criteri di licenza LGPL sono stati soddisfatti, sarà possibile inoltre (i) modificare il Prodotto Collegato per propri scopi di impiego, in particolare elaborare il Prodotto Collegato per linkarlo ad una versione modificata del modulo con licenza LGPL, e (ii) effettuare il reverse engineering del Prodotto Collegato, esclusivamente a fini di correzione degli errori di elaborazione. Il diritto di elaborazione non include il diritto di distribuire tali modifiche. Inoltre, tutte le informazioni ottenute con il reverse engineering del Prodotto Collegato devono essere trattate come riservate.
Determinate licenze OSS obbligano SIEMENS a pubblicare il codice sorgente, ad es. la GNU General Public License, la GNU Lesser General Public License e la Mozilla Public License. Se queste licenze sono applicabili, e il presente Prodotto non è stato già fornito con il necessario codice sorgente, è possibile richiedere una copia di detto codice nel periodo di validità indicato nella licenza OSS applicabile al seguente indirizzo.
Per l'evasione della richiesta, SIEMENS potrà addebitare fino a 5 Euro.
Garanzia di utilizzo dell'Open Source Software
Le obbligazioni di garanzia di SIEMENS sono disciplinate dal vostro contratto sottoscritto con SIEMENS. Se si modifica il Prodotto o i componenti dell'OSS, oppure li si utilizza in un modo diverso da quello specificato da SIEMENS, la garanzia e il supporto tecnico decadono. Le seguenti condizioni di licenza possono contenere limitazioni di responsabilità valevoli nel rapporto tra l'utente e il licenziante. Per maggiore chiarezza, si ribadisce che SIEMENS non concede alcuna garanzia a nome di, o vincolante per, qualsiasi terza parte licenziante.

Japanese / 日本語
再販業者への注意事項:ライセンス違反を防ぐため、本書を顧客の皆様に配布してください。
他社製ソフトウェアの使用に関する情報
本製品、ソリューション、またはサービス(以下「本製品」)には、本書に記載の他社製ソフトウェ アのコンポーネントが含まれています。該当するコンポーネントとは、Open Source Initiative (www.opensource.org) によって認可されたライセンスのもとで使用許諾を得たオープンソースソフ トウェア、または SIEMENS によって決定された同様のライセンス(以下「OSS」)、および/または商用もしくはフリーウェアのソフトウェアコンポーネントを指します。本製品を対象とするその他いかなる契約条件に対しても、OSS のコンポーネントに関しては、適用される OSS ライセンス条件が優先するものとします。本製品の OSS の部分に関しては、著作権使用料無料で提供され、無料で使用する ことができます。
SIEMENS が、本製品の特定のコンポーネントと適用されるライセンスの定義の通りに GNU LGPLのバージョン 2 以降のもとで使用許諾を得た OSS コンポーネントを組み合わせるか、関連付け、なおかつ付随するオブジェクト・ファイルの使用が制限されていない場合(以下「LGPL 使用許諾モジュー ル」、それに対し、LGPL使用許諾モジュールが組み合わされているか、関連付けられている LGPL 使用許諾済みモジュールとコンポーネントを「組み合わせ製品」という)、関連する LGPL 使用許諾の基準を満たしていれば、次の追加の権利が適用されます。(i) 個人的な使用のために組み合わせ製品を変更することができる(LGPL 使用許諾モジュールの変更したバージョンを再度関連付けるために組み合わせ製品を変更する権利を含むが、それに限定されるものではない)、および (ii) 組み合わせ製品にリバースエンジニアリングを行うことができる(ただし変更のデバッグのみ)。変更に関する権利には、該当する変更を配布する権利は含まれていません。また契約者の方は、このような組み合わせ製品のリバースエンジニアリングから生じるいかなる情報に関しても極秘として維持するものとします。
例えば、GNU General Public License (GNU一般公衆利用許諾書)、GNU Lesser General Public License(GNU劣等一般公衆利用許諾書)、Mozilla Public License 等の特定の OSSライセンスでは、SIEMENS がソースコードを利用できるようにする必要があります。該当するライセンスが適用可能であり、本製品が必要とされるソースコードとともに出荷されなかった場合、この情報を受け取った人物が適用される OSS ライセンスによって義務付けられている期間中に以下の住所まで連絡することで、このソースコードのコピーを入手することができます。
リクエストを実行するために SIEMENS では、最高 5 ユーロの手数料を請求する場合があります。
オープンソースソフトウェアのさらなる使用に関する保証
SIEMENS の保証義務は、契約者と SIEMENS との契約書に記載されています。本製品を SIEMENS が指定した以外の方法で変更したり、使用したりした場合、SIEMENS では本製品、またはいかなる OSS コンポーネントに対しても保証やテクニカルサポートを提供いたしません。以下に記載のライセンス条件には、 契約者と個別のライセンサーとの間で適用される免責事項が含まれる場合があります。誤解を避けるため、SIEMENSでは他社のライセンサーを代表、または他社を拘束するいかなる保証義務も負いません。

Russian / Русский
Информация для партнёров по сбыту: просим передать этот документ вашим клиентам во избежание нарушений лицензионных прав.
Информация о программном обеспечении сторонних разработчиков
Настоящий продукт, настоящее решение или сервис ("Продукт") включает в себя программные компоненты сторонних разработчиков, перечисленные ниже. Это компоненты программного обеспечения с открытым кодом, имеющие лицензию, признанную организацией Open Source Initiative (www.opensource.org), либо иную лицензию согласно определению компании SIEMENS ("OSS"), и / или компоненты коммерческого либо свободно распространяемого программного обеспечения. В отношении компонентов OSS соответствующие условия лицензии OSS имеют приоритет перед всеми прочими положениями, применимыми к данному Продукту. SIEMENS предоставляет вам долевые права на OSS в отношении данного Продукта на безвозмездной основе.
Если SIEMENS комбинирует или связывает определённые компоненты Продукта с компонентами OSS в соответствии с определением применимой лицензии, лицензированными по версии 2 или более поздней GNU LGPL, и если неограниченное использование соответствующего объектного файла не разрешено ("Модуль по лицензии LGPL", причём Модуль по лицензии LGPL и компоненты, с которыми скомбинирован или связан Модуль по лицензии LGPL, далее именуются "Комбинированный продукт") и выполнены соответствующие критерии лицензии LGPL, вам разрешается дополнительно (i) обрабатывать Комбинированный продукт в собственных целях и, в частности, но не ограничиваясь, обрабатывать Комбинированный продукт таким образом, чтобы связать его с модифицированной версией Модуля по лицензии LGPL, а также (ii) проводить обратную разработку Комбинированного продукта, но только в целях исправления ошибок вашей обработки. Право на обработку не включает в себя право на дистрибуцию. Вы обязаны сохранять конфиденциальность в отношении всей информации, полученной вами в ходе обратной разработки Комбинированного продукта.
Определённые лицензии OSS обязывают SIEMENS раскрывать исходный код, например, GNU General Public License, GNU Lesser General Public License и Mozilla Public License. Если указанные лицензии применимы и Продукт поставлен без необходимого исходного кода, копия исходного кода может быть запрошена обладателем настоящей информации в течение времени, указанного в применимой лицензии OSS, по следующему адресу.
За выполнение запроса SIEMENS может взимать сбор в размере до 5 евро.
Гарантия в отношении дальнейшего применения программного обеспечения с открытым кодом
Гарантийные обязательства SIEMENS регулируются соответствующим договором с компанией SIEMENS. Если вы модифицируете Продукт или компоненты OSS либо используете их иным образом, чем указано компанией SIEMENS, гарантия аннулируется, техническая поддержка не предоставляется. Приведённые ниже лицензионные условия могут включать в себя положения об ограничении ответственности, действующие в отношениях между вами и соответствующим лицензиаром. Во избежание сомнений подчёркиваем, что SIEMENS не даёт гарантии от имени сторонних лицензиаров и гарантии, налагающей обязательства на сторонних лицензиаров.


Open Source Software and/or other third-party software contained in this Product

If you like to receive a copy of the source code, please contact SIEMENS at the following address:

Siemens AG
Attn: Software Licensing
LC TEC IT&SL
Hertha-Sponer-Weg 3
91058 Erlangen
Germany

Subject: Open Source Request (please specify Product name and version)

+
+ +

+ +

+ +

+ Please note the following license conditions and copyright notices applicable to Open Source Software and/or other components (or parts thereof): +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ComponentOpen Source Software
[Yes/No]
Acknowledgements/CommentLicense conditions and copyright notices
cJSON - 1.7.18YesLICENSE AND COPYRIGHT INFORMATION FOR COMPONENT cJSON - 1.7.18
CMock - 2.4.3YesLICENSE AND COPYRIGHT INFORMATION FOR COMPONENT CMock - 2.4.3
+ + + + + + + + + + + +
+


LICENSE CONDITIONS AND COPYRIGHT NOTICES

+

Open Source Software: - cJSON - 1.7.18

+

Enclosed you will find the license conditions and + copyright notices applicable for + - cJSON - 1.7.18

+
+ +
License conditions:
+
+ + + + + + + +
Apache License Version 2.0, January 2004

http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ +
+ +
+
Copyrights:
+ + + + +
+ Copyright (c) 2007 - 2017 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams; Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams; Copyright (c) 2007-14 Mike Karlesky, Mark VanderVoord, Greg Williams; Copyright (c) 2009-2017 Dave Gamble and cJSON contributors; Copyright (c) 2009-2019 Dave Gamble and cJSON contributors; Copyright (c) 2010 James Grenning and Contributed to Unity Project; Copyright (c) 2015 Alexander Mueller / XelaRellum@web.de; Copyright 2014 The Authors; John Theofanopoulos A; generate_test_runner.rb +
+
+
+
+


LICENSE CONDITIONS AND COPYRIGHT NOTICES

+

Open Source Software: - CMock - 2.4.3

+

Enclosed you will find the license conditions and + copyright notices applicable for + - CMock - 2.4.3

+
+ +
License conditions:
+
+ + + + + + + +
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the disclaimer below.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the disclaimer below in the documentation and/or other materials provided with the distribution.
Atmel's name may not be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ +
+ +
+
Copyrights:
+ + + + +
+ Copyright (c) 2005 David Heinemeier Hansson; Copyright (c) 2006, Atmel Corporation; Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams; Copyright (c) 2007-14 Mike Karlesky, Mark VanderVoord, Greg Williams; Copyright (c) 2007-2014 Mike Karlesky, Mark VanderVoord, Greg Williams; copyright (c) 2007-2013 Cmock Project; copyright (c) 2007-2014 Cmock Project +
+
+
+
+ +

+ Portions generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. No content created from ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. + Visit https://github.com/nexB/scancode-toolkit/ for support and download. +

+ + + \ No newline at end of file diff --git a/build_helper_cross_compile_for_rpi.sh b/build_helper_cross_compile_for_rpi.sh index 2de8b81..7ede727 100644 --- a/build_helper_cross_compile_for_rpi.sh +++ b/build_helper_cross_compile_for_rpi.sh @@ -1,6 +1,8 @@ +# This is deprecated. Use build_helper_linux.sh and modify accordingly. + #!/bin/bash -openssl_version=1.1.1m -curl_version=7.81.0 +openssl_version=3.0.13 +curl_version=8.6.0 main_directory=../mcl_sandbox_for_rpi mcl_directory=$(pwd) @@ -16,7 +18,7 @@ rpi_tool_path=$main_directory/raspberrypi_tools/arm-bcm2708/arm-linux-gnueabihf wget -c https://www.openssl.org/source/openssl-$openssl_version.tar.gz tar -xvzf openssl-$openssl_version.tar.gz -wget https://curl.haxx.se/download/curl-$curl_version.tar.gz +wget https://curl.se/download/curl-$curl_version.tar.gz tar -xvzf curl-$curl_version.tar.gz cd openssl-$openssl_version diff --git a/build_helper_linux.sh b/build_helper_linux.sh index a64ce15..57fa699 100644 --- a/build_helper_linux.sh +++ b/build_helper_linux.sh @@ -1,6 +1,6 @@ #!/bin/bash -openssl_version=1.1.1m -curl_version=7.81.0 +openssl_version=3.0.13 +curl_version=8.6.0 main_directory=../mcl_sandbox mcl_directory=$(pwd) @@ -13,15 +13,15 @@ main_directory=$(pwd) wget -c https://www.openssl.org/source/openssl-$openssl_version.tar.gz tar -xvzf openssl-$openssl_version.tar.gz -wget https://curl.haxx.se/download/curl-$curl_version.tar.gz +wget https://curl.se/download/curl-$curl_version.tar.gz tar -xvzf curl-$curl_version.tar.gz cd openssl-$openssl_version -./config --prefix=$main_directory/install -Wl,-rpath=$main_directory/install/lib shared -fPIC && make install_sw +./config --prefix=$main_directory/install -Wl,-rpath=$main_directory/install/lib shared -fPIC --libdir=lib && make install_sw cd .. cd curl-$curl_version -LDFLAGS="-Wl,-R$main_directory/install/lib" ./configure --enable-http --with-ssl=$main_directory/install --prefix=$main_directory/install --without-libssh2 --disable-ftp --disable-tftp --disable-file --disable-ldap --disable-rtsp --disable-dict --disable-telnet --disable-pop3 --disable-imap --disable-smb --disable-scp --disable-sftp --disable-smtp --disable-gopher --disable-manual && make install +LDFLAGS="-Wl,-R$main_directory/install/lib" ./configure --enable-http --with-ssl=$main_directory/install --prefix=$main_directory/install --without-libssh2 --without-libpsl --disable-ftp --disable-tftp --disable-file --disable-ldap --disable-rtsp --disable-dict --disable-telnet --disable-pop3 --disable-imap --disable-smb --disable-scp --disable-sftp --disable-smtp --disable-gopher --disable-manual && make install cd .. mkdir mcl_build diff --git a/build_helper_win64.bat b/build_helper_win64.bat index 9b664ee..381fe46 100644 --- a/build_helper_win64.bat +++ b/build_helper_win64.bat @@ -1,5 +1,5 @@ -set openssl_version=1.1.1m -set curl_version=7.81.0 +set openssl_version=3.0.13 +set curl_version=8.6.0 set path_to_7zip="C:\Program Files\7-Zip" set path_to_visual_studio="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional" set main_directory=..\mcl_sandbox @@ -15,7 +15,7 @@ powershell -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.Secur %path_to_7zip%\7z e openssl-%openssl_version%.tar.gz %path_to_7zip%\7z x openssl-%openssl_version%.tar -powershell -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget http://curl.haxx.se/download/curl-%curl_version%.tar.gz -OutFile curl-%curl_version%.tar.gz}" +powershell -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget https://curl.se/download/curl-%curl_version%.tar.gz -OutFile curl-%curl_version%.tar.gz}" %path_to_7zip%\7z e curl-%curl_version%.tar.gz %path_to_7zip%\7z x curl-%curl_version%.tar diff --git a/mcl_connectivity/examples/create_mapping.c b/mcl_connectivity/examples/create_mapping.c index 3d234c9..9c8f92a 100644 --- a/mcl_connectivity/examples/create_mapping.c +++ b/mcl_connectivity/examples/create_mapping.c @@ -10,7 +10,29 @@ #include "mcl_connectivity/mcl_connectivity.h" #include "callbacks.h" -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n" +"MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n" +"b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n" +"9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI\n" +"2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx\n" +"1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ\n" +"q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz\n" +"tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ\n" +"vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP\n" +"BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV\n" +"5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY\n" +"1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4\n" +"NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG\n" +"Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91\n" +"8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe\n" +"pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\n" +"MrY=\n" +"-----END CERTIFICATE-----\n" +"-----BEGIN CERTIFICATE-----\n"\ "MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL\n"\ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -42,6 +64,7 @@ const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + #define DATA_POINT_COUNT 3 #define IS_AGENT_ALSO_ITS_DATA_OWNER 0 diff --git a/mcl_connectivity/examples/dsc_upload.c b/mcl_connectivity/examples/dsc_upload.c index 2c9d671..741b061 100644 --- a/mcl_connectivity/examples/dsc_upload.c +++ b/mcl_connectivity/examples/dsc_upload.c @@ -13,7 +13,29 @@ #include "mcl_core/mcl_random.h" #include "callbacks.h" -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n" +"MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n" +"b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n" +"9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI\n" +"2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx\n" +"1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ\n" +"q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz\n" +"tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ\n" +"vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP\n" +"BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV\n" +"5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY\n" +"1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4\n" +"NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG\n" +"Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91\n" +"8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe\n" +"pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\n" +"MrY=\n" +"-----END CERTIFICATE-----\n" +"-----BEGIN CERTIFICATE-----\n"\ "MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL\n"\ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -45,6 +67,7 @@ const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + // Replace with your own initial access token. const char *initial_access_token = ""; @@ -126,7 +149,7 @@ int main(void) // Core configuration and related parameters. mcl_core_configuration_t *core_configuration = NULL; mcl_uint16_t mindsphere_port = 443; - mcl_uint16_t proxy_port = 3128; + mcl_uint16_t proxy_port = 9400; E_MCL_PROXY mcl_proxy = MCL_PROXY_HTTP; E_MCL_SECURITY_PROFILE security_profile = MCL_SECURITY_SHARED_SECRET; @@ -159,7 +182,7 @@ int main(void) mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE, mindsphere_certificate); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_SECURITY_PROFILE, &security_profile); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, "custom agent v1.0"); - mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "192.168.0.1"); + mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "194.138.0.5"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT, &proxy_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE, &mcl_proxy); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_IAT, initial_access_token); diff --git a/mcl_connectivity/examples/event_upload.c b/mcl_connectivity/examples/event_upload.c index 784420f..375a4dc 100644 --- a/mcl_connectivity/examples/event_upload.c +++ b/mcl_connectivity/examples/event_upload.c @@ -12,7 +12,29 @@ const char my_initial_access_token[] = ""; -const char mindsphere_certificate[] = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n" +"MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n" +"b20xIDAeBgNVBAMTF0RpZ2l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BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -44,6 +66,8 @@ const char mindsphere_certificate[] = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + + int main(void) { mcl_error_t code; @@ -53,7 +77,7 @@ int main(void) // Core configuration and related parameters. mcl_core_configuration_t *core_configuration = NULL; mcl_uint16_t mindsphere_port = 443; - mcl_uint16_t proxy_port = 3128; + mcl_uint16_t proxy_port = 9400; E_MCL_PROXY mcl_proxy = MCL_PROXY_HTTP; E_MCL_SECURITY_PROFILE security_profile = MCL_SECURITY_SHARED_SECRET; @@ -81,10 +105,10 @@ int main(void) mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_HOST, "https://southgate.eu1.mindsphere.io"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_PORT, &mindsphere_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE, mindsphere_certificate); - mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "192.168.0.1"); + mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "194.138.0.5"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT, &proxy_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE, &mcl_proxy); - mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, "my user agent"); + mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, "custom agent v1.0"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_TENANT, "mclibiot"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_SECURITY_PROFILE, &security_profile); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_CREDENTIALS_LOAD_CALLBACK, custom_load_function_shared_secret); diff --git a/mcl_connectivity/examples/file_upload.c b/mcl_connectivity/examples/file_upload.c index 147d05a..6193f9b 100644 --- a/mcl_connectivity/examples/file_upload.c +++ b/mcl_connectivity/examples/file_upload.c @@ -12,7 +12,29 @@ const char *initial_access_token = ""; -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n" +"MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n" +"b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n" +"9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI\n" +"2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx\n" +"1x7e/dfgy5SDN67sH0NO3Xss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iC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + int main(void) { printf("***** CUSTOM AGENT using MCL *****\n"); @@ -55,7 +78,7 @@ int main(void) // Core configuration and related parameters. mcl_core_configuration_t *core_configuration = NULL; mcl_uint16_t mindsphere_port = 443; - mcl_uint16_t proxy_port = 3128; + mcl_uint16_t proxy_port = 9400; E_MCL_PROXY mcl_proxy = MCL_PROXY_HTTP; E_MCL_SECURITY_PROFILE security_profile = MCL_SECURITY_SHARED_SECRET; @@ -83,7 +106,7 @@ int main(void) mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_HOST, "https://southgate.eu1.mindsphere.io"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_PORT, &mindsphere_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE, mindsphere_certificate); - mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "192.168.0.1"); + mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "194.138.0.5"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT, &proxy_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE, &mcl_proxy); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, "custom agent v1.0"); diff --git a/mcl_connectivity/examples/store_upload.c b/mcl_connectivity/examples/store_upload.c index 6b7fe8d..f002299 100644 --- a/mcl_connectivity/examples/store_upload.c +++ b/mcl_connectivity/examples/store_upload.c @@ -23,7 +23,29 @@ const char *initial_access_token = ""; -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN C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vHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG\n" +"Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91\n" +"8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe\n" +"pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\n" +"MrY=\n" +"-----END CERTIFICATE-----\n" +"-----BEGIN CERTIFICATE-----\n"\ "MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL\n"\ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -55,6 +77,8 @@ const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + + #define VALUE_LIST_PER_EXCHANGE 4 #define VALUE_BUFFER_LENGTH 8 @@ -119,7 +143,7 @@ int main(void) // Core configuration and related parameters. mcl_core_configuration_t *core_configuration = NULL; mcl_uint16_t mindsphere_port = 443; - mcl_uint16_t proxy_port = 3128; + mcl_uint16_t proxy_port = 9400; E_MCL_PROXY mcl_proxy = MCL_PROXY_HTTP; E_MCL_SECURITY_PROFILE security_profile = MCL_SECURITY_SHARED_SECRET; @@ -158,7 +182,7 @@ int main(void) mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_HOST, "https://southgate.eu1.mindsphere.io"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_MDSP_PORT, &mindsphere_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE, mindsphere_certificate); - mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "192.168.0.1"); + mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "194.138.0.5"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT, &proxy_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE, &mcl_proxy); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, "custom agent v1.0"); diff --git a/mcl_connectivity/examples/timeseries_upload.c b/mcl_connectivity/examples/timeseries_upload.c index c32b661..35f6b07 100644 --- a/mcl_connectivity/examples/timeseries_upload.c +++ b/mcl_connectivity/examples/timeseries_upload.c @@ -21,7 +21,29 @@ #include #endif -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n" +"MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n" +"b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n" +"9w0BAQEFAAOCAQ8AMIIBCg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\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -53,6 +75,7 @@ const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + #define VALUE_LIST_PER_EXCHANGE 4 #define VALUE_BUFFER_LENGTH 8 @@ -117,7 +140,7 @@ int main(void) // Core configuration and related parameters. mcl_core_configuration_t *core_configuration = NULL; mcl_uint16_t mindsphere_port = 443; - mcl_uint16_t proxy_port = 3128; + mcl_uint16_t proxy_port = 9400; E_MCL_PROXY mcl_proxy = MCL_PROXY_HTTP; E_MCL_SECURITY_PROFILE security_profile = MCL_SECURITY_SHARED_SECRET; @@ -140,7 +163,7 @@ int main(void) mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_CERTIFICATE, mindsphere_certificate); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_SECURITY_PROFILE, &security_profile); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_USER_AGENT, "custom agent v1.0"); - mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "192.168.0.1"); + mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_HOST, "194.138.0.5"); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_PORT, &proxy_port); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_PROXY_TYPE, &mcl_proxy); mcl_core_configuration_set_parameter(core_configuration, MCL_CORE_CONFIGURATION_PARAMETER_TENANT, "mclibiot"); diff --git a/mcl_core/examples/onboard.c b/mcl_core/examples/onboard.c index 704249f..48678bf 100644 --- a/mcl_core/examples/onboard.c +++ b/mcl_core/examples/onboard.c @@ -12,7 +12,29 @@ #include "mcl_core/mcl_core.h" #include "callbacks.h" -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n" +"MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n" +"b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n" +"9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI\n" +"2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx\n" +"1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ\n" +"q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz\n" +"tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ\n" +"vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP\n" +"BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV\n" +"5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY\n" +"1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4\n" +"NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG\n" +"Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91\n" +"8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe\n" +"pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\n" +"MrY=\n" +"-----END CERTIFICATE-----\n" +"-----BEGIN CERTIFICATE-----\n"\ "MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL\n"\ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -44,6 +66,7 @@ const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + // Buffer size for initial access token. #define IAT_BUFFER_SIZE 2048 diff --git a/mcl_core/include/mcl_core/mcl_version.h b/mcl_core/include/mcl_core/mcl_version.h index d03dd3a..a4520c7 100644 --- a/mcl_core/include/mcl_core/mcl_version.h +++ b/mcl_core/include/mcl_core/mcl_version.h @@ -10,10 +10,10 @@ #define MCL_VERSION_H_ #define MCL_VERSION_MAJOR 4 -#define MCL_VERSION_MINOR 3 -#define MCL_VERSION_PATCH 2 +#define MCL_VERSION_MINOR 4 +#define MCL_VERSION_PATCH 0 -#define MCL_VERSION_NUMBER 0x04030200 -#define MCL_VERSION_STRING "4.3.3" +#define MCL_VERSION_NUMBER 0x04040000 +#define MCL_VERSION_STRING "4.4.0" #endif //MCL_VERSION_H_ diff --git a/mcl_core/lib/cJSON/cJSON.c b/mcl_core/lib/cJSON/cJSON.c index c78aac6..61483d9 100644 --- a/mcl_core/lib/cJSON/cJSON.c +++ b/mcl_core/lib/cJSON/cJSON.c @@ -96,9 +96,9 @@ CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void) return (const char*) (global_error.json + global_error.position); } -CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item) +CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item) { - if (!cJSON_IsString(item)) + if (!cJSON_IsString(item)) { return NULL; } @@ -106,9 +106,9 @@ CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item) return item->valuestring; } -CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item) +CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item) { - if (!cJSON_IsNumber(item)) + if (!cJSON_IsNumber(item)) { return (double) NAN; } @@ -117,7 +117,7 @@ CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item) } /* This is a safeguard to prevent copy-pasters from using incompatible C and header files */ -#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 15) +#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 18) #error cJSON.h and cJSON.c have different versions. Make sure that both have the same. #endif @@ -263,10 +263,12 @@ CJSON_PUBLIC(void) cJSON_Delete(cJSON *item) if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL)) { global_hooks.deallocate(item->valuestring); + item->valuestring = NULL; } if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) { global_hooks.deallocate(item->string); + item->string = NULL; } global_hooks.deallocate(item); item = next; @@ -397,11 +399,17 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number) return object->valuedouble = number; } +/* Note: when passing a NULL valuestring, cJSON_SetValuestring treats this as an error and return NULL */ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring) { char *copy = NULL; /* if object's type is not cJSON_String or is cJSON_IsReference, it should not set valuestring */ - if (!(object->type & cJSON_String) || (object->type & cJSON_IsReference)) + if ((object == NULL) || !(object->type & cJSON_String) || (object->type & cJSON_IsReference)) + { + return NULL; + } + /* return NULL if the object is corrupted or valuestring is NULL */ + if (object->valuestring == NULL || valuestring == NULL) { return NULL; } @@ -511,7 +519,7 @@ static unsigned char* ensure(printbuffer * const p, size_t needed) return NULL; } - + memcpy(newbuffer, p->buffer, p->offset + 1); p->hooks.deallocate(p->buffer); } @@ -888,6 +896,7 @@ static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_bu if (output != NULL) { input_buffer->hooks.deallocate(output); + output = NULL; } if (input_pointer != NULL) @@ -1107,7 +1116,7 @@ CJSON_PUBLIC(cJSON *) cJSON_ParseWithLengthOpts(const char *value, size_t buffer } buffer.content = (const unsigned char*)value; - buffer.length = buffer_length; + buffer.length = buffer_length; buffer.offset = 0; buffer.hooks = global_hooks; @@ -1230,6 +1239,7 @@ static unsigned char *print(const cJSON * const item, cJSON_bool format, const i /* free the buffer */ hooks->deallocate(buffer->buffer); + buffer->buffer = NULL; } return printed; @@ -1238,11 +1248,13 @@ static unsigned char *print(const cJSON * const item, cJSON_bool format, const i if (buffer->buffer != NULL) { hooks->deallocate(buffer->buffer); + buffer->buffer = NULL; } if (printed != NULL) { hooks->deallocate(printed); + printed = NULL; } return NULL; @@ -1283,6 +1295,7 @@ CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON if (!print_value(item, &p)) { global_hooks.deallocate(p.buffer); + p.buffer = NULL; return NULL; } @@ -1654,6 +1667,11 @@ static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_bu current_item = new_item; } + if (cannot_access_at_index(input_buffer, 1)) + { + goto fail; /* nothing comes after the comma */ + } + /* parse the name of the child */ input_buffer->offset++; buffer_skip_whitespace(input_buffer); @@ -2264,7 +2282,7 @@ CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON { cJSON *after_inserted = NULL; - if (which < 0) + if (which < 0 || newitem == NULL) { return false; } @@ -2275,6 +2293,11 @@ CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON return add_item_to_array(array, newitem); } + if (after_inserted != array->child && after_inserted->prev == NULL) { + /* return false if after_inserted is a corrupted array item */ + return false; + } + newitem->next = after_inserted; newitem->prev = after_inserted->prev; after_inserted->prev = newitem; @@ -2291,7 +2314,7 @@ CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement) { - if ((parent == NULL) || (replacement == NULL) || (item == NULL)) + if ((parent == NULL) || (parent->child == NULL) || (replacement == NULL) || (item == NULL)) { return false; } @@ -2361,6 +2384,11 @@ static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSO cJSON_free(replacement->string); } replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); + if (replacement->string == NULL) + { + return false; + } + replacement->type &= ~cJSON_StringIsConst; return cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement); @@ -2693,7 +2721,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int co if (a && a->child) { a->child->prev = n; } - + return a; } @@ -3111,4 +3139,5 @@ CJSON_PUBLIC(void *) cJSON_malloc(size_t size) CJSON_PUBLIC(void) cJSON_free(void *object) { global_hooks.deallocate(object); + object = NULL; } diff --git a/mcl_core/lib/cJSON/cJSON.h b/mcl_core/lib/cJSON/cJSON.h index 95a9cf6..88cf0bc 100644 --- a/mcl_core/lib/cJSON/cJSON.h +++ b/mcl_core/lib/cJSON/cJSON.h @@ -81,7 +81,7 @@ then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJ /* project version */ #define CJSON_VERSION_MAJOR 1 #define CJSON_VERSION_MINOR 7 -#define CJSON_VERSION_PATCH 15 +#define CJSON_VERSION_PATCH 18 #include diff --git a/mcl_core/src/crypto/openssl/CMakeLists.txt b/mcl_core/src/crypto/openssl/CMakeLists.txt index d14fc3c..c5198ea 100644 --- a/mcl_core/src/crypto/openssl/CMakeLists.txt +++ b/mcl_core/src/crypto/openssl/CMakeLists.txt @@ -1,5 +1,4 @@ -SET(OPENSSL_VERSION_NUMBER_REQUIRED 1.1.1) -SET(OPENSSL_VERSION_LETTER_REQUIRED "m") +SET(OPENSSL_VERSION_NUMBER_REQUIRED 3.0.13) #Try to find OpenSSL. FIND_PACKAGE(OpenSSL) @@ -9,11 +8,8 @@ ENDIF() #Verify OpenSSL version STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" OPENSSL_VERSION_NUMBER ${OPENSSL_VERSION}) -STRING(REGEX MATCH "[a-z]+" OPENSSL_VERSION_LETTER ${OPENSSL_VERSION}) -IF((OPENSSL_VERSION_NUMBER VERSION_LESS OPENSSL_VERSION_NUMBER_REQUIRED) OR - ((OPENSSL_VERSION_NUMBER VERSION_EQUAL OPENSSL_VERSION_NUMBER_REQUIRED) AND - (OPENSSL_VERSION_LETTER STRLESS OPENSSL_VERSION_LETTER_REQUIRED))) - MESSAGE(FATAL_ERROR "Found OpenSSL version ${OPENSSL_VERSION} but version ${OPENSSL_VERSION_NUMBER_REQUIRED}${OPENSSL_VERSION_LETTER_REQUIRED} or later is required.") +IF((OPENSSL_VERSION_NUMBER VERSION_LESS OPENSSL_VERSION_NUMBER_REQUIRED)) + MESSAGE(FATAL_ERROR "Found OpenSSL version ${OPENSSL_VERSION} but version ${OPENSSL_VERSION_NUMBER_REQUIRED} or later is required.") ENDIF() SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) diff --git a/mcl_core/src/http_client/curl/CMakeLists.txt b/mcl_core/src/http_client/curl/CMakeLists.txt index be17f4a..8de504b 100644 --- a/mcl_core/src/http_client/curl/CMakeLists.txt +++ b/mcl_core/src/http_client/curl/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(CURL_VERSION_REQUIRED 7.81.0) +SET(CURL_VERSION_REQUIRED 8.6.0) #Try to find libcurl. FIND_PACKAGE(CURL) diff --git a/mcl_data_lake/examples/data_lake_upload.c b/mcl_data_lake/examples/data_lake_upload.c index 9b6d41e..45aef9e 100644 --- a/mcl_data_lake/examples/data_lake_upload.c +++ b/mcl_data_lake/examples/data_lake_upload.c @@ -14,31 +14,61 @@ #include "mcl_core/mcl_file_util.h" #include "callbacks.h" -const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" \ -"MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl\n" \ -"MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp\n" \ -"U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw\n" \ -"NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE\n" \ -"ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp\n" \ -"ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3\n" \ -"DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf\n" \ -"8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN\n" \ -"+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0\n" \ -"X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa\n" \ -"K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA\n" \ -"1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G\n" \ -"A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR\n" \ -"zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0\n" \ -"YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD\n" \ -"bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w\n" \ -"DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3\n" \ -"L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D\n" \ -"eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl\n" \ -"xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp\n" \ -"VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY\n" \ -"WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=\n" \ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEV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HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4\n"\ +"WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + const char *data_lake_certificate = "-----BEGIN CERTIFICATE-----\n" \ "MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ\n" \ "RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD\n" \ @@ -65,7 +95,7 @@ const char *data_lake_certificate = "-----BEGIN CERTIFICATE-----\n" \ #define USER_INPUT_BUFFER_SIZE 1024 #define MINDSPHERE_HOSTNAME "https://southgate.eu1-int.mindsphere.io" -#define MINDSPHERE_TENANT "tide19" +#define MINDSPHERE_TENANT "mclibiot" #define USE_HTTP_PROXY 1 #define USE_SHARED_SECRET 0 #define SUBTENANT_ID "a59e4760fe0b3731db4d36aea59b9742" diff --git a/mcl_deployment/examples/manage_deployment.c b/mcl_deployment/examples/manage_deployment.c index 340f131..4beeea5 100644 --- a/mcl_deployment/examples/manage_deployment.c +++ b/mcl_deployment/examples/manage_deployment.c @@ -15,7 +15,29 @@ #include "mcl_deployment/mcl_deployment.h" #include "callbacks.h" -const char* mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ +const char *mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n" +"MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\n" +"MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n" +"d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n" +"MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\n"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----\n" +"-----BEGIN CERTIFICATE-----\n"\ "MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL\n"\ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"\ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00\n"\ @@ -47,13 +69,14 @@ const char* mindsphere_certificate = "-----BEGIN CERTIFICATE-----\n"\ "WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M\n"\ "-----END CERTIFICATE-----"; + // Buffer size for initial access token. #define IAT_BUFFER_SIZE 2048 #define MINDSPHERE_HOSTNAME "https://southgate.eu1.mindsphere.io" #define MINDSPHERE_TENANT "mclibiot" #define USE_HTTP_PROXY 1 -#define USE_SHARED_SECRET 1 +#define USE_SHARED_SECRET 0 #if USE_HTTP_PROXY #define HTTP_PROXY_HOSTNAME "127.0.0.1" @@ -77,7 +100,7 @@ int main(void) char *initial_access_token = NULL; mcl_uint16_t mindsphere_port = 443; - char *user_agent = "Custom Agent v0.0.1"; + char *user_agent = "custom agent v1.0"; #if USE_HTTP_PROXY mcl_uint16_t proxy_port = HTTP_PROXY_PORT;