33 #include "dcmtk/config/osconfig.h" 34 #include "dcmtk/dcmsign/sitypes.h" 38 #include "dcmtk/dcmdata/dcxfer.h" 40 #define INCLUDE_CSTDIO 41 #include "dcmtk/ofstd/ofstdinc.h" 109 E_TransferSyntax xfer=EXS_LittleEndianExplicit,
a class representing a list of DICOM elements in which each element has a different tag and elements ...
SiCertificate * getCurrentCertificate()
returns the certificate of the current signature if present.
void attach(DcmItem *dataset)
attaches a DICOM dataset or item to the signature object.
class representing a DICOM Sequence of Items (SQ).
this class provides the main interface to the dcmsign module - it allows to create, examine and verify digital signatures in DICOM datasets or items.
DcmSequenceOfItems * macParametersSq
pointer to mac parameters sequence of attached item, may be NULL if not attached or not yet present ...
unsigned long numberOfSignatures()
returns the number of signatures in the dataset.
void detach()
detaches an attached DICOM dataset from the signature object.
OFCondition selectSignature(unsigned long i)
selects one of the digital signatures from the attached dataset for reading.
DcmItem * selectedMacParametersItem
pointer to currently selected mac parameters item
a class representing X.509 public key certificates.
OFCondition getCurrentSignatureUID(OFString &str)
returns the Digital Signature UID of the current signature.
DcmSequenceOfItems * signatureSq
pointer to digital signatures sequence of attached item, may be NULL if not attached or not yet prese...
static void currentDateTime(OFString &str)
returns the current date and time as a DICOM DT string.
DcmItem * selectedSignatureItem
pointer to currently selected signature item
OFCondition getCurrentMacXferSyntaxName(OFString &str)
returns the MAC Calculation Transfer Syntax of the current signature.
FILE * dumpFile
if nonzero, the data fed to the MAC algorithm is also stored in this file.
abstract base class for all security profiles.
DcmItem * currentItem
pointer to current item if attached, NULL otherwise
this class manages a stack of pointers to DcmObject instances.
virtual ~DcmSignature()
destructor
OFCondition getCurrentMacID(Uint16 &macID)
returns the MAC ID of the current signature.
static void initializeLibrary()
initializes the dcmsign library including the underlying OpenSSL library.
static Uint16 getMACIDnumber(DcmItem &item)
searches a given item for the DCM_MACIDnumber element and returns its value if present, otherwise returns 0.
OFCondition allocateMACID(Uint16 &newID)
allocates a new mac ID number for a new signature.
a class representing a private key.
OFCondition getCurrentDataElementsSigned(DcmAttributeTag &desig)
returns the Data Elements Signed attribute of the current signature if present.
a base class for all classes that implement hash functions.
void setDumpFile(FILE *f)
dump all data that is fed into the MAC algorithm into the given file, which must be opened and closed...
OFCondition getCurrentSignatureDateTime(OFString &str)
returns the Signature Date/Time of the current signature.
OFCondition verifyCurrent()
verifies the current signature.
static DcmItem * findFirstSignatureItem(DcmItem &item, DcmStack &stack)
recursively browses through the given dataset and searches the first occurence of the DigitalSignatur...
a simple string class that implements a subset of std::string.
SiCertificate * selectedCertificate
pointer to certificate for currently selected signature item
OFCondition getCurrentMacName(OFString &str)
returns the MAC Algorithm Name of the current signature.
pure virtual base class for a timestamp client.
DcmSignature()
default constructor
OFCondition removeSignature(unsigned long i)
removes a signature from the dataset.
static DcmItem * findNextSignatureItem(DcmItem &item, DcmStack &stack)
recursively browses through the given dataset and searches the next occurence of the DigitalSignature...
OFCondition createSignature(SiPrivateKey &key, SiCertificate &cert, SiMAC &mac, SiSecurityProfile &profile, E_TransferSyntax xfer=EXS_LittleEndianExplicit, const DcmAttributeTag *tagList=NULL, SiTimeStamp *timeStamp=NULL)
creates a new digital signature in the current dataset.
DcmSignature & operator=(DcmSignature &arg)
private undefined copy assignment operator
General purpose class for condition codes.
void deselect()
removes the selection of a current signature if present
a class representing the DICOM value representation 'Attribute Tag' (AT)