diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2023-11-20 04:10:55 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2023-11-20 04:10:55 +0000 |
commit | d2545249739ae3fd9f99f400004058872e0bee94 (patch) | |
tree | 534724dcaaf3089f847a1442e4938e8aaf653d0d | |
parent | 2ed62c75d1230bbe8268a1a3c54de2972d50dcf8 (diff) | |
download | ports-d2545249739ae3fd9f99f400004058872e0bee94.tar.gz ports-d2545249739ae3fd9f99f400004058872e0bee94.zip |
devel/tcltls: fixes to the newly-added generation of DH-parameters
Specifically:
- move the entire code to the post-configure target -- so
that our own header will be newer than the Makefile
generated by configure. Otherwise the authors' Makefile
will (attempt to) regenerate the dh_param.h again.
- use openssl's asnparse functionality to more reliably
parse the generated prime -- and turn it into C.
PR: 275160
-rw-r--r-- | devel/tcltls/Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/devel/tcltls/Makefile b/devel/tcltls/Makefile index d370430fad53..e2965fb6995f 100644 --- a/devel/tcltls/Makefile +++ b/devel/tcltls/Makefile @@ -38,15 +38,17 @@ CFLAGS+= -Wno-error=int-conversion post-patch: ${MV} ${WRKSRC}/tests/ciphers.test ${WRKSRC}/tests/ciphers.test.broken - ${CP} ${FILESDIR}/dh_params.h ${WRKSRC}/ # Newer openssl-dhparam has no "-C" option, we emulate it here :-/ post-configure: + ${CP} ${FILESDIR}/dh_params.h ${WRKSRC}/ ${OPENSSLBASE}/bin/openssl dhparam -text 2048 | \ - ${SED} -E -e '/^---/,/^---/d' \ - -e '/(DH|prime|generator)/d' \ - -e 's/([0-9a-h]{2})(:|$$)/0x\1, /g' \ - -e w${WRKSRC}/generateddh.txt + ${OPENSSLBASE}/bin/openssl asn1parse | \ + ${SED} -E \ + -e '/^ .*(0|5):d=/d' \ + -e 's/ 4:d=1.*INTEGER *://' \ + -e 's/([0-9A-H]{2})/0x\1, /g' \ + -e 'w${WRKSRC}/generateddh.txt' post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} |