duanlie7447 2015-04-08 09:46
浏览 52

too long

When I try to sign test useing PGP I get no signature in result error.

public function pgpSign($strFileContent, $strSignKey) {
    $pgp = new \gnupg();
    $pgp->seterrormode(\gnupg::ERROR_EXCEPTION); 
    $arrFingerPrint = $pgp->import($strSignKey);
    $pgp->addsignkey($arrFingerPrint['fingerprint']);
    $pgp->setsignmode(GNUPG_SIG_MODE_DETACH);
    return $pgp->sign($strFileContent);
}

public function test() {
    return $this->pgpSign('test testowy', '/../Static/private_key.pem');    
}
  • 写回答

1条回答 默认 最新

  • doulan4371 2015-04-08 13:45
    关注

    It wass an issue wwith the key. I needed to generate a new one.

    评论

报告相同问题?