mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
libgcrypt: Import libgcrypt 1.11
We currently use an old version of libgcrypt which results in us having fewer ciphers and missing on many other improvements. Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
a0d4c94ef6
commit
3312af6e07
468 files changed
+210508
-33178
No files matched your search
@@ -0,0 +1,48 @@
|
||||
# Makefile for compat directory
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Libgcrypt.
|
||||
#
|
||||
# Libgcrypt is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# Libgcrypt 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Process this file with automake to produce Makefile.in
|
||||
|
||||
# We use this libcompat to work around problems with LIBOBJ stuff.
|
||||
# For example, we need some of the compat files also in tests/ but the
|
||||
# suggested way to do this (using the automake option subdir-objects)
|
||||
# leads to problems with "make distclean": The distclean target in
|
||||
# tests is run before the one src and it removes the deps files of the
|
||||
# libobj files which are in src. Now when it comes to run make in src
|
||||
# the icnluded files are gone - bummer. Instead of try to fix this
|
||||
# issue it seems better not to use subdir-objects but build them all
|
||||
# into a compat library and always link against that library. This
|
||||
# also avoids the problem that a dependency on LTLIBOBJ is not setup
|
||||
# if -- disable-static was used.
|
||||
|
||||
# Need to include ../src in addition to top_srcdir because gcrypt.h is
|
||||
# a built header.
|
||||
AM_CPPFLAGS = -I../src -I$(top_srcdir)/src $(GPG_ERROR_CFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = libcompat.la
|
||||
|
||||
# We only need one file so that the library is guaranteed to have at
|
||||
# least one member.
|
||||
libcompat_la_SOURCES = compat.c libcompat.h
|
||||
libcompat_la_DEPENDENCIES = @LTLIBOBJS@
|
||||
libcompat_la_LIBADD = @LTLIBOBJS@
|
||||
|
||||
# AC_LIBOBJ files are:
|
||||
# getpid.c
|
||||
# clock.c
|
||||
#
|
||||
@@ -0,0 +1,36 @@
|
||||
/* clock.c - Replacement for WindowsCE
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_W32CE_SYSTEM
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
clock_t
|
||||
_gcry_clock (void)
|
||||
{
|
||||
assert (CLOCKS_PER_SEC == 1000);
|
||||
#warning Replace by a correct implementation.
|
||||
/* It seems that GetProcessTimes is available in the kernel but
|
||||
without a declaration. If that fails we would need to walk over
|
||||
all threads and tally up the GetThreadTimes. */
|
||||
|
||||
return GetTickCount ();
|
||||
}
|
||||
|
||||
#else
|
||||
# error No replacement function for clock known
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
/* compat.c - Dummy file to avoid an empty library.
|
||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of Libgcrypt.
|
||||
*
|
||||
* Libgcrypt is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* Libgcrypt 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "../src/g10lib.h"
|
||||
|
||||
|
||||
const char *
|
||||
_gcry_compat_identification (void)
|
||||
{
|
||||
/* For complete list of copyright holders see the file AUTHORS in
|
||||
the source distribution. */
|
||||
static const char blurb[] =
|
||||
"\n\n"
|
||||
"This is Libgcrypt " PACKAGE_VERSION " - The GNU Crypto Library\n"
|
||||
"Copyright (C) 2000-2018 Free Software Foundation, Inc.\n"
|
||||
"Copyright (C) 2012-2024 g10 Code GmbH\n"
|
||||
"Copyright (C) 2013-2024 Jussi Kivilinna\n"
|
||||
"\n"
|
||||
"(" BUILD_REVISION " " BUILD_TIMESTAMP ")\n"
|
||||
"\n\n";
|
||||
return blurb;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/* getpid.c - Replacement for WindowsCE
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_W32CE_SYSTEM
|
||||
#include <windows.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
pid_t
|
||||
_gcry_getpid (void)
|
||||
{
|
||||
return GetCurrentProcessId ();
|
||||
}
|
||||
|
||||
#else
|
||||
# error No replacement function for getpid known
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
/* libcomapt.h - Prototypes for AC_REPLACE_FUNCtions.
|
||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of Libgcrypt.
|
||||
*
|
||||
* Libgcrypt is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* Libgcrypt 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GCRY_LIBCOMPAT_H
|
||||
#define GCRY_LIBCOMPAT_H
|
||||
|
||||
const char *_gcry_compat_identification (void);
|
||||
|
||||
|
||||
#ifndef HAVE_GETPID
|
||||
pid_t _gcry_getpid (void);
|
||||
#define getpid() _gcry_getpid ()
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK
|
||||
clock_t _gcry_clock (void);
|
||||
#define clock() _gcry_clock ()
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*GCRY_LIBCOMPAT_H*/
|
||||
Reference in new issue
Block a user