When did the Roman Empire formally legalize Christianity ?

When did the Roman Empire formally legalize Christianity ?

A. The 3rd century
B. The 4th century
C. The 7th century
D. The 8th century