monotone

monotone Mtn Source Tree

Root/botan/x509_obj.h

1/*************************************************
2* X.509 SIGNED Object Header File *
3* (C) 1999-2005 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_X509_OBJECT_H__
7#define BOTAN_X509_OBJECT_H__
8
9#include <botan/asn1_obj.h>
10#include <botan/pipe.h>
11#include <vector>
12
13namespace Botan {
14
15/*************************************************
16* Generic X.509 SIGNED Object *
17*************************************************/
18class X509_Object
19 {
20 public:
21 SecureVector<byte> tbs_data() const;
22 SecureVector<byte> signature() const;
23 AlgorithmIdentifier signature_algorithm() const;
24
25 void encode(Pipe&, X509_Encoding = PEM) const;
26 SecureVector<byte> BER_encode() const;
27 std::string PEM_encode() const;
28
29 X509_Object(DataSource&, const std::string&);
30 X509_Object(const std::string&, const std::string&);
31 virtual ~X509_Object() {}
32 protected:
33 void do_decode();
34 X509_Object() {}
35 AlgorithmIdentifier sig_algo;
36 SecureVector<byte> tbs_bits, sig;
37 private:
38 virtual void force_decode() = 0;
39 void init(DataSource&, const std::string&);
40 void decode_info(DataSource&);
41 std::vector<std::string> PEM_labels_allowed;
42 std::string PEM_label_pref;
43 };
44
45}
46
47#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status