[Tickets #9514] Re: Fatal error when saving S/MIME key

bugs at horde.org bugs at horde.org
Thu Feb 17 15:54:10 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/h/whups/ticket/9514
------------------------------------------------------------------------------
  Ticket             | 9514
  Updated By         | hordetest at trash-mail.com
  Summary            | Fatal error when saving S/MIME key
  Queue              | IMP
  Version            | Git master
  Type               | Bug
  State              | Resolved
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


hordetest at trash-mail.com (2011-02-17 15:54) wrote:

>> I still get the A fatal error has occurred No certificate found. popup.
>
> Probably because that key is already saved.
There are some bugs in the implementation of the method addPublicKey  
in smime.php.
These coding is working for me. Please take as initial input:

     /**
      * Add a public key to an address book.
      *
      * @param string $cert  A public certificate to add.
      *
      * @throws Horde_Crypt_Exception
      */
     public function addPublicKey($cert)
     {
		$cert_a = $this->publicKeyInfo($cert);
		$name = $cert_a[0]['subject']['CN'];
		$email = $cert_a[0]['subject']['emailAddress'];

         $GLOBALS['registry']->call('contacts/addField', array($email,  
$name, self::PUBKEY_FIELD, $cert,  
$GLOBALS['prefs']->getValue('add_source')));
     }






More information about the bugs mailing list