This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading Sorry if my question is easy because I am new to Mac. 

OS X Yosemite on my friend's  Macbook Air was removed. Now when we start his Mac it has just Windows.

For installing Os x, I got the the installation file (13 Zip file) from third party web site and extracted that and it produced dmg file.

Now I have tried to made a bootable USB of OS X Yosemite with my Mac by using Disk Maker App.   

Now when we turn on Mac of my friend while pressing Alt , I can see the icon to install Yosemite. So I click on that and continue first steps like language without error, but after 2 or 3 steps I received error

" This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading."

Please help what is the problem and how i can solve that.
Your installation file for Yosemite has had its digital certificate expire. Which means after a certain date it will no longer work. To work around this issue you open the Date &amp; Time preferences pane, uncheck the box for "Set date &amp; time automatically" &amp; set the date back to just after the time Yosemite was initially released (October 16, 2014) then run the installer.