Added checks for local CA and key, in MiTM proxy