Philippians 3:8,9 ... I count all things but loss for the excellency of the knowledge of Christ Jesus, my Lord, for Whom I have suffered the loss of all things, and do count them but dung, that I may win (be intimate with) Christ and be found in Him, not having mine own righteousness which is of the law, but that which is through the faith of Christ ... the righteousness which is of God by faith.
"Righteousness" ... two kinds ... are mentioned here. There seems to be a lot of confusion concerning the "righteousness of the Lord" and our own righteousness. God pointed out the difference to me.
He said that our righteousness is as filthy rags because it's worthless to Him. Jesus' righteousness to the Father, into which we have been adopted, is the righteousness of God, and He recognizes this righteousness.
Because of Jesus' righteousness, we can go boldly into the Throne Room of God, talk to Him, and know that He hears us. We may not always get the answers that we want or are looking for, especially right away. But we can go there because Jesus made us righteous.
We cannot make ourselves righteous. If we are "self-righteous", we're in trouble. The Body of Christ has too many self-righteous people who are trying to run things, and God will not have any part in that.
Reverend Robert W. & Mary C. Butler