Changeset 1788 for trunk/pdns/pdns/pdnssec.cc
- Timestamp:
- 01/02/11 19:30:37 (2 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/pdnssec.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/pdnssec.cc
r1783 r1788 85 85 ::arg().setSwitch("query-logging","Hint backends that queries should be logged")="no"; 86 86 ::arg().set("soa-minimum-ttl","Default SOA mininum ttl")="3600"; 87 ::arg().set("key-repository","")="./keys";88 87 UeberBackend::go(); 89 88 } … … 173 172 desc.add_options() 174 173 ("help,h", "produce help message") 175 ("key-repository,k", po::value<string>()->default_value("./keys"), "Location of keys")176 174 ("verbose,v", po::value<bool>(), "be verbose") 177 175 ("force", "force an action") … … 197 195 loadMainConfig(); 198 196 reportAllTypes(); 199 DNSSECKeeper dk (g_vm["key-repository"].as<string>());197 DNSSECKeeper dk; 200 198 201 199 if(cmds[0] == "order-zone") { … … 258 256 else if(cmds[0] == "add-zone-key") { 259 257 const string& zone=cmds[1]; 260 // need to get algorithm & ksk or zsk 258 // need to get algorithm & ksk or zsk from commandline 261 259 dk.addKey(zone, 1, 5, 0); 262 260 cerr<<"Not implemented"<<endl; … … 326 324 cout << dpk.d_key.convertToISC(dpk.d_algorithm) <<endl; 327 325 } 326 else if(cmds[0]=="import-zone-key") { 327 cerr<<"This isn't quite right yet!"<<endl; /// XXX FIXME 328 string zone=cmds[1]; 329 string fname=cmds[2]; 330 DNSSECPrivateKey dpk; 331 getRSAKeyFromISC(&dpk.d_key.getContext(), fname.c_str()); 332 dpk.d_algorithm = 5; 333 dpk.d_flags = 257; 334 dk.addKey(zone, true, dpk); // add a KSK 335 } 328 336 else if(cmds[0]=="export-zone-dnskey") { 329 337 string zone=cmds[1];