Swearing while believing himself to be truthful

A: If you took the oath in front of the officer thinking that you were telling the truth, but the reality is other than what you said under oath, you do not have to do anything.If you knew that you were telling a lie under oath, you are considered to be sinful, and it is Wajib (obligatory) on you to perform Istighfar (seek forgiveness from Allah) and Tawbah (repentance to Allah), but you do not have to offer Kaffarah (expiation) for the oath.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.