Section 24007 (b)(2) of the Vehicle Code states it is the responsibility of the seller to provide a valid smog certificate at the time of delivery of the vehicle. There is no stipulation for selling to a car dealer or private party.
Typically the car dealership (used or new) will take on the smog check responsibility and may deduct a smog check fee from the purchase price of your vehicle. The dealership may require you provide a smog check certificate. This matter should be discussed and decided on by you and the dealership.