From: <arn...@us...> - 2006-07-10 20:34:56
|
Revision: 636 Author: arnetheduck Date: 2006-07-10 13:34:17 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=636&view=rev Log Message: ----------- 0.694 fixes Modified Paths: -------------- dcplusplus/trunk/DCPlusPlus.rc dcplusplus/trunk/Example.xml dcplusplus/trunk/changelog.txt dcplusplus/trunk/client/CryptoManager.cpp dcplusplus/trunk/client/HashManager.h dcplusplus/trunk/client/QueueManager.cpp dcplusplus/trunk/client/QueueManager.h dcplusplus/trunk/client/Streams.h dcplusplus/trunk/client/version.h dcplusplus/trunk/windows/DirectoryListingFrm.cpp Modified: dcplusplus/trunk/DCPlusPlus.rc =================================================================== --- dcplusplus/trunk/DCPlusPlus.rc 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/DCPlusPlus.rc 2006-07-10 20:34:17 UTC (rev 636) @@ -942,8 +942,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,9,3 - PRODUCTVERSION 0,6,9,3 + FILEVERSION 0,6,9,4 + PRODUCTVERSION 0,6,9,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -960,12 +960,12 @@ BEGIN VALUE "Comments", "http://dcplusplus.sourceforge.net" VALUE "FileDescription", "DC++" - VALUE "FileVersion", "0, 6, 9, 3" + VALUE "FileVersion", "0, 6, 9, 4" VALUE "InternalName", "DC++" VALUE "LegalCopyright", "Copyright 2001-2006 Jacek Sieka" VALUE "OriginalFilename", "DCPlusPlus.exe" VALUE "ProductName", "DC++" - VALUE "ProductVersion", "0, 6, 9, 3" + VALUE "ProductVersion", "0, 6, 9, 4" END END BLOCK "VarFileInfo" Modified: dcplusplus/trunk/Example.xml =================================================================== --- dcplusplus/trunk/Example.xml 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/Example.xml 2006-07-10 20:34:17 UTC (rev 636) @@ -1,5 +1,5 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<Language Name="Example Language" Author="arnetheduck" Version="0.691" Revision="1" RightToLeft="0"> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<Language Name="Example Language" Native="English" Code="en" Author="arnetheduck" Version="0.694" Revision="1" RightToLeft="0"> <Strings> <String Name="Active">Active</String> <String Name="ActiveSearchString">Enabled / Search String</String> Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/changelog.txt 2006-07-10 20:34:17 UTC (rev 636) @@ -1,4 +1,10 @@ --- 0.693 2006-07-09 -- +-- 0.694 2006-07-10 -- +* Fixed crash in certificates page +* [bug 1005] Fixed linux compile issue (thanks tpo) +* [bug 1004] Fixed browse file list on self +* Both .crt and .pem files are read as trusted certificates + +-- 0.693 2006-07-09 -- * Fixed crash bug * Added language code to example language xml Modified: dcplusplus/trunk/client/CryptoManager.cpp =================================================================== --- dcplusplus/trunk/client/CryptoManager.cpp 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/CryptoManager.cpp 2006-07-10 20:34:17 UTC (rev 636) @@ -196,18 +196,29 @@ hFind = FindFirstFile(Text::toT(SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + "*.pem").c_str(), &data); if(hFind != INVALID_HANDLE_VALUE) { do { - if(SSL_CTX_load_verify_locations(clientContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { + if( + SSL_CTX_load_verify_locations(clientContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(clientVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS + ) { LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); } - if(SSL_CTX_load_verify_locations(clientVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { + } while(FindNextFile(hFind, &data)); + + FindClose(hFind); + } + hFind = FindFirstFile(Text::toT(SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + "*.crt").c_str(), &data); + if(hFind != INVALID_HANDLE_VALUE) { + do { + if( + SSL_CTX_load_verify_locations(clientContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(clientVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS || + SSL_CTX_load_verify_locations(serverVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS + ) { LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); } - if(SSL_CTX_load_verify_locations(serverContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { - LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); - } - if(SSL_CTX_load_verify_locations(serverVerContext, (SETTING(TLS_TRUSTED_CERTIFICATES_PATH) + Text::fromT(data.cFileName)).c_str(), NULL) != SSL_SUCCESS) { - LogManager::getInstance()->message("Failed to load trusted certificate from " + Text::fromT(data.cFileName)); - } } while(FindNextFile(hFind, &data)); FindClose(hFind); Modified: dcplusplus/trunk/client/HashManager.h =================================================================== --- dcplusplus/trunk/client/HashManager.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/HashManager.h 2006-07-10 20:34:17 UTC (rev 636) @@ -32,6 +32,7 @@ #include "Util.h" #include "FastAlloc.h" #include "Text.h" +#include "Streams.h" STANDARD_EXCEPTION(HashException); class File; Modified: dcplusplus/trunk/client/QueueManager.cpp =================================================================== --- dcplusplus/trunk/client/QueueManager.cpp 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/QueueManager.cpp 2006-07-10 20:34:17 UTC (rev 636) @@ -413,7 +413,11 @@ add(target, -1, NULL, aUser, USER_LIST_NAME, true, QueueItem::FLAG_USER_LIST | aFlags); } -void QueueManager::addPfs(const User::Ptr& aUser, const string& aDir) throw() { +void QueueManager::addPfs(const User::Ptr& aUser, const string& aDir) throw(QueueException) { + if(aUser == ClientManager::getInstance()->getMe()) { + throw QueueException(STRING(NO_DOWNLOADS_FROM_SELF)); + } + if(!aUser->isOnline() || aUser->getCID().isZero()) return; Modified: dcplusplus/trunk/client/QueueManager.h =================================================================== --- dcplusplus/trunk/client/QueueManager.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/QueueManager.h 2006-07-10 20:34:17 UTC (rev 636) @@ -80,7 +80,7 @@ /** Add a user's filelist to the queue. */ void addList(const User::Ptr& aUser, int aFlags) throw(QueueException, FileException); /** Queue a partial file list download */ - void addPfs(const User::Ptr& aUser, const string& aDir) throw(); + void addPfs(const User::Ptr& aUser, const string& aDir) throw(QueueException); /** Readd a source that was removed */ void readd(const string& target, User::Ptr& aUser) throw(QueueException); /** Add a directory to the queue (downloads filelist and matches the directory). */ Modified: dcplusplus/trunk/client/Streams.h =================================================================== --- dcplusplus/trunk/client/Streams.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/Streams.h 2006-07-10 20:34:17 UTC (rev 636) @@ -23,6 +23,7 @@ #pragma once #endif // _MSC_VER > 1000 +#include "SettingsManager.h" #include "Exception.h" STANDARD_EXCEPTION(FileException); Modified: dcplusplus/trunk/client/version.h =================================================================== --- dcplusplus/trunk/client/version.h 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/client/version.h 2006-07-10 20:34:17 UTC (rev 636) @@ -17,8 +17,8 @@ */ #define APPNAME "DC++" -#define VERSIONSTRING "0.693" -#define VERSIONFLOAT 0.693 +#define VERSIONSTRING "0.694" +#define VERSIONFLOAT 0.694 /* Update the .rc file as well... */ Modified: dcplusplus/trunk/windows/DirectoryListingFrm.cpp =================================================================== --- dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-07-10 08:40:05 UTC (rev 635) +++ dcplusplus/trunk/windows/DirectoryListingFrm.cpp 2006-07-10 20:34:17 UTC (rev 636) @@ -334,8 +334,12 @@ if(!d->getComplete()) { if(dl->getUser()->isOnline()) { - QueueManager::getInstance()->addPfs(dl->getUser(), dl->getPath(d)); - ctrlStatus.SetText(STATUS_TEXT, CTSTRING(DOWNLOADING_LIST)); + try { + QueueManager::getInstance()->addPfs(dl->getUser(), dl->getPath(d)); + ctrlStatus.SetText(STATUS_TEXT, CTSTRING(DOWNLOADING_LIST)); + } catch(const QueueException& e) { + ctrlStatus.SetText(STATUS_TEXT, Text::toT(e.getError()).c_str()); + } } else { ctrlStatus.SetText(STATUS_TEXT, CTSTRING(USER_OFFLINE)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |