Botan 1.10.17
pkcs10.h
Go to the documentation of this file.
1/*
2* PKCS #10
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_PKCS10_H__
9#define BOTAN_PKCS10_H__
10
11#include <botan/x509_obj.h>
12#include <botan/x509_dn.h>
13#include <botan/pkcs8.h>
14#include <botan/datastor.h>
15#include <vector>
16
17namespace Botan {
18
19/**
20* PKCS #10 Certificate Request.
21*/
22class BOTAN_DLL PKCS10_Request : public X509_Object
23 {
24 public:
25 /**
26 * Get the subject public key.
27 * @return subject public key
28 */
30
31 /**
32 * Get the raw DER encoded public key.
33 * @return raw DER encoded public key
34 */
36
37 /**
38 * Get the subject DN.
39 * @return subject DN
40 */
41 X509_DN subject_dn() const;
42
43 /**
44 * Get the subject alternative name.
45 * @return subject alternative name.
46 */
48
49 /**
50 * Get the key constraints for the key associated with this
51 * PKCS#10 object.
52 * @return key constraints
53 */
55
56 /**
57 * Get the extendend key constraints (if any).
58 * @return extended key constraints
59 */
60 std::vector<OID> ex_constraints() const;
61
62 /**
63 * Find out whether this is a CA request.
64 * @result true if it is a CA request, false otherwise.
65 */
66 bool is_CA() const;
67
68 /**
69 * Return the constraint on the path length defined
70 * in the BasicConstraints extension.
71 * @return path limit
72 */
73 u32bit path_limit() const;
74
75 /**
76 * Get the challenge password for this request
77 * @return challenge password for this request
78 */
79 std::string challenge_password() const;
80
81 /**
82 * Create a PKCS#10 Request from a data source.
83 * @param source the data source providing the DER encoded request
84 */
86
87 /**
88 * Create a PKCS#10 Request from a file.
89 * @param filename the name of the file containing the DER or PEM
90 * encoded request file
91 */
92 PKCS10_Request(const std::string& filename);
93 private:
94 void force_decode();
95 void handle_attribute(const Attribute&);
96
97 Data_Store info;
98 };
99
100}
101
102#endif
AlternativeName subject_alt_name() const
Definition pkcs10.cpp:157
PKCS10_Request(DataSource &source)
Definition pkcs10.cpp:22
MemoryVector< byte > raw_public_key() const
Definition pkcs10.cpp:139
Public_Key * subject_public_key() const
Definition pkcs10.cpp:148
X509_DN subject_dn() const
Definition pkcs10.cpp:131
std::vector< OID > ex_constraints() const
Definition pkcs10.cpp:173
Key_Constraints constraints() const
Definition pkcs10.cpp:165
bool is_CA() const
Definition pkcs10.cpp:186
u32bit path_limit() const
Definition pkcs10.cpp:194
std::string challenge_password() const
Definition pkcs10.cpp:123
X509_Object(DataSource &src, const std::string &pem_labels)
Definition x509_obj.cpp:24
unsigned int u32bit
Definition types.h:32
Key_Constraints