00001 /* 00002 * 00003 * Copyright (C) 1998-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmsign 00019 * 00020 * Author: Norbert Loxen, Marco Eichelberg 00021 * 00022 * Purpose: 00023 * consts, typedefs and enums for dcmsign 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:04:47 $ 00027 * CVS/RCS Revision: $Revision: 1.6 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef SITYPES_H 00035 #define SITYPES_H 00036 00037 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00038 00039 #ifdef WITH_OPENSSL 00040 00041 #include "dcmtk/ofstd/oftypes.h" 00042 #include "dcmtk/ofstd/ofcond.h" 00043 00044 // DICOM defined terms for MAC algorithms, certificate and timestamp types 00045 #define SI_DEFTERMS_RIPEMD160 "RIPEMD160" 00046 #define SI_DEFTERMS_SHA1 "SHA1" 00047 #define SI_DEFTERMS_MD5 "MD5" 00048 #define SI_DEFTERMS_X509CERT "X509_1993_SIG" 00049 #define SI_DEFTERMS_CMS_TS "CMS_TS" 00050 00051 00054 enum E_KeyType 00055 { 00057 EKT_RSA, 00058 00060 EKT_DSA, 00061 00063 EKT_DH, 00064 00066 EKT_none 00067 }; 00068 00069 00072 enum E_MACType 00073 { 00075 EMT_SHA1, 00076 00078 EMT_RIPEMD160, 00079 00081 EMT_MD5 00082 }; 00083 00084 00085 /* 00086 * specific error conditions for module dcmsign 00087 */ 00088 00090 extern const OFCondition SI_EC_InitializationFailed; 00091 00093 extern const OFCondition SI_EC_OpenSSLFailure; 00094 00096 extern const OFCondition SI_EC_CannotRead; 00097 00099 extern const OFCondition SI_EC_WrongTransferSyntax; 00100 00102 extern const OFCondition SI_EC_MacIDsExhausted; 00103 00105 extern const OFCondition SI_EC_CertificateDoesNotMatchPrivateKey; 00106 00108 extern const OFCondition SI_EC_MacDoesNotMatchProfile; 00109 00111 extern const OFCondition SI_EC_AlgorithmDoesNotMatchProfile; 00112 00114 extern const OFCondition SI_EC_TransferSyntaxDoesNotMatchProfile; 00115 00119 extern const OFCondition SI_EC_VerificationFailed_NoCertificate; 00120 00122 extern const OFCondition SI_EC_VerificationFailed_NoMAC; 00123 00125 extern const OFCondition SI_EC_VerificationFailed_NoSignature; 00126 00128 extern const OFCondition SI_EC_VerificationFailed_UnsupportedMACAlgorithm; 00129 00131 extern const OFCondition SI_EC_VerificationFailed_Corrupted; 00132 00134 extern const OFCondition SI_EC_VerificationFailed_NoTrust; 00135 00136 #endif 00137 #endif 00138 00139 /* 00140 * $Log: sitypes.h,v $ 00141 * Revision 1.6 2005/12/08 16:04:47 meichel 00142 * Changed include path schema for all DCMTK header files 00143 * 00144 * Revision 1.5 2001/11/16 15:50:51 meichel 00145 * Adapted digital signature code to final text of supplement 41. 00146 * 00147 * Revision 1.4 2001/09/26 14:30:23 meichel 00148 * Adapted dcmsign to class OFCondition 00149 * 00150 * Revision 1.3 2001/06/01 15:50:51 meichel 00151 * Updated copyright header 00152 * 00153 * Revision 1.2 2001/01/25 15:11:44 meichel 00154 * Added class SiCertificateVerifier in dcmsign which allows to check 00155 * whether a certificate from a digital signature is trusted, i.e. issued 00156 * by a known CA and not contained in a CRL. 00157 * 00158 * Revision 1.1 2000/11/07 16:49:00 meichel 00159 * Initial release of dcmsign module for DICOM Digital Signatures 00160 * 00161 * 00162 */ 00163