phill93
Goto Top

WLAN EAP-TLS mit FreeRadius unsupported certificate

Hallo,

bin hier am verzweifeln. Bekomme von meinem FreeRadius immer die Fehlermeldung "TLS Alert write:fatal:unsupported certificate ".
Beide (Radius und Client) haben ein any Purpose Zertifikat von einer CA.

Weis wer was da schief geht?

eap.conf (Freeradius)
eap {
                default_eap_type = tls

                timer_expire     = 60

                ignore_unknown_eap_types = no

                cisco_accounting_username_bug = no

                max_sessions = ${max_requests}

                tls {
                        #
                        #  These is used to simplify later configurations.
                        #
                        certdir = ${confdir}/certs
                        cadir = ${confdir}/certs

                        #private_key_password = whatever
                        private_key_file = ${certdir}/radius.key

                        certificate_file = ${certdir}/radius.pem

                        CA_file = ${cadir}/ca.pem

                        dh_file = ${certdir}/dh
                        random_file = /dev/urandom


                        CA_path = ${cadir}

                        cipher_list = "DEFAULT"  
                        make_cert_command = "${certdir}/bootstrap"  

                        ecdh_curve = "prime256v1"  

                        cache {
                              enable = no
                              lifetime = 24 # hours
                              max_entries = 255
                        }

                        verify {
                        }

                }

        }

wpa_supplicant.conf (Client)
network={
        ssid="IoTs"  
        scan_ssid=1     
        key_mgmt=WPA-EAP
        proto=WPA2
        eap=TLS
        identity="PI1"  
        ca_cert="/root/ca-2"  
        client_cert="/root/wlan.pem"  
        private_key="/root/wlan.key"      
}

Log (Radius)
Mon Apr 10 16:33:30 2017 : Info: # Executing section authorize from file /etc/freeradius/sites-enabled/default
Mon Apr 10 16:33:30 2017 : Info: +group authorize {
Mon Apr 10 16:33:30 2017 : Info: ++[preprocess] = ok
Mon Apr 10 16:33:30 2017 : Info: ++[chap] = noop
Mon Apr 10 16:33:30 2017 : Info: ++[mschap] = noop
Mon Apr 10 16:33:30 2017 : Info: ++[digest] = noop
Mon Apr 10 16:33:30 2017 : Info: [suffix] No '@' in User-Name = "PI1", looking up realm NULL  
Mon Apr 10 16:33:30 2017 : Info: [suffix] No such realm "NULL"  
Mon Apr 10 16:33:30 2017 : Info: ++[suffix] = noop
Mon Apr 10 16:33:30 2017 : Info: [eap] EAP packet type response id 9 length 253
Mon Apr 10 16:33:30 2017 : Info: [eap] No EAP Start, assuming it's an on-going EAP conversation  
Mon Apr 10 16:33:30 2017 : Info: ++[eap] = updated
Mon Apr 10 16:33:30 2017 : Info: ++[files] = noop
Mon Apr 10 16:33:30 2017 : Info: ++[expiration] = noop
Mon Apr 10 16:33:30 2017 : Info: ++[logintime] = noop
Mon Apr 10 16:33:30 2017 : Info: ++[pap] = noop
Mon Apr 10 16:33:30 2017 : Info: +} # group authorize = updated
Mon Apr 10 16:33:30 2017 : Info: Found Auth-Type = EAP
Mon Apr 10 16:33:30 2017 : Info: # Executing group from file /etc/freeradius/sites-enabled/default
Mon Apr 10 16:33:30 2017 : Info: +group authenticate {
Mon Apr 10 16:33:30 2017 : Info: [eap] Request found, released from the list
Mon Apr 10 16:33:30 2017 : Info: [eap] EAP/tls
Mon Apr 10 16:33:30 2017 : Info: [eap] processing type tls
Mon Apr 10 16:33:30 2017 : Info: [tls] Authenticate
Mon Apr 10 16:33:30 2017 : Info: [tls] processing EAP-TLS
Mon Apr 10 16:33:30 2017 : Info: [tls] eaptls_verify returned 7 
Mon Apr 10 16:33:30 2017 : Info: [tls] Done initial handshake
Mon Apr 10 16:33:30 2017 : Info: [tls] <<< TLS 1.0 Handshake [length 0cd3], Certificate  
Mon Apr 10 16:33:30 2017 : Error: --> verify error:num=26:unsupported certificate purpose 
Mon Apr 10 16:33:30 2017 : Info: [tls] >>> TLS 1.0 Alert [length 0002], fatal unsupported_certificate  
Mon Apr 10 16:33:30 2017 : Error: TLS Alert write:fatal:unsupported certificate
Mon Apr 10 16:33:30 2017 : Error:     TLS_accept: error in error
Mon Apr 10 16:33:30 2017 : Error: rlm_eap: SSL error error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
Mon Apr 10 16:33:30 2017 : Error: SSL: SSL_read failed in a system call (-1), TLS session fails.
Mon Apr 10 16:33:30 2017 : Debug: TLS receive handshake failed during operation
Mon Apr 10 16:33:30 2017 : Info: [tls] eaptls_process returned 4 
Mon Apr 10 16:33:30 2017 : Info: [eap] Handler failed in EAP/tls
Mon Apr 10 16:33:30 2017 : Info: [eap] Failed in EAP select
Mon Apr 10 16:33:30 2017 : Info: ++[eap] = invalid
Mon Apr 10 16:33:30 2017 : Info: +} # group authenticate = invalid
Mon Apr 10 16:33:30 2017 : Info: Failed to authenticate the user.
Mon Apr 10 16:33:30 2017 : Info: Using Post-Auth-Type REJECT
Mon Apr 10 16:33:30 2017 : Info: # Executing group from file /etc/freeradius/sites-enabled/default
Mon Apr 10 16:33:30 2017 : Info: +group REJECT {
Mon Apr 10 16:33:30 2017 : Info: [attr_filter.access_reject]    expand: %{User-Name} -> PI1
Mon Apr 10 16:33:30 2017 : Debug: attr_filter: Matched entry DEFAULT at line 11
Mon Apr 10 16:33:30 2017 : Info: ++[attr_filter.access_reject] = updated
Mon Apr 10 16:33:30 2017 : Info: +} # group REJECT = updated
Mon Apr 10 16:33:30 2017 : Info: Delaying reject of request 7 for 1 seconds
Mon Apr 10 16:33:30 2017 : Debug: Going to the next request
Mon Apr 10 16:33:30 2017 : Debug: Waking up in 0.9 seconds.
Mon Apr 10 16:33:31 2017 : Info: Sending delayed reject for request 7

Content-Key: 334768

Url: https://administrator.de/contentid/334768

Ausgedruckt am: 19.03.2024 um 07:03 Uhr

Mitglied: Looser27
Looser27 10.04.2017 um 16:44:56 Uhr
Goto Top
Versuch mal nach der Anleitung

Ubuntu 14.04 - 16.04 - 18.04 - 20.04 LTS Server - Freeradius mit AD-Anbindung

Zertifikat kannst Du dann immer noch tauschen.

Gruß

Looser
Mitglied: aqui
aqui 10.04.2017 um 17:48:59 Uhr
Goto Top
Mitglied: Phill93
Phill93 10.04.2017 um 18:39:46 Uhr
Goto Top
Hallo,

Danke für die ganzen Anleitungen leider machen die alle kein EAP-TLS auf reiner Zertifikatsbasis. Sondern nutzen immer noch ein User Backend zusätzlich. Desweiteren wird überall die interne CA des Radius Verwendet was bei mir ebenfalls nicht möglich ist.

Gruß

Phill93
Mitglied: michaaa
michaaa 04.11.2017 um 19:28:28 Uhr
Goto Top
Ist das Problem mittlerweile gelöst? Ich bin nämlich auf das gleiche Problem gestoßen.

Ich habe den Eindruck, dass es am Client-Zertifikat liegt. Nachdem ich (fast) alle X.501 Extensions deaktiviert habe, nur OID 1.3.6.1.4.1.311.17.2 (TLS Web Client Authentication) drin gelassen habe, funktionierte der EAP-TLS Request.

Ich muss mal testen, welches Attribut genau zu dem Verify Error 26 führt.

Bei FreeRadius 3 erzeugt das bootstrap-Script im cert-Verzeichnis der Beispiel-Config genau so ein Client-Zertifikat, dass eben nur diese eine Extension aktiviert hat... ich habe es mit dieser Demo-CA nicht getestet, aber ich vermute, dass es damit funktioniert.
Mitglied: Phill93
Phill93 06.11.2017 um 20:33:15 Uhr
Goto Top
Hallo,

Ja das Problem hab ich gelöst.
Der Fehler lag in den Zertifikatserweiterungen.
Das Client Zertifikat muss Client Authentification unterstützen.

Gruß

Phill93
Mitglied: michaaa
michaaa 06.11.2017 um 20:51:42 Uhr
Goto Top
In meinem Fall hat es auch nicht funktioniert, wenn zu viele Attribute im Client-Zertifikat enthalten waren. Client Authentification hatte ich von Anfang an drin.