#!/bin/bash
+commajoin() {
+ f=y
+ for arg in "$@"; do
+ if [ -z "$f" ]; then echo -n ,; fi
+ echo -n "$arg"
+ f=
+ done
+}
+
usage() {
echo "usage: certreq [-h] [-a ALTNAMES] SUBJECT KEYFILE"
echo ' SUBJECT is of the form `/PART1=VALUE1/PART2=VALUE2/...'\'
args=(openssl req -new)
if [ -n "${!reqexts[*]}" ]; then
- args=("${args[@]}" -reqexts "${!reqexts[@]}")
+ for reqext in "${!reqexts[@]}"; do
+ args=("${args[@]}" -reqexts "$reqext")
+ done
fi
if [ -n "${!config[*]}" ]; then
confpath="$(mktemp /tmp/certreq-XXXXXX)"