There's a thread on removing tampered and showing locked in android Dev section. I believe it just flashes a modified hboot file. Then you just need to s-on:
Fastboot oem writesecureflag 3
Then lock your bootloader which you know how to do.
There have been issues with running an RUU after messing with your bootloader while S-on with HTC Phones in the past so to minimize possible bricking be sure to see your CID back to its original if you changed it and possibly even leaving the phone S-Off if you plan to continue using it after returning to stock.
Sent from my HTC One_M8 using xda app-developers app
: Telus HTC One M8: 3.16 HBOOT S-OFF
Exad's m8 Everything Explained Thread