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.
Fork of mbed-os-example-client by
security.h@0:7d5ec759888b, 2016-07-25 (annotated)
- Committer:
- Yogesh Pande
- Date:
- Mon Jul 25 16:32:20 2016 +0300
- Revision:
- 0:7d5ec759888b
- Child:
- 31:218ca6b6fe19
Update example home repo at https://github.com/ARMmbed/mbed-os-example-client
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Yogesh Pande |
0:7d5ec759888b | 1 | /* |
Yogesh Pande |
0:7d5ec759888b | 2 | * Copyright (c) 2015 ARM Limited. All rights reserved. |
Yogesh Pande |
0:7d5ec759888b | 3 | * SPDX-License-Identifier: Apache-2.0 |
Yogesh Pande |
0:7d5ec759888b | 4 | * Licensed under the Apache License, Version 2.0 (the License); you may |
Yogesh Pande |
0:7d5ec759888b | 5 | * not use this file except in compliance with the License. |
Yogesh Pande |
0:7d5ec759888b | 6 | * You may obtain a copy of the License at |
Yogesh Pande |
0:7d5ec759888b | 7 | * |
Yogesh Pande |
0:7d5ec759888b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Yogesh Pande |
0:7d5ec759888b | 9 | * |
Yogesh Pande |
0:7d5ec759888b | 10 | * Unless required by applicable law or agreed to in writing, software |
Yogesh Pande |
0:7d5ec759888b | 11 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
Yogesh Pande |
0:7d5ec759888b | 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Yogesh Pande |
0:7d5ec759888b | 13 | * See the License for the specific language governing permissions and |
Yogesh Pande |
0:7d5ec759888b | 14 | * limitations under the License. |
Yogesh Pande |
0:7d5ec759888b | 15 | */ |
Yogesh Pande |
0:7d5ec759888b | 16 | #ifndef __SECURITY_H__ |
Yogesh Pande |
0:7d5ec759888b | 17 | #define __SECURITY_H__ |
Yogesh Pande |
0:7d5ec759888b | 18 | |
Yogesh Pande |
0:7d5ec759888b | 19 | #include <inttypes.h> |
Yogesh Pande |
0:7d5ec759888b | 20 | |
Yogesh Pande |
0:7d5ec759888b | 21 | #define MBED_DOMAIN "DOMAIN" |
Yogesh Pande |
0:7d5ec759888b | 22 | #define MBED_ENDPOINT_NAME "ENDPOINT_NAME" |
Yogesh Pande |
0:7d5ec759888b | 23 | |
Yogesh Pande |
0:7d5ec759888b | 24 | const uint8_t SERVER_CERT[] = "-----BEGIN CERTIFICATE-----\r\n" |
Yogesh Pande |
0:7d5ec759888b | 25 | "-----END CERTIFICATE-----\r\n"; |
Yogesh Pande |
0:7d5ec759888b | 26 | |
Yogesh Pande |
0:7d5ec759888b | 27 | const uint8_t CERT[] = "-----BEGIN CERTIFICATE-----\r\n" |
Yogesh Pande |
0:7d5ec759888b | 28 | "-----END CERTIFICATE-----\r\n"; |
Yogesh Pande |
0:7d5ec759888b | 29 | |
Yogesh Pande |
0:7d5ec759888b | 30 | const uint8_t KEY[] = "-----BEGIN PRIVATE KEY-----\r\n" |
Yogesh Pande |
0:7d5ec759888b | 31 | "-----END PRIVATE KEY-----\r\n"; |
Yogesh Pande |
0:7d5ec759888b | 32 | |
Yogesh Pande |
0:7d5ec759888b | 33 | #endif //__SECURITY_H__ |
Yogesh Pande |
0:7d5ec759888b | 34 | |
Yogesh Pande |
0:7d5ec759888b | 35 | #error "You need to get security.h credentials from connector.mbed.com and replace the content of this security.h file" |