Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C DLL Help

L_DicomSaveCertificate

Show in webframe

#include "ltdic.h"

L_LTDIC_API L_UINT16 L_DicomSaveCertificate(hDS, pSignatureItem, pszFilename, uFormat)

HDICOMDS hDS;

/* a DICOM handle */

pDICOMELEMENT pSignatureItem;

/* pointer to a Digital Signatures Sequence Item */

const L_TCHAR * pszFilename;

/* character string that contains the file name */

L_UINT16 uFormat;

/* format */

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

Parameter

Description

hDS

A DICOM handle.

pSignatureItem

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

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.

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

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:

L_DicomGetSignatureUID

L_DicomGetSignatureDateTime

L_DicomGetSignedElementsCount

L_DicomGetSignedElement

L_DicomGetMacTransferSyntax

L_DicomGetMacAlgorithm

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

L_DicomGetSignature, L_DicomFindSignature, L_DicomGetSignatureUID, L_DicomGetSignatureDateTime, L_DicomGetSignedElementsCount, L_DicomGetSignedElement, L_DicomGetMacTransferSyntax, L_DicomGetMacAlgorithm

Topics:

Working with Digital Signatures

Example

For an example, refer to L_DicomVerifySignature.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.