libcamgm
CertificateData.hpp
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | _ _ _ _ __ _ |
4 | | | | | | \_/ | / \ | | |
5 | | | | | | |_| | / /\ \ | | |
6 | | |__ | | | | | | / ____ \ | |__ |
7 | |____||_| |_| |_|/ / \ \|____| |
8 | |
9 | ca-mgm library |
10 | |
11 | (C) SUSE Linux Products GmbH |
12 \----------------------------------------------------------------------/
13 
14  File: CertificateData.hpp
15 
16  Author: <Michael Calmer> <mc@suse.de>
17  Maintainer: <Michael Calmer> <mc@suse.de>
18 
19  Purpose:
20 
21 /-*/
22 #ifndef CA_MGM_CERTIFICATE_DATA_HPP
23 #define CA_MGM_CERTIFICATE_DATA_HPP
24 
25 #include <ca-mgm/config.h>
26 #include <ca-mgm/CommonData.hpp>
28 #include <ca-mgm/DNObject.hpp>
29 #include <ca-mgm/ByteBuffer.hpp>
30 #include <ca-mgm/PtrTypes.hpp>
31 
32 namespace CA_MGM_NAMESPACE {
33 
34  class CertificateDataImpl;
35 
42  public:
43  CertificateData(const CertificateData& data);
44 
45  virtual ~CertificateData();
46 
47 #ifndef SWIG
48 
50  operator=(const CertificateData& data);
51 
52 #endif
53 
54  uint32_t
55  getVersion() const;
56 
57  std::string
58  getSerial() const;
59 
60  time_t
61  getStartDate() const;
62 
63  time_t
64  getEndDate() const;
65 
66  DNObject
67  getIssuerDN() const;
68 
69  DNObject
70  getSubjectDN() const;
71 
72  uint32_t
73  getKeysize() const;
74 
75  KeyAlg
76  getPublicKeyAlgorithm() const;
77 
78  std::string
79  getPublicKeyAlgorithmAsString() const;
80 
82  getPublicKey() const;
83 
84  SigAlg
85  getSignatureAlgorithm() const;
86 
87  std::string
88  getSignatureAlgorithmAsString() const;
89 
91  getSignature() const;
92 
93  std::string
94  getFingerprint() const;
95 
97  getExtensions() const;
98 
103  std::string
104  getCertificateAsText() const;
105 
110  std::string
111  getExtensionsAsText() const;
112 
113  virtual bool
114  valid() const;
115 
116  virtual std::vector<std::string>
117  verify() const;
118 
119  virtual std::vector<std::string>
120  dump() const;
121 
122  protected:
123  CertificateData();
124 
125 
127  };
128 
129 }
130 
131 #endif // CA_MGM_CERTIFICATE_DATA_HPP
Read-only data representation of X509 V3 Certificate Extensions.
Definition: X509v3CertificateExtensions.hpp:48
Definition: DNObject.hpp:72
SigAlg
Definition: CommonData.hpp:60
Read-only data representation of a certificate.
Definition: CertificateData.hpp:41
KeyAlg
Definition: CommonData.hpp:54
LiMaL byte buffer class.
Buffer for storing binary data.
Definition: ByteBuffer.hpp:55
ca_mgm::RWCOW_pointer< CertificateDataImpl > m_impl
Definition: CertificateData.hpp:126