dkim.h   dkim.h 
/************************************************************************** *** /************************************************************************** ***
* Copyright 2005 Alt-N Technologies, Ltd. * Copyright 2005 Alt-N Technologies, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* This code incorporates intellectual property owned by Yahoo! and license
d
* pursuant to the Yahoo! DomainKeys Patent License Agreement.
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*
*************************************************************************** **/ *************************************************************************** **/
#ifdef WIN32 #ifdef WIN32
#define DKIM_CALL WINAPI #define DKIM_CALL WINAPI
#else #else
#define DKIM_CALL #define DKIM_CALL
#define MAKELONG(a,b) ((long)(((unsigned)(a) & 0xffff) | (((unsigned)(b) & 0xffff) << 16))) #define MAKELONG(a,b) ((long)(((unsigned)(a) & 0xffff) | (((unsigned)(b) & 0xffff) << 16)))
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 lines changed or added


 dkimbase.h   dkimbase.h 
/************************************************************************** *** /************************************************************************** ***
* Copyright 2005 Alt-N Technologies, Ltd. * Copyright 2005 Alt-N Technologies, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* This code incorporates intellectual property owned by Yahoo! and license
d
* pursuant to the Yahoo! DomainKeys Patent License Agreement.
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*
*************************************************************************** **/ *************************************************************************** **/
#ifndef DKIMBASE_H #ifndef DKIMBASE_H
#define DKIMBASE_H #define DKIMBASE_H
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/err.h> #include <openssl/err.h>
#define BUFFER_ALLOC_INCREMENT 256 #define BUFFER_ALLOC_INCREMENT 256
skipping to change at line 40 skipping to change at line 44
class CDKIMBase class CDKIMBase
{ {
public: public:
CDKIMBase(); CDKIMBase();
~CDKIMBase(); ~CDKIMBase();
int Init(void); int Init(void);
int Process( char* szBuffer, int nBufLength ); int Process( char* szBuffer, int nBufLength, bool bEOF );
int ProcessFinal(void); int ProcessFinal(void);
int Alloc( char*& szBuffer, int nRequiredSize ); int Alloc( char*& szBuffer, int nRequiredSize );
int ReAlloc( char*& szBuffer, int& nBufferLength, int nRequiredSize ); int ReAlloc( char*& szBuffer, int& nBufferLength, int nRequiredSize );
void Free( char* szBuffer ); void Free( char* szBuffer );
static void RemoveSWSP( char* szBuffer ); static void RemoveSWSP( char* szBuffer );
static void RemoveSWSP( char* pBuffer, int& nBufLength ); static void RemoveSWSP( char* pBuffer, int& nBufLength );
static void RemoveSWSP( string& sBuffer ); static void RemoveSWSP( string& sBuffer );
static void CompressSWSP( char* pBuffer, int& nBufLength ); static void CompressSWSP( char* pBuffer, int& nBufLength );
static void CompressSWSP( string& sBuffer ); static void CompressSWSP( string& sBuffer );
static string RelaxHeader( const string& sHeader ); static string RelaxHeader( const string& sHeader );
virtual int ProcessHeaders(void); virtual int ProcessHeaders(void);
virtual int ProcessBody( char* szBuffer, int nBufLength ); virtual int ProcessBody( char* szBuffer, int nBufLength, bool bEOF ) ;
protected: protected:
char* m_From; char* m_From;
char* m_Sender; char* m_Sender;
char* m_hTag; char* m_hTag;
int m_hTagSize; int m_hTagSize;
int m_hTagPos; int m_hTagPos;
char* m_Line; char* m_Line;
int m_LineSize; int m_LineSize;
int m_LinePos; int m_LinePos;
int m_EmptyLineCount;
bool m_InHeaders; bool m_InHeaders;
list<string> HeaderList; list<string> HeaderList;
}; };
#endif // DKIMBASE_H #endif // DKIMBASE_H
 End of changes. 5 change blocks. 
3 lines changed or deleted 7 lines changed or added


 dkimsign.h   dkimsign.h 
/************************************************************************** *** /************************************************************************** ***
* Copyright 2005 Alt-N Technologies, Ltd. * Copyright 2005 Alt-N Technologies, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* This code incorporates intellectual property owned by Yahoo! and license
d
* pursuant to the Yahoo! DomainKeys Patent License Agreement.
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*
*************************************************************************** **/ *************************************************************************** **/
#ifndef DKIMSIGN_H #ifndef DKIMSIGN_H
#define DKIMSIGN_H #define DKIMSIGN_H
#include "dkimbase.h" #include "dkimbase.h"
class CDKIMSign : public CDKIMBase class CDKIMSign : public CDKIMBase
{ {
public: public:
CDKIMSign(); CDKIMSign();
~CDKIMSign(); ~CDKIMSign();
int Init( DKIMSignOptions* pOptions ); int Init( DKIMSignOptions* pOptions );
int GetSig( char* szPrivKey, char* szSignature, int nSigLength ); int GetSig( char* szPrivKey, char* szSignature, int nSigLength );
int GetSig2( char* szPrivKey, char** pszSignature ); int GetSig2( char* szPrivKey, char** pszSignature );
virtual int ProcessHeaders(void); virtual int ProcessHeaders(void);
virtual int ProcessBody( char* szBuffer, int nBufLength ); virtual int ProcessBody( char* szBuffer, int nBufLength, bool bEOF ) ;
enum CKDKIMConstants { OptimalHeaderLineLength = 65 }; enum CKDKIMConstants { OptimalHeaderLineLength = 65 };
protected: protected:
void Hash( const char* szBuffer, int nBufLength, bool bHdr, bool bAl lmanOnly = false ); void Hash( const char* szBuffer, int nBufLength, bool bHdr, bool bAl lmanOnly = false );
bool SignThisTag( const string& sTag ); bool SignThisTag( const string& sTag );
void GetHeaderParams( const string& sHdr ); void GetHeaderParams( const string& sHdr );
void ProcessHeader( const string& sHdr ); void ProcessHeader( const string& sHdr );
skipping to change at line 69 skipping to change at line 73
EVP_MD_CTX m_Hdr_ietf_sha1ctx; /* the header hash for ietf sha1 */ EVP_MD_CTX m_Hdr_ietf_sha1ctx; /* the header hash for ietf sha1 */
EVP_MD_CTX m_Hdr_ietf_sha256ctx; /* the header hash for ietf sha256 */ EVP_MD_CTX m_Hdr_ietf_sha256ctx; /* the header hash for ietf sha256 */
EVP_MD_CTX m_Bdy_ietf_sha1ctx; /* the body hash for ietf sh a1 */ EVP_MD_CTX m_Bdy_ietf_sha1ctx; /* the body hash for ietf sh a1 */
EVP_MD_CTX m_Bdy_ietf_sha256ctx; /* the body hash for ietf sh a256 */ EVP_MD_CTX m_Bdy_ietf_sha256ctx; /* the body hash for ietf sh a256 */
EVP_MD_CTX m_allman_sha1ctx; /* the hash for allman sha1 */ EVP_MD_CTX m_allman_sha1ctx; /* the hash for allman sha1 */
int m_Canon; // canonization method int m_Canon; // canonization method
int m_EmptyLineCount;
string hParam; string hParam;
string sFrom; string sFrom;
string sSender; string sSender;
string sSelector; string sSelector;
string sDomain; string sDomain;
string sIdentity; // for i= ta g, if empty tag will not be included in sig string sIdentity; // for i= ta g, if empty tag will not be included in sig
string sRequiredHeaders; string sRequiredHeaders;
bool m_IncludeBodyLengthTag; bool m_IncludeBodyLengthTag;
int m_nBodyLength; int m_nBodyLength;
 End of changes. 4 change blocks. 
1 lines changed or deleted 8 lines changed or added


 dkimverify.h   dkimverify.h 
/************************************************************************** *** /************************************************************************** ***
* Copyright 2005 Alt-N Technologies, Ltd. * Copyright 2005 Alt-N Technologies, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* This code incorporates intellectual property owned by Yahoo! and license
d
* pursuant to the Yahoo! DomainKeys Patent License Agreement.
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*
*************************************************************************** **/ *************************************************************************** **/
#ifndef DKIMVERIFY_H #ifndef DKIMVERIFY_H
#define DKIMVERIFY_H #define DKIMVERIFY_H
#include "dkimbase.h" #include "dkimbase.h"
#include <vector> #include <vector>
#define DKIM_SSP_UNKNOWN 1 #define DKIM_SSP_UNKNOWN 1
#define DKIM_SSP_ALL 2 #define DKIM_SSP_ALL 2
skipping to change at line 87 skipping to change at line 91
unsigned VerifiedBodyCount; unsigned VerifiedBodyCount;
unsigned UnverifiedBodyCount; unsigned UnverifiedBodyCount;
EVP_MD_CTX m_Hdr_ctx; EVP_MD_CTX m_Hdr_ctx;
EVP_MD_CTX m_Bdy_ctx; EVP_MD_CTX m_Bdy_ctx;
SelectorInfo *m_pSelector; SelectorInfo *m_pSelector;
int Status; int Status;
int m_nHash; // use one o f the DKIM_HASH_xxx constants here int m_nHash; // use one o f the DKIM_HASH_xxx constants here
unsigned EmptyLineCount;
bool m_SaveCanonicalizedData; bool m_SaveCanonicalizedData;
}; };
class CDKIMVerify : public CDKIMBase class CDKIMVerify : public CDKIMBase
{ {
public: public:
CDKIMVerify(); CDKIMVerify();
~CDKIMVerify(); ~CDKIMVerify();
int Init( DKIMVerifyOptions* pOptions ); int Init( DKIMVerifyOptions* pOptions );
int GetResults(void); int GetResults(void);
int GetDetails( int* nSigCount, DKIMVerifyDetails** pDetails ); int GetDetails( int* nSigCount, DKIMVerifyDetails** pDetails );
virtual int ProcessHeaders(void); virtual int ProcessHeaders(void);
virtual int ProcessBody( char* szBuffer, int nBufLength ); virtual int ProcessBody( char* szBuffer, int nBufLength, bool bEOF ) ;
const char* GetPractices() { return Practices.c_str(); } const char* GetPractices() { return Practices.c_str(); }
protected: protected:
int ParseDKIMSignature( const string& sHeader, SignatureInfo &sig ); int ParseDKIMSignature( const string& sHeader, SignatureInfo &sig );
SelectorInfo& GetSelector( const string &sSelector, const string &sD omain ); SelectorInfo& GetSelector( const string &sSelector, const string &sD omain );
int GetSSP( const string &sDomain, int &iSSP, bool &bTesting ); int GetSSP( const string &sDomain, int &iSSP, bool &bTesting );
 End of changes. 4 change blocks. 
1 lines changed or deleted 7 lines changed or added


 dns.h   dns.h 
/************************************************************************** *** /************************************************************************** ***
* Copyright 2005 Alt-N Technologies, Ltd. * Copyright 2005 Alt-N Technologies, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* This code incorporates intellectual property owned by Yahoo! and license
d
* pursuant to the Yahoo! DomainKeys Patent License Agreement.
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*
*************************************************************************** **/ *************************************************************************** **/
// This file is an intermediary which chooses the correct resolver // This file is an intermediary which chooses the correct resolver
// to use based on the platform // to use based on the platform
// //
// Windows 2k+ -> Dynamically load dnsapi.dll and use DnsQuery() // Windows 2k+ -> Dynamically load dnsapi.dll and use DnsQuery()
// Win9x/NT -> Use dnsresolv.cpp // Win9x/NT -> Use dnsresolv.cpp
// UNIX -> Use res_query from libresolv // UNIX -> Use res_query from libresolv
// //
// These DNS resolution routines are encapsulated by the API below // These DNS resolution routines are encapsulated by the API below
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 lines changed or added


 dnsresolv.h   dnsresolv.h 
/************************************************************************** *** /************************************************************************** ***
* Copyright 2005 Alt-N Technologies, Ltd. * Copyright 2005 Alt-N Technologies, Ltd.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* This code incorporates intellectual property owned by Yahoo! and license
d
* pursuant to the Yahoo! DomainKeys Patent License Agreement.
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*
*************************************************************************** **/ *************************************************************************** **/
// DNS query routines // DNS query routines
#ifndef DNSRESOLV_H #ifndef DNSRESOLV_H
#define DNSRESOLV_H #define DNSRESOLV_H
#define DNSMSG_HDR_ID 0 #define DNSMSG_HDR_ID 0
#define DNSMSG_HDR_CODES 1 #define DNSMSG_HDR_CODES 1
#define DNSMSG_HDR_QDCOUNT 2 #define DNSMSG_HDR_QDCOUNT 2
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 lines changed or added


 resource.h   resource.h 
//{{NO_DEPENDENCIES}} //{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file. // Microsoft Developer Studio generated include file.
// Used by libdkim.rc // Used by libdkim.rc
// //
#define VER_MAJOR 1 #define VER_MAJOR 1
#define VER_MINOR 0 #define VER_MINOR 0
#define VER_REV 17 #define VER_REV 19
#define VER_BUILD 0 #define VER_BUILD 0
#define VERSION_STRING "1.0.17" #define VERSION_STRING "1.0.19"
#define IDS_PROJNAME 100 #define IDS_PROJNAME 100
#define IDR_WMDMLOGGER 101 #define IDR_WMDMLOGGER 101
#define IDS_LOG_SEV_INFO 201 #define IDS_LOG_SEV_INFO 201
#define IDS_LOG_SEV_WARN 202 #define IDS_LOG_SEV_WARN 202
#define IDS_LOG_SEV_ERROR 203 #define IDS_LOG_SEV_ERROR 203
#define IDS_LOG_DATETIME 204 #define IDS_LOG_DATETIME 204
#define IDS_LOG_SRCNAME 205 #define IDS_LOG_SRCNAME 205
#define IDS_DEF_LOGFILE 301 #define IDS_DEF_LOGFILE 301
#define IDS_DEF_MAXSIZE 302 #define IDS_DEF_MAXSIZE 302
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/