  This article focuses on the mathematical problem of existence and uniqueness
of BSDE with a random terminal time which is a general random variable but not
a stopping time, as it has been usually the case in the previous literature of
BSDE with random terminal time. The main motivation of this work is a financial
or actuarial problem of hedging of defaultable contingent claims or life
insurance contracts, for which the terminal time is a default time or a death
time, which are not stopping times. We have to use progressive enlargement of
the Brownian filtration, and to solve the obtained BSDE under this enlarged
filtration. This work gives a solution to the mathematical problem and proves
the existence and uniqueness of solutions of such BSDE under certain general
conditions. This approach is applied to the financial problem of hedging of
defaultable contingent claims, and an expression of the hedging strategy is
given for a defaultable contingent claim or a life insurance contract.
