anchor.diff:       "crlDistributionPoints=@crl_section\n"
       ];
   
  -ca_cnf(C = #config{issuing_distribution_point = false}) ->
  +ca_cnf(Root, C = #config{issuing_distribution_point = false}) ->
       ["# Purpose: Configuration for CAs.\n"
        "\n"
  -     "ROOTDIR	        = $ENV::ROOTDIR\n"
  +     "ROOTDIR	          = " ++ Root ++ "\n"
        "default_ca	= ca\n"
        "\n"
   
  
positive.code:     do_append_files(Fs, RF).
  
  rootCA(Root, Name, C) ->
      create_ca_dir(Root, Name, ca_cnf(C#config{commonName = Name})),
      create_self_signed_cert(Root, Name, req_cnf(C#config{commonName = Name}), C),
      file:copy(filename:join([Root, Name, "cert.pem"]), filename:join([Root, Name, "cacerts.pem"])),
      gencrl(Root, Name, C).
  
  intermediateCA(Root, CA, ParentCA, C) ->
      create_ca_dir(Root, CA, ca_cnf(C#config{commonName = CA})),
      CARoot = filename:join([Root, CA]),
      CnfFile = filename:join([CARoot, "req.cnf"]),
      file:write_file(CnfFile, req_cnf(C#config{commonName = CA})),
      KeyFile = filename:join([CARoot, "private", "key.pem"]), 
      ReqFile =  filename:join([CARoot, "req.pem"]), 
      create_req(Root, CnfFile, KeyFile, ReqFile, C),
  
negative.code:      "subjectKeyIdentifier = hash\n"
       "subjectAltName	= email:copy\n"].
  
  ca_cnf(Root, C = #config{issuing_distribution_point = true}) ->
      ["# Purpose: Configuration for CAs.\n"
       "\n"
       "ROOTDIR	       = " ++ Root ++ "\n"
       "default_ca	= ca\n"
       "\n"
  
  