aboutsummaryrefslogtreecommitdiffstats
path: root/g10/seckey-cert.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-02-16 13:16:33 +0000
committerWerner Koch <[email protected]>1999-02-16 13:16:33 +0000
commite1a1b3fc90af66a5db5ee92514b0a7c52e49d1ed (patch)
tree31dd54ac26b4c3fc30cc93d66161e72bf4cf7927 /g10/seckey-cert.c
parentSee ChangeLog: Sat Feb 13 14:13:04 CET 1999 Werner Koch (diff)
downloadgnupg-e1a1b3fc90af66a5db5ee92514b0a7c52e49d1ed.tar.gz
gnupg-e1a1b3fc90af66a5db5ee92514b0a7c52e49d1ed.zip
See ChangeLog: Tue Feb 16 14:10:02 CET 1999 Werner Koch
Diffstat (limited to '')
-rw-r--r--g10/seckey-cert.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/g10/seckey-cert.c b/g10/seckey-cert.c
index 7712036e4..cab99b65b 100644
--- a/g10/seckey-cert.c
+++ b/g10/seckey-cert.c
@@ -226,8 +226,8 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek )
cipher_encrypt( cipher_hd, sk->protect.iv, sk->protect.iv, 8 );
if( sk->version >= 4 ) {
#define NMPIS (PUBKEY_MAX_NSKEY - PUBKEY_MAX_NPKEY)
- byte *buffer[NMPIS];
- unsigned nbytes[NMPIS];
+ byte *bufarr[NMPIS];
+ unsigned narr[NMPIS];
unsigned nbits[NMPIS];
int ndata=0;
byte *p, *data;
@@ -235,23 +235,23 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek )
for(j=0, i = pubkey_get_npkey(sk->pubkey_algo);
i < pubkey_get_nskey(sk->pubkey_algo); i++, j++ ) {
assert( !mpi_is_opaque( sk->skey[i] ) );
- buffer[j] = mpi_get_buffer( sk->skey[i], &nbytes[j], NULL );
+ bufarr[j] = mpi_get_buffer( sk->skey[i], &narr[j], NULL );
nbits[j] = mpi_get_nbits( sk->skey[i] );
- ndata += nbytes[j] + 2;
+ ndata += narr[j] + 2;
}
for( ; j < NMPIS; j++ )
- buffer[j] = NULL;
+ bufarr[j] = NULL;
ndata += 2; /* for checksum */
data = m_alloc_secure( ndata );
p = data;
- for(j=0; j < NMPIS && buffer[j]; j++ ) {
+ for(j=0; j < NMPIS && bufarr[j]; j++ ) {
p[0] = nbits[j] >> 8 ;
p[1] = nbits[j];
p += 2;
- memcpy(p, buffer[j], nbytes[j] );
- p += nbytes[j];
- m_free(buffer[j]);
+ memcpy(p, bufarr[j], narr[j] );
+ p += narr[j];
+ m_free(bufarr[j]);
}
#undef NMPIS
csum = checksum( data, ndata-2);