Suppose I have a software which I sell to customer to use. I want to include a license that will be expired in let's say 1 year, so that customer need to renew their package.
I want to prevent the user (customer) from trying to bypass the expiration, so I decide to use a digital signature to protect the expiration date information where I keep the private key to myself only, and need to distribute the public key and expiration date along with the software.
But how can I store the public key with the software other than hardcoding it? Given that I only concern that they should not be able to modify the public key. It does not matter if they can read public key or the expiration date, only they must not be able to bypass or change that expiration date.
Sure I can hardcode the public key, but it sounds like a bad option. (and since I also need to replace the license for them from time to time, so hardcoding mean I may need to re-compile the whole software)