Evaluate your product carefully before you throw away such a precious product until you know for certain what is going on with it! The animal's sole purpose was to be carefully raised as an amazingly flavorful meat source, so if it is truly spoiled then it must go, but otherwise take some steps to figure it out and save it... You paid a lot of money for this product and are probably handling nearly 20# hams that yield a lot of food potential.
Some good points have been made already and curing hams can be difficult including an occasional loss of product due to not beating down the bad bacteria fast enough with the good bacteria. Mostly the protocol needs to be established and followed that will lead to a high level of success.
Yes, putting it in a bag sounds like a very bad idea! It does not breath or dehydrate. Oxygen is restricted and the possibility of sourering the meat is through bacterial activity and changes in pH are likely.
A typical ham should be completely covered in salt which may be 4 or more pounds and held under refrigeration at first. Pressed with a moderate weight for a period of 3-6 days and resalted if a lot of moisture comes off initially. Once the ham is firmer and being to "cure" it moves to the next step. Your shop being 40 degrees meets that lower temp requirement. Then it moves to rinsing, protecting the bone end and light pepper before hanging at a higher temp in the 60 degree or slightly higher for a number of months.
Issues to consider:
How bad does it smell and where is it coming from? Is is faint, moderate or so pungent you want to gag?
Light smells and early periods of some off smells are not completely uncommon but a cause for concern and correction before things get worse.
Does a good rinsing with cool
water and a light soak significantly help the smell and remove stickiness? You can try making a brine with salt or rubbing with white vinegar. These are all methods to reduce bacterial activity by washing it away or creating inhospitable environments. Not a sure guarantee to food safety but a step to help evaluate the condition and prevent further damage.
Blood product also gets really rancid fast but can be washed away easily.
Next is their continued smell or rot in the fat which can get quite stinky from rancidity fast but may be salvageable with peeling away and some reprocessing.
Is the aitch bone removed (hip bone) with just the ball remaining? A lot of blood, fluid etc is trapped in this area and needs to be taken off for air drying.
Additionally, if the hog is not properly bled and fully remove the excess blood from the major veins in the leg it will cause problems and ruin good dried hams. Some people try messaging out the blood from the main arteries but this is difficult and only possible early on at best.
People pay special attention to extra salt around the open bone ends and hip ball rubbing it in thoroughly and generously to reduce issues of bone marrow, cut bone and bloody areas. Before hanging the peppering of the ham is for flavor but also for some antibacterial assistance. I have always added a touch more toward the hip ball and surrounding meat. Some processes cover this exposed hip area with a touch of lard or clay after salting and in preparation for hanging. I've hit curing meat with some grappa or vodka in a spray bottle or dampened clean cloth if I later see exterior molds developing in an area. White mold is ok. Grey, hairy, blue, green, orange etc is BAD, knock it down with vinegar or strong alcohol asap to prevent penetrating deep into the ham. But is is during the hanging process, not the initial salt cure.
What to do at this point:
If your inspection locates key issues tackle them. If rinsing and removal of some fat, blood area etc. and a re-rinse or soaking in light brine make things look and smell a lot better think about proceeding.
If it is still absolutely putrid, makes you want to gag after tackling these key areas you're probably sending it to
compost and a total loss.
Assume that the high moisture, too low salt and other issues have developed issues that may not be totally fixed. Bagging the meat and bacterial growth may have lead to pH changes that will also be much harder to correct. But being held at 40 degrees if you are accurate about this range is a lot better than a week at 85 degrees!
So, I would cut you losses on a dry hung ham at this point as too risky the outcome for getting a quality or safe product in the end.
Now, what might you still be able to do?
Remember whole muscle meat is still very bioactive if not physically alive. It has a lot of pathogen resistance within the meat. The attack happens in the blood fluids, fat and exposed surface much faster than it penetrates into the core muscle materials.
If there is concern about the integrity of the bone or a lot of blood material in the flesh, think about opening it up down the side closest to the bone and removing the bone completely. Get a good look at the flesh. Smell the internal flesh compared to the external. Does it seem much better? Does it look really wet and moist like salt has not penetrated in there much at all or reduced moisture content? Your eyes and nose can do a lot of work. If you see and smell good things seek confirmation and proceed. Specialized measurements, tools, complex protocols, absolute health department standards for 100% safety, 100% of the time all have their place but can be an incomplete when dealing with traditional charcuterie and age-old methods where other signs and senses prevailed through history.
If bone and blood integrity do not seem to be issues of concern then opening up the ham is not necessary.
I would recommend at this time moving to a brine cured protocol for a cooked ham. Pump the hams with 10% solution by weight with a needle especially focusing on the deep muscles and around the bone areas if it is still maintained. Use the TCM to resist bad bacteria and botulism issues as a precaution even though they are slight they are extremely dangerous in oxygen free atmospheres of low temp smoking, canning and oil preserving. meaure carefully to get the right amount per gal of brine as too much is dangerous and too little is not effective.
You may want to reduce the brining time from the 7 days or so to a slightly less amount due to the salt curing that already took place. But give time for the pumped meat to brine to the bone.
Rinse off and either boil,
oven roast or smoke to produce a fully cooked ham. Cut into it after some time to cool and rest (for a few days refrigerated if it was smoked to mellow out). Taste some of it for strong off flavors that persist and salt level. If really bad flavors develop it is done! Most likely even light funk is acceptable like in prosciutto and add some nuance but not offensive. It may be a bit salty from poor control of salt due to rubbing and then brining or it might be fine. If you boil it they salt can dissipate into the water before roasting it further for color. It can be frozen until need as a whole or in pieces once you know what you have. If you have two hams the second ham is now a known product. Either very usable, or salty but can be moved to flavoring soups and beans or in casseroles.
You have a lot of options and steps to take before the garbage unless it is just awful after first attach and rinses. Move carefully to put on bandaids and stretch sore muscles before going to the surgeon and cutting off your arm...'
Most Americans are not familiar with rancidity and are unprepared to deal with it in rational ways but still take safety precautions and some calculated risks. Most of the rest of the world does this practice much more often out of necessity. Aging, controlled aging, funk, selective and surface rot versus putrification are different situations. Removal of surface funk, blood, rancid fat which smells awful but may not be nearly as dangerous as other forms of bacterial contamination. Going through times of things stinking and fermenting (less with pork) but coming out under different pH conditions of fermentation, pickling, etc. can make meats safe, edible and frequently tasty. Learning to assess some off flavor of funk or appreciate things that are not simply fresh kill meat is less in the average American repertoire. Much of history people have learned to salvage less than perfect meat and process, spice and cook it into good or edible product. Sometimes pawn it off to unsuspecting customers who suffer the consequences.
Approach these areas with caution and with experienced guides. Sort of like
mushroom hunting but probably a bit less risky with aged meats. Read and do research on what to look for and expect when aging goes right and wrong. Nothing better than the funky nutty smell of a well aged pork or the rich earthy smell of dry aged
beef!
I think the chances of making something out of this
project is good without a total loss of 40# of Berkshire.