Home GnuPG

Make the management of pinentry.pin more explicit.
bdd81974633fUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Make the management of pinentry.pin more explicit.

* pinentry/pinentry.c: Include <assert.h>.
(pinentry): Set pin_len to 0.
(pinentry_setbufferlen): If len is less than 2048, set it to 2048.
Add an assertion.
(pinentry_setbuffer_clear): New function that releases the pin buffer.
(pinentry_setbuffer_init): New function that initializes the pin
buffer.
(cmd_getpin): Use pinentry_setbuffer_init and pinentry_setbuffer_clear
instead of manual memory management.
(cmd_confirm): Use pinentry_setbuffer_clear instead of manual memory
management.

Details

Provenance
nealAuthored on May 13 2015, 1:52 PM
Parents
rPae7dfae00df8: Better document struct pinentry.
Branches
Unknown
Tags
Unknown