Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Workarounds to make SSL/TLS work #899

@tom-ch1

Description

@tom-ch1

Setting-up an SSL/TLS enabled Server using the ESPAsyncWebServer library is not yet fully documented and straight-forward. I spent a lot of time and finally got it to work. I'd like to share what I have learned, so you can make it work, too.

My setup and basic requirements

Here's an account of the caveats and how to work around them

  1. Compile error "class AsyncServer has no member named beginSecure"
  2. Link error: no matching function for call to AsyncClient::_recv(tcp_pcb*&, pbuf*&, int) or similar
  3. Link error: undefined reference to AsyncWebServer::onSslFileRequest(std::function<int (void*, char const*, unsigned char**)>, void*) or similar
  4. Now it compiles, but you may get a runtime error: Error: Feature not supported after calling server.beginSecure()
    • I tracked that one down to https://github.com/igrr/axtls-8266.
    • I thought it just didn't work because I used an unsupported cypher suite. But it wasn't that and I couldn't figure out the reason
    • but I found a configuration which works:
      • openssl genrsa -out Key.pem 1024
      • openssl req -x509 -out Cert.pem -key Key.pem -new -sha256 -subj /CN=your.domain -addext "keyUsage=digitalSignature,keyEncipherment" -addext extendedKeyUsage=serverAuth

I hope I could help somebody trying to set up an SSL-protected update-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions