Loading...
Searching...
No Matches
X509Certificate.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 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>
14#include <Crypto/X501DistinguishedName.h>
15#include <Crypto/X509Extension.h>
16
17 namespace pdftron { namespace Crypto {
18
22 class X509Certificate
23{
24 public:
25 X509Certificate(const X509Certificate& other);
26 X509Certificate& operator= (const X509Certificate& other);
27 ~X509Certificate();
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
50 X509Certificate(const UChar* in_cert_buf, size_t in_cert_buf_size);
51#endif
52
63 X501DistinguishedName GetIssuerField() const;
64
74 X501DistinguishedName GetSubjectField() const;
75
82 Int64 GetNotBeforeEpochTime() const;
83
90 Int64 GetNotAfterEpochTime() const;
91
99 UInt32 GetRawX509VersionNumber() const;
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
BasicTypes.h
DigestAlgorithm.h
PDFDoc.h
UString.h
X501DistinguishedName.h
X509Extension.h
pdftron::Crypto::DigestAlgorithm::Type
Type
Definition DigestAlgorithm.h:21
pdftron::Crypto::DigestAlgorithm::e_SHA256
@ e_SHA256
Definition DigestAlgorithm.h:23
pdftron::Crypto::X501DistinguishedName
Definition X501DistinguishedName.h:23
pdftron::Crypto::X509Certificate::~X509Certificate
~X509Certificate()
pdftron::Crypto::X509Certificate::ToString
UString ToString() const
pdftron::Crypto::X509Certificate::GetIssuerField
X501DistinguishedName GetIssuerField() const
pdftron::Crypto::X509Certificate::GetSerialNumber
std::vector< UChar > GetSerialNumber() const
pdftron::Crypto::X509Certificate::X509Certificate
X509Certificate(const UString &in_certificate_path)
pdftron::Crypto::X509Certificate::GetNotBeforeEpochTime
Int64 GetNotBeforeEpochTime() const
pdftron::Crypto::X509Certificate::operator=
X509Certificate & operator=(const X509Certificate &other)
pdftron::Crypto::X509Certificate::X509Certificate
X509Certificate(const X509Certificate &other)
pdftron::Crypto::X509Certificate::GetExtensions
std::vector< X509Extension > GetExtensions() const
pdftron::Crypto::X509Certificate::X509Certificate
X509Certificate(TRN_X509Certificate impl)
pdftron::Crypto::X509Certificate::GetNotAfterEpochTime
Int64 GetNotAfterEpochTime() const
pdftron::Crypto::X509Certificate::GetSubjectField
X501DistinguishedName GetSubjectField() const
pdftron::Crypto::X509Certificate::GetFingerprint
UString GetFingerprint(const enum DigestAlgorithm::Type in_digest_algorithm=DigestAlgorithm::e_SHA256) const
pdftron::Crypto::X509Certificate::X509Certificate
X509Certificate(const UChar *in_cert_buf, size_t in_cert_buf_size)
pdftron::Crypto::X509Certificate::GetData
std::vector< UChar > GetData() const
pdftron::Crypto::X509Certificate::Destroy
void Destroy()
pdftron::Crypto::X509Certificate::m_impl
TRN_X509Certificate m_impl
Definition X509Certificate.h:148
pdftron::Crypto::X509Certificate::X509Certificate
X509Certificate(const std::vector< UChar > &in_cert_buf)
pdftron::Crypto::X509Certificate::GetRawX509VersionNumber
UInt32 GetRawX509VersionNumber() const
pdftron::UString
Definition UString.h:28
pdftron::Crypto
Definition AlgorithmIdentifier.h:13
pdftron
Definition BasicTypes.h:10
pdftron::UInt32
TRN_UInt32 UInt32
Definition BasicTypes.h:13
pdftron::UChar
TRN_UChar UChar
Definition BasicTypes.h:12
pdftron::Int64
TRN_Int64 Int64
Definition BasicTypes.h:20