3a67a6c8cb
This was needed because puppet-certmonger didn't have the means to request the appropriate EKU values manually (it relied on the defaults per CA). This is no longer the case, so we can remove it. Depends-On: Ie54d10fd4da45a73529a05e29aaa8eb19f986df3 Change-Id: I0eb466d7311e012d10fe03651c39dfd9a77bc517
25 lines
618 B
Bash
25 lines
618 B
Bash
#!/bin/bash
|
|
CERT_FILE="$1"
|
|
KEY_FILE="$2"
|
|
OUTPUT_FILE="$3"
|
|
REQUEST_NICKNAME="$4"
|
|
|
|
if [[ -z "$CERT_FILE" || -z "$KEY_FILE" || -z "$OUTPUT_FILE" ]]; then
|
|
echo "You need to provide CERT_FILE KEY_FILE and finally OUTPUT_FILE" \
|
|
"as arguments in that order."
|
|
exit 1
|
|
fi
|
|
if [[ ! -f "$CERT_FILE" || ! -f "$KEY_FILE" ]]; then
|
|
echo "Certificate and key files must exist!"
|
|
exit 1
|
|
fi
|
|
if [ -z "$REQUEST_NICKNAME" ]; then
|
|
echo "Request nickname must be specified in arguments."
|
|
exit 1
|
|
fi
|
|
|
|
cat $CERT_FILE $KEY_FILE > $OUTPUT_FILE
|
|
if systemctl -q is-active haproxy; then
|
|
systemctl reload haproxy
|
|
fi
|