Назад | Перейти на главную страницу

EAP-TLS: как проверить ключ p12 с помощью freeradius?

Я установил сервер Radius с конфигурацией только EAP-TLS. у меня есть client.p12 файл, который должен содержать как корневой CA, так и сертификат клиента.

  1. Я добавил p12 ключ

  2. Я настроил SSID, но в отладочных сообщениях freeradius кажется, что freeradius не может проверить мой ключ / сертификат.

error 20 at 0 depth lookup: unable to get local issuer certificate
(25) eap_tls: ERROR: Program returned code (2) and output 'error /tmp/radiusd/radiusd.client.XXK1l6r6: verification failed'
tls: Certificate CN (testuser@****.com) fails external verification!
(25) eap_tls: >>> send TLS 1.2  [length 0002] 
(25) eap_tls: ERROR: TLS Alert write:fatal:internal error
tls: TLS_accept: Error in error
(25) eap_tls: ERROR: Failed in __FUNCTION__ (SSL_read): error:1417C086:SSL routines:tls_process_client_certificate:certificate verify failed
(25) eap_tls: ERROR: System call (I/O) error (-1)
(25) eap_tls: ERROR: TLS receive handshake failed during operation
(25) eap_tls: ERROR: [eaptls process] = fail
(25) eap: ERROR: Failed continuing EAP TLS (13) session.  EAP sub-module failed
(25) eap: Sending EAP Failure (code 4) ID 7 length 4
(25) eap: Failed in EAP select
(25)     [eap] = invalid
(25)   } # authenticate = invalid
(25) Failed to authenticate the user
(25) Using Post-Auth-Type Reject
(25) # Executing group from file /etc/freeradius/3.0/sites-enabled/***network
(25)   Post-Auth-Type REJECT {
(25) attr_filter.access_reject: EXPAND %{User-Name}
(25) attr_filter.access_reject:    --> testuser@@****..com
(25) attr_filter.access_reject: Matched entry DEFAULT at line 11
(25)     [attr_filter.access_reject] = updated
(25)   } # Post-Auth-Type REJECT = updated
(25) Delaying response for 1.000000 seconds
Waking up in 0.6 seconds.
Waking up in 0.3 seconds.
(25) Sending delayed response
(25) Sent Access-Reject Id 25 from 172.17.0.2:1812 to 172.17.0.1:33331 length 44
(25)   EAP-Message = 0x04070004
(25)   Message-Authenticator = 0x00000000000000000000000000000000
Waking up in 3.8 seconds.
(20) Cleaning up request packet ID 20 with timestamp +1661
(21) Cleaning up request packet ID 21 with timestamp +1661
(22) Cleaning up request packet ID 22 with timestamp +1661
(23) Cleaning up request packet ID 23 with timestamp +1661
(24) Cleaning up request packet ID 24 with timestamp +1661
(25) Cleaning up request packet ID 25 with timestamp +1661
Ready to process requests

Вопрос: Как протестировать мой сервер freeradius с моим ключом p12 в CLI без необходимости настраивать все из Windows?

Я нашел здесь решение:

client_cert не требуется, поскольку сертификат клиента уже существует в файле p12.

eapol_test.conf.tls:

network={
        key_mgmt=WPA-EAP
        identity="myusername"
        proto=WPA2
        eap=TLS
        ca_cert="/tmp/clients/ca.pem
        # client_cert="/tmp/clients/clientcertpem" # Useless, the certificate is already in the p12 file
        private_key="/tmp/clients/client.p12"
        private_key_passwd="xxxxx"
}

Выполните команду: eapol_test -c eapol_test.conf.tls -a 127.0.0.1 -p 1812 -s testing123 -r1