Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib



Module Name:    src
Committed By:   agc
Date:           Wed Jun 10 16:01:37 UTC 2009

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c misc.c

Log Message:
Get rid of an unusual architectural construct:

The original code had dynamic arrays indexed by unsigned indices,
except for the array of keys, which was indexed by a signed integer,
and initialised to -1.  Subsequently, when a new id was created, the
index was pre-incremented, and later on, in a different call, the
userid (a different packet) was assigned to the current index. This
has implications for growing the array, for signed comparison checks,
and just general cleanliness.

This change overhauls the construct:  don't special case anything,
just address the array from 0, use unsigned indices same as everything
else, and complain if we get a user id for which we haven't received a
public or secret key.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
    src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c
cvs rdiff -u -r1.18 -r1.19 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index