1 /* 2 * 3 * Copyright (C) 2019, 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: dcmsign 15 * 16 * Author: Marco Eichelberg 17 * 18 * Purpose: 19 * classes: SiStructuredReportingVerificationProfile 20 * 21 */ 22 23 #ifndef SISRVPR_H 24 #define SISRVPR_H 25 26 #include "dcmtk/config/osconfig.h" 27 28 #ifdef WITH_OPENSSL 29 30 #include "dcmtk/dcmsign/sisrpr.h" /* for SiStructuredReportingProfile */ 31 32 /** Structured Reporting RSA Digital Signature Profile - Verification Signature 33 * @remark this class is only available if DCMTK is compiled with 34 * OpenSSL support enabled. 35 */ 36 class DCMTK_DCMSIGN_EXPORT SiStructuredReportingVerificationProfile: public SiStructuredReportingProfile 37 { 38 public: 39 40 /// default constructor SiStructuredReportingVerificationProfile()41 SiStructuredReportingVerificationProfile() { } 42 43 /// destructor ~SiStructuredReportingVerificationProfile()44 virtual ~SiStructuredReportingVerificationProfile() { } 45 46 /** checks whether an attribute with the given tag is required to be signed 47 * for the current security profile if the attribute is present in the dataset 48 * @param key tag key to be checked 49 * @return true if required, false otherwise. 50 */ 51 virtual OFBool attributeRequiredIfPresent(const DcmTagKey& key) const; 52 53 /** checks whether all attributes that are required unconditionally 54 * to be signed in this profile are included in the given tagList. 55 * @param taglist attribute tag list 56 * @return true if requirements for profile are fulfilled, false otherwise. 57 */ 58 virtual OFBool checkRequiredAttributeList(DcmAttributeTag& tagList) const; 59 60 /** some digital signature profiles specify conditions under which certain 61 * attributes must be included into the signature. 62 * This method allows the signature profile to inspect the dataset in order 63 * to determine whether or not the conditions are met. 64 * This method should be called before DcmSignature::createSignature() is executed. 65 * @param item the dataset or item to which the signature will be added 66 * @return status code 67 */ 68 virtual OFCondition inspectSignatureDataset(DcmItem &item); 69 70 /** return the required digital signature purpose for this signature profile 71 * @return for this class, this method always returns ESP_VerificationSignature. 72 */ 73 virtual SiSignaturePurpose::E_SignaturePurposeType getOverrideSignaturePurpose() const; 74 75 }; 76 77 #endif 78 #endif 79