Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 90f1e83430a45fde6ebe382c40061374 > files > 3

pokerth-1.0.1-2.fc18.src.rpm

Only in PokerTH-0.8.3-src: bin
Only in PokerTH-0.8.3-src: chatcleaner
Only in PokerTH-0.8.3-src: lib
Only in PokerTH-0.8.3-src: Makefile
Only in PokerTH-0.8.3-src: Makefile.chatcleaner
Only in PokerTH-0.8.3-src: Makefile.pokerth_db
Only in PokerTH-0.8.3-src: Makefile.pokerth_game
Only in PokerTH-0.8.3-src: Makefile.pokerth_lib
Only in PokerTH-0.8.3-src: Makefile.pokerth_protocol
Only in PokerTH-0.8.3-src: Makefile.pokerth_server
Only in PokerTH-0.8.3-src: mocs
Only in PokerTH-0.8.3-src: obj
Only in PokerTH-0.8.3-src: pokerth
diff -ur PokerTH-0.8.3-src-foo/pokerth_game.pro PokerTH-0.8.3-src/pokerth_game.pro
--- PokerTH-0.8.3-src-foo/pokerth_game.pro	2011-08-27 00:56:23.541971807 -0400
+++ PokerTH-0.8.3-src/pokerth_game.pro	2011-10-02 13:45:26.875003939 -0400
@@ -332,7 +332,7 @@
 		LIBS += -lcrypto -lssl -llibeay32 -lssleay32 -lgsasl
 	}
 	!pkth_win64 {
-		LIBS += -lgnutls-openssl -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
+		LIBS += -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
 	}
 	win32-g++-cross {
 		LIBS += -lsqlite3
@@ -453,8 +453,7 @@
                 -lSDL_mixer \
 		-lgsasl
 	!isEmpty( BSD ):isEmpty( kFreeBSD ):LIBS += -lcrypto
-	else:LIBS += -lgnutls-openssl \
-		-lgcrypt
+	else:LIBS += -lgcrypt
 	TARGETDEPS += ./lib/libpokerth_lib.a \
 		./lib/libpokerth_db.a \
 		./lib/libpokerth_protocol.a
diff -ur PokerTH-0.8.3-src-foo/pokerth_server.pro PokerTH-0.8.3-src/pokerth_server.pro
--- PokerTH-0.8.3-src-foo/pokerth_server.pro	2011-08-27 00:56:23.562971837 -0400
+++ PokerTH-0.8.3-src/pokerth_server.pro	2011-10-02 13:45:45.949929421 -0400
@@ -134,7 +134,7 @@
 		LIBS += -lcrypto -lssl -llibeay32 -lssleay32 -lgsasl
 	}
 	!pkth_win64 {
-		LIBS += -lgnutls-openssl -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
+		LIBS += -lgnutls -lgcrypt -lgpg-error -lgsasl -lidn
 	}
 	win32-g++-cross {
 		LIBS += -lsqlite3
@@ -277,7 +277,7 @@
 	!isEmpty( BSD ): isEmpty( kFreeBSD ){
 		LIBS += -lcrypto -liconv
 	} else {
-		LIBS += -lgnutls-openssl -lgcrypt
+		LIBS += -lgcrypt
 	}
 
 	TARGETDEPS += ./lib/libpokerth_lib.a \
Only in PokerTH-0.8.3-src: qrc_pokerth.cpp
diff -ur PokerTH-0.8.3-src-foo/src/core/common/crypthelper.cpp PokerTH-0.8.3-src/src/core/common/crypthelper.cpp
--- PokerTH-0.8.3-src-foo/src/core/common/crypthelper.cpp	2011-01-16 14:36:15.000000000 -0500
+++ PokerTH-0.8.3-src/src/core/common/crypthelper.cpp	2011-10-02 14:31:02.616044597 -0400
@@ -170,13 +170,13 @@
 	{
 		// Calculate MD5 sum of file.
 		unsigned char readBuf[8192];
-		MD5_CTX context;
+		gcry_md_hd_t context;
 		int numBytes;
 
-		MD5_Init(&context);
+		gcry_md_open(&context, GCRY_MD_MD5, 0);
 		while ((numBytes = fread(readBuf, 1, sizeof(readBuf), file)) > 0)
-			MD5_Update(&context, readBuf, numBytes);
-		MD5_Final(buf.GetData(), &context);
+			gcry_md_write(context, readBuf, numBytes);
+		memcpy(buf.m_data, gcry_md_read(context, GCRY_MD_MD5), 16);
 		retVal = ferror(file) == 0;
 
 		fclose(file);
diff -ur PokerTH-0.8.3-src-foo/src/core/crypthelper.h PokerTH-0.8.3-src/src/core/crypthelper.h
--- PokerTH-0.8.3-src-foo/src/core/crypthelper.h	2011-01-16 14:36:15.000000000 -0500
+++ PokerTH-0.8.3-src/src/core/crypthelper.h	2011-10-02 14:27:27.572863717 -0400
@@ -56,7 +56,7 @@
 	virtual const unsigned char *GetData() const;
 	virtual int GetDataSize() const;
 
-private:
+	//private:
 	unsigned char m_data[MD5_DATA_SIZE];
 };
 
diff -ur PokerTH-0.8.3-src-foo/src/core/openssl_wrapper.h PokerTH-0.8.3-src/src/core/openssl_wrapper.h
--- PokerTH-0.8.3-src-foo/src/core/openssl_wrapper.h	2011-01-16 14:36:15.000000000 -0500
+++ PokerTH-0.8.3-src/src/core/openssl_wrapper.h	2011-10-02 12:40:20.431586507 -0400
@@ -68,7 +68,7 @@
 	#include <openssl/evp.h>
 #else
 	// For all other systems, we use GnuTLS.
-	#include <gnutls/openssl.h>
+//	#include <gnutls/openssl.h>
 	#include <gcrypt.h>
 	#define PKTH_USE_GNUTLS
 #endif
diff -ur PokerTH-0.8.3-src-foo/src/engine/local_engine/tools.cpp PokerTH-0.8.3-src/src/engine/local_engine/tools.cpp
--- PokerTH-0.8.3-src-foo/src/engine/local_engine/tools.cpp	2011-01-16 14:36:20.000000000 -0500
+++ PokerTH-0.8.3-src/src/engine/local_engine/tools.cpp	2011-10-02 13:39:53.801305014 -0400
@@ -39,9 +39,9 @@
 
 		for (i=0; i<howMany; i++) {
 
-			if(!RAND_bytes(rand_buf, 4))
+		  if(!memcpy(rand_buf, gcry_random_bytes(4, GCRY_STRONG_RANDOM), 4))
 			{
-				LOG_MSG("RAND_bytes failed!");
+				LOG_MSG("gcry_random_bytes failed!");
 			}
 
 			randNumber = 0;
@@ -69,9 +69,9 @@
 		int counter(0);
 		while (counter < howMany) {
 
-			if(!RAND_bytes(rand_buf, 4))
+		  if(!memcpy(rand_buf, gcry_random_bytes(4, GCRY_STRONG_RANDOM), 4))
 			{
-				LOG_MSG("RAND_bytes failed!");
+				LOG_MSG("gcry_random_bytes failed!");
 			}
 
 			randNumber = 0;
diff -ur PokerTH-0.8.3-src-foo/src/net/common/socket_startup.cpp PokerTH-0.8.3-src/src/net/common/socket_startup.cpp
--- PokerTH-0.8.3-src-foo/src/net/common/socket_startup.cpp	2011-01-16 14:36:14.000000000 -0500
+++ PokerTH-0.8.3-src/src/net/common/socket_startup.cpp	2011-10-02 13:41:57.278822678 -0400
@@ -75,7 +75,7 @@
 	gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_boost);
 	gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);
 #endif
-	return SSL_library_init() == 1;
+	//return SSL_library_init() == 1;
 }
 
 void
Only in PokerTH-0.8.3-src: uics