aboutsummaryrefslogtreecommitdiffstats
path: root/include/pkcs10.h
blob: a83e650642160e34c13f2ed79ab8d3cc39a6902b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*************************************************
* PKCS #10 Header File                           *
* (C) 1999-2007 The Botan Project                *
*************************************************/

#ifndef BOTAN_PKCS10_H__
#define BOTAN_PKCS10_H__

#include <botan/x509_obj.h>
#include <botan/pkcs8.h>
#include <botan/datastor.h>
#include <vector>

namespace Botan {

/*************************************************
* PKCS #10 Certificate Request                   *
*************************************************/
class PKCS10_Request : public X509_Object
   {
   public:
      Public_Key* subject_public_key() const;

      MemoryVector<byte> raw_public_key() const;
      X509_DN subject_dn() const;
      AlternativeName subject_alt_name() const;
      Key_Constraints constraints() const;
      std::vector<OID> ex_constraints() const;

      bool is_CA() const;
      u32bit path_limit() const;

      std::string challenge_password() const;

      PKCS10_Request(DataSource&);
      PKCS10_Request(const std::string&);
   private:
      void force_decode();
      void handle_attribute(const Attribute&);

      Data_Store info;
   };

}

#endif