LDicomDS::SaveCertificate

Summary

Saves the signers digital certificate associated with the specified Digital Signature to a file.

Syntax

#include "ltdic.h"

L_UINT16 LDicomDS::SaveCertificate(pSignatureItem, pszFilename, uFormat = DICOM_CERTIFICATE_FORMAT_PEM)

Parameters

pDICOMELEMENT pSignatureItem

Pointer to a DICOMELEMENT structure that specifies the Digital Signatures Sequence Item which corresponds to the Digital Signature. This cannot be NULL.

const L_TCHAR* pszFilename

Character string that contains the name of the file to which the digital certificate should be saved. If the file already exists, it will be overwritten.

L_UINT16 uFormat

The format in which the digital certificate should be saved. Possible values are:

Value Meaning
DICOM_CERTIFICATE_FORMAT_PEM [0] Base-64 encoded X.509 Privacy Enhanced Mail (PEM).
DICOM_CERTIFICATE_FORMAT_DER [1] Distinguished Encoding Rules (DER) encoded binary X.509.

Returns

Value Meaning
DICOM_SUCCESS The function was successful.
<> DICOM_SUCCESS An error occurred. Refer to Return Codes.

Comments

The Certificate of Signer (0400,0115) under the Digital Signatures Sequence Item of a Digital Signature contains the digital certificate of the entity that produced the Digital Signature. You can use this function to save this digital certificate to a file.

The following functions can also be used to get information about the Digital Signature:

LDicomDS::GetSignatureUID

LDicomDS::GetSignatureDateTime

LDicomDS::GetSignedElementsCount

LDicomDS::GetSignedElement

LDicomDS::GetMacTransferSyntax

LDicomDS::GetMacAlgorithm

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

For an example, refer to LDicomDS::VerifySignature.

Help Version 23.0.2024.7.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.