anchor.diff:      let defaultDBFile  = TLSInfo.defaultConfig.dhDBFileName
       let defaultMinPlen = fst TLSInfo.defaultConfig.dhPQMinLength
       let defaultMinQlen = snd TLSInfo.defaultConfig.dhPQMinLength
  -    let defaultDumpDir = "dhdb_dump"
  +    let defaultConfidence = 80
     
       let options = ref {
  -        command = Dump;
  +        command = None;
           dbfile  = Path.Combine(mypath, defaultDBFile); 
  -        dbfile2 = "";
  -        pemfile = "";
  -        dumpdir = Path.Combine(mypath, defaultDumpDir);
           minplen = defaultMinPlen;
           minqlen = defaultMinQlen; 
           force   = false; 
  -        confidence = 80; }
  +        confidence = defaultConfidence; }
   
       let o_dbfile = fun s ->
           options := { !options with dbfile = s }
  
positive.code:         if not (File.Exists s) then
              let msg = sprintf "File not found: %s" s in
                  raise (ArgError msg);
          options := { !options with command = Insert; pemfile = s }
  
      let o_dumpdir = fun s ->
          options := { !options with command = Dump; dumpdir = s }
          
      let o_dbfile2 = fun s ->
          if not (File.Exists s) then
              let msg = sprintf "File not found: %s" s in
                  raise (ArgError msg);
          options := { !options with command = Import; dbfile2 = s }
  
      let o_check = fun () ->
          options := { !options with command = Check }
      
      let o_force = fun () ->
          options := { !options with force = true }
  
negative.code:         try 
              DHDB.create options.dbfile
          with _ ->
              eprintf "Could not open nor create database: %s" options.dbfile;
              exit 1
   
      match options.command with
      | None ->
          eprintf "At least one command must be specified";
          exit 1
      | Some(command) ->
          match command with  
          | Insert(pemfile) ->
              let dhp =
                  try load_params_from_file pemfile
                  with InvalidPEMFile s -> 
                      eprintfn "Invalid PEM file. %s" s;
                      exit 1
              in
                  match dhp with
                  | DH(p,g) -> 
                      match DHDB.select db (p,g) with
                      | Some _ -> 
                          eprintfn "Found parameters in the database with same modulus and generator";
                          exit 1
                      | _ ->            
                          if options.force || check_unknown_q options.confidence options.minplen options.minqlen p g then
                              ignore(insert_safe_prime db p g);
                              exit 0
                          else
                              eprintfn "Could not validate the parameters";
                              exit 1
                  | DHX(p,q,g) ->
                      match DHDB.select db (p,g) with
                      | Some _ -> 
                          eprintfn "Found parameters in the database with same modulus and generator";
                          exit 1
                      | _ ->            
                          if options.force || check_known_q options.confidence options.minplen options.minqlen p g q then
                              ignore(insert_known_q db p g q);
                              exit 0
                          else
                              eprintfn "Could not validate the parameters";
                              exit 1       
  
          | Dump(dumpdir) -> 
              try 
                  let di = Directory.CreateDirectory dumpdir in
                  dump db dumpdir;
                  exit 0
              with _ ->
                  eprintf "Could not open nor create directory: %s" dumpdir;
                  exit 1
  
          | Check ->
              check options.confidence options.minplen options.minqlen db;
              exit 0
  
          | Import(dbfile2) ->
              try 
                  ignore (DHDB.merge db dbfile2);
                  exit 0
              with _ ->
                  eprintfn "Error merging the databases";
                  exit 1
  