1 EXHIBIT 5 OPINION OF SHUMAKER WILLIAMS, P.C. 2 717.909.1651 bybel@shumakerwilliams.com August 24, 2001 Larry J. Miller, President CODORUS VALLEY BANCORP, INC. P.O. Box 2887 York, PA 17405 Re: CODORUS VALLEY BANCORP, INC. Registration Statement on Form S-8 Our File No.:01-846 Dear Mr. Miller: We have acted as Special Corporate Counsel to Codorus Valley Bancorp, Inc., a Pennsylvania corporation (the "Corporation") in connection with its Registration Statement on Form S-8 (the "Registration Statement") to be filed with the Securities and Exchange Commission relating to the registration of 10,000 shares of its common stock issuable upon the grant of Awards pursuant to the Corporation's Employee Stock Bonus Plan (the "Plan"). In connection with the foregoing, we have examined the following documents: 1. the Corporation's Amended Articles of Incorporation; 2. the Corporation's Amended Bylaws; 3. Resolutions adopted by the Board of Directors on June 12, 2001 authorizing the Plan; 4. Resolutions adopted by the Board of Directors on June 26, 2001 authorizing preparation and filing of the Registration Statement; 5. the Plan; and 6. the Registration Statement. 3 In our examination, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals and the conformity with the original documents of documents submitted to us as copies. As to any facts material to our opinion, we have, to the extent that relevant facts were not independently established by us, relied on certificates of public officials and certificates, oaths and declarations of officers or other representatives of the Corporation. On the basis of the foregoing and in reliance thereon, it is our opinion that the Corporation's common stock, par value $2.50 per share, issuable under the Plan, when issued in accordance with the provisions of the Plan and the Registration Statement, will be legally and validly issued, fully paid, and non-assessable. In giving the foregoing opinion, we have assumed that the Corporation will have, at the time of the issuance of common stock under the Plan, a sufficient number of authorized shares available for issue. We consent to the use of this opinion as an exhibit to the Corporation's Registration Statement on Form S-8, filed by the Corporation with the Securities and Exchange Commission, relating to the Plan. In giving this consent, we do not admit that we come within the category of persons whose consent is required under Sections 7 or 11 of the Securities Act of 1933, as amended, or the rules and regulations thereunder. Very truly yours, /s/ Nicholas Bybel, Jr. By Nicholas Bybel, Jr.