def rpc_ping(self, sender, nodeid, challenge, signature, certString=None):
        source = Node(nodeid, sender[0], sender[1])
        nodeIdHex = nodeid.encode("hex").upper()
        if certString != None:
            try:
                cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM,
                                                      certString)
                store_ctx = OpenSSL.crypto.X509StoreContext(self.trustedStore,
                                                           cert)
                store_ctx.verify_certificate()
                # Ensure that the CA of the received certificate is trusted
                fingerprint = cert.digest("sha256")
                id = fingerprint.replace(":", "")[-40:]
                if id != nodeIdHex:
                    logger(self.sourceNode,
                          "RETNONE: Explicit certificate in ping from {} "
                          "does not match nodeid".format(source))
                    return None
                sourceNodeIdHex = self.sourceNode.id.encode('hex').upper()
                payload = "{}{}".format(sourceNodeIdHex, challenge)
                OpenSSL.crypto.verify(cert,
                                     signature,
                                     payload,
                                     "sha256")
                if not self.certificateExists(nodeIdHex):
                    self.storeCert(certString, nodeIdHex)
                    self.transferKeyValues(source)
            except:
                logger(self.sourceNode,
                      "RETNONE: Bad signature for sender of ping with "
                      "explicit certificate: {}".format(source))
                return None
        else:
            cert_stored = self.searchForCertificate(nodeIdHex)
            if cert_stored == None:
                try:
                    private = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM,
                                                          self.priv_key,
                                                          '')
                    signature = OpenSSL.crypto.sign(private,
                                                   challenge,
                                                   "sha256")
                except:
                    logger(self.sourceNode,
                          "RETNONE: Failed make signature for ping")
                    return None
                logger(self.sourceNode,
                      "Certificate for {} not found "
                      "in store".format(source))
                return {'NACK' : None, "signature" : signature}
            else:
                try:
                    sourceNodeIdHex = self.sourceNode.id.encode('hex').upper()
                    payload = "{}{}".format(sourceNodeIdHex, challenge)
                    OpenSSL.crypto.verify(cert_stored,
                                         signature,
                                         payload,
                                         "sha256")
                except:
                    logger(self.sourceNode,
                          "RETNONE: Bad signature for sender of "
                          "ping: {}".format(source))
                    return None
        try:
            private = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM,
                                                    self.priv_key,
                                                    '')
            signature = OpenSSL.crypto.sign(private,
                                           challenge,
                                           "sha256")
        except:
            logger(self.sourceNode, "RETNONE: Signing of rpc_ping failed")
            return None
        return { 'id': self.sourceNode.id, 'signature': signature }


    #####################
    # MISC              #
    #####################
This function is ???
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/south/plugins/storage/twistedimpl/securedht/append_server.py/KademliaProtocolAppend.rpc_ping