OpenSecurityResearch / hostapd-wpe

Modified hostapd to facilitate AP impersonation attacks
487 stars 97 forks source link

Install not working on Kali 2.0 #15

Open RomanFire1 opened 7 years ago

RomanFire1 commented 7 years ago

root@kali:~/Desktop# git clone https://github.com/OpenSecurityResearch/hostapd-wpe Cloning into 'hostapd-wpe'... remote: Counting objects: 51, done. remote: Total 51 (delta 0), reused 0 (delta 0), pack-reused 51 Unpacking objects: 100% (51/51), done. root@kali:~/Desktop# apt-get update Get:1 http://mirrors.ocf.berkeley.edu/kali kali-rolling InRelease [30.5 kB] Get:2 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 Packages [15.1 MB] Get:3 http://mirrors.ocf.berkeley.edu/kali kali-rolling/non-free amd64 Packages [165 kB] Get:4 http://mirrors.ocf.berkeley.edu/kali kali-rolling/contrib amd64 Packages [108 kB] Fetched 15.4 MB in 19s (794 kB/s)
Reading package lists... Done root@kali:~/Desktop# apt-get install libssl-dev libnl-dev Reading package lists... Done Building dependency tree
Reading state information... Done Package libnl-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libnl-dev' has no installation candidate root@kali:~/Desktop# apt-get install libssl-dev libnl-genl-3-dev Reading package lists... Done Building dependency tree
Reading state information... Done The following packages were automatically installed and are no longer required: gdebi-core iproute libcrypto++6 libjavascriptcoregtk-1.0-0 libladr4 libnm-gtk-common libqt4-opengl libqtwebkit4 libvpx3 libwebkitgtk-1.0-0 prover9 python-cluster python-darts.lib.utils.lru python-esmre python-git python-gitdb python-guess-language python-halberd python-ipaddr python-ndg-httpsclient python-nltk python-pdfminer python-phply python-ply python-psutil python-pybloomfiltermmap python-pyclamd python-pycryptopp python-pygithub python-ruamel.ordereddict python-smmap python-tblib python-vulndb python-webkit python-xdot w3af w3af-console Use 'apt autoremove' to remove them. The following additional packages will be installed: libnl-3-200 libnl-3-dev libnl-genl-3-200 libnl-route-3-200 libssl-doc libssl1.1 The following NEW packages will be installed: libnl-3-dev libnl-genl-3-dev libssl-dev libssl-doc libssl1.1 The following packages will be upgraded: libnl-3-200 libnl-genl-3-200 libnl-route-3-200 3 upgraded, 5 newly installed, 0 to remove and 883 not upgraded. Need to get 3,333 kB/4,674 kB of archives. After this operation, 15.8 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-route-3-200 amd64 3.2.27-1+b1 [136 kB] Get:2 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-genl-3-200 amd64 3.2.27-1+b1 [21.2 kB] Get:3 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-3-200 amd64 3.2.27-1+b1 [61.6 kB] Get:4 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-3-dev amd64 3.2.27-1+b1 [96.5 kB] Get:5 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-genl-3-dev amd64 3.2.27-1+b1 [20.4 kB] Get:6 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libssl-dev amd64 1.1.0e-1 [1,572 kB] Get:7 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libssl-doc all 1.1.0e-1 [1,425 kB] Fetched 3,333 kB in 3s (882 kB/s)
Reading changelogs... Done Preconfiguring packages ... Selecting previously unselected package libssl1.1:amd64. (Reading database ... 317973 files and directories currently installed.) Preparing to unpack .../0-libssl1.1_1.1.0e-1_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.0e-1) ... Preparing to unpack .../1-libnl-route-3-200_3.2.27-1+b1_amd64.deb ... Unpacking libnl-route-3-200:amd64 (3.2.27-1+b1) over (3.2.27-1) ... Preparing to unpack .../2-libnl-genl-3-200_3.2.27-1+b1_amd64.deb ... Unpacking libnl-genl-3-200:amd64 (3.2.27-1+b1) over (3.2.27-1) ... Preparing to unpack .../3-libnl-3-200_3.2.27-1+b1_amd64.deb ... Unpacking libnl-3-200:amd64 (3.2.27-1+b1) over (3.2.27-1) ... Selecting previously unselected package libnl-3-dev:amd64. Preparing to unpack .../4-libnl-3-dev_3.2.27-1+b1_amd64.deb ... Unpacking libnl-3-dev:amd64 (3.2.27-1+b1) ... Selecting previously unselected package libnl-genl-3-dev:amd64. Preparing to unpack .../5-libnl-genl-3-dev_3.2.27-1+b1_amd64.deb ... Unpacking libnl-genl-3-dev:amd64 (3.2.27-1+b1) ... Selecting previously unselected package libssl-dev:amd64. Preparing to unpack .../6-libssl-dev_1.1.0e-1_amd64.deb ... Unpacking libssl-dev:amd64 (1.1.0e-1) ... Selecting previously unselected package libssl-doc. Preparing to unpack .../7-libssl-doc_1.1.0e-1_all.deb ... Unpacking libssl-doc (1.1.0e-1) ... Processing triggers for libc-bin (2.24-9) ... Setting up libssl1.1:amd64 (1.1.0e-1) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up libssl-doc (1.1.0e-1) ... Setting up libnl-3-200:amd64 (3.2.27-1+b1) ... Setting up libssl-dev:amd64 (1.1.0e-1) ... Setting up libnl-3-dev:amd64 (3.2.27-1+b1) ... Setting up libnl-genl-3-200:amd64 (3.2.27-1+b1) ... Setting up libnl-route-3-200:amd64 (3.2.27-1+b1) ... Setting up libnl-genl-3-dev:amd64 (3.2.27-1+b1) ... Processing triggers for libc-bin (2.24-9) ... root@kali:~/Desktop# git clone https://github.com/OpenSecurityResearch/hostapd-wpe fatal: destination path 'hostapd-wpe' already exists and is not an empty directory. root@kali:~/Desktop# sudo git clone https://github.com/OpenSecurityResearch/hostapd-wpe fatal: destination path 'hostapd-wpe' already exists and is not an empty directory. root@kali:~/Desktop# wget http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz --2017-03-29 14:33:15-- http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz Resolving hostap.epitest.fi (hostap.epitest.fi)... 212.71.239.96 Connecting to hostap.epitest.fi (hostap.epitest.fi)|212.71.239.96|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://w1.fi/releases/hostapd-2.2.tar.gz [following] --2017-03-29 14:33:16-- http://w1.fi/releases/hostapd-2.2.tar.gz Resolving w1.fi (w1.fi)... 212.71.239.96 Reusing existing connection to hostap.epitest.fi:80. HTTP request sent, awaiting response... 200 OK Length: 1586482 (1.5M) [application/x-gzip] Saving to: ‘hostapd-2.2.tar.gz’

hostapd-2.2.tar.gz 100%[===================>] 1.51M 321KB/s in 8.2s

2017-03-29 14:33:25 (188 KB/s) - ‘hostapd-2.2.tar.gz’ saved [1586482/1586482]

root@kali:~/Desktop# tar -zxf hostapd-2.2.tar.gz root@kali:~/Desktop# cd hostapd-2.2 root@kali:~/Desktop/hostapd-2.2# patch -p1 < ../hostapd-wpe/hostapd-wpe.patch patching file hostapd/.config patching file hostapd/config_file.c patching file hostapd/hostapd-wpe.conf patching file hostapd/hostapd-wpe.eap_user patching file hostapd/main.c patching file hostapd/Makefile patching file src/ap/beacon.c patching file src/ap/ieee802_11.c patching file src/crypto/ms_funcs.c patching file src/crypto/ms_funcs.h patching file src/crypto/tls_openssl.c patching file src/eap_server/eap_server.c patching file src/eap_server/eap_server_mschapv2.c patching file src/eap_server/eap_server_peap.c patching file src/eap_server/eap_server_ttls.c patching file src/Makefile patching file src/utils/wpa_debug.c patching file src/wpe/Makefile patching file src/wpe/wpe.c patching file src/wpe/wpe.h root@kali:~/Desktop/hostapd-2.2# cd hostapd root@kali:~/Desktop/hostapd-2.2/hostapd# ls android.config hlr_auc_gw.milenage_db hostapd.wpa_psk Android.mk hlr_auc_gw.txt hostapd-wpe.conf ChangeLog hostapd.8 hostapd-wpe.eap_user config_file.c hostapd.accept logwatch config_file.h hostapd_cli.1 main.c ctrl_iface.c hostapd_cli.c Makefile ctrl_iface.h hostapd.conf nt_password_hash.c defconfig hostapd.deny README eap_register.c hostapd.eap_user README-WPS eap_register.h hostapd.eap_user_sqlite wired.conf eap_testing.txt hostapd.radius_clients wps-ap-nfc.py hapd_module_tests.c hostapd.sim_db hlr_auc_gw.c hostapd.vlan root@kali:~/Desktop/hostapd-2.2/hostapd# ls -a . hapd_module_tests.c hostapd.vlan .. hlr_auc_gw.c hostapd.wpa_psk android.config hlr_auc_gw.milenage_db hostapd-wpe.conf Android.mk hlr_auc_gw.txt hostapd-wpe.eap_user ChangeLog hostapd.8 logwatch .config hostapd.accept main.c config_file.c hostapd_cli.1 Makefile config_file.h hostapd_cli.c nt_password_hash.c ctrl_iface.c hostapd.conf README ctrl_iface.h hostapd.deny README-WPS defconfig hostapd.eap_user wired.conf eap_register.c hostapd.eap_user_sqlite wps-ap-nfc.py eap_register.h hostapd.radius_clients eap_testing.txt hostapd.sim_db root@kali:~/Desktop/hostapd-2.2/hostapd# vi .config root@kali:~/Desktop/hostapd-2.2/hostapd# make CC main.c CC config_file.c CC ../src/ap/hostapd.c CC ../src/ap/wpa_auth_glue.c CC ../src/ap/drv_callbacks.c CC ../src/ap/ap_drv_ops.c CC ../src/ap/utils.c CC ../src/ap/authsrv.c CC ../src/ap/ieee802_1x.c CC ../src/ap/ap_config.c CC ../src/ap/eap_user_db.c CC ../src/ap/ieee802_11_auth.c CC ../src/ap/sta_info.c CC ../src/ap/wpa_auth.c CC ../src/ap/tkip_countermeasures.c CC ../src/ap/ap_mlme.c CC ../src/ap/wpa_auth_ie.c CC ../src/ap/preauth_auth.c CC ../src/ap/pmksa_cache_auth.c CC ../src/ap/ieee802_11_shared.c CC ../src/ap/beacon.c ../src/wpe/wpe.c: In function ‘wpe_hb_cb’: ../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) if (v_content_type == TLS1_RT_HEARTBEAT) { ^~~~~ ../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in ../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ v_ssl->tlsext_hb_pending = 1; ^~ Makefile:892: recipe for target '../src/wpe/wpe.o' failed make: ** [../src/wpe/wpe.o] Error 1 root@kali:~/Desktop/hostapd-2.2/hostapd# cd ../../hostapd-wpe/certs root@kali:~/Desktop/hostapd-wpe/certs# ./bootstrap openssl dhparam -out dh 1024 Generating DH parameters, 1024 bit long safe prime, generator 2 This is going to take a long time .......................................+...+.............+.+............+............................+......................+....................................................................+....................+..........................................................+......+...................................................................+.................................................................+....+...................................................................................................................................................+..+...............................................................................................................+........................................+...........................................................................................................................+..+......................+.........................................................................................+......................+................................................+..............................................................................................+.................................................................................................................................................................................+................+..............................................+...............................+........................+...................................................+....................................................+...................................................................................................+......................+...+....................+.....+................+...........+..........+...................................................................................................................+...................+............................+............+....+............................................+.....+..................................++++++ openssl req -new -out server.csr -keyout server.key -config ./server.cnf Generating a 2048 bit RSA private key .............................................................................................+++ .......................+++ writing new private key to 'server.key'

openssl req -new -x509 -keyout ca.key -out ca.pem \ -days grep default_days ca.cnf | sed 's/.*=//;s/^ *//' -config ./ca.cnf Generating a 2048 bit RSA private key ..........................+++ ..................................................................................+++ writing new private key to 'ca.key'

openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key grep output_password ca.cnf | sed 's/.*=//;s/^ *//' -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf Using configuration from ./server.cnf Check that the request matches the signature Signature ok Certificate Details: Serial Number: 1 (0x1) Validity Not Before: Mar 29 18:38:08 2017 GMT Not After : Mar 29 18:38:08 2018 GMT Subject: countryName = FR stateOrProvinceName = Radius organizationName = Example Inc. commonName = Example Server Certificate emailAddress = admin@example.com X509v3 extensions: X509v3 Extended Key Usage: TLS Web Server Authentication Certificate is to be certified until Mar 29 18:38:08 2018 GMT (365 days)

Write out database with 1 new entries Data Base Updated openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//' -passout pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//' openssl pkcs12 -in server.p12 -out server.pem -passin pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//' -passout pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//' MAC verified OK openssl verify -CAfile ca.pem server.pem server.pem: OK openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der root@kali:~/Desktop/hostapd-wpe/certs# cd ../../hostapd-2.2/hostapd root@kali:~/Desktop/hostapd-2.2/hostapd# sudo ./hostapd-wpe hostapd-wpe.conf sudo: ./hostapd-wpe: command not found root@kali:~/Desktop/hostapd-2.2/hostapd# ls android.config hlr_auc_gw.c hostapd.wpa_psk Android.mk hlr_auc_gw.milenage_db hostapd-wpe.conf ChangeLog hlr_auc_gw.txt hostapd-wpe.eap_user config_file.c hostapd.8 logwatch config_file.d hostapd.accept main.c config_file.h hostapd_cli.1 main.d config_file.o hostapd_cli.c main.o ctrl_iface.c hostapd.conf Makefile ctrl_iface.h hostapd.deny nt_password_hash.c defconfig hostapd.eap_user README eap_register.c hostapd.eap_user_sqlite README-WPS eap_register.h hostapd.radius_clients wired.conf eap_testing.txt hostapd.sim_db wps-ap-nfc.py hapd_module_tests.c hostapd.vlan root@kali:~/Desktop/hostapd-2.2/hostapd# man make root@kali:~/Desktop/hostapd-2.2/hostapd# make -B CC main.c CC config_file.c CC ../src/ap/hostapd.c CC ../src/ap/wpa_auth_glue.c CC ../src/ap/drv_callbacks.c CC ../src/ap/ap_drv_ops.c CC ../src/ap/utils.c CC ../src/ap/authsrv.c CC ../src/ap/ieee802_1x.c CC ../src/ap/ap_config.c CC ../src/ap/eap_user_db.c CC ../src/ap/ieee802_11_auth.c CC ../src/ap/sta_info.c CC ../src/ap/wpa_auth.c CC ../src/ap/tkip_countermeasures.c CC ../src/ap/ap_mlme.c CC ../src/ap/wpa_auth_ie.c CC ../src/ap/preauth_auth.c CC ../src/ap/pmksa_cache_auth.c CC ../src/ap/ieee802_11_shared.c CC ../src/ap/beacon.c ../src/wpe/wpe.c: In function ‘wpe_hb_cb’: ../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) if (v_content_type == TLS1_RT_HEARTBEAT) { ^~~~~ ../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in ../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ v_ssl->tlsext_hb_pending = 1; ^~ Makefile:892: recipe for target '../src/wpe/wpe.o' failed make: * [../src/wpe/wpe.o] Error 1 root@kali:~/Desktop/hostapd-2.2/hostapd# man make root@kali:~/Desktop/hostapd-2.2/hostapd# make -Bi CC main.c CC config_file.c CC ../src/ap/hostapd.c CC ../src/ap/wpa_auth_glue.c CC ../src/ap/drv_callbacks.c CC ../src/ap/ap_drv_ops.c CC ../src/ap/utils.c CC ../src/ap/authsrv.c CC ../src/ap/ieee802_1x.c CC ../src/ap/ap_config.c CC ../src/ap/eap_user_db.c CC ../src/ap/ieee802_11_auth.c CC ../src/ap/sta_info.c CC ../src/ap/wpa_auth.c CC ../src/ap/tkip_countermeasures.c CC ../src/ap/ap_mlme.c CC ../src/ap/wpa_auth_ie.c CC ../src/ap/preauth_auth.c CC ../src/ap/pmksa_cache_auth.c CC ../src/ap/ieee802_11_shared.c CC ../src/ap/beacon.c ../src/wpe/wpe.c: In function ‘wpe_hb_cb’: ../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) if (v_content_type == TLS1_RT_HEARTBEAT) { ^~~~~ ../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in ../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ v_ssl->tlsext_hb_pending = 1; ^~ Makefile:892: recipe for target '../src/wpe/wpe.o' failed make: [../src/wpe/wpe.o] Error 1 (ignored) CC ../src/wpe/wpe.c CC ../src/drivers/drivers.c CC ../src/utils/eloop.c CC ../src/utils/common.c CC ../src/utils/wpa_debug.c CC ../src/utils/wpabuf.c CC ../src/utils/os_unix.c CC ../src/utils/ip_addr.c CC ../src/common/ieee802_11_common.c CC ../src/common/wpa_common.c CC ../src/eapol_auth/eapol_auth_sm.c CC ../src/eapol_auth/eapol_auth_dump.c CC ../src/radius/radius.c CC ../src/radius/radius_client.c CC ../src/radius/radius_das.c CC ../src/ap/vlan_init.c CC ctrl_iface.c CC ../src/ap/ctrl_iface_ap.c CC ../src/crypto/md5.c CC ../src/ap/iapp.c CC ../src/ap/peerkey_auth.c CC ../src/drivers/driver_hostap.c CC ../src/drivers/driver_wired.c CC ../src/drivers/driver_nl80211.c CC ../src/utils/radiotap.c CC ../src/drivers/netlink.c CC ../src/drivers/linux_ioctl.c CC ../src/drivers/rfkill.c CC ../src/l2_packet/l2_packet_linux.c CC ../src/eap_server/eap_server_md5.c CC ../src/eap_server/eap_server_tls.c CC ../src/eap_server/eap_server_peap.c CC ../src/eap_common/eap_peap_common.c CC ../src/eap_server/eap_server_ttls.c CC ../src/eap_server/eap_server_mschapv2.c CC ../src/eap_server/eap_server_gtc.c CC ../src/eap_server/eap_server_sim.c CC ../src/eap_server/eap_server_aka.c CC ../src/eap_common/eap_sim_common.c CC ../src/eap_server/eap_sim_db.c CC ../src/eap_server/eap_server_pax.c CC ../src/eap_common/eap_pax_common.c CC ../src/eap_server/eap_server_psk.c CC ../src/eap_common/eap_psk_common.c CC ../src/eap_server/eap_server_sake.c CC ../src/eap_common/eap_sake_common.c CC ../src/eap_server/eap_server_gpsk.c CC ../src/eap_common/eap_gpsk_common.c CC ../src/eap_server/eap_server_pwd.c CC ../src/eap_common/eap_pwd_common.c CC ../src/eap_server/eap_server_eke.c CC ../src/eap_common/eap_eke_common.c CC ../src/eap_server/eap_server_fast.c CC ../src/eap_common/eap_fast_common.c CC ../src/eap_server/eap_server_ikev2.c CC ../src/eap_server/ikev2.c CC ../src/eap_common/eap_ikev2_common.c CC ../src/eap_common/ikev2_common.c CC ../src/eap_server/eap_server_tnc.c CC ../src/eap_server/tncs.c CC eap_register.c CC ../src/eap_server/eap_server.c CC ../src/eap_common/eap_common.c CC ../src/eap_server/eap_server_methods.c CC ../src/eap_server/eap_server_identity.c CC ../src/crypto/ms_funcs.c CC ../src/eap_common/chap.c CC ../src/eap_server/eap_server_tls_common.c ../src/crypto/tls_openssl.c: In function ‘tls_init’: ../src/crypto/tls_openssl.c:805:2: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated-declarations] ssl = SSL_CTX_new(TLSv1_method()); ^~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/ssl.h:1596:1: note: declared here DEPRECATEDIN_1_1_0(__owur const SSL_METHOD TLSv1_method(void)) / TLSv1.0 / ^ ../src/crypto/tls_openssl.c: In function ‘tls_deinit’: ../src/crypto/tls_openssl.c:861:3: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations] ERR_remove_state(0); ^~~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/err.h:247:1: note: declared here DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) ^ ../src/crypto/tls_openssl.c: In function ‘tls_load_ca_der’: ../src/crypto/tls_openssl.c:1530:40: error: dereferencing pointer to incomplete type ‘SSL_CTX {aka struct ssl_ctx_st}’ lookup = X509_STORE_add_lookup(ssl_ctx->cert_store, ^~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_get_keys’: ../src/crypto/tls_openssl.c:2522:24: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL) ^~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_encrypt’: ../src/crypto/tls_openssl.c:2755:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_before_appdata) ^~ ../src/crypto/tls_openssl.c:2758:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data)); ^~~ ../src/crypto/tls_openssl.c:2765:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_after_appdata) ^~ ../src/crypto/tls_openssl.c:2770:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ buf = wpabuf_alloc(wpabuf_len(in_data) + 300); ^~~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_set_session_ticket_cb’: ../src/crypto/tls_openssl.c:3547:44: warning: passing argument 2 of ‘SSL_set_session_secret_cb’ from incompatible pointer type [-Wincompatible-pointer-types] if (SSL_set_session_secret_cb(conn->ssl, tls_sess_sec_cb, ^~~~~~~ In file included from ../src/crypto/tls_openssl.c:19:0: /usr/include/openssl/ssl.h:1801:12: note: expected ‘tls_session_secret_cb_fn {aka int ()(struct ssl_st , void , int , struct stack_st_SSL_CIPHER , const struct ssl_cipher_st , void )}’ but argument is of type ‘int ()(SSL , void , int , struct stack_st_SSL_CIPHER , SSL_CIPHER , void ) {aka int ()(struct ssl_st , void , int , struct stack_st_SSL_CIPHER , struct ssl_cipher_st , void )}’ __owur int SSL_set_session_secret_cb(SSL s, ^~~~~~~~~ ../src/crypto/tls_openssl.c: In function ‘wpe_hb_enc’: ../src/crypto/tls_openssl.c:3595:39: error: ‘SSL_TLSEXT_HB_ENABLED’ undeclared (first use in this function) if(!conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_ENABLED || ^~~~~ ../src/crypto/tls_openssl.c:3595:39: note: each undeclared identifier is reported only once for each function it appears in ../src/crypto/tls_openssl.c:3596:43: error: ‘SSL_TLSEXT_HB_DONT_SEND_REQUESTS’ undeclared (first use in this function) conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_DONT_SEND_REQUESTS) { ^~~~~~~~ In file included from ../src/crypto/tls_openssl.c:32:0: /root/Desktop/hostapd-2.2/src/wpe/wpe.h:42:56: warning: left-hand operand of comma expression has no effect [-Wunused-value]

define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \

                                                    ^

../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’ s2n(conn->ssl->tlsext_hb_seq, p); ^~~ /root/Desktop/hostapd-2.2/src/wpe/wpe.h:43:46: warning: left-hand operand of comma expression has no effect [-Wunused-value] c[1]=(unsigned char)(((s) )&0xff)),c+=2) ^ ../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’ s2n(conn->ssl->tlsext_hb_seq, p); ^~~ ../src/crypto/tls_openssl.c:3625:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations] RAND_pseudo_bytes(p, 16); ^~~~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/rand.h:47:1: note: declared here DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char buf, int num)) ^ ../src/crypto/tls_openssl.c:3629:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations] RAND_pseudo_bytes(p, padding); ^~~~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/rand.h:47:1: note: declared here DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char buf, int num)) ^ ../src/crypto/tls_openssl.c:3636:38: error: dereferencing pointer to incomplete type ‘SSL_METHOD {aka const struct ssl_method_st}’ if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT, ^~ ../src/crypto/tls_openssl.c:3636:67: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT, ^~~~~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_resumed’: ../src/crypto/tls_openssl.c:2838:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:892: recipe for target '../src/crypto/tls_openssl.o' failed make: [../src/crypto/tls_openssl.o] Error 1 (ignored) CC ../src/crypto/tls_openssl.c ../src/crypto/crypto_openssl.c: In function ‘openssl_digest_vector’: ../src/crypto/crypto_openssl.c:84:13: error: storage size of ‘ctx’ isn’t known EVP_MD_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:84:13: warning: unused variable ‘ctx’ [-Wunused-variable] ../src/crypto/crypto_openssl.c: In function ‘rc4_skip’: ../src/crypto/crypto_openssl.c:145:17: error: storage size of ‘ctx’ isn’t known EVP_CIPHER_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:145:17: warning: unused variable ‘ctx’ [-Wunused-variable] In file included from /root/Desktop/hostapd-2.2/src/utils/common.h:12:0, from ../src/crypto/crypto_openssl.c:26: ../src/crypto/crypto_openssl.c: In function ‘aes_encrypt_init’: ../src/crypto/crypto_openssl.c:221:25: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’ ctx = os_malloc(sizeof(*ctx)); ^~ /root/Desktop/hostapd-2.2/src/utils/os.h:478:30: note: in definition of macro ‘os_malloc’

define os_malloc(s) malloc((s))

                          ^

../src/crypto/crypto_openssl.c: At top level: ../src/crypto/crypto_openssl.c:353:17: error: field ‘enc’ has incomplete type EVP_CIPHER_CTX enc; ^~~ ../src/crypto/crypto_openssl.c:354:17: error: field ‘dec’ has incomplete type EVP_CIPHER_CTX dec; ^~~ ../src/crypto/crypto_openssl.c: In function ‘dh5_init’: ../src/crypto/crypto_openssl.c:478:4: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’ dh->g = BN_new(); ^~ ../src/crypto/crypto_openssl.c: At top level: ../src/crypto/crypto_openssl.c:596:11: error: field ‘ctx’ has incomplete type HMAC_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c: In function ‘crypto_hash_init’: ../src/crypto/crypto_openssl.c:631:2: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration] HMAC_CTX_init(&ctx->ctx); ^~~~~ ../src/crypto/crypto_openssl.c: In function ‘crypto_hash_finish’: ../src/crypto/crypto_openssl.c:674:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration] HMAC_CTX_cleanup(&ctx->ctx); ^~~~ ../src/crypto/crypto_openssl.c: In function ‘hmac_sha1_vector’: ../src/crypto/crypto_openssl.c:706:11: error: storage size of ‘ctx’ isn’t known HMAC_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:706:11: warning: unused variable ‘ctx’ [-Wunused-variable] ../src/crypto/crypto_openssl.c: In function ‘hmac_sha256_vector’: ../src/crypto/crypto_openssl.c:747:11: error: storage size of ‘ctx’ isn’t known HMAC_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:747:11: warning: unused variable ‘ctx’ [-Wunused-variable] Makefile:892: recipe for target '../src/crypto/crypto_openssl.o' failed make: [../src/crypto/crypto_openssl.o] Error 1 (ignored) CC ../src/crypto/crypto_openssl.c CC ../src/crypto/fips_prf_openssl.c CC ../src/crypto/aes-wrap.c CC ../src/crypto/aes-eax.c CC ../src/crypto/aes-ctr.c CC ../src/crypto/aes-encblock.c CC ../src/crypto/aes-omac1.c CC ../src/crypto/aes-unwrap.c CC ../src/crypto/aes-cbc.c CC ../src/crypto/sha1-prf.c CC ../src/crypto/sha1-tprf.c CC ../src/crypto/sha1-tlsprf.c CC ../src/crypto/sha256-prf.c CC ../src/crypto/dh_groups.c CC ../src/crypto/random.c CC ../src/radius/radius_server.c CC ../src/utils/base64.c CC ../src/ap/wmm.c CC ../src/ap/ap_list.c CC ../src/ap/ieee802_11.c CC ../src/ap/hw_features.c CC ../src/ap/dfs.c CC ../src/drivers/driver_common.c cc: error: ../src/wpe/wpe.o: No such file or directory cc: error: ../src/crypto/tls_openssl.o: No such file or directory cc: error: ../src/crypto/crypto_openssl.o: No such file or directory Makefile:918: recipe for target 'hostapd-wpe' failed make: [hostapd-wpe] Error 1 (ignored) LD hostapd-wpe CC hostapd_cli.c CC ../src/common/wpa_ctrl.c CC ../src/utils/edit_simple.c LD hostapd-wpe_cli root@kali:~/Desktop/hostapd-2.2/hostapd# sudo ./hostapd-wpe hostapd-wpe.conf sudo: ./hostapd-wpe: command not found root@kali:~/Desktop/hostapd-2.2/hostapd# ls android.config eap_testing.txt hostapd.sim_db Android.mk hapd_module_tests.c hostapd.vlan ChangeLog hlr_auc_gw.c hostapd.wpa_psk config_file.c hlr_auc_gw.milenage_db hostapd-wpe_cli config_file.d hlr_auc_gw.txt hostapd-wpe.conf config_file.h hostapd.8 hostapd-wpe.eap_user config_file.o hostapd.accept logwatch ctrl_iface.c hostapd_cli.1 main.c ctrl_iface.d hostapd_cli.c main.d ctrl_iface.h hostapd_cli.d main.o ctrl_iface.o hostapd_cli.o Makefile defconfig hostapd.conf nt_password_hash.c eap_register.c hostapd.deny README eap_register.d hostapd.eap_user README-WPS eap_register.h hostapd.eap_user_sqlite wired.conf eap_register.o hostapd.radius_clients wps-ap-nfc.py root@kali:~/Desktop/hostapd-2.2/hostapd# sudo ./hostapd-wpe_cli hostapd-wpe.conf Failed to connect to hostapd - wpa_ctrl_open: No such file or directory root@kali:~/Desktop/hostapd-2.2/hostapd# make -Bi CC main.c CC config_file.c CC ../src/ap/hostapd.c CC ../src/ap/wpa_auth_glue.c CC ../src/ap/drv_callbacks.c CC ../src/ap/ap_drv_ops.c CC ../src/ap/utils.c CC ../src/ap/authsrv.c CC ../src/ap/ieee802_1x.c CC ../src/ap/ap_config.c CC ../src/ap/eap_user_db.c CC ../src/ap/ieee802_11_auth.c CC ../src/ap/sta_info.c CC ../src/ap/wpa_auth.c CC ../src/ap/tkip_countermeasures.c CC ../src/ap/ap_mlme.c CC ../src/ap/wpa_auth_ie.c CC ../src/ap/preauth_auth.c CC ../src/ap/pmksa_cache_auth.c CC ../src/ap/ieee802_11_shared.c CC ../src/ap/beacon.c ../src/wpe/wpe.c: In function ‘wpe_hb_cb’: ../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) if (v_content_type == TLS1_RT_HEARTBEAT) { ^~~~~ ../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in ../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ v_ssl->tlsext_hb_pending = 1; ^~ Makefile:892: recipe for target '../src/wpe/wpe.o' failed make: [../src/wpe/wpe.o] Error 1 (ignored) CC ../src/wpe/wpe.c CC ../src/drivers/drivers.c CC ../src/utils/eloop.c CC ../src/utils/common.c CC ../src/utils/wpa_debug.c CC ../src/utils/wpabuf.c CC ../src/utils/os_unix.c CC ../src/utils/ip_addr.c CC ../src/common/ieee802_11_common.c CC ../src/common/wpa_common.c CC ../src/eapol_auth/eapol_auth_sm.c CC ../src/eapol_auth/eapol_auth_dump.c CC ../src/radius/radius.c CC ../src/radius/radius_client.c CC ../src/radius/radius_das.c CC ../src/ap/vlan_init.c CC ctrl_iface.c CC ../src/ap/ctrl_iface_ap.c CC ../src/crypto/md5.c CC ../src/ap/iapp.c CC ../src/ap/peerkey_auth.c CC ../src/drivers/driver_hostap.c CC ../src/drivers/driver_wired.c CC ../src/drivers/driver_nl80211.c CC ../src/utils/radiotap.c CC ../src/drivers/netlink.c CC ../src/drivers/linux_ioctl.c CC ../src/drivers/rfkill.c CC ../src/l2_packet/l2_packet_linux.c CC ../src/eap_server/eap_server_md5.c CC ../src/eap_server/eap_server_tls.c CC ../src/eap_server/eap_server_peap.c CC ../src/eap_common/eap_peap_common.c CC ../src/eap_server/eap_server_ttls.c CC ../src/eap_server/eap_server_mschapv2.c CC ../src/eap_server/eap_server_gtc.c CC ../src/eap_server/eap_server_sim.c CC ../src/eap_server/eap_server_aka.c CC ../src/eap_common/eap_sim_common.c CC ../src/eap_server/eap_sim_db.c CC ../src/eap_server/eap_server_pax.c CC ../src/eap_common/eap_pax_common.c CC ../src/eap_server/eap_server_psk.c CC ../src/eap_common/eap_psk_common.c CC ../src/eap_server/eap_server_sake.c CC ../src/eap_common/eap_sake_common.c CC ../src/eap_server/eap_server_gpsk.c CC ../src/eap_common/eap_gpsk_common.c CC ../src/eap_server/eap_server_pwd.c CC ../src/eap_common/eap_pwd_common.c CC ../src/eap_server/eap_server_eke.c CC ../src/eap_common/eap_eke_common.c CC ../src/eap_server/eap_server_fast.c CC ../src/eap_common/eap_fast_common.c CC ../src/eap_server/eap_server_ikev2.c CC ../src/eap_server/ikev2.c CC ../src/eap_common/eap_ikev2_common.c CC ../src/eap_common/ikev2_common.c CC ../src/eap_server/eap_server_tnc.c CC ../src/eap_server/tncs.c CC eap_register.c CC ../src/eap_server/eap_server.c CC ../src/eap_common/eap_common.c CC ../src/eap_server/eap_server_methods.c CC ../src/eap_server/eap_server_identity.c CC ../src/crypto/ms_funcs.c CC ../src/eap_common/chap.c CC ../src/eap_server/eap_server_tls_common.c ../src/crypto/tls_openssl.c: In function ‘tls_init’: ../src/crypto/tls_openssl.c:805:2: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated-declarations] ssl = SSL_CTX_new(TLSv1_method()); ^~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/ssl.h:1596:1: note: declared here DEPRECATEDIN_1_1_0(owur const SSL_METHOD TLSv1_method(void)) / TLSv1.0 / ^ ../src/crypto/tls_openssl.c: In function ‘tls_deinit’: ../src/crypto/tls_openssl.c:861:3: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations] ERR_remove_state(0); ^~~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/err.h:247:1: note: declared here DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) ^ ../src/crypto/tls_openssl.c: In function ‘tls_load_ca_der’: ../src/crypto/tls_openssl.c:1530:40: error: dereferencing pointer to incomplete type ‘SSL_CTX {aka struct ssl_ctx_st}’ lookup = X509_STORE_add_lookup(ssl_ctx->cert_store, ^~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_get_keys’: ../src/crypto/tls_openssl.c:2522:24: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL) ^~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_encrypt’: ../src/crypto/tls_openssl.c:2755:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_before_appdata) ^~ ../src/crypto/tls_openssl.c:2758:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data)); ^~~ ../src/crypto/tls_openssl.c:2765:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_after_appdata) ^~ ../src/crypto/tls_openssl.c:2770:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ buf = wpabuf_alloc(wpabuf_len(in_data) + 300); ^~~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_set_session_ticket_cb’: ../src/crypto/tls_openssl.c:3547:44: warning: passing argument 2 of ‘SSL_set_session_secret_cb’ from incompatible pointer type [-Wincompatible-pointer-types] if (SSL_set_session_secret_cb(conn->ssl, tls_sess_sec_cb, ^~~~~~~ In file included from ../src/crypto/tls_openssl.c:19:0: /usr/include/openssl/ssl.h:1801:12: note: expected ‘tls_session_secret_cb_fn {aka int ()(struct ssl_st , void , int , struct stack_st_SSL_CIPHER , const struct ssl_cipher_st , void )}’ but argument is of type ‘int ()(SSL , void , int , struct stack_st_SSL_CIPHER , SSL_CIPHER , void ) {aka int ()(struct ssl_st , void , int , struct stack_st_SSL_CIPHER , struct ssl_cipher_st *, void )}’ owur int SSL_set_session_secret_cb(SSL *s, ^~~~~~~~~ ../src/crypto/tls_openssl.c: In function ‘wpe_hb_enc’: ../src/crypto/tls_openssl.c:3595:39: error: ‘SSL_TLSEXT_HB_ENABLED’ undeclared (first use in this function) if(!conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_ENABLED || ^~~~~ ../src/crypto/tls_openssl.c:3595:39: note: each undeclared identifier is reported only once for each function it appears in ../src/crypto/tls_openssl.c:3596:43: error: ‘SSL_TLSEXT_HB_DONT_SEND_REQUESTS’ undeclared (first use in this function) conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_DONT_SEND_REQUESTS) { ^~~~~~~~ In file included from ../src/crypto/tls_openssl.c:32:0: /root/Desktop/hostapd-2.2/src/wpe/wpe.h:42:56: warning: left-hand operand of comma expression has no effect [-Wunused-value]

define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \

                                                    ^

../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’ s2n(conn->ssl->tlsext_hb_seq, p); ^~~ /root/Desktop/hostapd-2.2/src/wpe/wpe.h:43:46: warning: left-hand operand of comma expression has no effect [-Wunused-value] c[1]=(unsigned char)(((s) )&0xff)),c+=2) ^ ../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’ s2n(conn->ssl->tlsext_hb_seq, p); ^~~ ../src/crypto/tls_openssl.c:3625:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations] RAND_pseudo_bytes(p, 16); ^~~~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/rand.h:47:1: note: declared here DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char buf, int num)) ^ ../src/crypto/tls_openssl.c:3629:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations] RAND_pseudo_bytes(p, padding); ^~~~~ In file included from /usr/include/openssl/ct.h:13:0, from /usr/include/openssl/ssl.h:61, from ../src/crypto/tls_openssl.c:19: /usr/include/openssl/rand.h:47:1: note: declared here DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char buf, int num)) ^ ../src/crypto/tls_openssl.c:3636:38: error: dereferencing pointer to incomplete type ‘SSL_METHOD {aka const struct ssl_method_st}’ if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT, ^~ ../src/crypto/tls_openssl.c:3636:67: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT, ^~~~~ ../src/crypto/tls_openssl.c: In function ‘tls_connection_resumed’: ../src/crypto/tls_openssl.c:2838:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:892: recipe for target '../src/crypto/tls_openssl.o' failed make: [../src/crypto/tls_openssl.o] Error 1 (ignored) CC ../src/crypto/tls_openssl.c ../src/crypto/crypto_openssl.c: In function ‘openssl_digest_vector’: ../src/crypto/crypto_openssl.c:84:13: error: storage size of ‘ctx’ isn’t known EVP_MD_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:84:13: warning: unused variable ‘ctx’ [-Wunused-variable] ../src/crypto/crypto_openssl.c: In function ‘rc4_skip’: ../src/crypto/crypto_openssl.c:145:17: error: storage size of ‘ctx’ isn’t known EVP_CIPHER_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:145:17: warning: unused variable ‘ctx’ [-Wunused-variable] In file included from /root/Desktop/hostapd-2.2/src/utils/common.h:12:0, from ../src/crypto/crypto_openssl.c:26: ../src/crypto/crypto_openssl.c: In function ‘aes_encrypt_init’: ../src/crypto/crypto_openssl.c:221:25: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’ ctx = os_malloc(sizeof(*ctx)); ^~ /root/Desktop/hostapd-2.2/src/utils/os.h:478:30: note: in definition of macro ‘os_malloc’

define os_malloc(s) malloc((s))

                          ^

../src/crypto/crypto_openssl.c: At top level: ../src/crypto/crypto_openssl.c:353:17: error: field ‘enc’ has incomplete type EVP_CIPHER_CTX enc; ^~~ ../src/crypto/crypto_openssl.c:354:17: error: field ‘dec’ has incomplete type EVP_CIPHER_CTX dec; ^~~ ../src/crypto/crypto_openssl.c: In function ‘dh5_init’: ../src/crypto/crypto_openssl.c:478:4: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’ dh->g = BN_new(); ^~ ../src/crypto/crypto_openssl.c: At top level: ../src/crypto/crypto_openssl.c:596:11: error: field ‘ctx’ has incomplete type HMAC_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c: In function ‘crypto_hash_init’: ../src/crypto/crypto_openssl.c:631:2: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration] HMAC_CTX_init(&ctx->ctx); ^~~~~ ../src/crypto/crypto_openssl.c: In function ‘crypto_hash_finish’: ../src/crypto/crypto_openssl.c:674:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration] HMAC_CTX_cleanup(&ctx->ctx); ^~~~ ../src/crypto/crypto_openssl.c: In function ‘hmac_sha1_vector’: ../src/crypto/crypto_openssl.c:706:11: error: storage size of ‘ctx’ isn’t known HMAC_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:706:11: warning: unused variable ‘ctx’ [-Wunused-variable] ../src/crypto/crypto_openssl.c: In function ‘hmac_sha256_vector’: ../src/crypto/crypto_openssl.c:747:11: error: storage size of ‘ctx’ isn’t known HMAC_CTX ctx; ^~~ ../src/crypto/crypto_openssl.c:747:11: warning: unused variable ‘ctx’ [-Wunused-variable] Makefile:892: recipe for target '../src/crypto/crypto_openssl.o' failed make: [../src/crypto/crypto_openssl.o] Error 1 (ignored) CC ../src/crypto/crypto_openssl.c CC ../src/crypto/fips_prf_openssl.c CC ../src/crypto/aes-wrap.c CC ../src/crypto/aes-eax.c CC ../src/crypto/aes-ctr.c CC ../src/crypto/aes-encblock.c CC ../src/crypto/aes-omac1.c CC ../src/crypto/aes-unwrap.c CC ../src/crypto/aes-cbc.c CC ../src/crypto/sha1-prf.c CC ../src/crypto/sha1-tprf.c CC ../src/crypto/sha1-tlsprf.c CC ../src/crypto/sha256-prf.c CC ../src/crypto/dh_groups.c CC ../src/crypto/random.c CC ../src/radius/radius_server.c CC ../src/utils/base64.c CC ../src/ap/wmm.c CC ../src/ap/ap_list.c CC ../src/ap/ieee802_11.c CC ../src/ap/hw_features.c CC ../src/ap/dfs.c CC ../src/drivers/driver_common.c cc: error: ../src/wpe/wpe.o: No such file or directory cc: error: ../src/crypto/tls_openssl.o: No such file or directory cc: error: ../src/crypto/crypto_openssl.o: No such file or directory Makefile:918: recipe for target 'hostapd-wpe' failed make: [hostapd-wpe] Error 1 (ignored) LD hostapd-wpe CC hostapd_cli.c CC ../src/common/wpa_ctrl.c CC ../src/utils/edit_simple.c LD hostapd-wpe_cli root@kali:~/Desktop/hostapd-2.2/hostapd#

lanrat commented 7 years ago

I resolved this issue as per https://github.com/OpenSecurityResearch/hostapd-wpe/issues/1#issuecomment-267822365 :

apt-get install libssl1.0-dev

ricardojoserf commented 6 years ago

@lanrat i love you mighty rat man!