Before this faith came, we were held in custody under the law, locked in until the faith that was to come should be revealed.
In context
21Is the law, then, against the promises of God? Never! If a law had been given that could give life, righteousness really would have come from the law. 22But the Scripture locked everything away under sin, so that the promise, by faith in Jesus Christ, might be given to those who believe. 23Before this faith came, we were held in custody under the law, locked in until the faith that was to come should be revealed. 24So the law became our guardian until the Christ, so that we might be justified by faith. 25But now that faith has come, we are no longer under a guardian.