An insurance company's duty to defend carries with it a conditional duty to indemnify a settlement reached prior to judgment. When an underlying action is settled, there are often unresolved factual questions. In almost all circumstances, Pennsylvania law does not permit a trial of those facts in an insurance declaratory judgment action.