aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-12-10 21:37:30 -0800
committerPaul Eggert2013-12-10 21:37:30 -0800
commita8f9bc05c344ec9b9e0dee5499ce0b1427cbfea6 (patch)
tree41f158f310130e87e01a650a5e34e2c6d52d20d9
parentbb8097b96b074e55ff05dc379b394dbdbdc82f3e (diff)
downloademacs-a8f9bc05c344ec9b9e0dee5499ce0b1427cbfea6.tar.gz
emacs-a8f9bc05c344ec9b9e0dee5499ce0b1427cbfea6.zip
Remove the option of using libcrypto.
This scorches the earth and waits for spring; see Ted Zlatanov and Stefan Monnier in <http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00323.html>. * configure.ac (with_openssl_default, HAVE_LIB_CRYPTO): Remove. Do not say whether Emacs is configured to use a crypto library, since it's no longer an option. (gl_CRYPTO_CHECK): Define a dummy. * lib/gl_openssl.h, m4/gl-openssl.m4: Remove. * admin/merge-gnulib: Remove lib/gl_openssh.h and m4/gl-openssl.m4. * src/Makefile.in (LIB_CRYPTO): Remove. (LIBES): Don't use it.
-rw-r--r--ChangeLog12
-rw-r--r--admin/ChangeLog5
-rwxr-xr-xadmin/merge-gnulib3
-rw-r--r--configure.ac12
-rw-r--r--lib/gl_openssl.h116
-rw-r--r--m4/gl-openssl.m451
-rw-r--r--src/ChangeLog6
-rw-r--r--src/Makefile.in2
8 files changed, 28 insertions, 179 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e5f084210f..787b590f098 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
12013-12-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Remove the option of using libcrypto.
4 This scorches the earth and waits for spring;
5 see Ted Zlatanov and Stefan Monnier in
6 <http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00323.html>.
7 * configure.ac (with_openssl_default, HAVE_LIB_CRYPTO): Remove.
8 Do not say whether Emacs is configured to use a crypto library,
9 since it's no longer an option.
10 (gl_CRYPTO_CHECK): Define a dummy.
11 * lib/gl_openssl.h, m4/gl-openssl.m4: Remove.
12
12013-12-10 Paul Eggert <eggert@cs.ucla.edu> 132013-12-10 Paul Eggert <eggert@cs.ucla.edu>
2 14
3 * configure.ac: Disable libcrypto by default. 15 * configure.ac: Disable libcrypto by default.
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 730253e616f..22824995dfc 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,8 @@
12013-12-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Remove the option of using libcrypto.
4 * merge-gnulib: Remove lib/gl_openssh.h and m4/gl-openssl.m4.
5
12013-12-04 Eli Zaretskii <eliz@gnu.org> 62013-12-04 Eli Zaretskii <eliz@gnu.org>
2 7
3 * unidata/unidata-gen.el (unidata-prop-alist): Update bidi-class 8 * unidata/unidata-gen.el (unidata-prop-alist): Update bidi-class
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index a5bd622f4c0..af9300edbec 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -91,7 +91,8 @@ test -x "$gnulib_srcdir"/gnulib-tool || {
91} 91}
92 92
93"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES && 93"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES &&
94rm -- "$src"m4/fcntl-o.m4 "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 && 94rm -- "$src"lib/gl_openssl.h "$src"m4/fcntl-o.m4 "$src"m4/gl-openssl.m4 \
95 "$src"m4/gnulib-cache.m4"$src" m4/warn-on-use.m4 &&
95cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc && 96cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
96cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux && 97cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
97autoreconf -i -I m4 -- ${src:+"$src"} 98autoreconf -i -I m4 -- ${src:+"$src"}
diff --git a/configure.ac b/configure.ac
index 0a2e5c624e2..41258fcb7a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,8 +94,7 @@ AC_ARG_WITH(all,
94[AS_HELP_STRING([--without-all], 94[AS_HELP_STRING([--without-all],
95 [omit almost all features and build 95 [omit almost all features and build
96 small executable with minimal dependencies])], 96 small executable with minimal dependencies])],
97 [with_features=$withval 97 [with_features=$withval],
98 with_openssl_default=$withval],
99 [with_features=yes]) 98 [with_features=yes])
100 99
101dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING) 100dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING)
@@ -640,6 +639,8 @@ dnl alternative to lib/gnulib.mk, so as to avoid generating header files
640dnl that clash with MinGW. 639dnl that clash with MinGW.
641AM_CONDITIONAL([BUILDING_FOR_WINDOWSNT], [test "x$opsys" = "xmingw32"]) 640AM_CONDITIONAL([BUILDING_FOR_WINDOWSNT], [test "x$opsys" = "xmingw32"])
642 641
642# Avoid gnulib's tests for -lcrypto, so that there's no static dependency on it.
643AC_DEFUN([gl_CRYPTO_CHECK])
643# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, 644# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
644# as we don't use them. 645# as we don't use them.
645AC_DEFUN([gl_FCNTL_O_FLAGS]) 646AC_DEFUN([gl_FCNTL_O_FLAGS])
@@ -4848,12 +4849,6 @@ else
4848 acl_summary=no 4849 acl_summary=no
4849fi 4850fi
4850 4851
4851if test -n "$LIB_CRYPTO"; then
4852 HAVE_LIB_CRYPTO=yes
4853else
4854 HAVE_LIB_CRYPTO=no
4855fi
4856
4857echo " 4852echo "
4858Configured for \`${canonical}'. 4853Configured for \`${canonical}'.
4859 4854
@@ -4893,7 +4888,6 @@ echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
4893echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" 4888echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
4894echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}" 4889echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
4895echo " Does Emacs use access control lists? ${acl_summary}" 4890echo " Does Emacs use access control lists? ${acl_summary}"
4896echo " Does Emacs use a crypto library? ${HAVE_LIB_CRYPTO} $LIB_CRYPTO"
4897echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" 4891echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
4898echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" 4892echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
4899echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" 4893echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
diff --git a/lib/gl_openssl.h b/lib/gl_openssl.h
deleted file mode 100644
index 1fb61066b11..00000000000
--- a/lib/gl_openssl.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/* gl_openssl.h -- wrap openssl crypto hash routines in gnulib interface
2
3 Copyright (C) 2013 Free Software Foundation, Inc.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18/* Written by Pádraig Brady */
19
20#ifndef GL_OPENSSL_NAME
21# error "Please define GL_OPENSSL_NAME to 1,5,256 etc."
22#endif
23
24#ifndef _GL_INLINE_HEADER_BEGIN
25# error "Please include config.h first."
26#endif
27_GL_INLINE_HEADER_BEGIN
28#ifndef GL_OPENSSL_INLINE
29# define GL_OPENSSL_INLINE _GL_INLINE
30#endif
31
32/* Concatenate two preprocessor tokens. */
33#define _GLCRYPTO_CONCAT_(prefix, suffix) prefix##suffix
34#define _GLCRYPTO_CONCAT(prefix, suffix) _GLCRYPTO_CONCAT_ (prefix, suffix)
35
36#if GL_OPENSSL_NAME == 5
37# define OPENSSL_ALG md5
38#else
39# define OPENSSL_ALG _GLCRYPTO_CONCAT (sha, GL_OPENSSL_NAME)
40#endif
41
42/* Context type mappings. */
43#if BASE_OPENSSL_TYPE != GL_OPENSSL_NAME
44# undef BASE_OPENSSL_TYPE
45# if GL_OPENSSL_NAME == 224
46# define BASE_OPENSSL_TYPE 256
47# elif GL_OPENSSL_NAME == 384
48# define BASE_OPENSSL_TYPE 512
49# endif
50# define md5_CTX MD5_CTX
51# define sha1_CTX SHA_CTX
52# define sha224_CTX SHA256_CTX
53# define sha224_ctx sha256_ctx
54# define sha256_CTX SHA256_CTX
55# define sha384_CTX SHA512_CTX
56# define sha384_ctx sha512_ctx
57# define sha512_CTX SHA512_CTX
58# undef _gl_CTX
59# undef _gl_ctx
60# define _gl_CTX _GLCRYPTO_CONCAT (OPENSSL_ALG, _CTX) /* openssl type. */
61# define _gl_ctx _GLCRYPTO_CONCAT (OPENSSL_ALG, _ctx) /* gnulib type. */
62
63struct _gl_ctx { _gl_CTX CTX; };
64#endif
65
66/* Function name mappings. */
67#define md5_prefix MD5
68#define sha1_prefix SHA1
69#define sha224_prefix SHA224
70#define sha256_prefix SHA256
71#define sha384_prefix SHA384
72#define sha512_prefix SHA512
73#define _GLCRYPTO_PREFIX _GLCRYPTO_CONCAT (OPENSSL_ALG, _prefix)
74#define OPENSSL_FN(suffix) _GLCRYPTO_CONCAT (_GLCRYPTO_PREFIX, suffix)
75#define GL_CRYPTO_FN(suffix) _GLCRYPTO_CONCAT (OPENSSL_ALG, suffix)
76
77GL_OPENSSL_INLINE void
78GL_CRYPTO_FN (_init_ctx) (struct _gl_ctx *ctx)
79{ (void) OPENSSL_FN (_Init) ((_gl_CTX *) ctx); }
80
81/* These were never exposed by gnulib. */
82#if ! (GL_OPENSSL_NAME == 224 || GL_OPENSSL_NAME == 384)
83GL_OPENSSL_INLINE void
84GL_CRYPTO_FN (_process_bytes) (const void *buf, size_t len, struct _gl_ctx *ctx)
85{ OPENSSL_FN (_Update) ((_gl_CTX *) ctx, buf, len); }
86
87GL_OPENSSL_INLINE void
88GL_CRYPTO_FN (_process_block) (const void *buf, size_t len, struct _gl_ctx *ctx)
89{ GL_CRYPTO_FN (_process_bytes) (buf, len, ctx); }
90#endif
91
92GL_OPENSSL_INLINE void *
93GL_CRYPTO_FN (_finish_ctx) (struct _gl_ctx *ctx, void *res)
94{ OPENSSL_FN (_Final) (res, (_gl_CTX *) ctx); return res; }
95
96GL_OPENSSL_INLINE void *
97GL_CRYPTO_FN (_buffer) (const char *buf, size_t len, void *res)
98{ return OPENSSL_FN () ((const unsigned char *) buf, len, res); }
99
100GL_OPENSSL_INLINE void *
101GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *res)
102{
103 /* Assume any unprocessed bytes in ctx are not to be ignored. */
104 _gl_CTX tmp_ctx = *(_gl_CTX *) ctx;
105 OPENSSL_FN (_Final) (res, &tmp_ctx);
106 return res;
107}
108
109/* Undef so we can include multiple times. */
110#undef GL_CRYPTO_FN
111#undef OPENSSL_FN
112#undef _GLCRYPTO_PREFIX
113#undef OPENSSL_ALG
114#undef GL_OPENSSL_NAME
115
116_GL_INLINE_HEADER_END
diff --git a/m4/gl-openssl.m4 b/m4/gl-openssl.m4
deleted file mode 100644
index 0434c4c8721..00000000000
--- a/m4/gl-openssl.m4
+++ /dev/null
@@ -1,51 +0,0 @@
1# gl-openssl.m4 serial 3
2dnl Copyright (C) 2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_SET_CRYPTO_CHECK_DEFAULT],
8[
9 m4_define([gl_CRYPTO_CHECK_DEFAULT], [$1])
10])
11gl_SET_CRYPTO_CHECK_DEFAULT([no])
12
13AC_DEFUN([gl_CRYPTO_CHECK],
14[
15 dnl gnulib users set this before gl_INIT with gl_SET_CRYPTO_CHECK_DEFAULT()
16 m4_divert_once([DEFAULTS], [with_openssl_default='gl_CRYPTO_CHECK_DEFAULT'])
17
18 dnl Only clear once, so crypto routines can be checked for individually
19 m4_divert_once([DEFAULTS], [LIB_CRYPTO=])
20
21 AC_ARG_WITH([openssl],
22 [AS_HELP_STRING([--with-openssl],
23 [use libcrypto hash routines. Valid ARGs are:
24 'yes', 'no', 'auto' => use if available,
25 'optional' => use if available and warn if not available;
26 default is ']gl_CRYPTO_CHECK_DEFAULT['])],
27 [],
28 [with_openssl=$with_openssl_default])
29
30 if test "x$1" = xMD5; then
31 ALG_header=md5.h
32 else
33 ALG_header=sha.h
34 fi
35
36 AC_SUBST([LIB_CRYPTO])
37 if test "x$with_openssl" != xno; then
38 AC_CHECK_LIB([crypto], [$1],
39 [AC_CHECK_HEADERS([openssl/$ALG_header],
40 [LIB_CRYPTO=-lcrypto
41 AC_DEFINE([HAVE_OPENSSL_$1], [1],
42 [Define to 1 if libcrypto is used for $1.])])])
43 if test "x$LIB_CRYPTO" = x; then
44 if test "x$with_openssl" = xyes; then
45 AC_MSG_ERROR([openssl development library not found for $1])
46 elif test "x$with_openssl" = xoptional; then
47 AC_MSG_WARN([openssl development library not found for $1])
48 fi
49 fi
50 fi
51])
diff --git a/src/ChangeLog b/src/ChangeLog
index a263867d617..58495874b2b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12013-12-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Remove the option of using libcrypto.
4 * Makefile.in (LIB_CRYPTO): Remove.
5 (LIBES): Don't use it.
6
12013-12-11 Juri Linkov <juri@jurta.org> 72013-12-11 Juri Linkov <juri@jurta.org>
2 8
3 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo 9 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
diff --git a/src/Makefile.in b/src/Makefile.in
index cef1ba5ed2e..7d91928acfe 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -139,7 +139,6 @@ M17N_FLT_LIBS = @M17N_FLT_LIBS@
139 139
140LIB_ACL=@LIB_ACL@ 140LIB_ACL=@LIB_ACL@
141LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ 141LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@
142LIB_CRYPTO=@LIB_CRYPTO@
143LIB_EACCESS=@LIB_EACCESS@ 142LIB_EACCESS=@LIB_EACCESS@
144LIB_FDATASYNC=@LIB_FDATASYNC@ 143LIB_FDATASYNC=@LIB_FDATASYNC@
145LIB_TIMER_TIME=@LIB_TIMER_TIME@ 144LIB_TIMER_TIME=@LIB_TIMER_TIME@
@@ -404,7 +403,6 @@ ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
404LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ 403LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
405 $(LIBX_OTHER) $(LIBSOUND) \ 404 $(LIBX_OTHER) $(LIBSOUND) \
406 $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \ 405 $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \
407 $(LIB_CRYPTO) \
408 $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ 406 $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
409 $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \ 407 $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \
410 $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ 408 $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \