All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
X509Certificate.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2023 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 
6 #ifndef PDFTRON_H_CPPPDFX509Certificate
7 #define PDFTRON_H_CPPPDFX509Certificate
8 #include <C/Crypto/TRN_X509Certificate.h>
9 
10 #include <Common/BasicTypes.h>
11 #include <Common/UString.h>
12 #include <PDF/PDFDoc.h>
13 #include <Crypto/DigestAlgorithm.h>
15 #include <Crypto/X509Extension.h>
16 
17 namespace pdftron { namespace Crypto {
18 
23 {
24 public:
25  X509Certificate(const X509Certificate& other);
28 
29  void Destroy();
30 
31  //methods:
32 
37  X509Certificate(const UString& in_certificate_path);
38 
43  X509Certificate(const std::vector<UChar>& in_cert_buf);
44 #ifndef SWIG
45 
50  X509Certificate(const UChar* in_cert_buf, size_t in_cert_buf_size);
51 #endif
52 
64 
75 
83 
91 
100 
108  UString ToString() const;
109 
119  UString GetFingerprint(const enum DigestAlgorithm::Type in_digest_algorithm = DigestAlgorithm::e_SHA256) const;
120 
126  std::vector<UChar> GetSerialNumber() const;
127 
133  std::vector<X509Extension> GetExtensions() const;
134 
140  std::vector<UChar> GetData() const;
141 
142 #ifdef SWIG
143  X509Certificate();
144 #endif
145 
146 #ifndef SWIGHIDDEN
147  X509Certificate(TRN_X509Certificate impl);
148  TRN_X509Certificate m_impl;
149 #endif
150 
151 private:
152 
153 #ifndef SWIGHIDDEN
154  mutable bool m_owner;
155 #endif
156 };
157 
158 #include <Impl/X509Certificate.inl>
159 } //end Crypto
160 } //end pdftron
161 
162 
163 #endif //PDFTRON_H_CPPPDFX509Certificate
TRN_Int64 Int64
Definition: BasicTypes.h:20
std::vector< X509Extension > GetExtensions() const
X509Certificate(const X509Certificate &other)
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
TRN_UChar UChar
Definition: BasicTypes.h:12
UInt32 GetRawX509VersionNumber() const
X501DistinguishedName GetIssuerField() const
std::vector< UChar > GetSerialNumber() const
UString GetFingerprint(const enum DigestAlgorithm::Type in_digest_algorithm=DigestAlgorithm::e_SHA256) const
X509Certificate & operator=(const X509Certificate &other)
std::vector< UChar > GetData() const
X501DistinguishedName GetSubjectField() const