California law states the seller is always responsible for selling the car with a smog certificate. If the seller sells the car saying it is "as-is" does that excuses him/her from previously obtaining this certificate? Which legal risks the seller would be exposed to if he/she does that?
No, selling a car "as-is" is not a valid reason for not having a smog certificate. According to the DMV here, the smog certificate must have been done within 90 days of the sale. The exceptions are:
The transfer occurs between a spouse, domestic partner, sibling, child, parent, grandparent, or grandchild.
A biennial smog certification was submitted to DMV within 90 days prior to the vehicle transfer date (a vehicle inspection report may be required for proof of certification).
There are a few other exceptions based on the type/year of the car like gasoline-powered and older than 1975 or electric-powered.