I am using gnupg for digital sign file in php. It was working fine before.
Suddenly I am getting this error:
PHP Fatal error: Uncaught exception 'Exception' with message 'get_key failed'
putenv("GNUPGHOME=/tmp"); $publicKey = file_get_contents("./media/digital_signed_transaction/public.key"); $gpg = new gnupg(); $gpg->seterrormode(gnupg::ERROR_EXCEPTION); $info = $gpg->import($publicKey); $gpg->addsignkey($info['fingerprint'], DIGITAL_FILE_PASS); $signed = $gpg->sign($data_to_sign);
What could be the reason?