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/05/14 06:29:42 UTC

cvs commit: xml-security/c/src/dsig DSIGSignature.cpp DSIGSignature.hpp

blautenb    2005/05/13 21:29:42

  Modified:    c/src/dsig DSIGSignature.cpp DSIGSignature.hpp
  Log:
  Change to allow apps to calculate and obtain signed info hash - from Eckehard.Hermann@softwareag.com - see email of 2 March 2005 on security-dev@xml
  
  Revision  Changes    Path
  1.38      +10 -1     xml-security/c/src/dsig/DSIGSignature.cpp
  
  Index: DSIGSignature.cpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGSignature.cpp,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- DSIGSignature.cpp	20 Feb 2005 10:35:51 -0000	1.37
  +++ DSIGSignature.cpp	14 May 2005 04:29:42 -0000	1.38
  @@ -967,6 +967,15 @@
   
   }
   
  +unsigned int DSIGSignature::calculateSignedInfoAndReferenceHash(unsigned char * hashBuf, 
  +													unsigned int hashBufLen) {
  +
  +	// Set up the reference list hashes - including any manifests
  +	mp_signedInfo->hash();
  +	// calculaet signed InfoHash
  +	return calculateSignedInfoHash(hashBuf,hashBufLen);
  +}
  +
   // --------------------------------------------------------------------------------
   //           Verify a signature
   // --------------------------------------------------------------------------------
  
  
  
  1.24      +17 -1     xml-security/c/src/dsig/DSIGSignature.hpp
  
  Index: DSIGSignature.hpp
  ===================================================================
  RCS file: /home/cvs/xml-security/c/src/dsig/DSIGSignature.hpp,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DSIGSignature.hpp	3 Feb 2005 12:56:37 -0000	1.23
  +++ DSIGSignature.hpp	14 May 2005 04:29:42 -0000	1.24
  @@ -344,6 +344,22 @@
   	 * 
   	 * Function to calculate and return the hash of the \<SignedInfo\>
   	 * structures (after the canonicalization defined by
  +	 * \<CanonicalizationMethod\> and the reference hashes have been performed).
  +	 *
  +	 * @param hashBuf Buffer to place the raw hash in.
  +	 * @param hashBufLen The length of the buffer
  +	 * @returns The length of the hash that was placed in hashBuf
  +	 *
  +	 */
  +
  +	unsigned int calculateSignedInfoAndReferenceHash(unsigned char * hashBuf, 
  +													unsigned int hashBufLen);
  +
  +	/**
  +	 * \brief Get the hash of the Signed Value
  +	 * 
  +	 * Function to calculate and return the hash of the \<SignedInfo\>
  +	 * structures (after the canonicalization defined by
   	 * \<CanonicalizationMethod\> has been performed).
   	 *
   	 * @param hashBuf Buffer to place the raw hash in.