summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-09 22:56:56 +0200
committerGitHub <noreply@github.com>2018-10-09 22:56:56 +0200
commit89939be9e6c455f851978eb27d3ecb201c0f32be (patch)
treebb00ae611ae39a09f03e154040613b92c35460c9 /src
parentMerge pull request #1462 from lioncash/move (diff)
parenttelemetry_session: Remove doxygen comment for a non-existent parameter (diff)
downloadyuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.tar
yuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.tar.gz
yuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.tar.bz2
yuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.tar.lz
yuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.tar.xz
yuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.tar.zst
yuzu-89939be9e6c455f851978eb27d3ecb201c0f32be.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/telemetry_session.cpp12
-rw-r--r--src/core/telemetry_session.h4
2 files changed, 9 insertions, 7 deletions
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index f29fff1e7..7b04792b5 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -2,12 +2,16 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <array>
+
+#include <mbedtls/ctr_drbg.h>
+#include <mbedtls/entropy.h>
+
#include "common/assert.h"
#include "common/common_types.h"
#include "common/file_util.h"
+#include "common/logging/log.h"
-#include <mbedtls/ctr_drbg.h>
-#include <mbedtls/entropy.h>
#include "core/core.h"
#include "core/file_sys/control_metadata.h"
#include "core/file_sys/patch_manager.h"
@@ -28,11 +32,11 @@ static u64 GenerateTelemetryId() {
mbedtls_entropy_context entropy;
mbedtls_entropy_init(&entropy);
mbedtls_ctr_drbg_context ctr_drbg;
- std::string personalization = "yuzu Telemetry ID";
+ constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}};
mbedtls_ctr_drbg_init(&ctr_drbg);
ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
- reinterpret_cast<const unsigned char*>(personalization.c_str()),
+ reinterpret_cast<const unsigned char*>(personalization.data()),
personalization.size()) == 0);
ASSERT(mbedtls_ctr_drbg_random(&ctr_drbg, reinterpret_cast<unsigned char*>(&telemetry_id),
sizeof(u64)) == 0);
diff --git a/src/core/telemetry_session.h b/src/core/telemetry_session.h
index cec271df0..2a4845797 100644
--- a/src/core/telemetry_session.h
+++ b/src/core/telemetry_session.h
@@ -5,6 +5,7 @@
#pragma once
#include <memory>
+#include <string>
#include "common/telemetry.h"
namespace Core {
@@ -30,8 +31,6 @@ public:
field_collection.AddField(type, name, std::move(value));
}
- static void FinalizeAsyncJob();
-
private:
Telemetry::FieldCollection field_collection; ///< Tracks all added fields for the session
std::unique_ptr<Telemetry::VisitorInterface> backend; ///< Backend interface that logs fields
@@ -53,7 +52,6 @@ u64 RegenerateTelemetryId();
* Verifies the username and token.
* @param username yuzu username to use for authentication.
* @param token yuzu token to use for authentication.
- * @param func A function that gets exectued when the verification is finished
* @returns Future with bool indicating whether the verification succeeded
*/
bool VerifyLogin(const std::string& username, const std::string& token);