OFFIS DCMTK  Version 3.6.0
dvsighdl.h
1 /*
2  *
3  * Copyright (C) 2001-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmpstat
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose:
19  * classes: DVSignatureHandler
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:37 $
23  * CVS/RCS Revision: $Revision: 1.11 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 #ifndef DVSIGHDL_H
31 #define DVSIGHDL_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 #include "dcmtk/ofstd/ofstream.h"
35 #include "dcmtk/dcmpstat/dvpstyp.h"
36 #include "dcmtk/ofstd/ofstring.h"
37 #include "dcmtk/dcmsign/sicertvf.h"
38 #include "dcmtk/dcmdata/dcerror.h"
39 
40 
41 
42 class DcmAttributeTag;
43 class DcmItem;
44 class DcmStack;
45 class DVConfiguration;
46 class DcmAttributeTag;
47 class DcmTagKey;
48 
52 {
53 public:
58 
60  virtual ~DVSignatureHandler();
61 
68  const char *getCurrentSignatureValidationHTML(DVPSObjectType objtype) const;
69 
74  const char *getCurrentSignatureValidationOverview() const;
75 
83  void updateDigitalSignatureInformation(DcmItem& dataset, DVPSObjectType objtype, OFBool onRead);
84 
88  void disableDigitalSignatureInformation(DVPSObjectType objtype);
89 
94  DVPSSignatureStatus getCurrentSignatureStatus(DVPSObjectType objtype) const;
95 
100  unsigned long getNumberOfCorrectSignatures(DVPSObjectType objtype) const;
101 
106  unsigned long getNumberOfUntrustworthySignatures(DVPSObjectType objtype) const;
107 
112  unsigned long getNumberOfCorruptSignatures(DVPSObjectType objtype) const;
113 
117  DVPSSignatureStatus getCombinedImagePStateSignatureStatus() const;
118 
123  void disableImageAndPState();
124 
136  OFBool attributesSigned(DcmItem& item, DcmAttributeTag& tagList) const;
137 
150  DcmItem& mainDataset,
151  const DcmStack& itemStack,
152  DcmAttributeTag& attributesNotToSignInMainDataset,
153  const char *userID,
154  const char *passwd);
155 
156 private:
157 
160 
163 
164  /* print the location stack into the given stream.
165  * It is assumed that the stack top is a DigitalSignatureSequence which is not printed
166  * and that the stack bottom is the main dataset, which is also not printed.
167  * @param stack search stack, as returned by DcmSignature::findFirstSignatureItem() etc.
168  * @param os output stream
169  */
170  static void printSignatureItemPosition(DcmStack& stack, STD_NAMESPACE ostream& os);
171 
176  void replaceString(DVPSObjectType objtype, const char *str);
177 
181 
184 
187 
190 
193 
195  unsigned long correctSignaturesSR;
196 
198  unsigned long corruptSignaturesSR;
199 
201  unsigned long untrustSignaturesSR;
202 
204  unsigned long correctSignaturesImage;
205 
207  unsigned long corruptSignaturesImage;
208 
210  unsigned long untrustSignaturesImage;
211 
213  unsigned long correctSignaturesPState;
214 
216  unsigned long corruptSignaturesPState;
217 
219  unsigned long untrustSignaturesPState;
220 
221 #ifdef WITH_OPENSSL
224 #endif
225 
228 
229 };
230 
231 #endif
232 
233 /*
234  * $Log: dvsighdl.h,v $
235  * Revision 1.11 2010-10-14 13:16:37 joergr
236  * Updated copyright header. Added reference to COPYRIGHT file.
237  *
238  * Revision 1.10 2006/08/15 16:57:01 meichel
239  * Updated the code in module dcmpstat to correctly compile when
240  * all standard C++ classes remain in namespace std.
241  *
242  * Revision 1.9 2005/12/08 16:04:15 meichel
243  * Changed include path schema for all DCMTK header files
244  *
245  * Revision 1.8 2004/02/04 15:49:09 joergr
246  * Removed acknowledgements with e-mail addresses from CVS log. Removed leading
247  * underscore characters from preprocessor symbols (reserved symbols).
248  *
249  * Revision 1.7 2002/04/16 14:02:04 joergr
250  * Added configurable support for C++ ANSI standard includes (e.g. streams).
251  *
252  * Revision 1.6 2001/09/26 15:36:19 meichel
253  * Adapted dcmpstat to class OFCondition
254  *
255  * Revision 1.5 2001/06/01 15:50:26 meichel
256  * Updated copyright header
257  *
258  * Revision 1.4 2001/05/25 10:07:34 meichel
259  * Modified dcmpstat signature handler to also compile without OpenSSL
260  *
261  * Revision 1.3 2001/01/29 14:55:43 meichel
262  * Added new methods for creating signatures and checking the signature
263  * status in module dcmpstat.
264  *
265  * Revision 1.2 2001/01/25 17:37:43 meichel
266  * Fixed problem with undefined copy constructor
267  *
268  * Revision 1.1 2001/01/25 15:18:05 meichel
269  * Added initial support for verification of digital signatures
270  * in presentation states, images and structured reports to module dcmpstat.
271  *
272  *
273  */
void updateDigitalSignatureInformation(DcmItem &dataset, DVPSObjectType objtype, OFBool onRead)
updates the digital signature information for the given object type.
a class representing a list of DICOM elements in which each element has a different tag and elements ...
Definition: dcitem.h:51
class maintaining a attribute tag (group and element number)
Definition: dctagkey.h:46
SiCertificateVerifier certVerifier
the certificate verifier, available only if compiled with OpenSSL support
Definition: dvsighdl.h:223
unsigned long corruptSignaturesPState
number of corrupt signatures in current PState
Definition: dvsighdl.h:216
unsigned long untrustSignaturesImage
number of untrustworthy signatures in current Image
Definition: dvsighdl.h:210
DVPSSignatureStatus getCombinedImagePStateSignatureStatus() const
returns the combined status flag for the current image and presentation state.
OFBool attributesSigned(DcmItem &item, DcmAttributeTag &tagList) const
checks whether any attribute mentioned in the tag list is affected by digital signatures.
Configuration class for the Softcopy Presentation State viewer.
Definition: dvpscf.h:46
virtual ~DVSignatureHandler()
destructor
unsigned long correctSignaturesImage
number of correct signatures in current Image
Definition: dvsighdl.h:204
unsigned long corruptSignaturesSR
number of corrupt signatures in current SR
Definition: dvsighdl.h:198
OFString htmlPState
current presentation state html page
Definition: dvsighdl.h:189
a class representing X.509 public key certificates.
Definition: sicertvf.h:44
DVPSSignatureStatus getCurrentSignatureStatus(DVPSObjectType objtype) const
returns the status flag for the current object of given type.
handler for all digital signature related functions in dcmpstat
Definition: dvsighdl.h:51
OFString htmlSR
current SR html page
Definition: dvsighdl.h:183
this class manages a stack of pointers to DcmObject instances.
Definition: dcstack.h:77
unsigned long correctSignaturesSR
number of correct signatures in current SR
Definition: dvsighdl.h:195
unsigned long getNumberOfUntrustworthySignatures(DVPSObjectType objtype) const
returns number of untrustworthy signatures for given object type.
void updateSignatureValidationOverview()
updates the overview HTML page.
unsigned long corruptSignaturesImage
number of corrupt signatures in current Image
Definition: dvsighdl.h:207
unsigned long getNumberOfCorruptSignatures(DVPSObjectType objtype) const
returns number of corrupt signatures for given object type.
const char * getCurrentSignatureValidationHTML(DVPSObjectType objtype) const
returns a string containing a complete HTML page with the signature validation results for the last o...
DVConfiguration & config
reference to object maintaining the system configuration
Definition: dvsighdl.h:227
unsigned long getNumberOfCorrectSignatures(DVPSObjectType objtype) const
returns number of correct signatures for given object type.
unsigned long correctSignaturesPState
number of correct signatures in current PState
Definition: dvsighdl.h:213
unsigned long untrustSignaturesSR
number of untrustworthy signatures in current SR
Definition: dvsighdl.h:201
unsigned long untrustSignaturesPState
number of untrustworthy signatures in current PState
Definition: dvsighdl.h:219
void replaceString(DVPSObjectType objtype, const char *str)
replaces the current HTML page for the given object type by the new string.
const char * getCurrentSignatureValidationOverview() const
returns a string containing a complete HTML page with the signature validation overview.
a simple string class that implements a subset of std::string.
Definition: ofstring.h:86
OFString htmlImage
current image html page
Definition: dvsighdl.h:186
OFString htmlOverview
current overview
Definition: dvsighdl.h:192
void disableDigitalSignatureInformation(DVPSObjectType objtype)
disables the digital signature information for the given object type.
DVSignatureHandler(DVConfiguration &cfg)
constructor
OFCondition createSignature(DcmItem &mainDataset, const DcmStack &itemStack, DcmAttributeTag &attributesNotToSignInMainDataset, const char *userID, const char *passwd)
adds one or more new digital signatures to the given dataset.
void disableImageAndPState()
disables internal settings for image and presentation state.
DVSignatureHandler & operator=(const DVSignatureHandler &)
private undefined assignment operator
General purpose class for condition codes.
Definition: ofcond.h:305
a class representing the DICOM value representation 'Attribute Tag' (AT)
Definition: dcvrat.h:40


Generated on Thu Aug 27 2015 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.9.1