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

new release

This commit is contained in:
Werner Koch 1998-04-09 11:19:09 +00:00
parent 8b10a87908
commit 3c7368a33d
19 changed files with 324 additions and 1050 deletions

View file

@ -1,3 +1,7 @@
Thu Apr 9 11:31:36 1998 Werner Koch (wk@isil.d.shuttle.de)
* mpicoder.c (mpi_get_secure_buffer): New.
Wed Apr 8 09:44:33 1998 Werner Koch (wk@isil.d.shuttle.de)
* config.links: Applied small fix from Ulf Möller.

View file

@ -268,8 +268,8 @@ mpi_get_keyid( MPI a, u32 *keyid )
* set to zero if the value of A is zero. If sign is not NULL, it will
* be set to the sign of the A.
*/
byte *
mpi_get_buffer( MPI a, unsigned *nbytes, int *sign )
static byte *
do_get_buffer( MPI a, unsigned *nbytes, int *sign, int force_secure )
{
byte *p, *buffer;
mpi_limb_t alimb;
@ -278,7 +278,8 @@ mpi_get_buffer( MPI a, unsigned *nbytes, int *sign )
if( sign )
*sign = a->sign;
*nbytes = a->nlimbs * BYTES_PER_MPI_LIMB;
p = buffer = a->secure ? m_alloc_secure( *nbytes) : m_alloc( *nbytes );
p = buffer = force_secure || a->secure ? m_alloc_secure( *nbytes)
: m_alloc( *nbytes );
for(i=a->nlimbs-1; i >= 0; i-- ) {
alimb = a->d[i];
@ -310,6 +311,19 @@ mpi_get_buffer( MPI a, unsigned *nbytes, int *sign )
return buffer;
}
byte *
mpi_get_buffer( MPI a, unsigned *nbytes, int *sign )
{
return do_get_buffer( a, nbytes, sign, 0 );
}
byte *
mpi_get_secure_buffer( MPI a, unsigned *nbytes, int *sign )
{
return do_get_buffer( a, nbytes, sign, 1 );
}
/****************
* Use BUFFER to update MPI.
*/