esp32_https_server icon indicating copy to clipboard operation
esp32_https_server copied to clipboard

Pull Request: Fixes and Enhancements for ESP32 HTTPS Certificate Generation

Open cturqueti opened this issue 8 months ago • 0 comments

The script 'create_cert.sh' had critical issues preventing reliable certificate generation:

  1. CA validation errors (error 79)
  2. Syntax errors from line endings
  3. Non-standard certificate attributes

Changes Made:

1. CA Configuration Fixes

  • Added proper X.509 v3 extensions for CA certificates
  • Included critical CA constraints
  • Set proper key identifiers

2. Certificate Signing Improvements

  • Added required extensions for end-entity certificates
  • Fixed subjectAltName generation
  • Standardized key usage parameters

3. Cross-Platform Compatibility

  • Normalized line endings (CRLF -> LF)
  • Removed Windows-specific artifacts
  • Added compatibility checks

4. Output File Generation

  • Simplified header file creation
  • Added error checking for xxd
  • Improved file permission handling

Testing Performed:

  • [X] Windows (Git Bash)
  • [X] WSL/Ubuntu
  • [X] ESP32 Integration
  • [X] OpenSSL verification

Verification Command: openssl verify -CAfile exampleca.crt example.crt

Impact:

  • Enables reliable HTTPS server setup
  • Works across development environments
  • Maintains security standards

Notes for Reviewers:

  • All changes backward compatible
  • No dependency changes required
  • Follows OpenSSL best practices

cturqueti avatar Apr 28 '25 19:04 cturqueti