help-gnutls
[Top][All Lists]
Advanced

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

[Help-gnutls] Small inconsistencies of the OpenPGP API


From: Ludovic Courtès
Subject: [Help-gnutls] Small inconsistencies of the OpenPGP API
Date: Fri, 27 Oct 2006 14:31:00 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hi,

`gnutls_openpgp_key_get_pk_algorithm ()' currently returns an `int'
while it should really return `gnutls_pk_algorithm_t'.  Same for
`privkey_get_pk_algorithm ()'.

Also, `key_get_name ()' assumes that SIZEOF_BUF points to the size of
BUF when it is invoked and uses that information to avoid buffer
overflows; however, it does not modify *SIZEOF_BUF as one would expect
to indicate the actual length of the name returned on success.

Conversely, `key_get_fingerprint ()' does not take into account the
initial value of *FPRLEN (thus, it may write data past the end of FPR)
but it does modify it on return to indicate the actual length of the
fingerprint returned.

I think it would be best to both take into account the original value of
these arguments _and_ modify them upon return to indicate the actual
length of the element returned in both cases.

Thanks,
Ludovic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]