code: def make_ca():
      os.mkdir(TMP_CADIR)
      with open(os.path.join("cadir", "index.txt"), "a+") as f:
          pass  # empty file
      with open(os.path.join("cadir", "crl.txt"), "a+") as f:
          f.write("00")
      with open(os.path.join("cadir", "index.txt.attr"), "w+") as f:
          f.write("unique_subject = no")
      # random start value for serial numbers
      with open(os.path.join("cadir", "serial"), "w") as f:
          f.write("CB2D80995A69525B\n")
  
      with tempfile.NamedTemporaryFile("w") as t:
          req = req_template.format(
              hostname="our-ca-server",
              extra_san="",
              startdate=startdate,
              enddate=enddate,
          )
          t.write(req)
          t.flush()
          with tempfile.NamedTemporaryFile() as f:
              args = [
                  "req",
                  "-config",
                  t.name,
                  "-new",
                  "-nodes",
                  "-newkey",
                  "rsa:3072",
                  "-keyout",
                  "pycakey.pem",
                  "-out",
                  f.name,
                  "-subj",
                  "/C=XY/L=Castle Anthrax/O=Python Software Foundation CA/CN=our-ca-server",
              ]
              check_call(["openssl"] + args)
              args = [
                  "ca",
                  "-config",
                  t.name,
                  "-out",
                  "pycacert.pem",
                  "-batch",
                  "-outdir",
                  TMP_CADIR,
                  "-keyfile",
                  "pycakey.pem",
                  "-selfsign",
                  "-extensions",
                  "v3_ca",
                  "-infiles",
                  f.name,
              ]
              check_call(["openssl"] + args)
              args = [
                  "ca",
                  "-config",
                  t.name,
                  "-gencrl",
                  "-out",
                  "revocation.crl",
              ]
              check_call(["openssl"] + args)
  
      # capath hashes depend on subject!
      check_call(
          [
              "openssl",
              "x509",
              "-in",
              "pycacert.pem",
              "-out",
              "capath/ceff1710.0",
          ]
      )
      shutil.copy("capath/ceff1710.0", "capath/b1930218.0")
  
file_path: cpython/Lib/test/certdata/make_ssl_certs.py
imports: import os
  import pprint
  import shutil
  import tempfile
  from subprocess import *
label_desc: Use image node_id 3 for calling a global function with example usage: make_ca() without return types