sign-req: Unique serial, check input serial is hexadecimal only
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
parent
a78babf835
commit
8ca55cfff0
@ -2449,6 +2449,13 @@ Certificate created at:
|
|||||||
# Check serial in db
|
# Check serial in db
|
||||||
check_serial_unique() {
|
check_serial_unique() {
|
||||||
[ "$1" ] || user_error "Serial number required!"
|
[ "$1" ] || user_error "Serial number required!"
|
||||||
|
case "$1" in
|
||||||
|
(*[!1234567890abcdef]*)
|
||||||
|
user_error "Invalid serial number: '$1'"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
: # ok
|
||||||
|
esac
|
||||||
|
|
||||||
[ "$2" = batch ] && internal_batch=1
|
[ "$2" = batch ] && internal_batch=1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user