Page MenuHome GnuPG

gnupg get_key failed in php
Closed, InvalidPublic

Description

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?

Details

Due Date
Oct 5 2015, 2:00 AM

Event Timeline

ronak.thamor added projects: gnupg, Bug Report.
ronak.thamor added a subscriber: ronak.thamor.

We don't maintain a PHP wrapper. I'd recommend that you report this problem to
the maintainers of that package. When doing so, you'll probably want to include
the public key that you are trying to import and indicate what version of GnuPG
and the GnuPG PHP wrapper that you have installed.

neal lowered the priority of this task from High to Normal.
neal removed a project: Bug Report.