Gov. Andrew Cuomo in Buffalo on Wednesday said he would sign legislation that would extend access to driver’s licenses to undocumented immigrants.

He also added the caveat: The Legislature has to pass the measure first.

“That’s an issue that the Legislature may take up this session. The Assembly said they’re going to put in a bill,” he said.

Asked if he’d sign the bill, Cuomo said, “Yeah, if they pass it.”

NY1’s Zack Fink reported last night there are now 30 members who are supportive of the bill in the state Senate’s Democratic conference, two shy of a majority needed for a measure to pass.

The proposal has been politically controversial in the past after it failed under then-Gov. Eliot Spitzer. But supporters believe this year is different given Democratic majorities in the Legislature and are pursuing an argument that expanding access to licenses is good for insurance and safety.