summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-07-12 19:52:32 +0100
committerfireice-uk <fireice-uk@users.noreply.github.com>2017-07-12 19:52:32 +0100
commit2eeeac6b46e002ed62044c37ef7788354c3002c3 (patch)
tree73d5fb9e4bcebe6670670217b2ec6a8cc5a12fa1
parent74c691470c57f447e3c1c118c4a4ee4bc366f2ff (diff)
downloadxmr-stak-2eeeac6b46e002ed62044c37ef7788354c3002c3.zip
xmr-stak-2eeeac6b46e002ed62044c37ef7788354c3002c3.tar.gz
AES override feature
-rw-r--r--config.txt10
-rw-r--r--jconf.cpp16
2 files changed, 20 insertions, 6 deletions
diff --git a/config.txt b/config.txt
index 98675a2..cb15fb9 100644
--- a/config.txt
+++ b/config.txt
@@ -77,6 +77,16 @@ null,
"nicehash_nonce" : false,
/*
+ * Manual hardware AES override
+ *
+ * Some VMs don't report AES capability correctly. You can set this value to true to make the miner use hardware
+ * AES or to false to make it use software AES.
+ *
+ * WARNING: setting this to true on a CPU that doesn't support hardware AES will crash the miner.
+ */
+"aes_override" : null,
+
+/*
* TLS Settings
* If you need real security, make sure tls_secure_algo is enabled (otherwise MITM attack can downgrade encryption
* to trivially breakable stuff like DES and MD5), and verify the server's fingerprint through a trusted channel.
diff --git a/jconf.cpp b/jconf.cpp
index 3457ed9..4ac4c13 100644
--- a/jconf.cpp
+++ b/jconf.cpp
@@ -45,7 +45,7 @@ using namespace rapidjson;
/*
* This enum needs to match index in oConfigValues, otherwise we will get a runtime error
*/
-enum configEnum { aCpuThreadsConf, sUseSlowMem, bNiceHashMode,
+enum configEnum { aCpuThreadsConf, sUseSlowMem, bNiceHashMode, bAesOverride,
bTlsMode, bTlsSecureAlgo, sTlsFingerprint, sPoolAddr, sWalletAddr, sPoolPwd,
iCallTimeout, iNetRetry, iGiveUpLimit, iVerboseLevel, iAutohashTime,
bDaemonMode, sOutputFile, iHttpdPort, bPreferIpv4 };
@@ -62,6 +62,7 @@ configVal oConfigValues[] = {
{ aCpuThreadsConf, "cpu_threads_conf", kNullType },
{ sUseSlowMem, "use_slow_memory", kStringType },
{ bNiceHashMode, "nicehash_nonce", kTrueType },
+ { bAesOverride, "aes_override", kNullType },
{ bTlsMode, "use_tls", kTrueType },
{ bTlsSecureAlgo, "tls_secure_algo", kTrueType },
{ sTlsFingerprint, "tls_fingerprint", kStringType },
@@ -453,11 +454,14 @@ bool jconf::parse_config(const char* sFilename)
printer::inst()->set_verbose_level(prv->configValues[iVerboseLevel]->GetUint64());
- if(!NeedsAutoconf())
- {
- if(!bHaveAes)
- printer::inst()->print_msg(L0, "Your CPU doesn't support hardware AES. Don't expect high hashrates.");
- }
+ if(NeedsAutoconf())
+ return true;
+
+ if(prv->configValues[bAesOverride]->IsBool())
+ bHaveAes = prv->configValues[bAesOverride]->GetBool();
+
+ if(!bHaveAes)
+ printer::inst()->print_msg(L0, "Your CPU doesn't support hardware AES. Don't expect high hashrates.");
return true;
}
OpenPOWER on IntegriCloud