If you are booting into Recovery Mode to perform the clean install, then you will need to change the computer's date to some time in 2017 (or perhaps earlier like 2016, etc.) because the certificates being used by the local installer have expired. While booted to the installer launch the Terminal app from the Utilities menu and run the following command to set the date & time to Jan. 2, 2017 @ 11:33am:
date -u 0102113317
If the command completes without any errors, then quit the Terminal app and select the "Reinstall macOS" option (or maybe it is "Reinstall OS X").
I don't believe you need to do this if you recently created a bootable macOS 10.11 USB installer, but if you are getting this error, then change the date & time.
FYI, when performing a clean install for resale you should boot into recovery mode using Command + Option + R so that you don't have to use your AppleID to download the macOS 10.11 installer since that will associate your AppleID with the OS which you don't want when selling a Mac.
If your laptop had macOS 10.12.6+ installed at some point in the past, then using Command + Option + R should boot the laptop into Internet Recovery Mode to access the online macOS 12.x Monterey installer, however, sometimes this will only access the online installer for the OS which originally shipped with the laptop from the factory which in this case is macOS 10.11.