Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -o option as phase1 options. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion rad_eap_test
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,12 @@ function generate_config()
then
echo " pairwise=CCMP TKIP" >> $CONF
echo " group=CCMP TKIP WEP104 WEP40" >> $CONF

if [[ ! -z "$PHASE1_OPT" ]]
then
echo " phase1=\"$PHASE1_OPT\"" >> $CONF
fi

echo " phase2=\"auth=$PHASE2\"" >> $CONF
fi

Expand Down Expand Up @@ -658,6 +664,7 @@ Parameters :
-b - print details about certificate of RADIUS server (whole certificate chain may be retrieved by eapol_test, there is a certain logic that tries to determine the end server cert and print it)
-B <file> - save certificate of RADIUS server to specified file
-n <directory> - store temporary files in specified directory
-o - string options to be used in phase1 (such as disabling specific TLS versions)
-g - print the entire unmodified output of eapol_test
-V - Show received Chargeable-User-Identity and/or Operator-Name
-X <warn_days> - check certificate expiry (whole certificate chain may be retrieved by eapol_test, there is a certain logic that tries to determine the end server cert which is checked for expiry)
Expand Down Expand Up @@ -892,7 +899,7 @@ function check_settings()
# ===========================================================================================
function process_options()
{
while getopts "H:P:S:u:p:t:m:s:e:t:M:i:d:j:k:a:A:l:2:x:vcNO:I:CTfhbB:n:gVX:64" opt
while getopts "H:P:S:u:p:t:m:s:e:t:M:i:d:j:k:a:A:l:2:x:vcNO:I:CTfhbB:n:o:gVX:64" opt
do
case "$opt" in
H) ADDRESS=$OPTARG;;
Expand Down Expand Up @@ -924,6 +931,7 @@ function process_options()
b) GET_CERT="YES";;
B) WRITE_CERT=$OPTARG;;
n) TMPDIR=$OPTARG;;
o) PHASE1_OPT=$OPTARG;;
g) VERBOSE=4;;
V) VERBOSE=1;;
X) CERTIFICATE_EXPIRY=$OPTARG;;
Expand Down Expand Up @@ -966,6 +974,9 @@ function default_config()
# default connection info
CONN_INFO="rad_eap_test + eapol_test"

# default phase1 settings
PHASE1_OPT="tls_disable_tlsv1_0=0 tls_disable_tlsv1_1=0 tls_disable_tlsv1_2=0 tls_disable_tlsv1_3=1"

# return codes
RET_SUCC=3
RET_EAP_FAILED=4
Expand Down