Skip to content

Commit

Permalink
sign-req: Unique serial, check input serial is hexadecimal only
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Jul 15, 2023
1 parent a78babf commit 8ca55cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,13 @@ Certificate created at:
# Check serial in db
check_serial_unique() {
[ "$1" ] || user_error "Serial number required!"
case "$1" in
(*[!1234567890abcdef]*)
user_error "Invalid serial number: '$1'"
;;
*)
: # ok
esac

[ "$2" = batch ] && internal_batch=1

Expand Down

0 comments on commit 8ca55cf

Please sign in to comment.