gstreamer/webrtc/signalling/generate_cert.sh
Matthew Waters e1c3dad258 webrtc: update for move to gst-examples
- Integrate with the build system.
- Some README updates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/16>
2020-06-25 18:36:22 +10:00

16 lines
297 B
Bash
Executable file

#! /bin/sh
BASE_DIR=$(dirname $0)
OUTDIR=""
if [ $# -eq 1 ]; then
OUTDIR=$1/
fi
output=$(openssl req -x509 -newkey rsa:4096 -keyout ${OUTDIR}key.pem -out ${OUTDIR}cert.pem -days 365 -nodes -subj "/CN=example.com" 2>&1)
ret=$?
if [ ! $ret -eq 0 ]; then
echo "${output}" 1>&2
exit $ret
fi