Skip to content

Commit 4a6b74b

Browse files
authored
Merge pull request #76 from govorox/v1.2.0
V1.2.0
2 parents 8d0da9d + ddc6899 commit 4a6b74b

File tree

45 files changed

+1960
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1960
-454
lines changed

.github/workflows/ci_master.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- 'v[0-9]+.[0-9]+.[0-9]+'
78

89
jobs:
910
test:

README.md

+37-19
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
# SSLClient Arduino Library (Version 1.1.10)
1+
# SSLClient Arduino Library (Version 1.2.0)
2+
3+
#### Available on PlatformIO registry as digitaldragon/[email protected]
24
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/digitaldragon/library/SSLClient.svg)](https://registry.platformio.org/libraries/digitaldragon/SSLClient)
35

4-
![arduino-library-badge](https://www.ardu-badge.com/badge/GovoroxSSLClient.svg)
6+
#### Available on Arduino Libraries registry to digitaldragon/[email protected]
7+
[![arduino-library-badge](https://www.ardu-badge.com/badge/GovoroxSSLClient.svg)](https://www.ardu-badge.com/badge/GovoroxSSLClient.svg)
58

6-
#### Available on PlatformIO registry as digitaldragon/[email protected]
7-
#### Available on Arduino Libraries registry to digitaldragon/[email protected]
9+
## 🚀 Overview
10+
SSLClient extends the ESP32/Arduino ecosystem to secure communication via TLS, providing a transparent SSL/TLS layer over any **Client** class instance. Leverages *mbedtls* for robust, efficient cryptographic operations, initially tailored for ESP32 but adaptable across platforms.
811

9-
## Overview - SSLClient Arduino library using *mbedtls* functions
10-
The SSLClient class implements support for secure connections using TLS (SSL). It Provides a transparent SSL wrapper over existing transport object of a **Client** class.
1112
Based on the [WiFiClientSecure](https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFiClientSecure) for Arduino/ESP32.
12-
Designed and tested on ESP32, but should be portable to other platforms.
1313

14-
The SSLClient library offers a simple way to add SSL/TLS encryption to your Arduino/ESP32 projects. Utilizing mbedtls functions, it provides a transparent SSL wrapper for the Client class. Originally designed for ESP32, it's adaptable for other platforms.
14+
## 🌟 What's New in 1.2.0
15+
**ALPN Support**: Application Layer Protocol Negotiation for efficient server communication.
16+
**Cert Bundles**: Simplifies management and use of multiple CA certificates.
17+
**Bug Fix**: Corrects byte calculation for record expansion post-handshake.
18+
**More Examples**: Examples for the ESP32 PlatformIO for ALPN protocols, AWS, and using certificate bundles.
1519

16-
## Features
17-
Secure TLS communication.
18-
Based on mbedtls.
19-
Compatible with Arduino/ESP32 and potentially other platforms.
20-
Suitable for IoT applications, including AWS IoT.
20+
## Features
21+
- Secure TLS communication.
22+
- Based on mbedtls.
23+
- Compatible with Arduino/ESP32 and potentially other platforms.
24+
- Suitable for IoT applications, including AWS IoT.
2125

22-
## Installation
26+
## 🔧 Installation
2327
Install via the Arduino Library Manager or PlatformIO:
2428

2529
Arduino IDE: Search for "SSLClient".
26-
PlatformIO: Add `digitaldragon/SSLClient@^1.1.10` to platformio.ini.
30+
PlatformIO: Add `digitaldragon/SSLClient@^1.2.0` to platformio.ini.
2731

28-
## Usage
32+
## 🛠 Usage
2933
### Basic Connection
3034
```cpp
3135
#include <SSLClient.h>
@@ -53,7 +57,7 @@ secure.setPrivateKey(AWS_CERT_PRIVATE);
5357
MQTTClient mqtt = MQTTClient(256);
5458
mqtt.begin(AWS_IOT_ENDPOINT, 8883, secure);
5559
```
56-
### Application Notes
60+
### 📚 Application Notes
5761
The `SSLClient.cpp` file provides a comprehensive suite of functions for handling SSL/TLS connections in an Arduino environment, particularly for the ESP32. These functions can be categorized into several key areas of functionality, which are essential for understanding the library's capabilities. Here's a user guide to the functionality based on the documentation blocks of these functions:
5862

5963
### Error Handling
@@ -101,5 +105,19 @@ The `SSLClient.cpp` file provides a comprehensive suite of functions for handlin
101105

102106
This user guide provides a comprehensive overview of each function, offering insights into how to use the SSLClient library effectively for secure communication in Arduino-based projects. Each function is designed to handle specific aspects of SSL/TLS communication, from establishing connections and handling data transmission to managing certificates and ensuring security.
103107

104-
## License
105-
The library is released under GNU General Public Licence. See the LICENSE file for more details.
108+
## 📄 License
109+
The library is released under GNU General Public Licence. See the LICENSE file for more details.
110+
111+
## 📶 Handy CSQ / RSSI / Signal Strength Mapping
112+
| CSQ Value | RSSI (dBm) | Description |
113+
|-----------|---------------------|------------------|
114+
| 0 | -113 dBm or less | No signal |
115+
| 1-2 | -111 dBm to -109 dBm| Very poor signal |
116+
| 3-9 | -107 dBm to -93 dBm | Poor signal |
117+
| 10-14 | -91 dBm to -83 dBm | Fair signal |
118+
| 15-19 | -81 dBm to -73 dBm | Good signal |
119+
| 20-30 | -71 dBm to -53 dBm | Very good signal |
120+
| 31 | -51 dBm or more | Excellent signal |
121+
122+
## 🖥 Contributing
123+
Contributions are welcome! Please fork the repository and submit pull requests with your enhancements.
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
//Azure Baltimore Certificate
2-
const char root_ca[] PROGMEM =
3-
"-----BEGIN CERTIFICATE-----\r\n"
4-
"MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ\r\n"
5-
"RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD\r\n"
6-
"VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX\r\n"
7-
"DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y\r\n"
8-
"ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy\r\n"
9-
"VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr\r\n"
10-
"mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr\r\n"
11-
"IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK\r\n"
12-
"mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu\r\n"
13-
"XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy\r\n"
14-
"dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye\r\n"
15-
"jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1\r\n"
16-
"BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3\r\n"
17-
"DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92\r\n"
18-
"9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx\r\n"
19-
"jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0\r\n"
20-
"Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz\r\n"
21-
"ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS\r\n"
22-
"R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\r\n"
23-
"-----END CERTIFICATE-----\r\n";
24-
25-
26-
27-
//Client Certificate (from Azure Iot Hub Device) - Get your own
28-
const char client_cert_pem_start[] =
29-
"-----BEGIN CERTIFICATE-----""\n"
30-
"MIIFfDCCA2SgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAqMSgwJgYDVQQDDB9BenVy""\n"
31-
...
32-
"+sDPud5VrLd8jOWCAKcuZA==""\n"
33-
"-----END CERTIFICATE-----";
34-
35-
//Client Key (from Azure Iot Hub Device) - Get your own
36-
const char client_key_pem_start[] =
37-
"-----BEGIN RSA PRIVATE KEY-----""\n"
38-
"MIIJKAIBAAKCAgEAwUG+ZPQp4ZRlvI7xPQYDHkLs5dTX0LTB0tUr3O7LSwc4PPf3""\n"
39-
...
40-
"63IPOMRIsakwx3hdRv9gh30bh6LVS6pn9UyHM65pNVsCu4OHB/B4dSiiceM=""\n"
41-
"-----END RSA PRIVATE KEY-----";
1+
//Azure Baltimore Certificate
2+
const char root_ca[] PROGMEM =
3+
"-----BEGIN CERTIFICATE-----\r\n"
4+
"MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ\r\n"
5+
"RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD\r\n"
6+
"VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX\r\n"
7+
"DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y\r\n"
8+
"ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy\r\n"
9+
"VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr\r\n"
10+
"mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr\r\n"
11+
"IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK\r\n"
12+
"mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu\r\n"
13+
"XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy\r\n"
14+
"dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye\r\n"
15+
"jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1\r\n"
16+
"BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3\r\n"
17+
"DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92\r\n"
18+
"9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx\r\n"
19+
"jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0\r\n"
20+
"Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz\r\n"
21+
"ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS\r\n"
22+
"R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\r\n"
23+
"-----END CERTIFICATE-----\r\n";
24+
25+
26+
27+
//Client Certificate (from Azure Iot Hub Device) - Get your own
28+
const char client_cert_pem_start[] =
29+
"-----BEGIN CERTIFICATE-----""\n"
30+
"MIIFfDCCA2SgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAqMSgwJgYDVQQDDB9BenVy""\n"
31+
...
32+
"+sDPud5VrLd8jOWCAKcuZA==""\n"
33+
"-----END CERTIFICATE-----";
34+
35+
//Client Key (from Azure Iot Hub Device) - Get your own
36+
const char client_key_pem_start[] =
37+
"-----BEGIN RSA PRIVATE KEY-----""\n"
38+
"MIIJKAIBAAKCAgEAwUG+ZPQp4ZRlvI7xPQYDHkLs5dTX0LTB0tUr3O7LSwc4PPf3""\n"
39+
...
40+
"63IPOMRIsakwx3hdRv9gh30bh6LVS6pn9UyHM65pNVsCu4OHB/B4dSiiceM=""\n"
41+
"-----END RSA PRIVATE KEY-----";

0 commit comments

Comments
 (0)