Ham has a shelf life, usually one year.
The most common cause of ham deterioration is oiliness.
Keeping your ham in the freezer of the refrigerator can extend the food preservation time and make it less likely to become oily.
It is recommended to take out the ham, defrost it, peel off the outermost layer, slice the inner part of the ham and steam it for 10 minutes before eating it. As long as there is no oily smell, it is still edible.