Rebuild for v2.4.0

This commit is contained in:
Iwan Timmer
2017-06-14 20:02:50 +00:00
parent 4897338b94
commit a3e01d5c93
6 changed files with 85 additions and 36 deletions

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
moonlight-embedded (2.4.0-1jessie1) RELEASED; urgency=medium
* Update to version 2.4.0
-- Iwan Timmer <irtimmer@gmail.com> Sun, 11 Jun 2017 17:56:38 +0000
moonlight-embedded (2.3.0-1jessie1) RELEASED; urgency=medium
* Update to version 2.3.0

2
debian/control vendored
View File

@@ -2,7 +2,7 @@ Source: moonlight-embedded
Section: games
Priority: extra
Maintainer: Iwan Timmer <irtimmer@gmail.com>
Build-Depends: debhelper (>= 8.0.0), quilt, cmake, uuid-dev, libenet-dev, libopus-dev, libexpat1-dev, libasound2-dev, libudev-dev, libavahi-client-dev, libssl-dev, libcurl4-openssl-dev, libevdev-dev, libraspberrypi-dev | rbp-userland-dev-osmc
Build-Depends: debhelper (>= 8.0.0), quilt, cmake, uuid-dev, libenet-dev, libopus-dev, libexpat1-dev, libasound2-dev, libudev-dev, libavahi-client-dev, libssl-dev, libcurl4-openssl-dev, libevdev-dev, libcec4-dev, libraspberrypi-dev | rbp-userland-dev-osmc
Standards-Version: 3.9.3
Homepage: https://github.com/irtimmer/moonlight-embedded

12
debian/patches/c99.patch vendored Normal file
View File

@@ -0,0 +1,12 @@
Index: moonlight-embedded/libgamestream/CMakeLists.txt
===================================================================
--- moonlight-embedded.orig/libgamestream/CMakeLists.txt
+++ moonlight-embedded/libgamestream/CMakeLists.txt
@@ -16,6 +16,7 @@ aux_source_directory(../third_party/moon
aux_source_directory(../third_party/moonlight-common-c/reedsolomon MOONLIGHT_COMMON_SRC_LIST)
add_library(moonlight-common SHARED ${MOONLIGHT_COMMON_SRC_LIST})
+set_property(TARGET moonlight-common PROPERTY C_STANDARD 99)
add_library(gamestream SHARED ${GAMESTREAM_SRC_LIST})
set_property(TARGET gamestream PROPERTY C_STANDARD 99)

View File

@@ -1,34 +0,0 @@
Compile using older version (3.0) of CMake
Index: moonlight-embedded-debian/CMakeLists.txt
===================================================================
--- moonlight-embedded-debian.orig/CMakeLists.txt
+++ moonlight-embedded-debian/CMakeLists.txt
@@ -1,5 +1,5 @@
project(moonlight-embedded C)
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.0)
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(${CMAKE_ROOT}/Modules/GNUInstallDirs.cmake)
@@ -82,7 +82,7 @@ add_subdirectory(libgamestream)
add_executable(moonlight ${SRC_LIST})
target_link_libraries(moonlight gamestream)
-set_property(TARGET moonlight PROPERTY C_STANDARD 99)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
if (CEC_FOUND)
list(APPEND MOONLIGHT_DEFINITIONS HAVE_LIBCEC)
Index: moonlight-embedded-debian/libgamestream/CMakeLists.txt
===================================================================
--- moonlight-embedded-debian.orig/libgamestream/CMakeLists.txt
+++ moonlight-embedded-debian/libgamestream/CMakeLists.txt
@@ -15,7 +15,7 @@ aux_source_directory(../third_party/moon
add_library(moonlight-common SHARED ${MOONLIGHT_COMMON_SRC_LIST})
add_library(gamestream SHARED ${GAMESTREAM_SRC_LIST})
-set_property(TARGET gamestream PROPERTY C_STANDARD 99)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
target_link_libraries(gamestream moonlight-common)
set_target_properties(gamestream PROPERTIES SOVERSION 0 VERSION ${MOONLIGHT_VERSION})

64
debian/patches/openssl.patch vendored Normal file
View File

@@ -0,0 +1,64 @@
diff --git b/libgamestream/mkcert.c a/libgamestream/mkcert.c
index 6dfc1c2..4ced6f6 100644
--- b/libgamestream/mkcert.c
+++ a/libgamestream/mkcert.c
@@ -103,9 +103,6 @@ int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years) {
} else {
x = *x509p;
}
-
- if ((rsa = RSA_new()) == NULL)
- goto err;
BIGNUM* bne = BN_new();
if (bne == NULL) {
diff --git b/libgamestream/client.c a/libgamestream/client.c
index bc6c020..2d547ce 100644
--- b/libgamestream/client.c
+++ a/libgamestream/client.c
@@ -494,15 +494,12 @@ int gs_pair(PSERVER_DATA server, char* pin) {
char client_secret_data[16];
RAND_bytes(client_secret_data, 16);
- const ASN1_BIT_STRING *asnSignature;
- X509_get0_signature(&asnSignature, NULL, cert);
-
char challenge_response[16 + 256 + 16];
char challenge_response_hash[32];
char challenge_response_hash_enc[32];
char challenge_response_hex[65];
memcpy(challenge_response, challenge_response_data + hash_length, 16);
- memcpy(challenge_response + 16, asnSignature->data, 256);
+ memcpy(challenge_response + 16, cert->signature->data, 256);
memcpy(challenge_response + 16 + 256, client_secret_data, 16);
if (server->serverMajorVersion >= 7)
SHA256(challenge_response, 16 + 256 + 16, challenge_response_hash);
diff --git b/libgamestream/mkcert.c a/libgamestream/mkcert.c
index e3f6b9e..b0d5e5a 100644
--- b/libgamestream/mkcert.c
+++ a/libgamestream/mkcert.c
@@ -18,7 +18,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <openssl/crypto.h>
#include <openssl/pem.h>
#include <openssl/conf.h>
#include <openssl/pkcs12.h>
@@ -43,7 +42,7 @@ CERT_KEY_PAIR mkcert_generate() {
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
- OpenSSL_add_all_algorithms();
+ SSLeay_add_all_algorithms();
ERR_load_crypto_strings();
mkcert(&x509, &pkey, NUM_BITS, SERIAL, NUM_YEARS);
@@ -55,6 +54,7 @@ CERT_KEY_PAIR mkcert_generate() {
#endif
CRYPTO_cleanup_all_ex_data();
+ CRYPTO_mem_leaks(bio_err);
BIO_free(bio_err);
return (CERT_KEY_PAIR) {x509, pkey, p12};

View File

@@ -1 +1,2 @@
install.patch
c99.patch
openssl.patch