This is a simple mbed client example demonstrating, registration of a device with mbed Device Connector and reading and writing values as well as deregistering on different Network Interfaces including Ethernet, WiFi, 6LoWPAN ND and Thread respectively.

Dependencies:   lwip

Fork of mbed-os-example-client by mbed-os-examples

Committer:
markblackburnetcorp
Date:
Thu Mar 09 18:46:25 2017 +0000
Revision:
68:6c535975a6e3
Parent:
32:7b3841243d70
Initial commit;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 32:7b3841243d70 1 /*
mbed_official 32:7b3841243d70 2 * Copyright (c) 2015 ARM Limited. All rights reserved.
mbed_official 32:7b3841243d70 3 * SPDX-License-Identifier: Apache-2.0
mbed_official 32:7b3841243d70 4 * Licensed under the Apache License, Version 2.0 (the License); you may
mbed_official 32:7b3841243d70 5 * not use this file except in compliance with the License.
mbed_official 32:7b3841243d70 6 * You may obtain a copy of the License at
mbed_official 32:7b3841243d70 7 *
mbed_official 32:7b3841243d70 8 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 32:7b3841243d70 9 *
mbed_official 32:7b3841243d70 10 * Unless required by applicable law or agreed to in writing, software
mbed_official 32:7b3841243d70 11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
mbed_official 32:7b3841243d70 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 32:7b3841243d70 13 * See the License for the specific language governing permissions and
mbed_official 32:7b3841243d70 14 * limitations under the License.
mbed_official 32:7b3841243d70 15 */
mbed_official 32:7b3841243d70 16 #ifndef __SECURITY_H__
mbed_official 32:7b3841243d70 17 #define __SECURITY_H__
mbed_official 32:7b3841243d70 18
mbed_official 32:7b3841243d70 19 #include <inttypes.h>
mbed_official 32:7b3841243d70 20
markblackburnetcorp 68:6c535975a6e3 21 #define MBED_DOMAIN "d6a0042c-14f3-40e6-a955-886946aff565"
markblackburnetcorp 68:6c535975a6e3 22 #define MBED_ENDPOINT_NAME "18bd38a2-77ff-4399-ac64-3938da7433df"
mbed_official 32:7b3841243d70 23
mbed_official 32:7b3841243d70 24 const uint8_t SERVER_CERT[] = "-----BEGIN CERTIFICATE-----\r\n"
markblackburnetcorp 68:6c535975a6e3 25 "MIIBmDCCAT6gAwIBAgIEVUCA0jAKBggqhkjOPQQDAjBLMQswCQYDVQQGEwJGSTEN\r\n"
markblackburnetcorp 68:6c535975a6e3 26 "MAsGA1UEBwwET3VsdTEMMAoGA1UECgwDQVJNMQwwCgYDVQQLDANJb1QxETAPBgNV\r\n"
markblackburnetcorp 68:6c535975a6e3 27 "BAMMCEFSTSBtYmVkMB4XDTE1MDQyOTA2NTc0OFoXDTE4MDQyOTA2NTc0OFowSzEL\r\n"
markblackburnetcorp 68:6c535975a6e3 28 "MAkGA1UEBhMCRkkxDTALBgNVBAcMBE91bHUxDDAKBgNVBAoMA0FSTTEMMAoGA1UE\r\n"
markblackburnetcorp 68:6c535975a6e3 29 "CwwDSW9UMREwDwYDVQQDDAhBUk0gbWJlZDBZMBMGByqGSM49AgEGCCqGSM49AwEH\r\n"
markblackburnetcorp 68:6c535975a6e3 30 "A0IABLuAyLSk0mA3awgFR5mw2RHth47tRUO44q/RdzFZnLsAsd18Esxd5LCpcT9w\r\n"
markblackburnetcorp 68:6c535975a6e3 31 "0tvNfBv4xJxGw0wcYrPDDb8/rjujEDAOMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0E\r\n"
markblackburnetcorp 68:6c535975a6e3 32 "AwIDSAAwRQIhAPAonEAkwixlJiyYRQQWpXtkMZax+VlEiS201BG0PpAzAiBh2RsD\r\n"
markblackburnetcorp 68:6c535975a6e3 33 "NxLKWwf4O7D6JasGBYf9+ZLwl0iaRjTjytO+Kw==\r\n"
mbed_official 32:7b3841243d70 34 "-----END CERTIFICATE-----\r\n";
mbed_official 32:7b3841243d70 35
mbed_official 32:7b3841243d70 36 const uint8_t CERT[] = "-----BEGIN CERTIFICATE-----\r\n"
markblackburnetcorp 68:6c535975a6e3 37 "MIIB0DCCAXOgAwIBAgIEN5VJBDAMBggqhkjOPQQDAgUAMDkxCzAJBgNVBAYTAkZ\r\n"
markblackburnetcorp 68:6c535975a6e3 38 "JMQwwCgYDVQQKDANBUk0xHDAaBgNVBAMME21iZWQtY29ubmVjdG9yLTIwMTgwHh\r\n"
markblackburnetcorp 68:6c535975a6e3 39 "cNMTcwMzA4MjM1ODA5WhcNMTgxMjMxMDYwMDAwWjCBoTFSMFAGA1UEAxNJZDZhM\r\n"
markblackburnetcorp 68:6c535975a6e3 40 "DA0MmMtMTRmMy00MGU2LWE5NTUtODg2OTQ2YWZmNTY1LzE4YmQzOGEyLTc3ZmYt\r\n"
markblackburnetcorp 68:6c535975a6e3 41 "NDM5OS1hYzY0LTM5MzhkYTc0MzNkZjEMMAoGA1UECxMDQVJNMRIwEAYDVQQKEwl\r\n"
markblackburnetcorp 68:6c535975a6e3 42 "tYmVkIHVzZXIxDTALBgNVBAcTBE91bHUxDTALBgNVBAgTBE91bHUxCzAJBgNVBA\r\n"
markblackburnetcorp 68:6c535975a6e3 43 "YTAkZJMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE46r9U0Vg22XC0snfkkzSP\r\n"
markblackburnetcorp 68:6c535975a6e3 44 "Id6EpO1jMFsvoH3P1FlrEqud17L2HrkMIN/hagHl4hvcdsvtjH067kIkYZXLy3c\r\n"
markblackburnetcorp 68:6c535975a6e3 45 "ojAMBggqhkjOPQQDAgUAA0kAMEYCIQDP8E0WcQi/H7iqaqiQnmwDqo28mqx7FB2\r\n"
markblackburnetcorp 68:6c535975a6e3 46 "LVEb2GcSVMAIhAKkgu0PkA/wJ6T/jhaBfGOqnN3MG+riUk+ZM7FIT85vX\r\n"
mbed_official 32:7b3841243d70 47 "-----END CERTIFICATE-----\r\n";
mbed_official 32:7b3841243d70 48
mbed_official 32:7b3841243d70 49 const uint8_t KEY[] = "-----BEGIN PRIVATE KEY-----\r\n"
markblackburnetcorp 68:6c535975a6e3 50 "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg6jJ8iMI5w7t+yi2c\r\n"
markblackburnetcorp 68:6c535975a6e3 51 "vHPerhEP9sQl78AwmjPlC40C2CmhRANCAATjqv1TRWDbZcLSyd+STNI8h3oSk7WM\r\n"
markblackburnetcorp 68:6c535975a6e3 52 "wWy+gfc/UWWsSq53XsvYeuQwg3+FqAeXiG9x2y+2MfTruQiRhlcvLdyi\r\n"
mbed_official 32:7b3841243d70 53 "-----END PRIVATE KEY-----\r\n";
mbed_official 32:7b3841243d70 54
markblackburnetcorp 68:6c535975a6e3 55 #endif //__SECURITY_H__