F social media and phone of spouse accessed any legal trouble

Hi, Couple of years ago one guy was regularly pinging my wife on her Facebook messenger, asked her and she denied it. One day while she had given her phone to me to talk to her father at the same time got a ping from that other guy. To know why he was so hell bend in contacting my wife and what she was hiding I went ahead to check the conversation they had and found some nasty conversations that wouldn\\\'t suit from the part of a good wife. To read the complete conversation as I knew her social media password logged into my phone, read the conversation and collected the proofs with an intention to show it her parents if she disagrees when questioned again. However when asked she admitted that she has done a mistake and the matter was put aside there on her assurance of not repeating again in future. Now after couple of years she has filled a divorce petition with many false allegations along with it has mentioned that I have accessed her phone which was kept unlocked. Now I am in a dilemma whether or not to admit that I did access her phone and social media account with the fear that I may get in trouble. Please advise will there be any legal trouble I will have to face if admitted that I did access her phone and social media account or if brought out to light the incident as it happened. Yours faithfully, Shyam.