diff options
author | Dmitry Kasatkin <dmitry.kasatkin@intel.com> | 2011-11-07 08:16:37 -0500 |
---|---|---|
committer | Dmitry Kasatkin <dmitry.kasatkin@intel.com> | 2011-11-09 04:47:26 -0500 |
commit | 7e8dec918ef8e0f68b4937c3c50fa57002077a4d (patch) | |
tree | a17d33fa54fcb18c335b36c4550b889b206015f4 /lib/mpi/mpi-inline.c | |
parent | d9c46b184fcfd33c85a7dc48a653435a08e21f56 (diff) |
crypto: GnuPG based MPI lib - additional sources (part 4)
Adds the multi-precision-integer maths library which was originally taken
from GnuPG and ported to the kernel by (among others) David Howells.
This version is taken from Fedora kernel 2.6.32-71.14.1.el6.
The difference is that checkpatch reported errors and warnings have been fixed.
This library is used to implemenet RSA digital signature verification
used in IMA/EVM integrity protection subsystem.
Due to patch size limitation, the patch is divided into 4 parts.
This code is unnecessary for RSA digital signature verification,
but for completeness it is included here and can be compiled,
if CONFIG_MPILIB_EXTRA is enabled.
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Diffstat (limited to 'lib/mpi/mpi-inline.c')
-rw-r--r-- | lib/mpi/mpi-inline.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/mpi/mpi-inline.c b/lib/mpi/mpi-inline.c new file mode 100644 index 000000000000..654f68aeed8b --- /dev/null +++ b/lib/mpi/mpi-inline.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* mpi-inline.c | ||
2 | * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | ||
3 | * | ||
4 | * This file is part of GnuPG. | ||
5 | * | ||
6 | * GnuPG is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * GnuPG is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | ||
19 | */ | ||
20 | |||
21 | /* put the inline functions as real functions into the lib */ | ||
22 | #define G10_MPI_INLINE_DECL | ||
23 | |||
24 | #include "mpi-internal.h" | ||
25 | |||
26 | /* always include the header becuase it is only | ||
27 | * included by mpi-internal if __GCC__ is defined but we | ||
28 | * need it here in all cases and the above definition of | ||
29 | * of the macro allows us to do so | ||
30 | */ | ||
31 | #include "mpi-inline.h" | ||