code: def _send_signed_request(url, payload):
      
      payload64 = _b64(json.dumps(payload).encode('utf8'))
  
      out = parse_account_key()
      header = get_boulder_header(out)
  
      protected = copy.deepcopy(header)
      protected["nonce"] = urlopen(DEFAULT_CA + "/directory").headers['Replay-Nonce']
      protected64 = _b64(json.dumps(protected).encode('utf8'))
      cmd = [
          'openssl', 'dgst',
          '-sha256',
          '-sign', os.path.join(gettempdir(), 'account.key')
      ]
      proc = subprocess.Popen(
          cmd,
          stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
      )
      out, err = proc.communicate("{0}.{1}".format(protected64, payload64).encode('utf8'))
      if proc.returncode != 0: # pragma: no cover
          raise IOError("OpenSSL Error: {0}".format(err))
      data = json.dumps({
          "header": header, "protected": protected64,
          "payload": payload64, "signature": _b64(out),
      })
      try:
          resp = urlopen(url, data.encode('utf8'))
          return resp.getcode(), resp.read()
      except IOError as e:
          return getattr(e, "code", None), getattr(e, "read", e.__str__)()
docs: Helper function to make signed requests to Boulder