Re-arrange handling of client certificates