]> git.tuebingen.mpg.de Git - paraslash.git/commit
gcrypt: Let decode_key() return blob size through additional argument.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 27 Aug 2018 16:32:58 +0000 (18:32 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 25 Dec 2018 16:45:24 +0000 (17:45 +0100)
commit686310d4b954efec5d5dcc8b4a143c294bb02739
treecd4ffff0385091f167706e2b9071cd0876e89f65
parenteb833d819057adb3916aa2f2704ca2df7fd6a48f
gcrypt: Let decode_key() return blob size through additional argument.

Currently we communicate the blob size through the return value, which
implies an implicit conversion from size_t to int. The new blob_size
argument guarantees type safety and simplifies the logic a bit.

After this patch the return value is only used for the (negative)
error code in the failure case while non-negative return values have
no meaning other than indicating success. Therefore this change also
allows us to convey the key type via the return value. This will turn
out to be handy for supporting RFC4716 keys.
gcrypt.c