예제 #1
0
파일: core.py 프로젝트: tierney/lockbox-py
    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
예제 #2
0
파일: core.py 프로젝트: 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
예제 #3
0
파일: core.py 프로젝트: tierney/lockbox-py
 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
예제 #4
0
파일: core.py 프로젝트: 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