aboutsummaryrefslogtreecommitdiffstats
path: root/include/pkcs10.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-05-18 18:33:19 +0000
committerlloyd <[email protected]>2006-05-18 18:33:19 +0000
commita2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch)
treead3d6c4fcc8dd0f403f8105598943616246fe172 /include/pkcs10.h
Initial checkin1.5.6
Diffstat (limited to 'include/pkcs10.h')
-rw-r--r--include/pkcs10.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/pkcs10.h b/include/pkcs10.h
new file mode 100644
index 000000000..212bf7749
--- /dev/null
+++ b/include/pkcs10.h
@@ -0,0 +1,53 @@
+/*************************************************
+* PKCS #10 Header File *
+* (C) 1999-2006 The Botan Project *
+*************************************************/
+
+#ifndef BOTAN_PKCS10_H__
+#define BOTAN_PKCS10_H__
+
+#include <botan/x509_obj.h>
+#include <botan/pkcs8.h>
+#include <vector>
+
+namespace Botan {
+
+/*************************************************
+* PKCS #10 Certificate Request *
+*************************************************/
+class PKCS10_Request : public X509_Object
+ {
+ public:
+ X509_PublicKey* 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&);
+ void handle_v3_extension(const Extension&);
+
+ MemoryVector<byte> pub_key;
+ X509_DN dn;
+ AlternativeName subject_alt;
+ std::string challenge;
+ Key_Constraints constraints_value;
+ std::vector<OID> ex_constraints_list;
+ bool is_ca;
+ u32bit max_path_len;
+ };
+
+}
+
+#endif