/*************************************************
* X.509 Certificate Options Header File          *
* (C) 1999-2003 The Botan Project                *
*************************************************/

#ifndef BOTAN_X509_CERT_OPTS_H__
#define BOTAN_X509_CERT_OPTS_H__

#include <botan/asn1_obj.h>

namespace Botan {

/*************************************************
* Options for X.509 Certificates                 *
*************************************************/
class X509_Cert_Options
   {
   public:
      std::string common_name;
      std::string country;
      std::string organization;
      std::string org_unit;
      std::string locality;
      std::string state;
      std::string serial_number;

      std::string email;
      std::string uri;
      std::string dns;

      std::string challenge;

      X509_Time start, end;

      bool is_CA;
      u32bit path_limit;
      Key_Constraints constraints;
      std::vector<OID> ex_constraints;

      void sanity_check() const;

      void CA_key(u32bit = 8);
      void not_before(const std::string&);
      void not_after(const std::string&);

      void add_constraints(Key_Constraints);
      void add_ex_constraint(const OID&);
      void add_ex_constraint(const std::string&);

      X509_Cert_Options(const std::string& = "");
   };

}

#endif
