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 SIPRIVAT_H
00035 #define SIPRIVAT_H
00036
00037 #include "osconfig.h"
00038 #include "sitypes.h"
00039
00040 #ifdef WITH_OPENSSL
00041
00042 #include "ofstring.h"
00043
00044 class SiAlgorithm;
00045 class SiCertificate;
00046 struct evp_pkey_st;
00047 typedef struct evp_pkey_st EVP_PKEY;
00048
00049
00052 class SiPrivateKey
00053 {
00054 public:
00056 SiPrivateKey();
00057
00059 virtual ~SiPrivateKey();
00060
00067 void setPrivateKeyPasswd(const char *thePasswd);
00068
00072 void setPrivateKeyPasswdFromConsole();
00073
00081 OFCondition loadPrivateKey(const char *filename, int filetype);
00082
00085 E_KeyType getKeyType() const;
00086
00092 SiAlgorithm *createAlgorithmForPrivateKey();
00093
00098 OFBool matchesCertificate(SiCertificate& cert);
00099
00100 private:
00101
00103 SiPrivateKey(SiPrivateKey& arg);
00104
00106 SiPrivateKey& operator=(SiPrivateKey& arg);
00107
00109 OFString privateKeyPasswd;
00110
00112 OFBool usePrivateKeyPassword;
00113
00115 EVP_PKEY* pkey;
00116
00117 };
00118
00119 #endif
00120 #endif
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139