Fix SEGV bug in keyring_enter_pin()

The public and private key length fields were stored as 'int' not
'unsigned', so arithmetic for checking buffer overrun was not correct.