The versions of OS's on the Recovery Servers have expired certificates, this happened about 5 months ago and Apple have done nothing to improve the situation. One method to get round this is to change the date in Terminal to a date prior to the certificates expiration date.
So if you are booted up to Recovery Mode, click Utilities in the menubar and select Terminal,
now copy and paste the following,
sudo date -u 011421002016
press Return
enter your password
press Return
If Terminal returns an error saying sudo : command not found, then try again without sudo,
so just
date -u 011421002016
Now try downloading the OS.
If this works then when the OS is installed and booted up you can Open System Preferences> Date & Time
and reset the time back to today.
Your mac must be connected to your router using a cabled connection, you will need to switch WiFi off,
WiFi has the habit of resetting the date back to today.
If you mac is still functioning and trying to install using the Recovery Servers is still not working then this is what
you really should have done.
Download Yosemite from here, How to upgrade to OS X Yosemite – Apple Support
At Section 4 download Yosemite, this downloads InstallMacOSX.dmg, open this and you will see InstallMacOSX.pkg,
double-click on that and an installer window will open, this does not install Yosemite but converts the .pkg to Install OS X Yosemite.app. This will appear in your Applications folder. Double-clicking this will start the installation of Yosemite, the install app will self-delete after the installation completes, so keep a copy of the InstallMacOSX.dmg, or make a copy of the Install OS X Yosemite.app and keep it safe elsewhere on the mac or an external drive. You can also make a bootable USB installerusing the Disk Creator app from here, https://macdaddy.io/install-disk-creator/ it is free.