Skip to content
Snippets Groups Projects
Commit 0f142f31 authored by nimrod's avatar nimrod
Browse files

Implementation.

parent 8598c5e3
No related branches found
No related tags found
No related merge requests found
#!/bin/sh -e
. "$1"
if [ -z "$path" ]
then
echo "failed=True msg=Path not set."
exit
fi
if [ ! -r $path ]
then
echo "failed=True msg=Can\'t access path."
exit
fi
if [ ! -f $path ]
then
echo "failed=True msg=Path doesn't exist or is not a file."
exit
fi
bits="$(openssl dhparam -in $path -text -noout \
| sed -n 's/Diffie-Hellman-Parameters: (\([0-9]*\) bit)/\1/p')"
echo "{ \"changed\": False, \"bits\": \"$bits\" }"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment