properly use unsigned char casts for ctype functions.
missing errno check
better response
fix regression introduced when plugged the passphrase-protected key support
Merge branch 'master' into portable