Newer OpenSSL versions have a slightly different function-signature

coming out of "openssl dhparam -C". Be prepared for that -- while
retaining compatibility with the older versions.

PR:		234361
Reported by:	Gerald Gutierrez
This commit is contained in:
Mikhail Teterin 2018-12-31 01:13:48 +00:00
parent 0be7eeab72
commit fdad400324
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=488753

View file

@ -11,7 +11,7 @@
- echo "${o_output}"
-
+ if openssl dhparam -C "$@" | sed \
+ -e 's/^DH \*get_dh[0-9]*/static DH *get_dhParams/' \
+ -e 's/^\(static \)*DH \*get_dh[0-9]*/static DH *get_dhParams/' \
+ -e '/^-----BEGIN DH PARAMETERS-----$/,/^-----END DH PARAMETERS-----$/ d;/^#/ d'
+ then
return 0