| 5,10 → 5,9 |
| |
| @DPATCH@ |
| |
| diff -ru libdkim-1.0.19.orig/src/dkim.cpp libdkim-1.0.19/src/dkim.cpp |
| --- libdkim-1.0.19.orig/src/dkim.cpp 2008-05-12 20:07:32.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkim.cpp 2009-04-15 19:38:08.000000000 +1000 |
| @@ -172,7 +172,7 @@ |
| --- a/src/dkim.cpp |
| +++ b/src/dkim.cpp |
| @@ -172,7 +172,7 @@ int DKIM_CALL DKIMVerifyInit( DKIMContex |
| } |
| |
| |
| 17,7 → 16,7 |
| { |
| CDKIMVerify* pVerify = (CDKIMVerify*)ValidateContext( pVerifyContext, false ); |
| |
| @@ -226,13 +226,13 @@ |
| @@ -226,13 +226,13 @@ void DKIM_CALL DKIMVerifyFree( DKIMConte |
| } |
| |
| |
| 33,7 → 32,7 |
| "DKIM_FAIL", |
| "DKIM_BAD_SYNTAX", |
| "DKIM_SIGNATURE_BAD", |
| @@ -254,7 +254,7 @@ |
| @@ -259,7 +259,7 @@ static char* DKIMErrorStrings[-1-DKIM_MA |
| }; |
| |
| |
| 42,10 → 41,9 |
| { |
| if (ErrorCode >= 0 || ErrorCode <= DKIM_MAX_ERROR) |
| return "Unknown"; |
| diff -ru libdkim-1.0.19.orig/src/dkim.h libdkim-1.0.19/src/dkim.h |
| --- libdkim-1.0.19.orig/src/dkim.h 2009-04-15 19:37:48.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkim.h 2009-04-15 19:38:08.000000000 +1000 |
| @@ -155,14 +155,14 @@ |
| --- a/src/dkim.h |
| +++ b/src/dkim.h |
| @@ -154,14 +154,14 @@ int DKIM_CALL DKIMSignGetSig2( DKIMConte |
| void DKIM_CALL DKIMSignFree( DKIMContext* pSignContext ); |
| |
| int DKIM_CALL DKIMVerifyInit( DKIMContext* pVerifyContext, DKIMVerifyOptions* pOptions ); |
| 63,10 → 61,9 |
| |
| #ifdef __cplusplus |
| } |
| diff -ru libdkim-1.0.19.orig/src/dkimbase.cpp libdkim-1.0.19/src/dkimbase.cpp |
| --- libdkim-1.0.19.orig/src/dkimbase.cpp 2008-05-12 20:07:36.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkimbase.cpp 2009-04-15 19:49:32.000000000 +1000 |
| @@ -118,10 +118,10 @@ |
| --- a/src/dkimbase.cpp |
| +++ b/src/dkimbase.cpp |
| @@ -118,10 +118,10 @@ void CDKIMBase::Free( char* szBuffer ) |
| // Process - split buffers into lines without any CRs or LFs at the end. |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
| 80,7 → 77,7 |
| |
| while( p < e ) |
| { |
| @@ -208,7 +208,8 @@ |
| @@ -208,7 +208,8 @@ int CDKIMBase::ProcessFinal(void) |
| { |
| m_InHeaders = false; |
| ProcessHeaders(); |
| 90,7 → 87,7 |
| } |
| |
| return DKIM_SUCCESS; |
| @@ -338,9 +339,9 @@ |
| @@ -338,9 +339,9 @@ string CDKIMBase::RelaxHeader( const str |
| |
| CompressSWSP(sTemp); |
| |
| 102,10 → 99,9 |
| { |
| // no colon?! |
| } |
| diff -ru libdkim-1.0.19.orig/src/dkimbase.h libdkim-1.0.19/src/dkimbase.h |
| --- libdkim-1.0.19.orig/src/dkimbase.h 2008-05-12 20:07:24.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkimbase.h 2009-04-15 19:49:32.000000000 +1000 |
| @@ -41,7 +41,7 @@ |
| --- a/src/dkimbase.h |
| +++ b/src/dkimbase.h |
| @@ -41,7 +41,7 @@ public: |
| |
| int Init(void); |
| |
| 114,10 → 110,9 |
| int ProcessFinal(void); |
| |
| int Alloc( char*& szBuffer, int nRequiredSize ); |
| diff -ru libdkim-1.0.19.orig/src/dkimsign.cpp libdkim-1.0.19/src/dkimsign.cpp |
| --- libdkim-1.0.19.orig/src/dkimsign.cpp 2008-05-12 20:07:46.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkimsign.cpp 2009-04-15 19:49:32.000000000 +1000 |
| @@ -144,7 +144,7 @@ |
| --- a/src/dkimsign.cpp |
| +++ b/src/dkimsign.cpp |
| @@ -144,7 +144,7 @@ void CDKIMSign::Hash( const char* szBuff |
| |
| fwrite( szBuffer, 1, nBufLength, fpdebug ); |
| |
| 126,7 → 121,7 |
| |
| if( bAllmanOnly ) |
| { |
| @@ -555,7 +555,7 @@ |
| @@ -555,7 +555,7 @@ void CDKIMSign::InitSig(void) |
| // if bFold, fold at cbrk char |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
| 135,7 → 130,7 |
| { |
| int nTagLen = strlen(Tag); |
| |
| @@ -583,10 +583,10 @@ |
| @@ -583,10 +583,10 @@ void CDKIMSign::AddTagToSig( char* Tag, |
| // AddTagToSig - add tag and numeric value to signature folding if necessary |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
| 148,7 → 143,7 |
| AddTagToSig( Tag, szValue, 0, false ); |
| } |
| |
| @@ -686,7 +686,7 @@ |
| @@ -686,7 +686,7 @@ void CDKIMSign::AddFoldedValueToSig( con |
| // GetSig - compute hash and return signature header in szSignature |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
| 157,7 → 152,7 |
| { |
| if( szPrivKey == NULL ) |
| { |
| @@ -794,7 +794,6 @@ |
| @@ -794,7 +794,6 @@ int CDKIMSign::ConstructSignature( char* |
| int size; |
| int len; |
| char* buf; |
| 165,7 → 160,7 |
| |
| // construct the DKIM-Signature: header and add to hash |
| InitSig(); |
| @@ -879,7 +878,7 @@ |
| @@ -879,7 +878,7 @@ int CDKIMSign::ConstructSignature( char* |
| } |
| BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); |
| BIO_push(b64, bio); |
| 174,7 → 169,7 |
| { |
| BIO_free_all(b64); |
| return DKIM_OUT_OF_MEMORY; |
| @@ -993,7 +992,7 @@ |
| @@ -993,7 +992,7 @@ int CDKIMSign::ConstructSignature( char* |
| } |
| BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); |
| BIO_push(b64, bio); |
| 183,10 → 178,9 |
| { |
| OPENSSL_free(sig); |
| BIO_free_all(b64); |
| diff -ru libdkim-1.0.19.orig/src/dkimsign.h libdkim-1.0.19/src/dkimsign.h |
| --- libdkim-1.0.19.orig/src/dkimsign.h 2008-05-12 20:07:58.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkimsign.h 2009-04-15 19:49:32.000000000 +1000 |
| @@ -32,7 +32,7 @@ |
| --- a/src/dkimsign.h |
| +++ b/src/dkimsign.h |
| @@ -32,7 +32,7 @@ public: |
| |
| int Init( DKIMSignOptions* pOptions ); |
| |
| 195,7 → 189,7 |
| int GetSig2( char* szPrivKey, char** pszSignature ); |
| |
| virtual int ProcessHeaders(void); |
| @@ -50,8 +50,8 @@ |
| @@ -50,8 +50,8 @@ protected: |
| bool ParseFromAddress( void ); |
| |
| void InitSig(void); |
| 206,10 → 200,9 |
| void AddInterTagSpace( int nSizeOfNextTag ); |
| void AddFoldedValueToSig( const string &sValue, char cbrk ); |
| |
| diff -ru libdkim-1.0.19.orig/src/dkimverify.cpp libdkim-1.0.19/src/dkimverify.cpp |
| --- libdkim-1.0.19.orig/src/dkimverify.cpp 2009-04-15 19:37:48.000000000 +1000 |
| +++ libdkim-1.0.19/src/dkimverify.cpp 2009-04-15 19:49:32.000000000 +1000 |
| @@ -440,7 +440,7 @@ |
| --- a/src/dkimverify.cpp |
| +++ b/src/dkimverify.cpp |
| @@ -442,7 +442,7 @@ int CDKIMVerify::GetResults(void) |
| { |
| ProcessFinal(); |
| |
| 218,7 → 211,7 |
| int TestingFailures=0; |
| int RealFailures=0; |
| |
| @@ -646,7 +646,7 @@ |
| @@ -643,7 +643,7 @@ void SignatureInfo::Hash( const char* sz |
| /** END DEBUG CODE **/ |
| #endif |
| |
| 227,7 → 220,7 |
| { |
| VerifiedBodyCount += nBufLength; |
| if (VerifiedBodyCount > BodyLength) |
| @@ -1019,7 +1019,7 @@ |
| @@ -1050,7 +1050,7 @@ int CDKIMVerify::ParseDKIMSignature( con |
| // body count |
| if (values[8] == NULL || !m_HonorBodyLengthTag) |
| { |
| 236,7 → 229,7 |
| } |
| else |
| { |
| @@ -1057,17 +1057,17 @@ |
| @@ -1088,17 +1088,17 @@ int CDKIMVerify::ParseDKIMSignature( con |
| // expiration time |
| if (values[11] == NULL) |
| { |
| 257,7 → 250,7 |
| return DKIM_BAD_SYNTAX; |
| |
| // todo: if possible, use the received date/time instead of the current time |
| @@ -1169,7 +1169,7 @@ |
| @@ -1200,7 +1200,7 @@ int CDKIMVerify::ProcessBody( char* szBu |
| } |
| |
| |
| 266,7 → 259,7 |
| { |
| AllowSHA1 = true; |
| AllowSHA256 = true; |
| @@ -1207,7 +1207,7 @@ |
| @@ -1241,7 +1241,7 @@ int SelectorInfo::Parse( char* Buffer ) |
| return DKIM_SELECTOR_INVALID; // todo: maybe create a new error code for unsupported selector version |
| |
| // make sure v= is the first tag in the response // todo: maybe don't enforce this, it seems unnecessary |
| 275,10 → 268,9 |
| { |
| if (values[j] != NULL && values[j] < values[0]) |
| { |
| diff -ru libdkim-1.0.19.orig/src/libdkimtest.cpp libdkim-1.0.19/src/libdkimtest.cpp |
| --- libdkim-1.0.19.orig/src/libdkimtest.cpp 2008-05-12 20:08:54.000000000 +1000 |
| +++ libdkim-1.0.19/src/libdkimtest.cpp 2009-04-15 19:38:08.000000000 +1000 |
| @@ -60,9 +60,9 @@ |
| --- a/src/libdkimtest.cpp |
| +++ b/src/libdkimtest.cpp |
| @@ -60,9 +60,9 @@ int DKIM_CALL SelectorCallback(const cha |
| int main(int argc, char* argv[]) |
| { |
| int n; |