mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-22 10:26:20 +00:00
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.
This commit is contained in:
parent
bb8097b96b
commit
a8f9bc05c3
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
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.
|
||||
|
||||
2013-12-10 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* configure.ac: Disable libcrypto by default.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Remove the option of using libcrypto.
|
||||
* merge-gnulib: Remove lib/gl_openssh.h and m4/gl-openssl.m4.
|
||||
|
||||
2013-12-04 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* unidata/unidata-gen.el (unidata-prop-alist): Update bidi-class
|
||||
|
@ -91,7 +91,8 @@ test -x "$gnulib_srcdir"/gnulib-tool || {
|
||||
}
|
||||
|
||||
"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES &&
|
||||
rm -- "$src"m4/fcntl-o.m4 "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 &&
|
||||
rm -- "$src"lib/gl_openssl.h "$src"m4/fcntl-o.m4 "$src"m4/gl-openssl.m4 \
|
||||
"$src"m4/gnulib-cache.m4"$src" m4/warn-on-use.m4 &&
|
||||
cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
|
||||
cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
|
||||
autoreconf -i -I m4 -- ${src:+"$src"}
|
||||
|
12
configure.ac
12
configure.ac
@ -94,8 +94,7 @@ AC_ARG_WITH(all,
|
||||
[AS_HELP_STRING([--without-all],
|
||||
[omit almost all features and build
|
||||
small executable with minimal dependencies])],
|
||||
[with_features=$withval
|
||||
with_openssl_default=$withval],
|
||||
[with_features=$withval],
|
||||
[with_features=yes])
|
||||
|
||||
dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING)
|
||||
@ -640,6 +639,8 @@ dnl alternative to lib/gnulib.mk, so as to avoid generating header files
|
||||
dnl that clash with MinGW.
|
||||
AM_CONDITIONAL([BUILDING_FOR_WINDOWSNT], [test "x$opsys" = "xmingw32"])
|
||||
|
||||
# Avoid gnulib's tests for -lcrypto, so that there's no static dependency on it.
|
||||
AC_DEFUN([gl_CRYPTO_CHECK])
|
||||
# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
|
||||
# as we don't use them.
|
||||
AC_DEFUN([gl_FCNTL_O_FLAGS])
|
||||
@ -4848,12 +4849,6 @@ else
|
||||
acl_summary=no
|
||||
fi
|
||||
|
||||
if test -n "$LIB_CRYPTO"; then
|
||||
HAVE_LIB_CRYPTO=yes
|
||||
else
|
||||
HAVE_LIB_CRYPTO=no
|
||||
fi
|
||||
|
||||
echo "
|
||||
Configured for \`${canonical}'.
|
||||
|
||||
@ -4893,7 +4888,6 @@ echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
|
||||
echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
|
||||
echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
|
||||
echo " Does Emacs use access control lists? ${acl_summary}"
|
||||
echo " Does Emacs use a crypto library? ${HAVE_LIB_CRYPTO} $LIB_CRYPTO"
|
||||
echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
|
||||
echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
|
||||
echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
|
||||
|
116
lib/gl_openssl.h
116
lib/gl_openssl.h
@ -1,116 +0,0 @@
|
||||
/* gl_openssl.h -- wrap openssl crypto hash routines in gnulib interface
|
||||
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Pádraig Brady */
|
||||
|
||||
#ifndef GL_OPENSSL_NAME
|
||||
# error "Please define GL_OPENSSL_NAME to 1,5,256 etc."
|
||||
#endif
|
||||
|
||||
#ifndef _GL_INLINE_HEADER_BEGIN
|
||||
# error "Please include config.h first."
|
||||
#endif
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
#ifndef GL_OPENSSL_INLINE
|
||||
# define GL_OPENSSL_INLINE _GL_INLINE
|
||||
#endif
|
||||
|
||||
/* Concatenate two preprocessor tokens. */
|
||||
#define _GLCRYPTO_CONCAT_(prefix, suffix) prefix##suffix
|
||||
#define _GLCRYPTO_CONCAT(prefix, suffix) _GLCRYPTO_CONCAT_ (prefix, suffix)
|
||||
|
||||
#if GL_OPENSSL_NAME == 5
|
||||
# define OPENSSL_ALG md5
|
||||
#else
|
||||
# define OPENSSL_ALG _GLCRYPTO_CONCAT (sha, GL_OPENSSL_NAME)
|
||||
#endif
|
||||
|
||||
/* Context type mappings. */
|
||||
#if BASE_OPENSSL_TYPE != GL_OPENSSL_NAME
|
||||
# undef BASE_OPENSSL_TYPE
|
||||
# if GL_OPENSSL_NAME == 224
|
||||
# define BASE_OPENSSL_TYPE 256
|
||||
# elif GL_OPENSSL_NAME == 384
|
||||
# define BASE_OPENSSL_TYPE 512
|
||||
# endif
|
||||
# define md5_CTX MD5_CTX
|
||||
# define sha1_CTX SHA_CTX
|
||||
# define sha224_CTX SHA256_CTX
|
||||
# define sha224_ctx sha256_ctx
|
||||
# define sha256_CTX SHA256_CTX
|
||||
# define sha384_CTX SHA512_CTX
|
||||
# define sha384_ctx sha512_ctx
|
||||
# define sha512_CTX SHA512_CTX
|
||||
# undef _gl_CTX
|
||||
# undef _gl_ctx
|
||||
# define _gl_CTX _GLCRYPTO_CONCAT (OPENSSL_ALG, _CTX) /* openssl type. */
|
||||
# define _gl_ctx _GLCRYPTO_CONCAT (OPENSSL_ALG, _ctx) /* gnulib type. */
|
||||
|
||||
struct _gl_ctx { _gl_CTX CTX; };
|
||||
#endif
|
||||
|
||||
/* Function name mappings. */
|
||||
#define md5_prefix MD5
|
||||
#define sha1_prefix SHA1
|
||||
#define sha224_prefix SHA224
|
||||
#define sha256_prefix SHA256
|
||||
#define sha384_prefix SHA384
|
||||
#define sha512_prefix SHA512
|
||||
#define _GLCRYPTO_PREFIX _GLCRYPTO_CONCAT (OPENSSL_ALG, _prefix)
|
||||
#define OPENSSL_FN(suffix) _GLCRYPTO_CONCAT (_GLCRYPTO_PREFIX, suffix)
|
||||
#define GL_CRYPTO_FN(suffix) _GLCRYPTO_CONCAT (OPENSSL_ALG, suffix)
|
||||
|
||||
GL_OPENSSL_INLINE void
|
||||
GL_CRYPTO_FN (_init_ctx) (struct _gl_ctx *ctx)
|
||||
{ (void) OPENSSL_FN (_Init) ((_gl_CTX *) ctx); }
|
||||
|
||||
/* These were never exposed by gnulib. */
|
||||
#if ! (GL_OPENSSL_NAME == 224 || GL_OPENSSL_NAME == 384)
|
||||
GL_OPENSSL_INLINE void
|
||||
GL_CRYPTO_FN (_process_bytes) (const void *buf, size_t len, struct _gl_ctx *ctx)
|
||||
{ OPENSSL_FN (_Update) ((_gl_CTX *) ctx, buf, len); }
|
||||
|
||||
GL_OPENSSL_INLINE void
|
||||
GL_CRYPTO_FN (_process_block) (const void *buf, size_t len, struct _gl_ctx *ctx)
|
||||
{ GL_CRYPTO_FN (_process_bytes) (buf, len, ctx); }
|
||||
#endif
|
||||
|
||||
GL_OPENSSL_INLINE void *
|
||||
GL_CRYPTO_FN (_finish_ctx) (struct _gl_ctx *ctx, void *res)
|
||||
{ OPENSSL_FN (_Final) (res, (_gl_CTX *) ctx); return res; }
|
||||
|
||||
GL_OPENSSL_INLINE void *
|
||||
GL_CRYPTO_FN (_buffer) (const char *buf, size_t len, void *res)
|
||||
{ return OPENSSL_FN () ((const unsigned char *) buf, len, res); }
|
||||
|
||||
GL_OPENSSL_INLINE void *
|
||||
GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *res)
|
||||
{
|
||||
/* Assume any unprocessed bytes in ctx are not to be ignored. */
|
||||
_gl_CTX tmp_ctx = *(_gl_CTX *) ctx;
|
||||
OPENSSL_FN (_Final) (res, &tmp_ctx);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Undef so we can include multiple times. */
|
||||
#undef GL_CRYPTO_FN
|
||||
#undef OPENSSL_FN
|
||||
#undef _GLCRYPTO_PREFIX
|
||||
#undef OPENSSL_ALG
|
||||
#undef GL_OPENSSL_NAME
|
||||
|
||||
_GL_INLINE_HEADER_END
|
@ -1,51 +0,0 @@
|
||||
# gl-openssl.m4 serial 3
|
||||
dnl Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_SET_CRYPTO_CHECK_DEFAULT],
|
||||
[
|
||||
m4_define([gl_CRYPTO_CHECK_DEFAULT], [$1])
|
||||
])
|
||||
gl_SET_CRYPTO_CHECK_DEFAULT([no])
|
||||
|
||||
AC_DEFUN([gl_CRYPTO_CHECK],
|
||||
[
|
||||
dnl gnulib users set this before gl_INIT with gl_SET_CRYPTO_CHECK_DEFAULT()
|
||||
m4_divert_once([DEFAULTS], [with_openssl_default='gl_CRYPTO_CHECK_DEFAULT'])
|
||||
|
||||
dnl Only clear once, so crypto routines can be checked for individually
|
||||
m4_divert_once([DEFAULTS], [LIB_CRYPTO=])
|
||||
|
||||
AC_ARG_WITH([openssl],
|
||||
[AS_HELP_STRING([--with-openssl],
|
||||
[use libcrypto hash routines. Valid ARGs are:
|
||||
'yes', 'no', 'auto' => use if available,
|
||||
'optional' => use if available and warn if not available;
|
||||
default is ']gl_CRYPTO_CHECK_DEFAULT['])],
|
||||
[],
|
||||
[with_openssl=$with_openssl_default])
|
||||
|
||||
if test "x$1" = xMD5; then
|
||||
ALG_header=md5.h
|
||||
else
|
||||
ALG_header=sha.h
|
||||
fi
|
||||
|
||||
AC_SUBST([LIB_CRYPTO])
|
||||
if test "x$with_openssl" != xno; then
|
||||
AC_CHECK_LIB([crypto], [$1],
|
||||
[AC_CHECK_HEADERS([openssl/$ALG_header],
|
||||
[LIB_CRYPTO=-lcrypto
|
||||
AC_DEFINE([HAVE_OPENSSL_$1], [1],
|
||||
[Define to 1 if libcrypto is used for $1.])])])
|
||||
if test "x$LIB_CRYPTO" = x; then
|
||||
if test "x$with_openssl" = xyes; then
|
||||
AC_MSG_ERROR([openssl development library not found for $1])
|
||||
elif test "x$with_openssl" = xoptional; then
|
||||
AC_MSG_WARN([openssl development library not found for $1])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
@ -1,3 +1,9 @@
|
||||
2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Remove the option of using libcrypto.
|
||||
* Makefile.in (LIB_CRYPTO): Remove.
|
||||
(LIBES): Don't use it.
|
||||
|
||||
2013-12-11 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
|
||||
|
@ -139,7 +139,6 @@ M17N_FLT_LIBS = @M17N_FLT_LIBS@
|
||||
|
||||
LIB_ACL=@LIB_ACL@
|
||||
LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@
|
||||
LIB_CRYPTO=@LIB_CRYPTO@
|
||||
LIB_EACCESS=@LIB_EACCESS@
|
||||
LIB_FDATASYNC=@LIB_FDATASYNC@
|
||||
LIB_TIMER_TIME=@LIB_TIMER_TIME@
|
||||
@ -404,7 +403,6 @@ ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
|
||||
LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
|
||||
$(LIBX_OTHER) $(LIBSOUND) \
|
||||
$(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \
|
||||
$(LIB_CRYPTO) \
|
||||
$(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
|
||||
$(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \
|
||||
$(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
|
||||
|
Loading…
Reference in New Issue
Block a user