1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

changed structure of trustdb

This commit is contained in:
Werner Koch 1998-02-02 14:36:06 +00:00
parent 3bcd3cd7b2
commit c8f12e218f
28 changed files with 2323 additions and 979 deletions

View file

@ -1,4 +1,4 @@
/* mpiutil.c - Utility functions for MPI
/* mpiutilac - Utility functions for MPI
* Copyright (c) 1997 by Werner Koch (dd9jn)
*
* This file is part of G10.
@ -192,6 +192,34 @@ mpi_free( MPI a )
}
void
mpi_set_secure( MPI a )
{
mpi_ptr_t ap, bp;
if( a->secure )
return;
a->secure = 1;
ap = a->d;
if( !a->nlimbs ) {
assert(!ap);
return;
}
#ifdef M_DEBUG
bp = mpi_debug_alloc_limb_space( a->nlimbs, 1, "set_secure" );
#else
bp = mpi_alloc_limb_space( a->nlimbs, 1 );
#endif
MPN_COPY( bp, ap, a->nlimbs );
a->d = bp;
#ifdef M_DEBUG
mpi_debug_free_limb_space(ap, "set_secure");
#else
mpi_free_limb_space(ap);
#endif
}
/****************
* Note: This copy function shpould not interpret the MPI
* but copy it transparently.