The petition must be accompanied with a copy of the sentence of conviction of the prisoner, duly certified by the clerk of the court by which he was sentenced, under the seal thereof; together with an affidavit of the applicant, stating that the person so convicted is actually imprisoned thereunder.
N.Y. Correct.Law § 354