mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32: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
@@ -14,8 +14,8 @@
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -28,7 +28,7 @@
|
||||
* Return: true if this 1, false in all other cases
|
||||
*/
|
||||
int
|
||||
gcry_mpi_gcd( gcry_mpi_t g, gcry_mpi_t xa, gcry_mpi_t xb )
|
||||
_gcry_mpi_gcd (gcry_mpi_t g, gcry_mpi_t xa, gcry_mpi_t xb)
|
||||
{
|
||||
gcry_mpi_t a, b;
|
||||
|
||||
@@ -38,14 +38,15 @@ gcry_mpi_gcd( gcry_mpi_t g, gcry_mpi_t xa, gcry_mpi_t xb )
|
||||
/* TAOCP Vol II, 4.5.2, Algorithm A */
|
||||
a->sign = 0;
|
||||
b->sign = 0;
|
||||
while( gcry_mpi_cmp_ui( b, 0 ) ) {
|
||||
_gcry_mpi_fdiv_r( g, a, b ); /* g used as temorary variable */
|
||||
while (mpi_cmp_ui (b, 0))
|
||||
{
|
||||
_gcry_mpi_fdiv_r( g, a, b ); /* G is used as temporary variable. */
|
||||
mpi_set(a,b);
|
||||
mpi_set(b,g);
|
||||
}
|
||||
}
|
||||
mpi_set(g, a);
|
||||
|
||||
mpi_free(a);
|
||||
mpi_free(b);
|
||||
return !gcry_mpi_cmp_ui( g, 1);
|
||||
return !mpi_cmp_ui( g, 1);
|
||||
}
|
||||
Reference in new issue
Block a user