

def add_pgp_key(self, public_key, signature, guid):
    '\n        Adds a pgp public key to the profile. The user must have submitted a\n        valid signature covering the guid otherwise the key will not be added to\n        the profile.\n        '
    gpg = gnupg.GPG()
    gpg.import_keys(public_key)
    if (gpg.verify(signature) and (guid in signature)):
        p = p.profile.PublicKey()
        p.public_key = public_key
        p.signature = signature
        self.profile.pgp_key.MergeFrom(p)
        self.db.profile.set_proto(self.profile.SerializeToString())
        return True
    else:
        return False

dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/market/profile.py Profile.add_pgp_key/VarMisuse@53/138 `self`->`p`