dcmsign/include/dcmtk/dcmsign/sicertvf.h

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


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1