You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by bl...@apache.org on 2005/07/05 13:55:57 UTC

cvs commit: xml-security/c/src/xenc/impl XENCAlgorithmHandlerDefault.cpp XENCAlgorithmHandlerDefault.hpp

blautenb    2005/07/05 04:55:57

  Modified:    c/Projects/VC6.0/xsec/xsec_lib xsec_lib.dsp
               c/src/xenc/impl XENCAlgorithmHandlerDefault.cpp
                        XENCAlgorithmHandlerDefault.hpp
  Log:
  Implement Algorithm handlers for digital signature algorithms and implement URI based signature creation methods
  
  Revision  Changes    Path
  1.45      +8 -0      xml-security/c/Projects/VC6.0/xsec/xsec_lib/xsec_lib.dsp
  
  Index: xsec_lib.dsp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/Projects/VC6.0/xsec/xsec_lib/xsec_lib.dsp,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- xsec_lib.dsp	3 Jul 2005 07:25:17 -0000	1.44
  +++ xsec_lib.dsp	5 Jul 2005 11:55:56 -0000	1.45
  @@ -174,6 +174,14 @@
   # PROP Default_Filter ""
   # Begin Source File
   
  +SOURCE=..\..\..\..\src\dsig\DSIGAlgorithmHandlerDefault.cpp
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\..\src\dsig\DSIGAlgorithmHandlerDefault.hpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\..\..\src\dsig\DSIGConstants.cpp
   # End Source File
   # Begin Source File
  
  
  
  1.14      +47 -1     xml-security/c/src/xenc/impl/XENCAlgorithmHandlerDefault.cpp
  
  Index: XENCAlgorithmHandlerDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCAlgorithmHandlerDefault.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XENCAlgorithmHandlerDefault.cpp	26 Feb 2005 03:17:08 -0000	1.13
  +++ XENCAlgorithmHandlerDefault.cpp	5 Jul 2005 11:55:57 -0000	1.14
  @@ -968,5 +968,51 @@
   
   }
   
  +// --------------------------------------------------------------------------------
  +//			Unsupported operations
  +// --------------------------------------------------------------------------------
   
  +unsigned int XENCAlgorithmHandlerDefault::signToSafeBuffer(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI,
  +		XSECCryptoKey * key,
  +		unsigned int outputLength,
  +		safeBuffer & result) {
  +
  +	throw XSECException(XSECException::AlgorithmMapperError, 
  +			"XENCAlgorithmHandlerDefault - Signature operations not supported");
  +
  +}
  +
  +
  +bool XENCAlgorithmHandlerDefault::appendSignatureHashTxfm(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI,
  +		XSECCryptoKey * key) {
  +
  +	throw XSECException(XSECException::AlgorithmMapperError, 
  +			"XENCAlgorithmHandlerDefault - Signature operations not supported");
  +
  +}
  +
  +bool XENCAlgorithmHandlerDefault::verifyBase64Signature(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI,
  +		const char * sig,
  +		unsigned int outputLength,
  +		XSECCryptoKey * key) {
  +
  +	throw XSECException(XSECException::AlgorithmMapperError, 
  +			"XENCAlgorithmHandlerDefault - Signature operations not supported");
  +
  +}
  +
  +bool XENCAlgorithmHandlerDefault::appendHashTxfm(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI) {
  +
  +	throw XSECException(XSECException::AlgorithmMapperError, 
  +			"XENCAlgorithmHandlerDefault - Hash operations not supported");
  +
  +}
   
  
  
  
  1.9       +32 -1     xml-security/c/src/xenc/impl/XENCAlgorithmHandlerDefault.hpp
  
  Index: XENCAlgorithmHandlerDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCAlgorithmHandlerDefault.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XENCAlgorithmHandlerDefault.hpp	3 Feb 2005 14:05:59 -0000	1.8
  +++ XENCAlgorithmHandlerDefault.hpp	5 Jul 2005 11:55:57 -0000	1.9
  @@ -77,6 +77,37 @@
   
   	virtual XSECAlgorithmHandler * clone(void) const;
   
  +	// Unsupported Signature ops
  +
  +	virtual unsigned int signToSafeBuffer(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI,
  +		XSECCryptoKey * key,
  +		unsigned int outputLength,
  +		safeBuffer & result
  +	);
  +
  +	virtual bool appendSignatureHashTxfm(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI,
  +		XSECCryptoKey * key
  +	);
  +
  +	virtual bool verifyBase64Signature(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI,
  +		const char * sig,
  +		unsigned int outputLength,
  +		XSECCryptoKey * key
  +	);
  +
  +	virtual bool appendHashTxfm(
  +		TXFMChain * inputBytes,
  +		const XMLCh * URI
  +	);
  +
  +
  +	
   private:
   
   	void mapURIToKey(const XMLCh * uri,