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 SIDSA_H
00035
#define SIDSA_H
00036
00037
#include "osconfig.h"
00038
#include "sialgo.h"
00039
00040
#ifdef WITH_OPENSSL
00041
00042
#include "oftypes.h"
00043
00044
class SiPrivateKey;
00045
struct dsa_st;
00046
typedef struct dsa_st DSA;
00047
00053 class SiDSA :
public SiAlgorithm
00054 {
00055
public:
00056
00060
SiDSA(DSA *key);
00061
00063
virtual ~SiDSA();
00064
00073
virtual OFCondition sign(
00074
const unsigned char *inputHash,
00075
unsigned long inputHashSize,
00076 E_MACType inputHashAlgorithm,
00077
unsigned char *outputSignature,
00078
unsigned long &outputSignatureSize);
00079
00089
virtual OFCondition verify(
00090
const unsigned char *inputHash,
00091
unsigned long inputHashSize,
00092 E_MACType inputHashAlgorithm,
00093
const unsigned char *inputSignature,
00094
unsigned long inputSignatureSize,
00095 OFBool &verified);
00096
00104
virtual unsigned long getSize()
const;
00105
00109
virtual E_KeyType
keyType()
const;
00110
00111
private:
00112
00114
SiDSA(
SiDSA& arg);
00115
00117
SiDSA&
operator=(
SiDSA& arg);
00118
00120 DSA *
dsa;
00121
00122 };
00123
00124
#endif
00125
#endif
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144