agent: Fix length detection of canonical formatted openpgp keys.