diff --git a/src/proxmox-acme b/src/proxmox-acme index 705f7df..18cbf20 100644 --- a/src/proxmox-acme +++ b/src/proxmox-acme @@ -510,7 +510,9 @@ _hex_dump() { } # stdin stdout +#_url_encode [upper-hex] the encoded hex will be upper-case if the argument upper-hex is followed _url_encode() { + _upper_hex=$1 _hex_str=$(_hex_dump) for _hex_code in $_hex_str; do #upper case @@ -720,6 +722,9 @@ _url_encode() { #other hex *) + if [ "$_upper_hex" = "upper-hex" ]; then + _hex_code=$(printf "%s" "$_hex_code" | _upper_case) + fi printf '%%%s' "$_hex_code" ;; esac