Browse Source

HTTPS disabled by default

fastled
Xose Pérez 7 years ago
parent
commit
a7c2a6b197
11 changed files with 88 additions and 152 deletions
  1. +4
    -0
      code/espurna/config/general.h
  2. +0
    -16
      code/espurna/data/espurna.crt
  3. +0
    -15
      code/espurna/data/espurna.key
  4. BIN
      code/espurna/data/server.cer
  5. BIN
      code/espurna/data/server.key
  6. +0
    -51
      code/espurna/static/espurna.crt.h
  7. +0
    -48
      code/espurna/static/espurna.key.h
  8. +33
    -0
      code/espurna/static/server.cer.h
  9. +34
    -0
      code/espurna/static/server.key.h
  10. +15
    -16
      code/espurna/web.ino
  11. +2
    -6
      code/gulpfile.js

+ 4
- 0
code/espurna/config/general.h View File

@ -188,6 +188,10 @@ PROGMEM const char* const custom_reset_string[] = {
#define DNS_PORT 53 // MDNS port #define DNS_PORT 53 // MDNS port
#define ENABLE_MDNS 1 // Enabled MDNS #define ENABLE_MDNS 1 // Enabled MDNS
// This is not working at the moment
// Requires ASYNC_TCP_SSL_ENABLED to 1
#define WEB_USE_SSL 0 // Use HTTPS web interface
#define WEB_MODE_NORMAL 0 #define WEB_MODE_NORMAL 0
#define WEB_MODE_PASSWORD 1 #define WEB_MODE_PASSWORD 1


+ 0
- 16
code/espurna/data/espurna.crt View File

@ -1,16 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICizCCAfQCCQDK3ZR2CA3GhzANBgkqhkiG9w0BAQsFADCBiTELMAkGA1UEBhMC
RVMxEjAQBgNVBAgMCUJhcmNlbG9uYTEYMBYGA1UEBwwPU2FudCBQb2wgZGUgTWFy
MRIwEAYDVQQKDAlUaW5rZXJtYW4xEzARBgNVBAMMClhvc2UgUGVyZXoxIzAhBgkq
hkiG9w0BCQEWFHhvc2UucGVyZXpAZ21haWwuY29tMB4XDTE3MDgxMzE1MjgwNVoX
DTE4MDgxMzE1MjgwNVowgYkxCzAJBgNVBAYTAkVTMRIwEAYDVQQIDAlCYXJjZWxv
bmExGDAWBgNVBAcMD1NhbnQgUG9sIGRlIE1hcjESMBAGA1UECgwJVGlua2VybWFu
MRMwEQYDVQQDDApYb3NlIFBlcmV6MSMwIQYJKoZIhvcNAQkBFhR4b3NlLnBlcmV6
QGdtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4IxsrqUgCoHW
PJ+mPAbDLCsuuTWPRNTAxNLx9nH0klaX3JyYbGDFS9myIi7GBiDpuaRv3+L99Jql
Qx8TW215DePu+nju1kiNvWfqn4N5iUrnbIYitsFsC4fxdZ2E2w+UDvT4Hj2d5cWe
Uqtm4UIhjtdQzWYUXrMdDM9pBnsIFhECAwEAATANBgkqhkiG9w0BAQsFAAOBgQBS
wEJrsjbGGnRmCNV9Jc3DSXTbfhX9MCRIIe6hcDVsnhgJvG/KdnSJkPTYE9GUybvG
+BYfEyJ7dpjOIXHY+xTvXL6/Kq1uykiIIwlI7a9jw40icUtGoZWJ2puDgwYJfojp
sTA9QDvoAry3qOfeOorGBkjddlPOv0htZUn0AxI/fw==
-----END CERTIFICATE-----

+ 0
- 15
code/espurna/data/espurna.key View File

@ -1,15 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDgjGyupSAKgdY8n6Y8BsMsKy65NY9E1MDE0vH2cfSSVpfcnJhs
YMVL2bIiLsYGIOm5pG/f4v30mqVDHxNbbXkN4+76eO7WSI29Z+qfg3mJSudshiK2
wWwLh/F1nYTbD5QO9PgePZ3lxZ5Sq2bhQiGO11DNZhResx0Mz2kGewgWEQIDAQAB
AoGAJ4oSiR4iajc6lio2h1NZgqmH7Kz1sVUVLJNIb/DY8/uzefFJFaxkkVqf90zt
KZ8aCMpfuLirpyqj9xG9wtef/PGcnzHSsBtd0hsmlvOgXnPKFlHkmQMcvL5qylHS
QjO6GAKOJbQI0wZBj7IPJeP1qkK8j/ZIn/1mlmUC+FijgAECQQD8nBCCnOfd/RD4
44oKbzwu20AD7ErUBm66feWXeIcYm0naH5zieNFxRtMXbT35A2HCgy5+c7jNV0M6
BN/pKIwRAkEA44/yElGIl4LMW1AnnUJV5As9XmNByONaW+GT014kF7VWWXHVVusR
VTdVQorPI/KlkwKf0VeRnv5noRLtnFjqAQJARapcu0i+gXA7cAiAl2QZ+uooe2x9
LoAfpXr3CJEK4PRip680OxkK2eyoZruP7c7K9TPsbJ9Jhgfc2HFjtw+hoQJAcfFO
hUub+Dk+9+3fmAdyGFhkZxGOC/eC9AS0Tx6RNenPjcPIzdev+xpUr5fvdhF2RHEI
8vpE6PZ7jxR6M1H2AQJBAKLY+DN2D0b0hvp4nFxiAEVB2p8A0XlfYKB/rl/Zz/LU
auUmeMJ1mViN59wl74DNduH0qSYGsMwkUwmHCOJTkk8=
-----END RSA PRIVATE KEY-----

BIN
code/espurna/data/server.cer View File


BIN
code/espurna/data/server.key View File


+ 0
- 51
code/espurna/static/espurna.crt.h View File

@ -1,51 +0,0 @@
#define espurna_crt_len 944
const uint8_t espurna_crt[] PROGMEM = {
0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x43,0x45,0x52,0x54,0x49,0x46,0x49,0x43,0x41,
0x54,0x45,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x43,0x69,0x7a,0x43,0x43,0x41,0x66,0x51,0x43,
0x43,0x51,0x44,0x4b,0x33,0x5a,0x52,0x32,0x43,0x41,0x33,0x47,0x68,0x7a,0x41,0x4e,0x42,0x67,0x6b,0x71,
0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x73,0x46,0x41,0x44,0x43,0x42,0x69,0x54,0x45,0x4c,
0x4d,0x41,0x6b,0x47,0x41,0x31,0x55,0x45,0x42,0x68,0x4d,0x43,0x0a,0x52,0x56,0x4d,0x78,0x45,0x6a,0x41,
0x51,0x42,0x67,0x4e,0x56,0x42,0x41,0x67,0x4d,0x43,0x55,0x4a,0x68,0x63,0x6d,0x4e,0x6c,0x62,0x47,0x39,
0x75,0x59,0x54,0x45,0x59,0x4d,0x42,0x59,0x47,0x41,0x31,0x55,0x45,0x42,0x77,0x77,0x50,0x55,0x32,0x46,
0x75,0x64,0x43,0x42,0x51,0x62,0x32,0x77,0x67,0x5a,0x47,0x55,0x67,0x54,0x57,0x46,0x79,0x0a,0x4d,0x52,
0x49,0x77,0x45,0x41,0x59,0x44,0x56,0x51,0x51,0x4b,0x44,0x41,0x6c,0x55,0x61,0x57,0x35,0x72,0x5a,0x58,
0x4a,0x74,0x59,0x57,0x34,0x78,0x45,0x7a,0x41,0x52,0x42,0x67,0x4e,0x56,0x42,0x41,0x4d,0x4d,0x43,0x6c,
0x68,0x76,0x63,0x32,0x55,0x67,0x55,0x47,0x56,0x79,0x5a,0x58,0x6f,0x78,0x49,0x7a,0x41,0x68,0x42,0x67,
0x6b,0x71,0x0a,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42,0x43,0x51,0x45,0x57,0x46,0x48,0x68,0x76,0x63,
0x32,0x55,0x75,0x63,0x47,0x56,0x79,0x5a,0x58,0x70,0x41,0x5a,0x32,0x31,0x68,0x61,0x57,0x77,0x75,0x59,
0x32,0x39,0x74,0x4d,0x42,0x34,0x58,0x44,0x54,0x45,0x33,0x4d,0x44,0x67,0x78,0x4d,0x7a,0x45,0x31,0x4d,
0x6a,0x67,0x77,0x4e,0x56,0x6f,0x58,0x0a,0x44,0x54,0x45,0x34,0x4d,0x44,0x67,0x78,0x4d,0x7a,0x45,0x31,
0x4d,0x6a,0x67,0x77,0x4e,0x56,0x6f,0x77,0x67,0x59,0x6b,0x78,0x43,0x7a,0x41,0x4a,0x42,0x67,0x4e,0x56,
0x42,0x41,0x59,0x54,0x41,0x6b,0x56,0x54,0x4d,0x52,0x49,0x77,0x45,0x41,0x59,0x44,0x56,0x51,0x51,0x49,
0x44,0x41,0x6c,0x43,0x59,0x58,0x4a,0x6a,0x5a,0x57,0x78,0x76,0x0a,0x62,0x6d,0x45,0x78,0x47,0x44,0x41,
0x57,0x42,0x67,0x4e,0x56,0x42,0x41,0x63,0x4d,0x44,0x31,0x4e,0x68,0x62,0x6e,0x51,0x67,0x55,0x47,0x39,
0x73,0x49,0x47,0x52,0x6c,0x49,0x45,0x31,0x68,0x63,0x6a,0x45,0x53,0x4d,0x42,0x41,0x47,0x41,0x31,0x55,
0x45,0x43,0x67,0x77,0x4a,0x56,0x47,0x6c,0x75,0x61,0x32,0x56,0x79,0x62,0x57,0x46,0x75,0x0a,0x4d,0x52,
0x4d,0x77,0x45,0x51,0x59,0x44,0x56,0x51,0x51,0x44,0x44,0x41,0x70,0x59,0x62,0x33,0x4e,0x6c,0x49,0x46,
0x42,0x6c,0x63,0x6d,0x56,0x36,0x4d,0x53,0x4d,0x77,0x49,0x51,0x59,0x4a,0x4b,0x6f,0x5a,0x49,0x68,0x76,
0x63,0x4e,0x41,0x51,0x6b,0x42,0x46,0x68,0x52,0x34,0x62,0x33,0x4e,0x6c,0x4c,0x6e,0x42,0x6c,0x63,0x6d,
0x56,0x36,0x0a,0x51,0x47,0x64,0x74,0x59,0x57,0x6c,0x73,0x4c,0x6d,0x4e,0x76,0x62,0x54,0x43,0x42,0x6e,
0x7a,0x41,0x4e,0x42,0x67,0x6b,0x71,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x45,0x46,0x41,
0x41,0x4f,0x42,0x6a,0x51,0x41,0x77,0x67,0x59,0x6b,0x43,0x67,0x59,0x45,0x41,0x34,0x49,0x78,0x73,0x72,
0x71,0x55,0x67,0x43,0x6f,0x48,0x57,0x0a,0x50,0x4a,0x2b,0x6d,0x50,0x41,0x62,0x44,0x4c,0x43,0x73,0x75,
0x75,0x54,0x57,0x50,0x52,0x4e,0x54,0x41,0x78,0x4e,0x4c,0x78,0x39,0x6e,0x48,0x30,0x6b,0x6c,0x61,0x58,
0x33,0x4a,0x79,0x59,0x62,0x47,0x44,0x46,0x53,0x39,0x6d,0x79,0x49,0x69,0x37,0x47,0x42,0x69,0x44,0x70,
0x75,0x61,0x52,0x76,0x33,0x2b,0x4c,0x39,0x39,0x4a,0x71,0x6c,0x0a,0x51,0x78,0x38,0x54,0x57,0x32,0x31,
0x35,0x44,0x65,0x50,0x75,0x2b,0x6e,0x6a,0x75,0x31,0x6b,0x69,0x4e,0x76,0x57,0x66,0x71,0x6e,0x34,0x4e,
0x35,0x69,0x55,0x72,0x6e,0x62,0x49,0x59,0x69,0x74,0x73,0x46,0x73,0x43,0x34,0x66,0x78,0x64,0x5a,0x32,
0x45,0x32,0x77,0x2b,0x55,0x44,0x76,0x54,0x34,0x48,0x6a,0x32,0x64,0x35,0x63,0x57,0x65,0x0a,0x55,0x71,
0x74,0x6d,0x34,0x55,0x49,0x68,0x6a,0x74,0x64,0x51,0x7a,0x57,0x59,0x55,0x58,0x72,0x4d,0x64,0x44,0x4d,
0x39,0x70,0x42,0x6e,0x73,0x49,0x46,0x68,0x45,0x43,0x41,0x77,0x45,0x41,0x41,0x54,0x41,0x4e,0x42,0x67,
0x6b,0x71,0x68,0x6b,0x69,0x47,0x39,0x77,0x30,0x42,0x41,0x51,0x73,0x46,0x41,0x41,0x4f,0x42,0x67,0x51,
0x42,0x53,0x0a,0x77,0x45,0x4a,0x72,0x73,0x6a,0x62,0x47,0x47,0x6e,0x52,0x6d,0x43,0x4e,0x56,0x39,0x4a,
0x63,0x33,0x44,0x53,0x58,0x54,0x62,0x66,0x68,0x58,0x39,0x4d,0x43,0x52,0x49,0x49,0x65,0x36,0x68,0x63,
0x44,0x56,0x73,0x6e,0x68,0x67,0x4a,0x76,0x47,0x2f,0x4b,0x64,0x6e,0x53,0x4a,0x6b,0x50,0x54,0x59,0x45,
0x39,0x47,0x55,0x79,0x62,0x76,0x47,0x0a,0x2b,0x42,0x59,0x66,0x45,0x79,0x4a,0x37,0x64,0x70,0x6a,0x4f,
0x49,0x58,0x48,0x59,0x2b,0x78,0x54,0x76,0x58,0x4c,0x36,0x2f,0x4b,0x71,0x31,0x75,0x79,0x6b,0x69,0x49,
0x49,0x77,0x6c,0x49,0x37,0x61,0x39,0x6a,0x77,0x34,0x30,0x69,0x63,0x55,0x74,0x47,0x6f,0x5a,0x57,0x4a,
0x32,0x70,0x75,0x44,0x67,0x77,0x59,0x4a,0x66,0x6f,0x6a,0x70,0x0a,0x73,0x54,0x41,0x39,0x51,0x44,0x76,
0x6f,0x41,0x72,0x79,0x33,0x71,0x4f,0x66,0x65,0x4f,0x6f,0x72,0x47,0x42,0x6b,0x6a,0x64,0x64,0x6c,0x50,
0x4f,0x76,0x30,0x68,0x74,0x5a,0x55,0x6e,0x30,0x41,0x78,0x49,0x2f,0x66,0x77,0x3d,0x3d,0x0a,0x2d,0x2d,
0x2d,0x2d,0x2d,0x45,0x4e,0x44,0x20,0x43,0x45,0x52,0x54,0x49,0x46,0x49,0x43,0x41,0x54,0x45,0x2d,0x2d,
0x2d,0x2d,0x2d,0x0a
};

+ 0
- 48
code/espurna/static/espurna.key.h View File

@ -1,48 +0,0 @@
#define espurna_key_len 887
const uint8_t espurna_key[] PROGMEM = {
0x2d,0x2d,0x2d,0x2d,0x2d,0x42,0x45,0x47,0x49,0x4e,0x20,0x52,0x53,0x41,0x20,0x50,0x52,0x49,0x56,0x41,
0x54,0x45,0x20,0x4b,0x45,0x59,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a,0x4d,0x49,0x49,0x43,0x58,0x41,0x49,0x42,
0x41,0x41,0x4b,0x42,0x67,0x51,0x44,0x67,0x6a,0x47,0x79,0x75,0x70,0x53,0x41,0x4b,0x67,0x64,0x59,0x38,
0x6e,0x36,0x59,0x38,0x42,0x73,0x4d,0x73,0x4b,0x79,0x36,0x35,0x4e,0x59,0x39,0x45,0x31,0x4d,0x44,0x45,
0x30,0x76,0x48,0x32,0x63,0x66,0x53,0x53,0x56,0x70,0x66,0x63,0x6e,0x4a,0x68,0x73,0x0a,0x59,0x4d,0x56,
0x4c,0x32,0x62,0x49,0x69,0x4c,0x73,0x59,0x47,0x49,0x4f,0x6d,0x35,0x70,0x47,0x2f,0x66,0x34,0x76,0x33,
0x30,0x6d,0x71,0x56,0x44,0x48,0x78,0x4e,0x62,0x62,0x58,0x6b,0x4e,0x34,0x2b,0x37,0x36,0x65,0x4f,0x37,
0x57,0x53,0x49,0x32,0x39,0x5a,0x2b,0x71,0x66,0x67,0x33,0x6d,0x4a,0x53,0x75,0x64,0x73,0x68,0x69,0x4b,
0x32,0x0a,0x77,0x57,0x77,0x4c,0x68,0x2f,0x46,0x31,0x6e,0x59,0x54,0x62,0x44,0x35,0x51,0x4f,0x39,0x50,
0x67,0x65,0x50,0x5a,0x33,0x6c,0x78,0x5a,0x35,0x53,0x71,0x32,0x62,0x68,0x51,0x69,0x47,0x4f,0x31,0x31,
0x44,0x4e,0x5a,0x68,0x52,0x65,0x73,0x78,0x30,0x4d,0x7a,0x32,0x6b,0x47,0x65,0x77,0x67,0x57,0x45,0x51,
0x49,0x44,0x41,0x51,0x41,0x42,0x0a,0x41,0x6f,0x47,0x41,0x4a,0x34,0x6f,0x53,0x69,0x52,0x34,0x69,0x61,
0x6a,0x63,0x36,0x6c,0x69,0x6f,0x32,0x68,0x31,0x4e,0x5a,0x67,0x71,0x6d,0x48,0x37,0x4b,0x7a,0x31,0x73,
0x56,0x55,0x56,0x4c,0x4a,0x4e,0x49,0x62,0x2f,0x44,0x59,0x38,0x2f,0x75,0x7a,0x65,0x66,0x46,0x4a,0x46,
0x61,0x78,0x6b,0x6b,0x56,0x71,0x66,0x39,0x30,0x7a,0x74,0x0a,0x4b,0x5a,0x38,0x61,0x43,0x4d,0x70,0x66,
0x75,0x4c,0x69,0x72,0x70,0x79,0x71,0x6a,0x39,0x78,0x47,0x39,0x77,0x74,0x65,0x66,0x2f,0x50,0x47,0x63,
0x6e,0x7a,0x48,0x53,0x73,0x42,0x74,0x64,0x30,0x68,0x73,0x6d,0x6c,0x76,0x4f,0x67,0x58,0x6e,0x50,0x4b,
0x46,0x6c,0x48,0x6b,0x6d,0x51,0x4d,0x63,0x76,0x4c,0x35,0x71,0x79,0x6c,0x48,0x53,0x0a,0x51,0x6a,0x4f,
0x36,0x47,0x41,0x4b,0x4f,0x4a,0x62,0x51,0x49,0x30,0x77,0x5a,0x42,0x6a,0x37,0x49,0x50,0x4a,0x65,0x50,
0x31,0x71,0x6b,0x4b,0x38,0x6a,0x2f,0x5a,0x49,0x6e,0x2f,0x31,0x6d,0x6c,0x6d,0x55,0x43,0x2b,0x46,0x69,
0x6a,0x67,0x41,0x45,0x43,0x51,0x51,0x44,0x38,0x6e,0x42,0x43,0x43,0x6e,0x4f,0x66,0x64,0x2f,0x52,0x44,
0x34,0x0a,0x34,0x34,0x6f,0x4b,0x62,0x7a,0x77,0x75,0x32,0x30,0x41,0x44,0x37,0x45,0x72,0x55,0x42,0x6d,
0x36,0x36,0x66,0x65,0x57,0x58,0x65,0x49,0x63,0x59,0x6d,0x30,0x6e,0x61,0x48,0x35,0x7a,0x69,0x65,0x4e,
0x46,0x78,0x52,0x74,0x4d,0x58,0x62,0x54,0x33,0x35,0x41,0x32,0x48,0x43,0x67,0x79,0x35,0x2b,0x63,0x37,
0x6a,0x4e,0x56,0x30,0x4d,0x36,0x0a,0x42,0x4e,0x2f,0x70,0x4b,0x49,0x77,0x52,0x41,0x6b,0x45,0x41,0x34,
0x34,0x2f,0x79,0x45,0x6c,0x47,0x49,0x6c,0x34,0x4c,0x4d,0x57,0x31,0x41,0x6e,0x6e,0x55,0x4a,0x56,0x35,
0x41,0x73,0x39,0x58,0x6d,0x4e,0x42,0x79,0x4f,0x4e,0x61,0x57,0x2b,0x47,0x54,0x30,0x31,0x34,0x6b,0x46,
0x37,0x56,0x57,0x57,0x58,0x48,0x56,0x56,0x75,0x73,0x52,0x0a,0x56,0x54,0x64,0x56,0x51,0x6f,0x72,0x50,
0x49,0x2f,0x4b,0x6c,0x6b,0x77,0x4b,0x66,0x30,0x56,0x65,0x52,0x6e,0x76,0x35,0x6e,0x6f,0x52,0x4c,0x74,
0x6e,0x46,0x6a,0x71,0x41,0x51,0x4a,0x41,0x52,0x61,0x70,0x63,0x75,0x30,0x69,0x2b,0x67,0x58,0x41,0x37,
0x63,0x41,0x69,0x41,0x6c,0x32,0x51,0x5a,0x2b,0x75,0x6f,0x6f,0x65,0x32,0x78,0x39,0x0a,0x4c,0x6f,0x41,
0x66,0x70,0x58,0x72,0x33,0x43,0x4a,0x45,0x4b,0x34,0x50,0x52,0x69,0x70,0x36,0x38,0x30,0x4f,0x78,0x6b,
0x4b,0x32,0x65,0x79,0x6f,0x5a,0x72,0x75,0x50,0x37,0x63,0x37,0x4b,0x39,0x54,0x50,0x73,0x62,0x4a,0x39,
0x4a,0x68,0x67,0x66,0x63,0x32,0x48,0x46,0x6a,0x74,0x77,0x2b,0x68,0x6f,0x51,0x4a,0x41,0x63,0x66,0x46,
0x4f,0x0a,0x68,0x55,0x75,0x62,0x2b,0x44,0x6b,0x2b,0x39,0x2b,0x33,0x66,0x6d,0x41,0x64,0x79,0x47,0x46,
0x68,0x6b,0x5a,0x78,0x47,0x4f,0x43,0x2f,0x65,0x43,0x39,0x41,0x53,0x30,0x54,0x78,0x36,0x52,0x4e,0x65,
0x6e,0x50,0x6a,0x63,0x50,0x49,0x7a,0x64,0x65,0x76,0x2b,0x78,0x70,0x55,0x72,0x35,0x66,0x76,0x64,0x68,
0x46,0x32,0x52,0x48,0x45,0x49,0x0a,0x38,0x76,0x70,0x45,0x36,0x50,0x5a,0x37,0x6a,0x78,0x52,0x36,0x4d,
0x31,0x48,0x32,0x41,0x51,0x4a,0x42,0x41,0x4b,0x4c,0x59,0x2b,0x44,0x4e,0x32,0x44,0x30,0x62,0x30,0x68,
0x76,0x70,0x34,0x6e,0x46,0x78,0x69,0x41,0x45,0x56,0x42,0x32,0x70,0x38,0x41,0x30,0x58,0x6c,0x66,0x59,
0x4b,0x42,0x2f,0x72,0x6c,0x2f,0x5a,0x7a,0x2f,0x4c,0x55,0x0a,0x61,0x75,0x55,0x6d,0x65,0x4d,0x4a,0x31,
0x6d,0x56,0x69,0x4e,0x35,0x39,0x77,0x6c,0x37,0x34,0x44,0x4e,0x64,0x75,0x48,0x30,0x71,0x53,0x59,0x47,
0x73,0x4d,0x77,0x6b,0x55,0x77,0x6d,0x48,0x43,0x4f,0x4a,0x54,0x6b,0x6b,0x38,0x3d,0x0a,0x2d,0x2d,0x2d,
0x2d,0x2d,0x45,0x4e,0x44,0x20,0x52,0x53,0x41,0x20,0x50,0x52,0x49,0x56,0x41,0x54,0x45,0x20,0x4b,0x45,
0x59,0x2d,0x2d,0x2d,0x2d,0x2d,0x0a
};

+ 33
- 0
code/espurna/static/server.cer.h View File

@ -0,0 +1,33 @@
#define server_cer_len 587
const uint8_t server_cer[] PROGMEM = {
0x30,0x82,0x02,0x47,0x30,0x82,0x01,0x2f,0x02,0x09,0x00,0x93,0x02,0xa1,0xb1,0x98,0xba,0x76,0x43,0x30,
0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x1c,0x31,0x1a,0x30,0x18,
0x06,0x03,0x55,0x04,0x0a,0x0c,0x11,0x45,0x73,0x70,0x72,0x65,0x73,0x73,0x69,0x66,0x20,0x53,0x79,0x73,
0x74,0x65,0x6d,0x73,0x30,0x1e,0x17,0x0d,0x31,0x36,0x30,0x38,0x32,0x34,0x32,0x31,0x34,0x37,0x33,0x38,
0x5a,0x17,0x0d,0x33,0x30,0x30,0x35,0x30,0x33,0x32,0x31,0x34,0x37,0x33,0x38,0x5a,0x30,0x33,0x31,0x19,
0x30,0x17,0x06,0x03,0x55,0x04,0x0a,0x0c,0x10,0x61,0x78,0x54,0x4c,0x53,0x20,0x6f,0x6e,0x20,0x45,0x53,
0x50,0x38,0x32,0x36,0x36,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x03,0x0c,0x0d,0x65,0x73,0x70,0x38,
0x32,0x36,0x36,0x2e,0x6c,0x6f,0x63,0x61,0x6c,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb4,0x8e,
0x39,0xec,0xc3,0x1e,0x89,0xa6,0xce,0xa6,0x40,0xc8,0x5e,0x67,0x77,0xf6,0x6e,0xbf,0x69,0x4f,0xfc,0x76,
0xab,0xbb,0x76,0xc0,0x9e,0x8b,0x05,0x6f,0x38,0x30,0xe0,0xca,0xd9,0x13,0x14,0xf0,0xe4,0x53,0xd2,0xa5,
0x33,0x53,0xb9,0x69,0xc9,0x71,0x55,0x53,0xb9,0xb4,0x3f,0x09,0x2f,0x8c,0x07,0xdf,0xd3,0x18,0xfd,0xbe,
0x5e,0x4d,0xcf,0xc8,0x42,0x35,0x8f,0x2b,0x89,0x3e,0xec,0x1f,0xb7,0x81,0x09,0xba,0x79,0x60,0x6a,0xb0,
0xc4,0x65,0xdb,0x45,0x60,0xe8,0xfe,0xeb,0x65,0x04,0xeb,0x57,0x14,0x76,0x91,0x65,0x43,0x2f,0x55,0xdb,
0xd4,0x50,0x62,0xbc,0x79,0x1d,0x21,0x89,0xa2,0xc3,0xae,0xc7,0x89,0x7b,0x01,0xc2,0xc5,0x8f,0xf6,0xcc,
0xd7,0xe4,0x68,0x5a,0x37,0x21,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x02,0x7e,0x98,0x36,0x19,0x6a,0xea,0xdf,0xf2,
0xfa,0x3a,0x5f,0x7d,0x82,0x2b,0xb5,0x6c,0x01,0xd9,0x38,0x2b,0x7e,0xb6,0xc8,0x6a,0x9d,0x03,0x9e,0x13,
0x3d,0x3f,0xd4,0x84,0x3f,0x20,0x1b,0xd0,0x3f,0x4f,0xf5,0x33,0x19,0xfe,0x5f,0xfa,0x87,0x67,0x13,0x7e,
0x63,0xca,0xbb,0x18,0x73,0x14,0x4a,0x9b,0x8a,0x17,0x29,0x7e,0x70,0xcd,0x2e,0xd5,0xbc,0xd1,0xc6,0xd9,
0x02,0xa6,0xd0,0x7b,0x97,0x0a,0x04,0xc8,0x07,0x4f,0x8c,0x2e,0x91,0x12,0xfe,0x62,0xab,0xf9,0x45,0x2d,
0xc3,0x7b,0x77,0x84,0x41,0xfa,0x88,0x2d,0xc1,0xd9,0x8b,0xc2,0x9b,0x00,0x14,0xe8,0xa6,0xcc,0x2d,0xc1,
0x06,0xad,0x02,0x11,0x7b,0xcd,0xe0,0x94,0xe9,0x9c,0xa7,0x87,0xf7,0xac,0x60,0x24,0x4e,0xe2,0xe9,0xc8,
0x6e,0x6a,0x4c,0xf9,0xed,0x86,0x2c,0x71,0xd2,0xa3,0xec,0xd7,0xdc,0xdb,0x9b,0x61,0x5d,0x7a,0x88,0x03,
0x73,0xfb,0xf3,0x4f,0xfa,0x07,0xea,0xe4,0x62,0x98,0x90,0x89,0xed,0x7d,0x61,0x45,0xd9,0xd2,0xc8,0x5f,
0x01,0x6c,0xa5,0xf2,0xaa,0xdb,0xaf,0xa5,0xf3,0x04,0x45,0x6d,0xe4,0xdf,0xfa,0x46,0x6f,0xdc,0xf4,0xc6,
0xfe,0x7f,0x3a,0x9b,0x06,0xa9,0xbf,0x30,0xdf,0x04,0xb6,0xfe,0x0b,0x4a,0x14,0x61,0xc1,0x80,0x68,0x06,
0x5b,0x5a,0xe4,0x4f,0x01,0xb1,0x73,0xa1,0x55,0x9b,0xde,0x44,0x4b,0x4d,0xf7,0x0e,0xdd,0x8c,0x88,0x67,
0x71,0x68,0x6f,0x78,0x07,0x13,0x04,0x45,0xe3,0xc3,0x80,0x34,0x30,0x11,0x95,0x74,0x1f,0xfe,0x60,0xc0,
0x28,0x9b,0x9a,0x43,0xbd,0xc5,0xa8
};

+ 34
- 0
code/espurna/static/server.key.h View File

@ -0,0 +1,34 @@
#define server_key_len 611
const uint8_t server_key[] PROGMEM = {
0x30,0x82,0x02,0x5f,0x02,0x01,0x00,0x02,0x81,0x81,0x00,0xb4,0x8e,0x39,0xec,0xc3,0x1e,0x89,0xa6,0xce,
0xa6,0x40,0xc8,0x5e,0x67,0x77,0xf6,0x6e,0xbf,0x69,0x4f,0xfc,0x76,0xab,0xbb,0x76,0xc0,0x9e,0x8b,0x05,
0x6f,0x38,0x30,0xe0,0xca,0xd9,0x13,0x14,0xf0,0xe4,0x53,0xd2,0xa5,0x33,0x53,0xb9,0x69,0xc9,0x71,0x55,
0x53,0xb9,0xb4,0x3f,0x09,0x2f,0x8c,0x07,0xdf,0xd3,0x18,0xfd,0xbe,0x5e,0x4d,0xcf,0xc8,0x42,0x35,0x8f,
0x2b,0x89,0x3e,0xec,0x1f,0xb7,0x81,0x09,0xba,0x79,0x60,0x6a,0xb0,0xc4,0x65,0xdb,0x45,0x60,0xe8,0xfe,
0xeb,0x65,0x04,0xeb,0x57,0x14,0x76,0x91,0x65,0x43,0x2f,0x55,0xdb,0xd4,0x50,0x62,0xbc,0x79,0x1d,0x21,
0x89,0xa2,0xc3,0xae,0xc7,0x89,0x7b,0x01,0xc2,0xc5,0x8f,0xf6,0xcc,0xd7,0xe4,0x68,0x5a,0x37,0x21,0x02,
0x03,0x01,0x00,0x01,0x02,0x81,0x81,0x00,0x8d,0x0c,0x72,0x89,0xd8,0x1f,0xba,0x0e,0xfa,0x6e,0x7c,0x3b,
0x4b,0x2c,0x6f,0x55,0xaf,0x4c,0x8e,0xbb,0xb2,0x91,0x0e,0x35,0x63,0x5e,0xb4,0x3c,0x0c,0x61,0xc7,0x36,
0xbf,0xd5,0x17,0x61,0x45,0xc1,0xad,0xcd,0x21,0xc8,0x76,0x61,0x58,0x7e,0x20,0xa5,0x0d,0xb0,0x5b,0x69,
0x48,0xb9,0x27,0x50,0xb0,0x32,0x15,0x19,0xf7,0xd7,0xc8,0x98,0x96,0x55,0x51,0x85,0xd6,0x6a,0xe6,0xdb,
0x9e,0x44,0xa2,0x55,0x5f,0xeb,0x0a,0xc2,0x99,0xad,0x25,0x46,0xa9,0x38,0xb6,0x7e,0xaa,0xcc,0x5f,0x02,
0x73,0x93,0xc5,0x2d,0xe6,0x62,0x8c,0x12,0x20,0x28,0xf3,0xe3,0x4c,0xbc,0xc7,0x13,0x8c,0xac,0x78,0x70,
0x34,0xeb,0x63,0xea,0x13,0x02,0xb6,0x69,0xdc,0xef,0x0a,0x4d,0xcd,0xde,0x29,0x01,0x02,0x41,0x00,0xe4,
0x03,0xff,0xe9,0xe8,0xd6,0x75,0x3f,0x3c,0x88,0x86,0x12,0xc6,0xe5,0xa6,0x7c,0x41,0xb2,0x64,0xe5,0x0c,
0x6e,0x83,0xf2,0x2a,0x3a,0xfd,0x9a,0x47,0x93,0x69,0xe5,0x11,0xa0,0x37,0x03,0x74,0x9d,0x28,0x65,0x62,
0xb9,0xe2,0x3d,0x6d,0xb2,0x46,0xc3,0x02,0x93,0xcc,0x1a,0x3c,0x20,0xd5,0x93,0xc6,0xb3,0x1d,0x70,0x0e,
0xbc,0x78,0xf1,0x02,0x41,0x00,0xca,0xb7,0x15,0x7b,0x6a,0xf7,0x14,0xcb,0xd5,0x0d,0x31,0x26,0x90,0xcb,
0x38,0x47,0x6b,0x34,0x2b,0xe4,0x1f,0x0d,0x59,0x06,0x49,0x06,0x94,0x79,0x9f,0x65,0xe0,0x83,0x5e,0xd5,
0xe6,0xb8,0x89,0x75,0x93,0x14,0x8b,0x5a,0x57,0x26,0x02,0x04,0x06,0xc4,0xed,0x68,0x6f,0x05,0x66,0xeb,
0x07,0x94,0x20,0x03,0xd9,0xd2,0x75,0xb0,0x21,0x31,0x02,0x41,0x00,0xbb,0xc1,0x23,0x60,0xab,0xee,0xb3,
0xfb,0x0f,0x50,0x67,0xfe,0x5c,0x33,0x4c,0x44,0xf3,0x1f,0xff,0x7e,0xb0,0x1e,0xec,0x9d,0x62,0xf2,0xd2,
0x52,0xd0,0xef,0x6c,0xfa,0x47,0xea,0x42,0x82,0xa0,0xea,0xac,0x11,0xd8,0x1a,0xb2,0x55,0xdc,0xd7,0x38,
0xf7,0x69,0x4e,0xe4,0x79,0x11,0xdc,0x03,0xa2,0x3c,0xb2,0xce,0xe1,0xaf,0xf0,0xb8,0x31,0x02,0x41,0x00,
0xac,0xb8,0x92,0x75,0x36,0x0e,0x90,0x89,0x9c,0x5e,0x41,0x22,0xba,0xfc,0x6c,0x57,0x6d,0xe0,0x66,0x05,
0x58,0xef,0xe6,0x8a,0x94,0x6e,0x26,0xd3,0xfa,0x1c,0xb3,0xcf,0x3b,0x5e,0xc5,0xd7,0x36,0x48,0x17,0xa9,
0xc9,0x92,0x8f,0xee,0xb2,0x88,0xfb,0xbb,0x8f,0x0d,0x0c,0x8b,0x6d,0xc5,0x94,0x0f,0x81,0xb7,0xc6,0x40,
0xac,0x46,0x06,0x01,0x02,0x41,0x00,0xa3,0x7d,0x8a,0x62,0x0e,0x8d,0xe7,0x00,0xea,0x21,0x86,0x61,0xb9,
0x13,0xc3,0xc2,0xcf,0x96,0x88,0x79,0xff,0xaa,0x94,0x6f,0x5a,0xb8,0xe4,0x70,0x84,0xe8,0x3e,0xe0,0x20,
0xd9,0x15,0xca,0xf5,0x0c,0xf3,0xa1,0xd3,0xca,0xf9,0x9f,0xa9,0x9a,0x8c,0x79,0x84,0x55,0xba,0xca,0x4c,
0xe5,0xb2,0x96,0x5a,0x8c,0x82,0xe7,0xf8,0x4b,0x1d,0x50
};

+ 15
- 16
code/espurna/web.ino View File

@ -20,9 +20,9 @@ Copyright (C) 2016-2017 by Xose Pérez <xose dot perez at gmail dot com>
#include "static/index.html.gz.h" #include "static/index.html.gz.h"
#endif #endif
#if ASYNC_TCP_SSL_ENABLED
#include "static/espurna.crt.h"
#include "static/espurna.key.h"
#if ASYNC_TCP_SSL_ENABLED & WEB_USE_SSL
#include "static/server.cer.h"
#include "static/server.key.h"
#endif #endif
AsyncWebServer * _server; AsyncWebServer * _server;
@ -909,24 +909,23 @@ void _onHome(AsyncWebServerRequest *request) {
} }
#endif #endif
#if ASYNC_TCP_SSL_ENABLED
#if ASYNC_TCP_SSL_ENABLED & WEB_USE_SSL
int _onCertificate(void * arg, const char *filename, uint8_t **buf) { int _onCertificate(void * arg, const char *filename, uint8_t **buf) {
if (strcmp(filename, "espurna.crt") == 0) {
uint8_t * nbuf = (uint8_t*) malloc(espurna_crt_len);
memcpy_P(nbuf, espurna_crt, espurna_crt_len);
if (strcmp(filename, "server.cer") == 0) {
uint8_t * nbuf = (uint8_t*) malloc(server_cer_len);
memcpy_P(nbuf, server_cer, server_cer_len);
*buf = nbuf; *buf = nbuf;
DEBUG_MSG_P(PSTR("[WEB] SSL File: %s - OK\n"), filename); DEBUG_MSG_P(PSTR("[WEB] SSL File: %s - OK\n"), filename);
return espurna_crt_len;
return server_cer_len;
} }
if (strcmp(filename, "espurna.key") == 0) {
uint8_t * nbuf = (uint8_t*) malloc(espurna_key_len);
memcpy_P(nbuf, espurna_key, espurna_key_len);
if (strcmp(filename, "server.key") == 0) {
uint8_t * nbuf = (uint8_t*) malloc(server_key_len);
memcpy_P(nbuf, server_key, server_key_len);
*buf = nbuf; *buf = nbuf;
DEBUG_MSG_P(PSTR("[WEB] SSL File: %s - OK\n"), filename); DEBUG_MSG_P(PSTR("[WEB] SSL File: %s - OK\n"), filename);
return espurna_key_len;
return server_key_len;
} }
DEBUG_MSG_P(PSTR("[WEB] SSL File: %s - ERROR\n"), filename); DEBUG_MSG_P(PSTR("[WEB] SSL File: %s - ERROR\n"), filename);
@ -981,7 +980,7 @@ void _onUpgradeData(AsyncWebServerRequest *request, String filename, size_t inde
void webSetup() { void webSetup() {
// Create server // Create server
#if ASYNC_TCP_SSL_ENABLED
#if ASYNC_TCP_SSL_ENABLED & WEB_USE_SSL
unsigned int port = 443; unsigned int port = 443;
#else #else
unsigned int port = getSetting("webPort", WEBSERVER_PORT).toInt(); unsigned int port = getSetting("webPort", WEBSERVER_PORT).toInt();
@ -1027,9 +1026,9 @@ void webSetup() {
}); });
// Run server // Run server
#if ASYNC_TCP_SSL_ENABLED
#if ASYNC_TCP_SSL_ENABLED & WEB_USE_SSL
_server->onSslFileRequest(_onCertificate, NULL); _server->onSslFileRequest(_onCertificate, NULL);
_server->beginSecure("espurna.crt", "espurna.key", NULL);
_server->beginSecure("server.cer", "server.key", NULL);
#else #else
_server->begin(); _server->begin();
#endif #endif


+ 2
- 6
code/gulpfile.js View File

@ -69,12 +69,8 @@ var toHeader = function(filename) {
} }
gulp.task('build_certs', function() { gulp.task('build_certs', function() {
// Create the certificates following the instructions in
// https://www.akadia.com/services/ssh_test_certificate.html
// and place the key and crt files in the espurna/data/ folder
// Then tun this task to create the .h files from those
toHeader('espurna.crt');
toHeader('espurna.key');
toHeader('server.cer');
toHeader('server.key');
}); });
gulp.task('buildfs_embeded', ['buildfs_inline'], function() { gulp.task('buildfs_embeded', ['buildfs_inline'], function() {


Loading…
Cancel
Save