EXHIBIT 10.2 CUPERTINO AFFILIATE AGREEMENT I, the undersigned, have been advised that as of the date hereof I may be deemed to be (but I do not hereby admit to being) an affiliate of Cupertino National Bancorp ("Cupertino") for purposes of Rule 145 promulgated by the SEC under the Securities Act ("Rule 145"). The following undertaking is given pursuant to and in compliance with that certain Agreement and Plan of Reorganization and Merger between Mid-Peninsula Bancorp ("Mid-Peninsula") and Cupertino, dated as of June 5, 1996 (the "Reorganization Agreement"), which provides for the merger of Cupertino with and into Mid-Peninsula (the "Merger") and Mid-Peninsula will change its name to Greater Bay Bancorp ("Bancorp"). Capitalized terms used herein and not defined herein shall have the meanings given to them in the Reorganization Agreement. I understand that Mid-Peninsula is relying on the performance of the covenants contained herein to insure that they obtain the desired pooling-of- interests accounting treatment as a result of the Merger and to avoid any appearance of improper manipulation of Mid-Peninsula's stock price or insider trading in the period prior to the Merger. I hereby agree that during the period beginning on October 15, 1996 (or such later date as Mid-Peninsula may notify me in writing), and ending on the date on which the Effective Time of the Merger occurs, which in either event shall not exceed thirty (30) days prior to the Effective Time of the Merger, I will not offer to sell or purchase, sell, transfer, purchase or acquire, publicly or privately, any shares of Mid-Peninsula common stock ("Mid-Peninsula Share" or "Mid-Peninsula Shares") or Cupertino common stock ("Cupertino Share" or "Cupertino Shares"), or cause any other person to do any of the above, except as a result of the conversion in the Merger of any Cupertino Shares or options to purchase Cupertino Shares held by me. I hereby also agree that during the period beginning on the date on which the Effective Time of the Merger occurs and ending on the date of release and publication to the general public of financial results covering at least thirty (30) days of post-merger combined operations of Mid-Peninsula and Cupertino, I will not offer, sell or transfer, publicly or privately, any Mid-Peninsula Shares or Bancorp Shares, and that I will not during such period commit or agree to sell or transfer any of such Mid-Peninsula Shares or Bancorp Shares after such period. I hereby also agree that at no time will I offer, sell or transfer, publicly or privately, any Bancorp Shares acquired by me in the Merger, whether in exchange for Cupertino Shares or for or upon exercise of options to purchase such Cupertino Shares, except: (i) Pursuant to a then current effective registration under the Securities Act of 1933, as amended (the "1933 Act"); or (ii) Pursuant to the provisions of Rule 145(d) under the 1933 Act; or (iii) If counsel representing me, satisfactory to Mid-Peninsula, shall have advised Mid-Peninsula in a written opinion letter in form and substance satisfactory to Mid-Peninsula and its counsel and upon which Mid- Peninsula and its counsel may rely, that no registration under the 1933 Act would be required in connection with the proposed sale, transfer or other disposition. I agree and confirm that: (i) the Bancorp Shares to be acquired by me upon consummation of the Merger (such Bancorp Shares being sometimes referred to for purposes of this Agreement as "Acquired Shares") will not be acquired with a view to the sale or distribution thereof except as permitted by Rule 145; (ii) the certificate representing the Acquired Shares or any substitutions therefor, may be subject to stop transfer instructions which confirm that such securities representing Bancorp Shares have been issued or transferred to the registered holder as a result of a transaction to which Rule 145 under the Securities Act of 1933, as amended (the "Act") applies and that such securities may not be sold, hypothecated, transferred or assigned, and the issuer or its transfer agent shall not be required to give effect to any attempted sale, hypothecation, transfer or assignment, except (i) pursuant to a then current effective registration statement under the Act, (ii) in a transaction permitted by Rule 145 as to which the issuer has, in the opinion of its counsel, received reasonably satisfactory evidence of compliance with the provisions of Rule 145, or (iii) in a transaction which, in the opinion of counsel satisfactory to the issuer or as described in a "no action" or interpretive letter from the staff of the Securities and Exchange Commission is not required to be registered under the Act. It is understood and agreed that any stop transfer instructions shall be removed if the undersigned shall have delivered to Mid-Peninsula a written opinion letter in form and substance satisfactory to Mid-Peninsula and its counsel and upon which Mid-Peninsula and its counsel may rely, from counsel satisfactory to Mid-Peninsula, that no registration under the 1933 Act would be required in connection with the proposed sale, transfer or other disposition. Date: Signed: /s/ ------------------------------ ------------------------------ MID-PENINSULA AFFILIATE AGREEMENT I, the undersigned, have been advised that as of the date hereof I may be deemed to be (but I do not hereby admit to being) an affiliate of Mid-Peninsula Bancorp ("Mid-Peninsula") for purposes of Rule 145 promulgated by the SEC under the Securities Act ("Rule 145"). The following undertaking is given pursuant to and in compliance with that certain Agreement and Plan of Reorganization and Merger between Mid-Peninsula and Cupertino National Bancorp ("Cupertino") dated as of June 5, 1996 (the "Reorganization Agreement"), which provides for the merger of Cupertino with and into Mid-Peninsula (the "Merger") and Mid-Peninsula will change its name to Greater Bay Bancorp ("Bancorp"). Capitalized terms used herein and not defined herein shall have the meanings given to them in the Reorganization Agreement. I understand that Mid-Peninsula is relying on the performance of the covenants contained herein to insure that they obtain the desired pooling-of- interests accounting treatment as a result of the Merger and to avoid any appearance of improper manipulation of Mid-Peninsula's stock price or insider trading in the period prior to the Merger. I hereby agree that during the period beginning on October 15, 1996, (or such later date as Mid-Peninsula may notify me in writing), and ending on the date on which the Effective Time of the Merger occurs, which in either event shall not exceed thirty (30) days prior to the Effective Time of the Merger, I will not offer to sell or purchase, sell, transfer, purchase or acquire, publicly or privately, any Mid-Peninsula common stock ("Mid-Peninsula Share" or "Mid-Peninsula Shares"), or cause any other person to do any of the above, except my exercise of any stock option pursuant to Mid-Peninsula's stock option plans. I hereby also agree that during the period beginning on the date on which the Effective Time of the Merger occurs and ending on the date of release and publication to the general public of financial results covering at least thirty (30) days of post-merger combined operations of Mid-Peninsula and Cupertino, I will not offer, sell or transfer, publicly or privately, any Mid-Peninsula Shares or Bancorp Shares, and that I will not during such period commit or agree to sell any of such Mid-Peninsula Shares or Bancorp Shares after such period. Date: /s/ ------------------------- -------------------------