I'm trying to connect Raspberry Pi to a EAP-TLS Wi-Fi access point. The connection fails:
wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=13 OpenSSL: tls_read_pkcs12 - Failed to use PKCS#12 file error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag OpenSSL: pending error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error OpenSSL: tls_connection_private_key - Failed to load private key error:00000000:lib(0):func(0):reason(0) TLS: Failed to load private key '/etc/ssl/private/demo.key' TLS: Failed to set TLS connection parameters EAP-TLS: Failed to initialize SSL. When I search for “ASN1_CHECK_TLEN:wrong tag,” all I can find is the suggestions that the certificate file is somehow damaged, and that I need to check that there are no leading or trailing spaces. The file seems fine, besides when I run openssl rsa -check -noout -in /etc/ssl/private/demo.key, it prompts for the pass phrase, and when I enter one, it prints: “RSA key ok.”
I also double-checked the password stored in private_key_passwd in wpa_supplicant.conf and it looks correct.
How do I figure out what's wrong?