Ensured consistent waiting for certificate acceptance in all cases using
java monitors.