1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

some more internall structure changes

This commit is contained in:
Werner Koch 1998-06-16 15:13:28 +00:00
parent 6e1ca6b80f
commit e6ac5acbbf
39 changed files with 814 additions and 400 deletions

View file

@ -1004,6 +1004,8 @@ parse_certificate( IOBUF inp, int pkttype, unsigned long pktlen,
* we can assume, that he operates an open system :=(.
* So we put the key into secure memory when we unprotect it. */
n = pktlen; cert->skey[3] = mpi_read(inp, &n, 0 ); pktlen -=n;
if( cert->is_protected )
mpi_set_protect_flag(cert->skey[3]);
cert->csum = read_16(inp); pktlen -= 2;
if( list_mode ) {
@ -1129,6 +1131,8 @@ parse_certificate( IOBUF inp, int pkttype, unsigned long pktlen,
* we can assume, that he operates an open system :=(.
* So we put the key into secure memory when we unprotect it. */
n = pktlen; cert->skey[4] = mpi_read(inp, &n, 0 ); pktlen -=n;
if( cert->is_protected )
mpi_set_protect_flag(cert->skey[4]);
cert->csum = read_16(inp); pktlen -= 2;
if( list_mode ) {
@ -1184,6 +1188,12 @@ parse_certificate( IOBUF inp, int pkttype, unsigned long pktlen,
n = pktlen; cert->skey[3] = mpi_read(inp, &n, 0 ); pktlen -=n;
n = pktlen; cert->skey[4] = mpi_read(inp, &n, 0 ); pktlen -=n;
n = pktlen; cert->skey[5] = mpi_read(inp, &n, 0 ); pktlen -=n;
if( cert->is_protected ) {
mpi_set_protect_flag(cert->skey[2]);
mpi_set_protect_flag(cert->skey[3]);
mpi_set_protect_flag(cert->skey[4]);
mpi_set_protect_flag(cert->skey[5]);
}
cert->csum = read_16(inp); pktlen -= 2;
if( list_mode ) {