28 #ifndef __CASIGNATURE__
29 #define __CASIGNATURE__
30 #if !defined ONLY_LOCAL_PROXY || defined INCLUDE_MIDDLE_MIX
32 #define SIGKEY_PKCS12 2
33 #define SHA1_REFERENCE "http://www.w3.org/2000/09/xmldsig#sha1"
34 #define DSA_SHA1_REFERENCE "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
35 #define RSA_SHA1_REFERENCE "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
36 #define ECDSA_SHA1_REFERENCE "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
50 SINT32 getSignKey(DOMElement* & node,XERCES_CPP_NAMESPACE::DOMDocument* doc);
100 bool isECDSA()
const;
121 EC_KEY* getECKey(){
return m_pEC; }
friend class CASSLContext
SINT32 verify(const UINT8 *const in, UINT32 inlen, DSA_SIG *const dsaSig) const
SINT32 verifyDSA(const UINT8 *dgst, const UINT32 dgstLen, UINT8 *sig, UINT32 sigLen) const
SINT32 getVerifyKey(CACertificate **)
Get the public key as XML encoded X509 certificate.
SINT32 verifyRSA(const UINT8 *dgst, const UINT32 dgstLen, UINT8 *sig, UINT32 sigLen) const
SINT32 verifyDER(UINT8 *in, UINT32 inlen, const UINT8 *dsaSig, const UINT32 sigLen)
Verifies an ASN.1 DER encoded SHA1-DSA signature.
SINT32 encodeRS(UINT8 *out, UINT32 *outLen, const DSA_SIG *const pdsaSig) const
UINT8 * getSignatureMethod()
SINT32 generateSignKey(UINT32 size)
SINT32 signRSA(const UINT8 *dgst, const UINT32 dgstLen, UINT8 *sig, UINT32 *sigLen) const
SINT32 decodeRS(const UINT8 *const in, const UINT32 inLen, DSA_SIG *pDsaSig) const
Converts a DSA signature from the XML Signature format to the openSSL R/S BigNumber format.
SINT32 setSignKey(const UINT8 *buff, UINT32 len, UINT32 type, const char *passwd=NULL)
SINT32 parseSignKeyXML(const UINT8 *buff, UINT32 len)
SINT32 getSignatureSize() const
SINT32 setVerifyKey(CACertificate *pCert)
Set the key for signature testing to the one include in pCert.
SINT32 verifyXML(DOMNode *node, CACertStore *pTrustedCerts=NULL)
Verifies a XML Signature under node root.
SINT32 getVerifyKeyHash(UINT8 *buff, UINT32 *len)
Calculates a SHA hash of the public key, which is represented as SubjectPublicKeyInfo.
SINT32 sign(const UINT8 *const in, UINT32 inlen, UINT8 *sig, UINT32 *siglen) const
Perform Signature with either DSA, RSA or ECDSA.
SINT32 getSignKey(DOMElement *&node, XERCES_CPP_NAMESPACE::DOMDocument *doc)
Gets the secret sign key as XML encode PKCS#12 struct.