Source-Changes-D archive

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

Re: CVS commit: [agc-netpgp-standalone] src/crypto/external/bsd/netpgp/dist/src



In article <20121025143517.GB19570%nef.pbox.org@localhost>,
Alistair Crooks  <agc%pkgsrc.org@localhost> wrote:
>On Thu, Oct 25, 2012 at 12:40:28PM +0000, Christos Zoulas wrote:
>> In article <20121025040317.3B164175D0%cvs.netbsd.org@localhost>,
>> Alistair G. Crooks <source-changes-d%NetBSD.org@localhost> wrote:
>> >-=-=-=-=-=-
>> >
>> >Module Name:        src
>> >Committed By:       agc
>> >Date:               Thu Oct 25 04:03:16 UTC 2012
>> >
>> >Modified Files:
>> >    src/crypto/external/bsd/netpgp/dist/src/libverify 
>> > [agc-netpgp-standalone]:
>> >        libnetpgpverify.3 libverify.c verify.h
>> >    src/crypto/external/bsd/netpgp/dist/src/netpgpverify
>[agc-netpgp-standalone]:
>> >        main.c
>> >
>> >Log Message:
>> >change the signature (ha!) of the pgpv_read_pubring() function to allow a
>> >key to be specified as a string in memory, as well as in a file. as always,
>> >the pubring must precede the signature.
>> 
>> That should be:
>> 
>> .Ft ssize_t
>> .Fo pgpv_read_pubring
>> .Fa "pgpv_t *pgp" "const void *keyring" "size_t size"
>
>Thanks.
>
>But I'm not sure it should - the memory pointer or filename argument
>is overloaded when it is passed in; the size parameter being negative
>is used to signify that it's a filename, so ssize_t is the correct
>type.

Perhaps there should be two entry points for the function then:

    pgp_read_file_pubring
    pgp_read_memory_pubring

and pgp_read_file_pubring should read/mmap the file and call
pgp_read_memory_pubring.

>As for the return type, ssize_t would tend to indicate that it's an
>amount of data being returned, with a negative amount signifying
>failure. Again, that's not really the case here.

ok.

christos



Home | Main Index | Thread Index | Old Index