-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 Certificate List Function V2 #669
base: master
Are you sure you want to change the base?
Conversation
Resync Back to Master
Fixes #563 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some issues with the PR. Other than what I wrote in the comments, can you remove the openvpn-install
submodule?
If you can, merge the commits with the changes in one after.
Thanks for contributing!
openvpn-install.sh
Outdated
@@ -1309,9 +1338,12 @@ function manageMenu() { | |||
revokeClient | |||
;; | |||
3) | |||
removeOpenVPN | |||
listcerts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the same casing as the other functions and remove the added space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed Casing
openvpn-install.sh
Outdated
echo " 4) Exit" | ||
until [[ $MENU_OPTION =~ ^[1-4]$ ]]; do | ||
read -rp "Select an option [1-4]: " MENU_OPTION | ||
echo " 3) List Current Issued Certificates" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the same casing as the other options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed Casing
openvpn-install.sh
Outdated
if [ "${STATUS}" == "V" ]; then | ||
printf " Valid :: %s :: %s\\n" "$NAME" "$EXPD" | ||
elif [ "${STATUS}" == "R" ]; then | ||
#printf " Revoked :: %s :: %s\\n" "$NAME" "$EXPD" | ||
continue | ||
else | ||
printf " Unknown :: %s :: %s\\n" "$NAME" "$EXPD" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use \t
instead of multiple spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Tabs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes Complete
openvpn-install.sh
Outdated
if [ "${STATUS}" == "V" ]; then | ||
printf " Valid :: %s :: %s\\n" "$NAME" "$EXPD" | ||
elif [ "${STATUS}" == "R" ]; then | ||
#printf " Revoked :: %s :: %s\\n" "$NAME" "$EXPD" | ||
continue | ||
else | ||
printf " Unknown :: %s :: %s\\n" "$NAME" "$EXPD" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Tabs
openvpn-install.sh
Outdated
echo " 4) Exit" | ||
until [[ $MENU_OPTION =~ ^[1-4]$ ]]; do | ||
read -rp "Select an option [1-4]: " MENU_OPTION | ||
echo " 3) List Current Issued Certificates" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed Casing
openvpn-install.sh
Outdated
@@ -1309,9 +1338,12 @@ function manageMenu() { | |||
revokeClient | |||
;; | |||
3) | |||
removeOpenVPN | |||
listcerts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed Casing
openvpn-install.sh
Outdated
while read -r line || [ -n "$line" ]; do | ||
STATUS=$(echo "$line" | awk '{print $1}') | ||
NAME=$(echo "$line" | awk '{print $5}' | awk -FCN= '{print $2}') | ||
EXPD=$(echo "$line" | awk '{if (length($2) == 15) print $2; else print "20"$2}' | cut -b 1-8 | date +"%b %d %Y" -f -) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expiration date is wrong for revoked clients, we should use the column provided instead of calculating it.
Co-authored-by: randomshell <randshell@protonmail.com>
Co-authored-by: randomshell <randshell@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I"m fine with the proposed changes. Thanks for doing that.
Co-authored-by: randomshell <randshell@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Added a Certificate List function with requested Changed.
Function will List issues Certificates with CN and Validity Dates.