synapse/storage/keys.py
def store_server_verify_key(self, server_name, from_server, time_now_ms,
                                verify_key):
        """Stores a NACL verification key for the given server.
        Args:
            server_name (str): The name of the server.
            from_server (str): Where the verification key was looked up
            time_now_ms (int): The time now in milliseconds
            verify_key (nacl.signing.VerifyKey): The NACL verify key.
        """
        key_id = "%s:%s" % (verify_key.alg, verify_key.version)

        def _txn(txn):
            self._simple_upsert_txn(
                txn,
                table="server_signature_keys",
                keyvalues={
                    "server_name": server_name,
                    "key_id": key_id,
                },
                values={
                    "from_server": from_server,
                    "ts_added_ms": time_now_ms,
                    "verify_key": buffer(verify_key.encode()),
                },
            )
            txn.call_after(
                self._get_server_verify_key.invalidate,
                (server_name, key_id)
            )

        return self.runInteraction("store_server_verify_key", _txn)
Stores a NACL verification key for the given server.
        Args:
            server_name (str): The name of the server.
            from_server (str): Where the verification key was looked up
            time_now_ms (int): The time now in milliseconds
            verify_key (nacl.signing.VerifyKey): The NACL verify key.
        
Stores a NACL verification key for the given server.
Stores a NACL verification key for the given server .
def store_server_verify_key(self, server_name, from_server, time_now_ms,
                                verify_key):
        key_id = "%s:%s" % (verify_key.alg, verify_key.version)
        def _txn(txn):
            self._simple_upsert_txn(
                txn,
                table="server_signature_keys",
                keyvalues={
                    "server_name": server_name,
                    "key_id": key_id,
                },
                values={
                    "from_server": from_server,
                    "ts_added_ms": time_now_ms,
                    "verify_key": buffer(verify_key.encode()),
                },
            )
            txn.call_after(
                self._get_server_verify_key.invalidate,
                (server_name, key_id)
            )
        return self.runInteraction("store_server_verify_key", _txn)
def store_server_verify_key ( self , server_name , from_server , time_now_ms , verify_key ) : key_id = "%s:%s" % ( verify_key . alg , verify_key . version ) def _txn ( txn ) : self . _simple_upsert_txn ( txn , table = "server_signature_keys" , keyvalues = { "server_name" : server_name , "key_id" : key_id , } , values = { "from_server" : from_server , "ts_added_ms" : time_now_ms , "verify_key" : buffer ( verify_key . encode ( ) ) , } , ) txn . call_after ( self . _get_server_verify_key . invalidate , ( server_name , key_id ) ) return self . runInteraction ( "store_server_verify_key" , _txn )
Stores a NACL verification key for the given server.
Stores a NACL verification key for the given server .
"""Stores a NACL verification key for the given server.
        Args:
            server_name (str): The name of the server.
            from_server (str): Where the verification key was looked up
            time_now_ms (int): The time now in milliseconds
            verify_key (nacl.signing.VerifyKey): The NACL verify key.
        """
self
server_name
The name of the server.
The name of the server .
from_server
None
time_now_ms
The time now in milliseconds
The time now in milliseconds
verify_key
The NACL verify key.
The NACL verify key .