This commit is contained in:
Sha Dak 2019-05-11 22:11:30 +00:00
parent 895416fc1f
commit 69b8d6dd30
7 changed files with 28 additions and 28 deletions

View file

@ -149,12 +149,12 @@ namespace config {
options_description dotnetcontrol("DotNetControl options");
dotnetcontrol.add_options()
("dotnetcontrol.enabled", value<bool>()->default_value(false), "Enable or disable DOTNET Control Protocol")
("dotnetcontrol.address", value<std::string>()->default_value("127.0.0.1"), "DOTNETCP listen address")
("dotnetcontrol.port", value<uint16_t>()->default_value(55505), "DOTNETCP listen port")
("dotnetcontrol.password", value<std::string>()->default_value("dotnet"), "DOTNETCP access password")
("dotnetcontrol.cert", value<std::string>()->default_value("dotnetcontrol.crt.pem"), "DOTNETCP connection certificate")
("dotnetcontrol.key", value<std::string>()->default_value("dotnetcontrol.key.pem"), "DOTNETCP connection certificate key")
("dotnetcontrol.enabled", value<bool>()->default_value(false), "Enable or disable .NET Control Protocol")
("dotnetcontrol.address", value<std::string>()->default_value("127.0.0.1"), "DNCP listen address")
("dotnetcontrol.port", value<uint16_t>()->default_value(55505), "DNCP listen port")
("dotnetcontrol.password", value<std::string>()->default_value("dotnet"), "DNCP access password")
("dotnetcontrol.cert", value<std::string>()->default_value("dotnetcontrol.crt.pem"), "DNCP connection certificate")
("dotnetcontrol.key", value<std::string>()->default_value("dotnetcontrol.key.pem"), "DNCP connection certificate key")
;
bool upnp_default = false;

View file

@ -53,7 +53,7 @@ namespace fs {
if(!GetModuleFileName(NULL, localAppData, MAX_PATH))
{
#if defined(WIN32_APP)
MessageBox(NULL, TEXT("Unable to get application path!"), TEXT("DOTNET: error"), MB_ICONERROR | MB_OK);
MessageBox(NULL, TEXT("Unable to get application path!"), TEXT(".NET: error"), MB_ICONERROR | MB_OK);
#else
fprintf(stderr, "Error: Unable to get application path!");
#endif
@ -71,7 +71,7 @@ namespace fs {
if(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, localAppData) != S_OK)
{
#if defined(WIN32_APP)
MessageBox(NULL, TEXT("Unable to get AppData path!"), TEXT("DOTNET: error"), MB_ICONERROR | MB_OK);
MessageBox(NULL, TEXT("Unable to get AppData path!"), TEXT(".NET: error"), MB_ICONERROR | MB_OK);
#else
fprintf(stderr, "Error: Unable to get AppData path!");
#endif

View file

@ -337,8 +337,8 @@ namespace data
{
uint16_t stA = htobe16 (GetSigType ()), stA1 = htobe16 (GetBlindedSigType ());
uint8_t salt[32];
//seed = HKDF(H("DOTNETGenerateAlpha", keydata), datestring || secret, "dotnetblinding1", 64)
H ("DOTNETGenerateAlpha", { {GetPublicKey (), GetPublicKeyLen ()}, {(const uint8_t *)&stA, 2}, {(const uint8_t *)&stA1, 2} }, salt);
//seed = HKDF(H("DotNetGenerateAlpha", keydata), datestring || secret, "dotnetblinding1", 64)
H ("DotNetGenerateAlpha", { {GetPublicKey (), GetPublicKeyLen ()}, {(const uint8_t *)&stA, 2}, {(const uint8_t *)&stA1, 2} }, salt);
dotnet::crypto::HKDF (salt, (const uint8_t *)date, 8, "dotnetblinding1", seed);
}