00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef SICERT_H
00035 #define SICERT_H
00036
00037 #include "osconfig.h"
00038 #include "sitypes.h"
00039
00040 #ifdef WITH_OPENSSL
00041
00042 #include "dcerror.h"
00043 #include "ofstring.h"
00044
00045 class DcmItem;
00046 class SiAlgorithm;
00047 struct x509_st;
00048 typedef struct x509_st X509;
00049
00052 class SiCertificate
00053 {
00054 public:
00055
00057 SiCertificate();
00058
00060 virtual ~SiCertificate();
00061
00067 OFCondition loadCertificate(const char *filename, int filetype);
00068
00074 OFCondition read(DcmItem& item);
00075
00081 OFCondition write(DcmItem& item);
00082
00085 E_KeyType getKeyType();
00086
00092 SiAlgorithm *createAlgorithmForPublicKey();
00093
00098 long getX509Version();
00099
00104 void getCertSubjectName(OFString& str);
00105
00110 void getCertIssuerName(OFString& str);
00111
00116 long getCertSerialNo();
00117
00122 void getCertValidityNotBefore(OFString& str);
00123
00128 void getCertValidityNotAfter(OFString& str);
00129
00135 long getCertKeyBits();
00136
00140 X509 *getRawCertificate();
00141
00142 private:
00143
00145 SiCertificate(SiCertificate& arg);
00146
00148 SiCertificate& operator=(SiCertificate& arg);
00149
00151 X509* x509;
00152
00153 };
00154
00155 #endif
00156 #endif
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179