Added function to extract public keys from SSL objects