DCMTK: DVSignatureHandler Class Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DVSignatureHandler Class Reference

handler for all digital signature related functions in dcmpstat More...

## Public Member Functions
| DVSignatureHandler (DVConfiguration &cfg)
| constructor
virtual | ~DVSignatureHandler ()
| destructor
const char * | getCurrentSignatureValidationHTML (DVPSObjectType objtype) const
| returns a string containing a complete HTML page with the signature validation results for the last object of the given type.
const char * | getCurrentSignatureValidationOverview () const
| returns a string containing a complete HTML page with the signature validation overview.
void | updateDigitalSignatureInformation (DcmItem &dataset, DVPSObjectType objtype, OFBool onRead)
| updates the digital signature information for the given object type.
void | disableDigitalSignatureInformation (DVPSObjectType objtype)
| disables the digital signature information for the given object type.
DVPSSignatureStatus | getCurrentSignatureStatus (DVPSObjectType objtype) const
| returns the status flag for the current object of given type.
unsigned long | getNumberOfCorrectSignatures (DVPSObjectType objtype) const
| returns number of correct signatures for given object type.
unsigned long | getNumberOfUntrustworthySignatures (DVPSObjectType objtype) const
| returns number of untrustworthy signatures for given object type.
unsigned long | getNumberOfCorruptSignatures (DVPSObjectType objtype) const
| returns number of corrupt signatures for given object type.
DVPSSignatureStatus | getCombinedImagePStateSignatureStatus () const
| returns the combined status flag for the current image and presentation state.
void | disableImageAndPState ()
| disables internal settings for 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.
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.

## Private Member Functions
| DVSignatureHandler (const DVSignatureHandler &copy)
| private undefined copy constructor
DVSignatureHandler & | operator= (const DVSignatureHandler &)
| private undefined assignment operator
void | replaceString (DVPSObjectType objtype, const char *str)
| replaces the current HTML page for the given object type by the new string.
void | updateSignatureValidationOverview ()
| updates the overview HTML page.

## Private Attributes
OFString | htmlSR
| current SR html page
OFString | htmlImage
| current image html page
OFString | htmlPState
| current presentation state html page
OFString | htmlOverview
| current overview
unsigned long | correctSignaturesSR
| number of correct signatures in current SR
unsigned long | corruptSignaturesSR
| number of corrupt signatures in current SR
unsigned long | untrustSignaturesSR
| number of untrustworthy signatures in current SR
unsigned long | correctSignaturesImage
| number of correct signatures in current Image
unsigned long | corruptSignaturesImage
| number of corrupt signatures in current Image
unsigned long | untrustSignaturesImage
| number of untrustworthy signatures in current Image
unsigned long | correctSignaturesPState
| number of correct signatures in current PState
unsigned long | corruptSignaturesPState
| number of corrupt signatures in current PState
unsigned long | untrustSignaturesPState
| number of untrustworthy signatures in current PState
SiCertificateVerifier | certVerifier
| the certificate verifier, available only if compiled with OpenSSL support
DVConfiguration & | config
| reference to object maintaining the system configuration

## Detailed Description

handler for all digital signature related functions in dcmpstat

## Constructor & Destructor Documentation

## ◆ DVSignatureHandler()

DVSignatureHandler::DVSignatureHandler | ( | DVConfiguration & | cfg | ) |

constructor

Parameters

  cfg | system configuration

Referenced by DVSignatureHandler(), and operator=().

## Member Function Documentation

## ◆ attributesSigned()

OFBool DVSignatureHandler::attributesSigned | ( | DcmItem & | item,
|  | DcmAttributeTag & | tagList ) const

checks whether any attribute mentioned in the tag list is affected by digital signatures.

Returns true if either any of the attributes is signed by a digital signature on the dataset level, or if any of the attributes is a sequence that contains one or more signatures in its items. Otherwise returns false.

Remarks
  this method is only functional if DCMTK is compiled with OpenSSL support enabled. Otherwise it always returns false.

Parameters

  item | item or dataset to be tested
  tagList | list of attributes (tags) to be looked up inside the dataset

Returns
  true if any of the given attributes is affected by a digital signature, false otherwise.

## ◆ createSignature()

OFCondition DVSignatureHandler::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.

If compiled without WITH_OPENSSL, always returns EC_IllegalCall.

Parameters

  mainDataset | reference to main dataset in which signature(s) are to be added
  itemStack | stack of items within the main dataset that are to be signed separately. If main dataset is to be signed, it must be included in this stack.
  attributesNotToSignInMainDataset | list of attribute tags that should be omitted from the signature on the main dataset level
  userID | user ID in configuration file, must not be NULL
  passwd | passwd password for private key, may be NULL

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ disableDigitalSignatureInformation()

void DVSignatureHandler::disableDigitalSignatureInformation | ( | DVPSObjectType | objtype | ) |

disables the digital signature information for the given object type.

Parameters

  objtype | object type

## ◆ disableImageAndPState()

void DVSignatureHandler::disableImageAndPState | ( |  | ) |

disables internal settings for image and presentation state.

Called when a new SR object is loaded and the current image/presentation state are hidden consequently.

## ◆ getCombinedImagePStateSignatureStatus()

DVPSSignatureStatus DVSignatureHandler::getCombinedImagePStateSignatureStatus | ( |  | ) | const

returns the combined status flag for the current image and presentation state.

Returns
  digital signature status for image and presentation state

## ◆ getCurrentSignatureStatus()

DVPSSignatureStatus DVSignatureHandler::getCurrentSignatureStatus | ( | DVPSObjectType | objtype | ) | const

returns the status flag for the current object of given type.

Parameters

  objtype | object type

Returns
  digital signature status for object

## ◆ getCurrentSignatureValidationHTML()

const char * DVSignatureHandler::getCurrentSignatureValidationHTML | ( | DVPSObjectType | objtype | ) | const

returns a string containing a complete HTML page with the signature validation results for the last object of the given type.

Never returns NULL.

Parameters

  objtype | object type

Returns
  pointer to string with HTML page

## ◆ getCurrentSignatureValidationOverview()

const char * DVSignatureHandler::getCurrentSignatureValidationOverview | ( |  | ) | const

returns a string containing a complete HTML page with the signature validation overview.

Never returns NULL.

Returns
  pointer to string with HTML page

## ◆ getNumberOfCorrectSignatures()

unsigned long DVSignatureHandler::getNumberOfCorrectSignatures | ( | DVPSObjectType | objtype | ) | const

returns number of correct signatures for given object type.

Parameters

  objtype | object type

Returns
  number of digital signatures

## ◆ getNumberOfCorruptSignatures()

unsigned long DVSignatureHandler::getNumberOfCorruptSignatures | ( | DVPSObjectType | objtype | ) | const

returns number of corrupt signatures for given object type.

Parameters

  objtype | object type

Returns
  number of digital signatures

## ◆ getNumberOfUntrustworthySignatures()

unsigned long DVSignatureHandler::getNumberOfUntrustworthySignatures | ( | DVPSObjectType | objtype | ) | const

returns number of untrustworthy signatures for given object type.

Parameters

  objtype | object type

Returns
  number of digital signatures

## ◆ replaceString()

void DVSignatureHandler::replaceString | ( | DVPSObjectType | objtype,
|  | const char * | str )
| private

replaces the current HTML page for the given object type by the new string.

Parameters

  objtype | object type
  str | string, must not be NULL

## ◆ updateDigitalSignatureInformation()

void DVSignatureHandler::updateDigitalSignatureInformation | ( | DcmItem & | dataset,
|  | DVPSObjectType | objtype,
|  | OFBool | onRead )

updates the digital signature information for the given object type.

Remarks
  This class is only functional if DCMTK is compiled with OpenSSL support enabled. If compiled without, it always reports that no signatures were found in the object.

Parameters

  dataset | dataset to be checked for digital signatures
  objtype | object type of dataset
  onRead | true if the dataset is just being read, false if it is being written

## Member Data Documentation

## ◆ certVerifier

SiCertificateVerifier DVSignatureHandler::certVerifier
| private

the certificate verifier, available only if compiled with OpenSSL support

Remarks
  This member is only available if DCMTK is compiled with OpenSSL support enabled.

The documentation for this class was generated from the following file:

- dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1