A defendant must obtain a certificate of probable cause to challenge “the trial court’s authority to impose the maximum allowable term reached in a charge bargain.” And a claim challenges the trial courts authority if a successful appeal would preclude the court on remand from imposing the maximum term reached in the bargain. Appellant pled guilty to Penal Code section 290, admitted five strikes and two prior prison terms. He acknowledged, both in writing and in open court, that the maximum term he faced as a result of his plea was 27 years to life. He was then sentenced to 27 years to life. Without obtaining a certificate of probable cause, he challenged the sentence as unconstitutional, being cruel and unusual punishment and violating double jeopardy provisions. Citing People v. Cuevas (2008) 44 Cal.4th 374, the appellate court found the claim to be a challenge to the plea requiring a certificate of probable cause, because if the argument was successful, the court could not impose the maximum sentence to which appellant agreed. The constitutional claims were dismissed.