svn commit: r426086 - in head/security/john: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Mon Nov 14 06:41:48 UTC 2016
Author: danfe
Date: Mon Nov 14 06:41:47 2016
New Revision: 426086
URL: https://svnweb.freebsd.org/changeset/ports/426086
Log:
- Fix the build against LibreSSL: put back safety belts added in r382632,
expanding them to cover newly added files, and augment OPENSSL_NO_SHA0
patch to avoid linking error
- Restore `-flax-vector-conversions' option required on pre-Clang systems
that was erroneously removed in r425958
PR: 214459
Modified:
head/security/john/Makefile
head/security/john/files/patch-rawSHA0__fmt__plug.c
Modified: head/security/john/Makefile
==============================================================================
--- head/security/john/Makefile Mon Nov 14 06:24:05 2016 (r426085)
+++ head/security/john/Makefile Mon Nov 14 06:41:47 2016 (r426086)
@@ -52,6 +52,28 @@ PORTDOCS= *
OPTIONS_DEFINE= DOCS #OPENMP
#OPENMP_USES= compiler:openmp
+post-patch:
+# Replace methods and types that were marked deprecated by OpenSSL 0.9.7
+# and removed in OpenSSL 1.1.0 and LibreSSL
+ @${REINPLACE_CMD} -e 's|des_string_to_key|DES_string_to_key|' \
+ ${WRKSRC}/KRB4_fmt_plug.c
+ @${REINPLACE_CMD} -e 's|des_set_odd_parity|DES_set_odd_parity|' \
+ ${WRKSRC}/KRB4_std_plug.c
+ @${REINPLACE_CMD} -e 's|C_Block|DES_cblock|' \
+ ${WRKSRC}/efs_fmt_plug.c \
+ ${WRKSRC}/gpg_fmt_plug.c \
+ ${WRKSRC}/keychain_fmt_plug.c \
+ ${WRKSRC}/mozilla_ng_fmt_plug.c \
+ ${WRKSRC}/opencl_gpg_fmt_plug.c \
+ ${WRKSRC}/opencl_keychain_fmt_plug.c \
+ ${WRKSRC}/ssh_ng_fmt_plug.c
+
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000024
+CFLAGS+= -flax-vector-conversions
+.endif
+
do-install:
.for b in ${BINARIES}
${INSTALL_PROGRAM} ${WRKSRC}/../run/${b} ${STAGEDIR}${PREFIX}/bin
@@ -71,4 +93,4 @@ do-install-DOCS-on:
@${RM} ${WRKSRC}/../doc/COPYING
${INSTALL_DATA} ${WRKSRC}/../doc/* ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Modified: head/security/john/files/patch-rawSHA0__fmt__plug.c
==============================================================================
--- head/security/john/files/patch-rawSHA0__fmt__plug.c Mon Nov 14 06:24:05 2016 (r426085)
+++ head/security/john/files/patch-rawSHA0__fmt__plug.c Mon Nov 14 06:41:47 2016 (r426086)
@@ -1,18 +1,27 @@
--- rawSHA0_fmt_plug.c.orig 2014-09-19 16:40:51 UTC
+++ rawSHA0_fmt_plug.c
-@@ -15,6 +15,8 @@ john_register_one(&fmt_rawSHA_0);
- #include <string.h>
- #include <openssl/sha.h>
+@@ -6,6 +6,10 @@
+ * Based on Raw-SHA1, but this is OpenSSL only.
+ */
++#include <openssl/sha.h>
++
+#ifndef OPENSSL_NO_SHA0
+
+ #if FMT_EXTERNS_H
+ extern struct fmt_main fmt_rawSHA_0;
+ #elif FMT_REGISTERS_H
+@@ -13,7 +17,6 @@ john_register_one(&fmt_rawSHA_0);
+ #else
+
+ #include <string.h>
+-#include <openssl/sha.h>
+
#include "arch.h"
#include "misc.h"
- #include "common.h"
-@@ -207,4 +209,6 @@ struct fmt_main fmt_rawSHA_0 = {
- }
+@@ -208,3 +211,5 @@ struct fmt_main fmt_rawSHA_0 = {
};
-+#endif /* OPENSSL_NO_SHA0 */
-+
#endif /* plugin stanza */
++
++#endif /* OPENSSL_NO_SHA0 */
More information about the svn-ports-head
mailing list