CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We hereby consent to the incorporation by reference in the Registration Statement on Form N-2 of John Hancock Financial Opportunities Fund of our report dated February 16, 2024, relating to the financial statements and financial highlights, which appears in this Form N-CSR.

Boston, MA

February 16, 2024