Group :: Sound
RPM: clementine
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: clementine-1.3.1-libcryptopp-6.patch
Download
Download
From 38c1f8777cecc7b2f91fecbcc48c41479839304b Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Thu, 1 Feb 2018 09:07:51 +0100
Subject: [PATCH] Fix compilation with crypto++ >= 6.0.0 (#5974)
---
src/internet/spotify/spotifyblobdownloader.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/internet/spotify/spotifyblobdownloader.cpp b/src/internet/spotify/spotifyblobdownloader.cpp
index e34577f5d..b6e3f2b64 100644
--- a/src/internet/spotify/spotifyblobdownloader.cpp
+++ b/src/internet/spotify/spotifyblobdownloader.cpp
@@ -42,6 +42,11 @@
#ifdef HAVE_CRYPTOPP
#include <cryptopp/pkcspad.h>
#include <cryptopp/rsa.h>
+
+// Compatibility with cryptocpp >= 6.0.0
+namespace CryptoPP {
+ typedef unsigned char byte;
+}
#endif // HAVE_CRYPTOPP
const char* SpotifyBlobDownloader::kSignatureSuffix = ".sha512";
@@ -189,7 +194,7 @@ bool SpotifyBlobDownloader::CheckSignature(
try {
CryptoPP::ByteQueue bytes;
- bytes.Put(reinterpret_cast<const byte*>(public_key_data.constData()),
+ bytes.Put(reinterpret_cast<const CryptoPP::byte*>(public_key_data.constData()),
public_key_data.size());
bytes.MessageEnd();
@@ -204,9 +209,9 @@ bool SpotifyBlobDownloader::CheckSignature(
actual_filename.remove(kSignatureSuffix);
const bool result = verifier.VerifyMessage(
- reinterpret_cast<const byte*>(file_data[actual_filename].constData()),
+ reinterpret_cast<const CryptoPP::byte*>(file_data[actual_filename].constData()),
file_data[actual_filename].size(),
- reinterpret_cast<const byte*>(
+ reinterpret_cast<const CryptoPP::byte*>(
file_data[signature_filename].constData()),
file_data[signature_filename].size());
qLog(Debug) << "Verifying" << actual_filename << "against"