code: def handle_getinfo(self, conn, args):
          
          result = None
          if args[0] == b'version':
              result = self.version
          elif args[0] == b's2k_count':
              # Use highest number of S2K iterations.
              # https://www.gnupg.org/documentation/manuals/gnupg/OpenPGP-Options.html
              # https://tools.ietf.org/html/rfc4880#section-3.7.1.3
              result = '{}'.format(64 << 20).encode('ascii')
          else:
              log.warning('Unknown GETINFO command: %s', args)
  
          if result:
              keyring.sendline(conn, b'D ' + result)
docs: Handle some of the GETINFO messages.