Justification is not something to be earned, but a gift to be received. Seeking to earn salvation is the only sin that will prevent a person from being saved, because you cannot submit yourself to the righteousness of God which comes as a gift through faith as long as you are seeking to establish your own righteousness.
Most people are unaware that there are two kinds of righteousness. Only one type of righteousness is acceptable to God. There is our righteousness, which is our compliance with the requirements of the law. This is an imperfect righteousness because human nature is imperfect and incapable of fulfilling the law.
And there is God's righteousness, which only comes as a gift and is received by faith. God's righteousness is perfect. Our righteousness is as filthy rags (Isaiah 64:6). A person who believes that he must earn God's acceptance by his holy actions is not believing in God's righteousness, which is a gift. It has to be one or the other; we cannot mix the two.
Righteousness is not what Jesus has done for us plus some minimum standard of holiness that we have to accomplish.
Right standing before a holy God is not to be achieved in the keeping of the law, but in humble trust in the person and work of Jesus Christ. No one who is trusting in his own righteousness can have the benefit of Christ's righteousness. The righteousness that gives men relationship with God is the RIGHTEOUSNESS OF GOD, and it comes freely through faith in Jesus Christ (Romans 3:22).
It is true that the way we obtained this righteousness is by putting faith IN what Christ has done for us. But when we place our faith in Christ, then the righteousness that Jesus obtained by His faith becomes ours. We are possessors of Christ's righteousness, which His faith produced.