Dsig.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 
11 #include "HeapzoneAllocator.h"
12 
14 
15 namespace DgnPlatform { struct DigitalSignatureCellHeaderHandler; };
16 
17 struct DsigQueryData;
18 
19 /*=================================================================================**/
28 {
29 DsigAnnotationData () : signDate(0), name(NULL), purpose(NULL), location(NULL), expiryDate(0) {;}
32 double signDate;
40 double expiryDate;
41 }; // DsigAnnotationData
42 
43 /*=================================================================================**/
50 class DsigQuery
51 {
55 
56  DsigDigitalSignature const* m_data;
57  mutable DsigQueryData* m_info;
58 
59  DsigQueryData* GetInfo () const;
60 
61 RMGRSUBS_EXPORT DsigQuery () {m_data=NULL; m_info=NULL;}
62 RMGRSUBS_EXPORT void SetData (DsigDigitalSignature const* d) {m_data = d;}
63 
64 
65 public:
66  RMGRSUBS_EXPORT DsigQuery (DsigDigitalSignature const&);
67  RMGRSUBS_EXPORT DsigQuery (DsigQuery const &);
68  RMGRSUBS_EXPORT DsigQuery& operator=(DsigQuery const&);
69 
70  RMGRSUBS_EXPORT ~DsigQuery ();
71 
73  RMGRSUBS_EXPORT bool IsValid () const;
74 
76  RMGRSUBS_EXPORT WCharCP GetCommonName () const;
77 
79  RMGRSUBS_EXPORT WCharCP GetEmail () const;
80 
82  RMGRSUBS_EXPORT bool IncludesEntireFile() const;
83 
85  RMGRSUBS_EXPORT bool IncludesReferences() const;
86 
91  RMGRSUBS_EXPORT StatusInt GetCertificate (bvector<byte>& x509Cert) const;
92 
95  RMGRSUBS_EXPORT StatusInt GetCertificateChain (bvector<byte>& pkcs7) const;
96 
100  RMGRSUBS_EXPORT StatusInt GetPublicKey (bvector<byte>& x509PublicKeyInfo) const;
101 
103  RMGRSUBS_EXPORT DsigAnnotationData const& GetAnnotationData () const;
104 
105 
106 }; // DsigQuery
107 
109 
110 
Signature annotation data.
Definition: Dsig.h:27
WCharCP location
This string may identify the signer's computer or organization.
Definition: Dsig.h:38
Provides access to digital signatures in a DGN file.
Definition: DigitalSignatureCellHeaderHandler.h:86
DsigAnnotationData()
Definition: Dsig.h:29
WCharCP name
This string may identify the signer.
Definition: Dsig.h:34
double signDate
The time and date on which the digital signature was created.
Definition: Dsig.h:32
#define RMGRSUBS_EXPORT
Definition: DgnPlatform/ExportMacros.h:70
wchar_t const * WCharCP
Definition: Bentley.h:224
WCharCP purpose
This string may indicate the signer's purpose in creating the signature.
Definition: Dsig.h:36
#define NULL
Definition: Bentley.h:157
bstdmap & operator=(const bstdmap &__rhs)
Definition: stdcxx/bstdmap.h:170
#define BEGIN_BENTLEY_NAMESPACE
Definition: Bentley.r.h:24
double expiryDate
If non-zero, date on which the digital signature expires.
Definition: Dsig.h:40
int StatusInt
Definition: Bentley.h:222
#define END_BENTLEY_NAMESPACE
Definition: Bentley.r.h:25
Information about a digital signature.
Definition: Dsig.h:50

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.