I wouldn’t be so sure that he was framed. He had worked as a CIA/FBI stooge in the past, and he may have been doing the same thing here. I don’t know if he was a victim in this saga or if he was a co-conspirator.
Why was Carter Page never set up in a perjury trap?