Ejemplo n.º 1
0
    def get_key(self, fpr, secret):
        """Return the key corresponding to the fingerprint 'fpr'"""
        ptr = pygpgme.new_gpgme_key_t_p()
        errorcheck(pygpgme.gpgme_get_key(self.wrapped, fpr, ptr, secret))
        key = pygpgme.gpgme_key_t_p_value(ptr)
        pygpgme.delete_gpgme_key_t_p(ptr)
	if key:
	    key.__del__ = lambda self: pygpgme.gpgme_key_unref(self)
        return key
Ejemplo n.º 2
0
Archivo: core.py Proyecto: jcollie/pyme
 def get_key(self, fpr, secret):
     """Return the key corresponding to the fingerprint 'fpr'"""
     ptr = pygpgme.new_gpgme_key_t_p()
     errorcheck(pygpgme.gpgme_get_key(self.wrapped, fpr, ptr, secret))
     key = pygpgme.gpgme_key_t_p_value(ptr)
     pygpgme.delete_gpgme_key_t_p(ptr)
     if key:
         key.__del__ = lambda self: pygpgme.gpgme_key_unref(self)
     return key
Ejemplo n.º 3
0
 def op_keylist_next(self):
     """Returns the next key in the list created
     by a call to op_keylist_start().  The object returned
     is of type Key."""
     ptr = pygpgme.new_gpgme_key_t_p()
     try:
         errorcheck(pygpgme.gpgme_op_keylist_next(self.wrapped, ptr))
         key = pygpgme.gpgme_key_t_p_value(ptr)
     except errors.GPGMEError, excp:
         key = None
         if excp.getcode() != errors.EOF:
             raise excp
Ejemplo n.º 4
0
Archivo: core.py Proyecto: jcollie/pyme
 def op_keylist_next(self):
     """Returns the next key in the list created
     by a call to op_keylist_start().  The object returned
     is of type Key."""
     ptr = pygpgme.new_gpgme_key_t_p()
     try:
         errorcheck(pygpgme.gpgme_op_keylist_next(self.wrapped, ptr))
         key = pygpgme.gpgme_key_t_p_value(ptr)
     except errors.GPGMEError, excp:
         key = None
         if excp.getcode() != errors.EOF:
             raise excp