Updated to determine subject from certificate