00001 /* 00002 * 00003 * Copyright (C) 1998-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmsign 00015 * 00016 * Author: Norbert Loxen, Marco Eichelberg 00017 * 00018 * Purpose: 00019 * consts, typedefs and enums for dcmsign 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-10-14 13:17:25 $ 00023 * CVS/RCS Revision: $Revision: 1.7 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 #ifndef SITYPES_H 00031 #define SITYPES_H 00032 00033 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00034 00035 #ifdef WITH_OPENSSL 00036 00037 #include "dcmtk/ofstd/oftypes.h" 00038 #include "dcmtk/ofstd/ofcond.h" 00039 00040 // DICOM defined terms for MAC algorithms, certificate and timestamp types 00041 #define SI_DEFTERMS_RIPEMD160 "RIPEMD160" 00042 #define SI_DEFTERMS_SHA1 "SHA1" 00043 #define SI_DEFTERMS_MD5 "MD5" 00044 #define SI_DEFTERMS_X509CERT "X509_1993_SIG" 00045 #define SI_DEFTERMS_CMS_TS "CMS_TS" 00046 00047 00050 enum E_KeyType 00051 { 00053 EKT_RSA, 00054 00056 EKT_DSA, 00057 00059 EKT_DH, 00060 00062 EKT_none 00063 }; 00064 00065 00068 enum E_MACType 00069 { 00071 EMT_SHA1, 00072 00074 EMT_RIPEMD160, 00075 00077 EMT_MD5 00078 }; 00079 00080 00081 /* 00082 * specific error conditions for module dcmsign 00083 */ 00084 00086 extern const OFCondition SI_EC_InitializationFailed; 00087 00089 extern const OFCondition SI_EC_OpenSSLFailure; 00090 00092 extern const OFCondition SI_EC_CannotRead; 00093 00095 extern const OFCondition SI_EC_WrongTransferSyntax; 00096 00098 extern const OFCondition SI_EC_MacIDsExhausted; 00099 00101 extern const OFCondition SI_EC_CertificateDoesNotMatchPrivateKey; 00102 00104 extern const OFCondition SI_EC_MacDoesNotMatchProfile; 00105 00107 extern const OFCondition SI_EC_AlgorithmDoesNotMatchProfile; 00108 00110 extern const OFCondition SI_EC_TransferSyntaxDoesNotMatchProfile; 00111 00115 extern const OFCondition SI_EC_VerificationFailed_NoCertificate; 00116 00118 extern const OFCondition SI_EC_VerificationFailed_NoMAC; 00119 00121 extern const OFCondition SI_EC_VerificationFailed_NoSignature; 00122 00124 extern const OFCondition SI_EC_VerificationFailed_UnsupportedMACAlgorithm; 00125 00127 extern const OFCondition SI_EC_VerificationFailed_Corrupted; 00128 00130 extern const OFCondition SI_EC_VerificationFailed_NoTrust; 00131 00132 #endif 00133 #endif 00134 00135 /* 00136 * $Log: sitypes.h,v $ 00137 * Revision 1.7 2010-10-14 13:17:25 joergr 00138 * Updated copyright header. Added reference to COPYRIGHT file. 00139 * 00140 * Revision 1.6 2005-12-08 16:04:47 meichel 00141 * Changed include path schema for all DCMTK header files 00142 * 00143 * Revision 1.5 2001/11/16 15:50:51 meichel 00144 * Adapted digital signature code to final text of supplement 41. 00145 * 00146 * Revision 1.4 2001/09/26 14:30:23 meichel 00147 * Adapted dcmsign to class OFCondition 00148 * 00149 * Revision 1.3 2001/06/01 15:50:51 meichel 00150 * Updated copyright header 00151 * 00152 * Revision 1.2 2001/01/25 15:11:44 meichel 00153 * Added class SiCertificateVerifier in dcmsign which allows to check 00154 * whether a certificate from a digital signature is trusted, i.e. issued 00155 * by a known CA and not contained in a CRL. 00156 * 00157 * Revision 1.1 2000/11/07 16:49:00 meichel 00158 * Initial release of dcmsign module for DICOM Digital Signatures 00159 * 00160 * 00161 */ 00162