espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.31k stars 1.56k forks source link

Issue while starting hostapd for wpa2_enterprise example (GIT8266O-616) #1039

Open ziogianni opened 3 years ago

ziogianni commented 3 years ago

Hello I configured the hostapd daemon according to the following link: https://blog.csdn.net/weixin_42083266/article/details/112649308

Just to do not incur in problems due to wrong certs generation, I used the server certificates included the ESP8266-RTOS-SDK wpa2_enterprise example. Anyway hostapd won't start because as far i have understood certificates have been generated by using md5 signature while Openssl is (maybe) requiring sha256.

sudo hostapd -dddt /etc/hostapd/hostapd.confOLD
1611601816.718601: random: getrandom() support available
1611601816.719237: Configuration file: /etc/hostapd/hostapd.confOLD
1611601816.722184: ctrl_interface_group=0
1611601816.728030: Completing interface initialization
1611601816.728460: Mode: IEEE 802.11g  Channel: 1  Frequency: 0 MHz
1611601816.728752: DFS: No current_mode information - assume no need to perform DFS operations by hostapd
1611601816.729040: hostapd_setup_bss(hapd=0x4c5990 (eth0), first=1)
1611601816.737957: TLS: Trusted root certificate(s) loaded
1611601816.741306: OpenSSL: tls_global_client_cert - Failed to load client certificate error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak
1611601816.741774: OpenSSL: pending error: error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak
1611601816.742077: TLS: Failed to set global parameters
1611601816.742361: Failed to set TLS parameters
ziogianni commented 3 years ago

I generated other certs with Openssl then I got another issue:

 sudo hostapd -dddt /etc/hostapd/hostapd.confOLD
1611603043.643887: random: getrandom() support available
1611603043.644087: Configuration file: /etc/hostapd/hostapd.confOLD
1611603043.645851: ctrl_interface_group=0
1611603043.648436: Completing interface initialization
1611603043.648481: Mode: IEEE 802.11g  Channel: 1  Frequency: 0 MHz
1611603043.648506: DFS: No current_mode information - assume no need to perform DFS operations by hostapd
1611603043.648538: hostapd_setup_bss(hapd=0x91b9a8 (eth0), first=1)
1611603043.662737: TLS: Trusted root certificate(s) loaded
1611603043.666349: OpenSSL: tls_global_private_key - Failed to load private key error:02001002:system library:fopen:No such file or directory
1611603043.666429: OpenSSL: pending error: error:2006D080:BIO routines:BIO_new_file:no such file
1611603043.666460: TLS: Failed to set global parameters
1611603043.666486: Failed to set TLS parameters