EXHIBIT 23.02 Consent of Independent Registered Public Accounting Firm We consent to the incorporation by reference in the Registration Statements, as amended, on Form S-3 (Registration Nos. 333-106949 and 333-116668) and Form S-8 (Registration Nos. 333-31709, 333-31721, 333-31723, 333-31727, 333-81844, 333-81858, 333-106620 and 333-118731), of our report dated March 11, 2004, with respect to the consolidated balance sheet of Valero Energy Corporation and subsidiaries as of December 31, 2003, and the related consolidated statements of income, stockholders' equity, cash flows, and comprehensive income for each of the two years in the period then ended, included in Valero Energy Corporation's Annual Report on Form 10-K for the year ended December 31, 2004. /s/ Ernst & Young LLP San Antonio, Texas March 11, 2005