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: Marco Eichelberg 00021 * 00022 * Purpose: 00023 * classes: SiCertificateVerifier 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:04:34 $ 00027 * CVS/RCS Revision: $Revision: 1.5 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef SICERTVF_H 00035 #define SICERTVF_H 00036 00037 #include "dcmtk/config/osconfig.h" 00038 #include "dcmtk/dcmsign/sitypes.h" 00039 00040 #ifdef WITH_OPENSSL 00041 00042 class SiCertificate; 00043 struct x509_store_st; 00044 typedef struct x509_store_st X509_STORE; 00045 00048 class SiCertificateVerifier 00049 { 00050 public: 00051 00053 SiCertificateVerifier(); 00054 00056 virtual ~SiCertificateVerifier(); 00057 00063 OFCondition addTrustedCertificateFile(const char *fileName, int fileType); 00064 00071 OFCondition addTrustedCertificateDir(const char *pathName, int fileType); 00072 00079 OFCondition addCertificateRevocationList(const char *fileName, int fileType); 00080 00088 OFCondition verifyCertificate(SiCertificate& certificate); 00089 00095 const char *lastError() const; 00096 00097 private: 00098 00100 SiCertificateVerifier(SiCertificateVerifier& arg); 00101 00103 SiCertificateVerifier& operator=(SiCertificateVerifier& arg); 00104 00106 X509_STORE* x509store; 00107 00109 long errorCode; 00110 00111 }; 00112 00113 #endif 00114 #endif 00115 00116 /* 00117 * $Log: sicertvf.h,v $ 00118 * Revision 1.5 2005/12/08 16:04:34 meichel 00119 * Changed include path schema for all DCMTK header files 00120 * 00121 * Revision 1.4 2003/06/04 14:21:03 meichel 00122 * Simplified include structure to avoid preprocessor limitation 00123 * (max 32 #if levels) on MSVC5 with STL. 00124 * 00125 * Revision 1.3 2001/09/26 14:30:19 meichel 00126 * Adapted dcmsign to class OFCondition 00127 * 00128 * Revision 1.2 2001/06/01 15:50:47 meichel 00129 * Updated copyright header 00130 * 00131 * Revision 1.1 2001/01/25 15:11:43 meichel 00132 * Added class SiCertificateVerifier in dcmsign which allows to check 00133 * whether a certificate from a digital signature is trusted, i.e. issued 00134 * by a known CA and not contained in a CRL. 00135 * 00136 * Revision 1.1 2000/11/07 16:48:53 meichel 00137 * Initial release of dcmsign module for DICOM Digital Signatures 00138 * 00139 * 00140 */ 00141