]> git.tuebingen.mpg.de Git - paraslash.git/commit
gcrypt: Return key size in bytes.
authorAndre Noll <maan@systemlinux.org>
Fri, 5 Aug 2011 10:53:46 +0000 (12:53 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 5 Aug 2011 10:53:46 +0000 (12:53 +0200)
commitc13f9045d75565f517a4e73cade098da7cc46fcc
tree91d1a21d45b73acedad68403944a736a9afc8ecf
parent0a0a577bb91b6ec4e26a9432c08974a3f1f611ac
gcrypt: Return key size in bytes.

The crypto API requires get_asymmetric_key() to return the size of
the RSA key in bytes on success.  The return value is evaluated in
populate_user_list() where keys which are too short to encrypt a
challenge buffer are rejected right away.

However, for ASN.1 keys, the gcrypt implementation returned the number
of *bits* instead. This caused para_server to accept keys which are
in fact not suitable for authentication.

The fix is trivial.
gcrypt.c