From 6da3b745f196e33f594e285d8abc53ea217061aa Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 11 Aug 2015 00:38:44 +0300 Subject: [PATCH] tests: Try users2.pkcs12 twice to add coverage This allows manual verification of extra PKCS#12 certificate processing. Signed-off-by: Jouni Malinen --- tests/hwsim/auth_serv/user3.pkcs12 | Bin 0 -> 2356 bytes tests/hwsim/test_ap_eap.py | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 tests/hwsim/auth_serv/user3.pkcs12 diff --git a/tests/hwsim/auth_serv/user3.pkcs12 b/tests/hwsim/auth_serv/user3.pkcs12 new file mode 100644 index 0000000000000000000000000000000000000000..953d7cb91b8b1be0bec33e2324e9552548e48337 GIT binary patch literal 2356 zcmY+Ec{~%28^>p3ZRMI4Np8*6*c?O7$XRR65wQ_9iCl@Csky?+ol?%_nj=Tt_0^n zAP@q0NM>`&x1;(x?``8`!FbWLFFT1FfgIOQG(0%78+Q~7yx&LU!PJuq7$wSA^x$jf zEOAX$&%GDzA@vEdHU$yE#+kqTztj? z-Lob5TWdRH4&;|2lQNoaXECw9FlK1nZmTKNCEZ+hO_b)ZJeHU#llzcZUEb8#tWZj3o=r1M?MSCZLDYY{)SCbeN2aozPo^>{qR zp@hJ*UNQL8FIVMvaL`@Jj0Vl#3l(94Mp_!qTCa>cZW_3hT7D?$yTnDa6v=^L2AaOB zI&kB}(b_@)-yUlaWK@D9(5Jv>qUnocYW_fDzxmJrn)h4r$(F*h1q?UBYXVub@FH~P zixdLC&TOE%{-RpV6kl2S7&x(@7(L;19+4_H>mCtoziR*F=~jyvYMca%iY1~4s81=` z{qCoS@-HCYz2P85_zlN7UvTbL7b$v_rB7*neA(s6b5Hy97kb}SQoIQg3ThvgI)W1w zY@X^D{Z3>oPS2}s>tU@)`seqV0Nd{&Aqmcb&D0AuC7u-wE^qVI2l0CakB$=Dx5CZ+q~FM1D30( zzZ9fml-FYbUo5H*Td)3*#Cv73BJZzY@#zhl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Tze^nFJJQ0O%9==m4#QD0C2CT65Eo^L&ddBoB=4FP>|6og@ zVk0H9zh5%{sdUo}_%yrr;QPT@xxE&*a3#fDX|4FFmgOvpX*%cI%}?L_vx}lu_6%$6 zq5kYM<$4LHeTI%kcO-6e!YeS40LQ`w zazXy@rMITD@sH%pL%izDlI6~ZsYyYD+G%rQ@ze90y(+hHAM3_z^B#BYE|d?6%o%ar zutb}q#Q%HM&=Y80R(QZgTO_F{GnsfR2@k{Afp-_0H&DpGLvXZ+kPyHX;0F)^+yIaO zcLDbRw*iiax&g31>`4GG6dEOpf`Zv(IYGcvYyehxe7WU6*YoIA{CS-*_;6?zpl_0m R6+)qgZsn?jqyId^zW~YnPOSg{ literal 0 HcmV?d00001 diff --git a/tests/hwsim/test_ap_eap.py b/tests/hwsim/test_ap_eap.py index a4f2e67c3..1fc0bfd4b 100644 --- a/tests/hwsim/test_ap_eap.py +++ b/tests/hwsim/test_ap_eap.py @@ -1341,11 +1341,18 @@ def test_ap_wpa2_eap_tls_pkcs12(dev, apdev): dev[0].request("REMOVE_NETWORK all") dev[0].wait_disconnected() - eap_connect(dev[0], apdev[0], "TLS", "tls user", ca_cert="auth_serv/ca.pem", - private_key="auth_serv/user2.pkcs12", - private_key_passwd="whatever") - dev[0].request("REMOVE_NETWORK all") - dev[0].wait_disconnected() + # Run this twice to verify certificate chain handling with OpenSSL. Use two + # different files to cover both cases of the extra certificate being the + # one that signed the client certificate and it being unrelated to the + # client certificate. + for pkcs12 in "auth_serv/user2.pkcs12", "auth_serv/user3.pkcs12": + for i in range(2): + eap_connect(dev[0], apdev[0], "TLS", "tls user", + ca_cert="auth_serv/ca.pem", + private_key=pkcs12, + private_key_passwd="whatever") + dev[0].request("REMOVE_NETWORK all") + dev[0].wait_disconnected() def test_ap_wpa2_eap_tls_pkcs12_blob(dev, apdev): """WPA2-Enterprise connection using EAP-TLS and PKCS#12 from configuration blob"""