libepp_nicbr
SheppObjSet.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: SheppObjSet.H 1224 2014-11-06 12:42:42Z rafael $ */
7 #ifndef __SHEPP_OBJ_SET_H__
8 #define __SHEPP_OBJ_SET_H__
9 
10 #include "CommonData.H"
11 #include "DomainUpdateCmd.H"
12 #include "DefRegUpdateCmd.H"
13 #include "RGPRestore.H"
14 #include "ClaimsNotice.H"
15 
17 class SheppObjSet {
18 public:
19 
21 
26  static int parse_iprange(const string &input, IpRange &ipRange) {
27  string error_msg("");
28 
29  string version;
30  string range;
31  string ipBegin;
32  string ipEnd;
33 
34  if (SheppStrUtil::split(input, version, range, "=", false) != 0 ||
35  SheppStrUtil::split(range, ipBegin, ipEnd, "-", false) != 0) {
36  return -1;
37  }
38 
39  ipRange.set_version(version);
40  ipRange.set_ipBegin(ipBegin);
41  ipRange.set_ipEnd(ipEnd);
42 
43  return 0;
44  }
45 
46  //used by both contact and domain
47 
49 
54  static int authInfo(AuthInfo &auth, vector<string> &words)
55  {
56  words.erase(words.begin());
57 
58  if (words.size() <= 0) {
59  return -1;
60  }
61 
62  string pw;
63  string roid;
64  if (SheppStrUtil::split(words[0], pw, roid, ":", true) != 0) {
65  return -1;
66  }
67 
68  auth.set_pw(pw);
69  auth.set_roid(roid);
70 
71  words.erase(words.begin());
72 
73  return 0;
74  }
75 
76  //domain specific
77 
79 
84  static int nameServer(NameServer &ns, vector<string> &words)
85  {
86  words.erase(words.begin());
87  if (words.empty()) {
88  return -1;
89  }
90 
91  string ips;
92  SheppStrUtil::split(words[0], ns.name, ips, ",", true);
93 
94  if (ips != "") {
95  string this_ip;
96  do {
97  if (SheppStrUtil::split(ips, this_ip, ips, ",", true) != 0) {
98  return -1;
99  }
100 
101  NSIPAddr ip;
102  if (SheppStrUtil::split(this_ip, ip.version, ip.addr, ":", false)
103  != 0) {
104  return -1;
105  }
106 
107  ns.ips.insert(ip);
108  } while (ips != "");
109  }
110 
111  words.erase(words.begin());
112 
113  return 0;
114  }
115 
117 
122  static int status(DomainUpdateCmd::Status &st, vector<string> &words)
123  {
124  string status;
125  string lang;
126  string description;
127 
128  if (SheppStrUtil::split(words[0], status, lang, ":", false) != 0) {
129  return -1;
130  }
131  words.erase(words.begin());
132 
133  if (SheppStrUtil::split(lang, lang, description, ":", false) != 0) {
134  return -1;
135  }
136 
137  SheppStrUtil::quote_gathering(words, description);
138 
139  st.s = status;
140  st.lang = lang;
141  st.msg = description;
142 
143  return 0;
144  }
145 
147 
152  static int status(DefRegUpdateCmd::Status &st, vector<string> &words)
153  {
154  string status;
155  string lang;
156  string description;
157 
158  if (SheppStrUtil::split(words[0], status, lang, ":", false) != 0) {
159  return -1;
160  }
161  words.erase(words.begin());
162 
163  if (SheppStrUtil::split(lang, lang, description, ":", false) != 0) {
164  return -1;
165  }
166 
167  SheppStrUtil::quote_gathering(words, description);
168 
169  st.set_status(status);
170  st.set_lang(lang);
171  st.set_msg(description);
172 
173  return 0;
174  }
175 
177 
182  static int dsInfo(DSInfo &ds, vector<string> &words, string &error_msg)
183  {
184  words.erase(words.begin()); // -ds
185 
186  // must have at least 4 elements: keytag, algorithm, digtype and digest
187  if (words.size() < 4) {
188  error_msg = "not enough arguments for DS";
189  return -1;
190  }
191 
192  // parse the key tag: check if it has only numbers
193  string c;
194  for (unsigned int i = 0; i < words[0].length(); i++) {
195  c = words[0][i];
196  if (c != "0" && atoi(c.c_str()) == 0) {
197  error_msg = "keyTag must be a number";
198  return -1;
199  }
200  }
201 
202  int key_tag = atoi(words[0].c_str());
203  if (key_tag < 0) {
204  error_msg = "keyTag cannot be a negative number";
205  return -1;
206  }
207  ds.set_key_tag(key_tag);
208 
209  int alg = atoi(words[1].c_str());
210  if (alg < 0) {
211  error_msg = "alg cannot be a negative number";
212  return -1;
213  }
214  ds.set_algo(alg);
215 
216  int dig_type = atoi(words[2].c_str());
217  if (dig_type < 0) {
218  error_msg = "digestType cannot be a negative number";
219  return -1;
220  }
221  ds.set_digest_type(dig_type);
222  ds.set_digest(words[3]);
223 
224  words.erase(words.begin(), words.begin() + 4);
225 
226  //optional parameters
227  while (!words.empty()) {
228  if (words[0] == "-maxlife") {
229  if (words.size() < 2) {
230  error_msg = "maxSigLife value missing";
231  return -1;
232  }
233  words.erase(words.begin()); // -maxlife
234  int maxlife = atoi(words[0].c_str());
235  if (maxlife < 0) {
236  error_msg = "maxSigLife cannot be a negative number";
237  return -1;
238  }
239  ds.set_max_sig_life(maxlife);
240  words.erase(words.begin()); // maxlife value
241  } else if (words[0] == "-keyData") {
242  KeyData dnskey;
243  if (SheppObjSet::keyData(dnskey, words, error_msg) != 0) {
244  return -1;
245  }
246  ds.set_key_data(dnskey);
247  } else {
248  break;
249  }
250  }
251 
252  return 0;
253  }
254 
256 
261  static int dsInfo(ReverseDSInfo &ds, vector<string> &words, string &error_msg)
262  {
263  words.erase(words.begin()); // -ds
264 
265  // must have at least 5 elements: ipRange, keytag, algorithm,
266  // digtype and digest
267  if (words.size() < 5) {
268  error_msg = "not enough arguments for DS";
269  return -1;
270  }
271 
272  IpRange ipRange;
273  if (parse_iprange(words[0], ipRange) != 0) {
274  error_msg = "invalid IP range";
275  return -1;
276  }
277  ds.set_ipRange(ipRange);
278 
279  // parse the key tag: check if it has only numbers
280  string c;
281  for (unsigned int i = 0; i < words[1].length(); i++) {
282  c = words[1][i];
283  if (c != "0" && atoi(c.c_str()) == 0) {
284  error_msg = "keyTag must be a number";
285  return -1;
286  }
287  }
288 
289  int key_tag = atoi(words[1].c_str());
290  if (key_tag < 0) {
291  error_msg = "keyTag cannot be a negative number";
292  return -1;
293  }
294  ds.set_key_tag(key_tag);
295 
296  int alg = atoi(words[2].c_str());
297  if (alg < 0) {
298  error_msg = "alg cannot be a negative number";
299  return -1;
300  }
301  ds.set_algo(alg);
302 
303  int dig_type = atoi(words[3].c_str());
304  if (dig_type < 0) {
305  error_msg = "digestType cannot be a negative number";
306  return -1;
307  }
308  ds.set_digest_type(dig_type);
309  ds.set_digest(words[4]);
310 
311  words.erase(words.begin(), words.begin() + 5);
312  return 0;
313  }
314 
316 
321  static int keyData(KeyData &dnskey, vector<string> &words, string &error_msg)
322  {
323  if (words.size() < 5) {
324  error_msg = "not enough arguments for keyData";
325  return -1;
326  }
327 
328  int flags = atoi(words[1].c_str());
329  int protocol = atoi(words[2].c_str());
330  int algorithm = atoi(words[3].c_str());
331 
332  if (flags < 0 || protocol < 0 || algorithm < 0) {
333  error_msg = "keyData flags, protocol and alg cannot be negative numbers";
334  return -1;
335  }
336 
337  dnskey.set_flags(flags);
338  dnskey.set_protocol(protocol);
339  dnskey.set_algorithm(algorithm);
340  dnskey.set_pub_key(words[4]);
341 
342  words.erase(words.begin(), words.begin() + 5);
343 
344  return 0;
345  }
346 
347  //contact specific
348 
350 
357  static int postalInfo(PostalInfo &postal, vector<string> &words,
358  string &error_msg, bool relaxed)
359  {
360  //type
361  string postal_type = words[0];
362  words.erase(words.begin());
363  if (SheppStrUtil::quote_gathering(words, postal_type) != 0) {
364  error_msg = "error setting postalInfo type";
365  return -1;
366  }
367  postal.set_type(postal_type);
368 
369  while (!words.empty()) {
370  if (words[0] == "-name") {
371  //name
372  words.erase(words.begin());
373  if (words.empty()) {
374  error_msg = "unspecified contact name";
375  return -1;
376  }
377  string postal_name = words[0];
378  words.erase(words.begin());
379  if (SheppStrUtil::quote_gathering(words, postal_name) != 0) {
380  error_msg = "error setting contact name";
381  return -1;
382  }
383  postal.set_name(postal_name);
384  } else if (words[0] == "-org") {
385  //org
386  words.erase(words.begin());
387  if (words.empty()) {
388  error_msg = "unspecified organization";
389  return -1;
390  }
391  string postal_org = words[0];
392  words.erase(words.begin());
393  if (SheppStrUtil::quote_gathering(words, postal_org) != 0) {
394  error_msg = "error setting organization";
395  return -1;
396  }
397  postal.set_org(postal_org);
398  } else if (words[0] == "-street1") {
399  //street1
400  words.erase(words.begin());
401  if (words.empty()) {
402  error_msg = "unspecified address street/line 1";
403  return -1;
404  }
405  string postal_str1 = words[0];
406  words.erase(words.begin());
407  if (SheppStrUtil::quote_gathering(words, postal_str1) != 0) {
408  error_msg = "error setting address street/line 1";
409  return -1;
410  }
411  postal.set_str1(postal_str1);
412  } else if (words[0] == "-street2") {
413  //street2
414  words.erase(words.begin());
415  if (words.empty()) {
416  error_msg = "unspecified address number/line 2";
417  return -1;
418  }
419  string postal_str2 = words[0];
420  words.erase(words.begin());
421  if (SheppStrUtil::quote_gathering(words, postal_str2) != 0) {
422  error_msg = "error setting address number/line 2";
423  return -1;
424  }
425  postal.set_str2(postal_str2);
426  } else if (words[0] == "-street3") {
427  //street3
428  words.erase(words.begin());
429  if (words.empty()) {
430  error_msg = "unspecified street3";
431  return -1;
432  }
433  string postal_str3 = words[0];
434  words.erase(words.begin());
435  if (SheppStrUtil::quote_gathering(words, postal_str3) != 0) {
436  error_msg = "error setting address line 3";
437  return -1;
438  }
439  postal.set_str3(postal_str3);
440  } else if (words[0] == "-city") {
441  //city
442  words.erase(words.begin());
443  if (words.empty()) {
444  error_msg = "unspecified city";
445  return -1;
446  }
447  string postal_city = words[0];
448  words.erase(words.begin());
449  if (SheppStrUtil::quote_gathering(words, postal_city) != 0) {
450  error_msg = "error setting city";
451  return -1;
452  }
453  postal.set_city(postal_city);
454  } else if (words[0] == "-state") {
455  //state
456  words.erase(words.begin());
457  if (words.empty()) {
458  error_msg = "unspecified state";
459  return -1;
460  }
461  string postal_sp = words[0];
462  words.erase(words.begin());
463  if (SheppStrUtil::quote_gathering(words, postal_sp) != 0) {
464  error_msg = "error setting state/province";
465  return -1;
466  }
467  postal.set_sp(postal_sp);
468  } else if (words[0] == "-pc") {
469  //pc
470  words.erase(words.begin());
471  if (words.empty()) {
472  error_msg = "unspecified postal code";
473  return -1;
474  }
475  string postal_pc = words[0];
476  words.erase(words.begin());
477  if (SheppStrUtil::quote_gathering(words, postal_pc) != 0) {
478  error_msg = "error setting postal code";
479  return -1;
480  }
481  postal.set_pc(postal_pc);
482  } else if (words[0] == "-cc") {
483  //cc
484  words.erase(words.begin());
485  if (words.empty()) {
486  error_msg = "unspecified country code";
487  return -1;
488  }
489  string postal_cc = words[0];
490  words.erase(words.begin());
491  if (SheppStrUtil::quote_gathering(words, postal_cc) != 0) {
492  error_msg = "error setting country code";
493  return -1;
494  }
495  postal.set_cc(postal_cc);
496  } else {
497  break;
498  }
499  }
500 
501  //relaxed: update; !relaxed: create
502  if (!relaxed) {
503  if (postal.get_name() == "") {
504  error_msg = "name is mandatory";
505  return -1;
506  }
507 
508  if (postal.get_str1() == "") {
509  error_msg = "address street/line 1 is mandatory";
510  return -1;
511  }
512 
513  if (postal.get_city() == "") {
514  error_msg = "city is mandatory";
515  return -1;
516  }
517 
518  if (postal.get_cc() == "") {
519  error_msg = "country code is mandatory";
520  return -1;
521  }
522  } else {
523  if (postal.get_name() == "" &&
524  postal.get_org() == "" &&
525  postal.get_str1() == "" &&
526  postal.get_str2() == "" &&
527  postal.get_str3() == "" &&
528  postal.get_city() == "" &&
529  postal.get_sp() == "" &&
530  postal.get_pc() == "" &&
531  postal.get_cc() == "") {
532  error_msg = "empty postal info";
533  return -1;
534  }
535  }
536 
537  return 0;
538  }
539 
541 
546  static int phone(CommonData::Phone &phone, vector<string> &words)
547  {
548  if (words.empty() ||
549  SheppStrUtil::split(words[0], phone.number, phone.ext, ":", true)
550  != 0) {
551  return -1;
552  }
553  words.erase(words.begin());
554  return 0;
555  }
556 
558 
563  static int disclose(CommonData::Disclose &disclose, string word)
564  {
565  string opt1 = word;
566  string opt2;
567  while (opt1 != "" &&
568  SheppStrUtil::split(opt1, opt1, opt2, ",", true) == 0) {
569  if (opt1 == "name_int") {
570  disclose.name_int = true;
571  } else if (opt1 == "name_loc") {
572  disclose.name_loc = true;
573  } else if (opt1 == "org_int") {
574  disclose.org_int = true;
575  } else if (opt1 == "org_loc") {
576  disclose.org_loc = true;
577  } else if (opt1 == "addr_int") {
578  disclose.addr_int = true;
579  } else if (opt1 == "addr_loc") {
580  disclose.addr_loc = true;
581  } else if (opt1 == "voice") {
582  disclose.voice = true;
583  } else if (opt1 == "fax") {
584  disclose.fax = true;
585  } else if (opt1 == "email") {
586  disclose.email = true;
587  } else {
588  return -1;
589  }
590  opt1 = opt2;
591  }
592  return 0;
593  }
594 
595  // brorg specific
596 
598 
604  static int contacts(map<string, string, less<string> > &contacts,
605  string args, string &error_msg)
606  {
607  string one = args;
608  string rest;
609 
610  do {
611  if (SheppStrUtil::split(one, one, rest, ",", true) != 0) {
612  error_msg = "invalid contact";
613  return -1;
614  }
615 
616  string key;
617  string value;
618  if (SheppStrUtil::split(one, key, value, "=", false) != 0) {
619  error_msg = "invalid contact";
620  return -1;
621  }
622 
623  contacts[key] = value;
624 
625  one = rest;
626  } while (one != "");
627 
628  return 0;
629  }
630 
632 
638  static int claimsNotice(ClaimsNotice &notice, vector<string> &words, string &error)
639  {
640  words.erase(words.begin());
641  if (words.size() < 3) {
642  error = "not enough arguments for Claims Notice";
643  return -1;
644  }
645 
646  notice.set_id(words[0]);
647  notice.set_acceptedDate(words[1]);
648  notice.set_notAfter(words[2]);
649  words.erase(words.begin(), words.begin() + 3);
650  return 0;
651  }
652 
654 
661  static int rgpRestore(vector<string> &words,
662  RGPRestore &rgp_restore,
663  string &error_msg)
664  {
665  words.erase(words.begin()); // -rgp
666 
667  if (words.empty()) {
668  error_msg = "invalid number of arguments for RGP";
669  return -1;
670  }
671 
672  rgp_restore.set_operation(RGPRestore::Operation::fromString(words[0]));
673  if (rgp_restore.get_operation() == RGPRestore::Operation::NONE) {
674  error_msg = "invalid RGP operation";
675  return -1;
676  }
677 
678  words.erase(words.begin()); // operation
679  bool fillReport = false;
680 
681  while(!words.empty()) {
682  if (words[0] == "-rgp-report") {
683  if (rgp_restore.get_operation() == RGPRestore::Operation::REQUEST) {
684  error_msg = "RGP request do not have -rgp-report parameters";
685  return -1;
686  }
687 
688  words.erase(words.begin()); // -rgp-report
689 
690  RGPReport rgp_report = rgp_restore.get_report();
691 
692  if (words.empty()) {
693  error_msg = "pre data is missing in RGP report";
694  return -1;
695  }
696 
697  string pre_data = words[0];
698  words.erase(words.begin());
699  if (SheppStrUtil::quote_gathering(words, pre_data) != 0) {
700  error_msg = "invalid pre data in RGP report";
701  return -1;
702  }
703  rgp_report.set_pre_data(pre_data);
704 
705  if (words.empty()) {
706  error_msg = "post data is missing in RGP report";
707  return -1;
708  }
709 
710  string post_data = words[0];
711  words.erase(words.begin());
712  if (SheppStrUtil::quote_gathering(words, post_data) != 0) {
713  error_msg = "invalid post data in RGP report";
714  return -1;
715  }
716  rgp_report.set_post_data(post_data);
717 
718  if (words.empty()) {
719  error_msg = "del time is missing in RGP report";
720  return -1;
721  }
722 
723  rgp_report.set_del_time(words[0]);
724  words.erase(words.begin()); // del_time
725 
726  if (words.empty()) {
727  error_msg = "res time is missing in RGP report";
728  return -1;
729  }
730 
731  rgp_report.set_res_time(words[0]);
732  words.erase(words.begin()); // res_time
733 
734  if (words.empty()) {
735  error_msg = "res reason is missing in RGP report";
736  return -1;
737  }
738 
739  string res_reason = words[0];
740  words.erase(words.begin());
741  if (SheppStrUtil::quote_gathering(words, res_reason) != 0) {
742  error_msg = "invalid res reason in RGP report";
743  return -1;
744  }
745  rgp_report.set_res_reason(res_reason);
746 
747  if (words.empty()) {
748  error_msg = "statement is missing in RGP report";
749  return -1;
750  }
751 
752  string statement1 = words[0];
753  words.erase(words.begin());
754  if (SheppStrUtil::quote_gathering(words, statement1) != 0) {
755  error_msg = "invalid statement in RGP report";
756  return -1;
757  }
758  rgp_report.set_statement1(statement1);
759 
760  if (words.empty()) {
761  error_msg = "statement is missing in RGP report";
762  return -1;
763  }
764 
765  string statement2 = words[0];
766  words.erase(words.begin());
767  if (SheppStrUtil::quote_gathering(words, statement2) != 0) {
768  error_msg = "invalid statement in RGP report";
769  return -1;
770  }
771  rgp_report.set_statement2(statement2);
772 
773  rgp_restore.set_report(rgp_report);
774  fillReport = true;
775 
776  } else if (words[0] == "-rgp-other") {
777  words.erase(words.begin()); // -rgp-other
778 
779  if (words.empty()) {
780  error_msg = "other value missing in RGP report";
781  return -1;
782  }
783 
784  string other = words[0];
785  words.erase(words.begin());
786  if (SheppStrUtil::quote_gathering(words, other) != 0) {
787  error_msg = "invalid other in RGP report";
788  return -1;
789  }
790 
791  RGPReport rgp_report = rgp_restore.get_report();
792  rgp_report.set_other(other);
793  rgp_restore.set_report(rgp_report);
794 
795  } else {
796  break;
797  }
798  }
799 
800  if (rgp_restore.get_operation() == RGPRestore::Operation::REPORT && !fillReport) {
801  error_msg = "RGP report fields are mandatory";
802  return -1;
803  }
804 
805  return 0;
806  }
807 };
808 
809 #endif //__SHEPP_OBJ_SET_H__
static int claimsNotice(ClaimsNotice &notice, vector< string > &words, string &error)
Fill a claims notice object.
Definition: SheppObjSet.H:638
void set_res_time(const string &res_time)
Sets the res time.
Definition: RGPRestore.H:93
Operation::Value get_operation() const
Returns the operation.
Definition: RGPRestore.H:356
static int split(string input, string &first, string &second, string splitter, bool relaxed=false)
Definition: SheppStrUtil.H:120
void set_ipRange(const IpRange &ipRange)
Sets ip range.
Definition: ReverseDSInfo.H:37
void set_algo(const unsigned int algo)
Sets algorithm.
Definition: DSInfo.H:63
EPP DomainUpdateCmd Class.
void set_digest_type(const unsigned int digest_type)
Sets the digest type.
Definition: DSInfo.H:79
EPP CommonData Class.
Definition: CommonData.H:183
static int phone(CommonData::Phone &phone, vector< string > &words)
fills a Phone based on input command line
Definition: SheppObjSet.H:546
static int keyData(KeyData &dnskey, vector< string > &words, string &error_msg)
fills a KeyData based on input command line
Definition: SheppObjSet.H:321
void set_digest(const string &digest)
Sets the digest.
Definition: ReverseDSInfo.H:103
void set_id(const string &id)
Definition: ClaimsNotice.H:28
PostalInfo class.
Definition: CommonData.H:281
void set_roid(const string &roid)
Sets repository object ID.
Definition: CommonData.H:103
void set_report(const RGPReport &report)
Sets the report.
Definition: RGPRestore.H:365
static int dsInfo(ReverseDSInfo &ds, vector< string > &words, string &error_msg)
fills a ReverseDSInfo based on input command line
Definition: SheppObjSet.H:261
void set_operation(const Operation::Value operation)
Sets the operation.
Definition: RGPRestore.H:346
static int status(DefRegUpdateCmd::Status &st, vector< string > &words)
fills a Status based on input command line
Definition: SheppObjSet.H:152
Describes IpRange structure.
Definition: CommonData.H:192
void set_notAfter(const string &notAfter)
Sets the expiry of the claims notice.
Definition: ClaimsNotice.H:42
static int status(DomainUpdateCmd::Status &st, vector< string > &words)
fills a Status based on input command line
Definition: SheppObjSet.H:122
void set_key_tag(const unsigned int key_tag)
Sets key tag.
Definition: DSInfo.H:44
void set_statement2(const string &statement2)
Sets the statement.
Definition: RGPRestore.H:178
EPP Launch Phase.
DSInfo Class.
Definition: DSInfo.H:16
void set_del_time(const string &del_time)
Sets the del time.
Definition: RGPRestore.H:73
void set_status(const string &status)
Sets the status of the defensive registration object.
Definition: DefRegUpdateCmd.H:64
Definition: DomainUpdateCmd.H:36
void set_msg(const string &msg)
Sets the status' message.
Definition: DefRegUpdateCmd.H:88
void set_key_data(const KeyData &key_data)
Sets the key data.
Definition: DSInfo.H:132
static int parse_iprange(const string &input, IpRange &ipRange)
reads an IpRange object from args
Definition: SheppObjSet.H:26
EPP Notice Class.
Definition: ClaimsNotice.H:13
EPP DefRegUpdateCmd::Status Class.
Definition: DefRegUpdateCmd.H:28
void set_other(const string &other)
Sets the other.
Definition: RGPRestore.H:219
Definition: KeyData.H:15
Definition: CommonData.H:491
void set_max_sig_life(const unsigned int max_sig_life)
Sets the maximum signature life (deprecated by RFC5910)
Definition: DSInfo.H:114
EPP RGPReport Class.
Definition: RGPRestore.H:19
static int postalInfo(PostalInfo &postal, vector< string > &words, string &error_msg, bool relaxed)
fills a PostalInfo based on input command line
Definition: SheppObjSet.H:357
void set_digest_type(const unsigned int digest_type)
Sets the digest type.
Definition: ReverseDSInfo.H:88
void set_statement1(const string &statement1)
Sets the statement.
Definition: RGPRestore.H:134
static int disclose(CommonData::Disclose &disclose, string word)
fills a Disclose based on input command line
Definition: SheppObjSet.H:563
Definition: CommonData.H:524
void set_digest(const string &digest)
Sets the digest.
Definition: DSInfo.H:95
EPP/RGP Restore information class.
RGPReport get_report() const
Returns the report.
Definition: RGPRestore.H:374
static int quote_gathering(vector< string > &words, string &gather)
Gathers command-line arguments bounded by quotes in a string.
Definition: SheppStrUtil.H:152
void set_algo(const unsigned int algo)
Sets algorithm.
Definition: ReverseDSInfo.H:73
Definition: CommonData.H:175
void set_res_reason(const string &res_reason)
Sets the res reason.
Definition: RGPRestore.H:113
shepp specific objects information setting class
Definition: SheppObjSet.H:17
void set_acceptedDate(const string &acceptedDate)
Sets the date and time that the Claims Notice was accepted.
Definition: ClaimsNotice.H:55
EPP RGPRestore Class.
Definition: RGPRestore.H:290
static int contacts(map< string, string, less< string > > &contacts, string args, string &error_msg)
fills a map of contacts based on input command line
Definition: SheppObjSet.H:604
static int nameServer(NameServer &ns, vector< string > &words)
fills a NameServer based on input command line
Definition: SheppObjSet.H:84
void set_key_tag(const unsigned int key_tag)
Sets key tag.
Definition: ReverseDSInfo.H:55
void set_pre_data(const string &pre_data)
Sets the pre data.
Definition: RGPRestore.H:33
static int dsInfo(DSInfo &ds, vector< string > &words, string &error_msg)
fills a DSInfo based on input command line
Definition: SheppObjSet.H:182
static int authInfo(AuthInfo &auth, vector< string > &words)
fills an AuthInfo based on input command line
Definition: SheppObjSet.H:54
EPP DefRegUpdateCmd Class.
void set_pw(const string &pw)
Sets password.
Definition: CommonData.H:130
Reverse DSInfo Class.
Definition: ReverseDSInfo.H:16
static int rgpRestore(vector< string > &words, RGPRestore &rgp_restore, string &error_msg)
fill a registry grace period structure
Definition: SheppObjSet.H:661
AuthInfo Class.
Definition: CommonData.H:83
void set_lang(const string &lang)
Sets the status' message language.
Definition: DefRegUpdateCmd.H:76
void set_post_data(const string &post_data)
Sets the post data.
Definition: RGPRestore.H:53