[PATCH v2 16/18] SecureSockets: add try/except blocks around key loading functions