-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MojeeIO.Exceptions.LicenseException: Mojee license is invalid. #578
Comments
Hmm. I was not able to reproduce. What version of Retype are you using? You can check using the command |
3.0.3, does Mojee require any special windows services to verify license? Or does it fail in case it detects any running software (such as Process hacker?) |
No, nothing special is required. |
No clue then, this is a fresh install, even tried clean reinstalling, just a default example retype.yml and still get the same error, NPM or dotnet doesn't matter. |
I was able to determine that the Mojee license key used within Retype is still valid, so something else is going on inside of the Mojee library. Whatever is happening is super strange. It might be platform specific. We are still investigating. |
Is there any active anti-debugging in your Mojee license protection? Such as scanning for specific .exe either running or installed (IDA Pro/x64dbg/Process Hacker etc)? If not then im not sure what is causing this, maybe because my user account on Windows has full admin rights and is not a "regular" account? |
There is no system scanning for anything in Mojee (or Retype) and user rights would not be a factor either. If you can install Retype, then you have all the rights required. The only thing from your system that Mojee (and Retype) checks is the system date. If the system date is returning a value and that date is earlier than At the moment, we are still uncertain what could be causing the license check failure. I think this is the first license check logic failure we have had. We are still testing and trying to figure out what could be going wrong. |
Afaik .NET has some enforced compliancy for their hashing/crypto functions due to it being used in governments around the world and USA, something about FIPS compliance, maybe on my OS this is disabled, i'm not sure, and your .NET apps require it to be enabled? Or something else inside group policy? Does your licensing system use Clock/NTP Time Sync services to check current dates? I have those disabled(Time Broker). update:I have FIPS compliance disabled, both in GPE and registry To use the group policy setting, open the Group Policy Editor, navigate to Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options, and enable the System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing setting. |
No services are used. Just the If you can run the following C# code (and it returns var dt = System.DateTime.ParseExact("9999-12-31", "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);
System.Console.WriteLine(DateTime.Now < dt ? "PASS" : "FAIL"); Best I can tell, FIPS policy enforcement is not managed within .NET and would be system managed, so there is nothing in Mojee or Retype that is specifically checking for compliance. The .NET standard lib would just be calling out to the system libraries.
This seems like it would create a less restrictive environment, so would be surprising if it is affecting the decrypting, but you never know for sure. Thanks for the Group Policy Editor notes; we are investigating. |
If you are able to run a simple dotnet app, then maybe you could help us determine if the license key validation is a problem within Mojee or Retype. Running the following app will output to the Console either If the string If the 🚀 emoji is output, then the Mojee license key validation is working, which means the Only 3 basic files are required. You can extract the following mojee-test.zip or add the files manually to a project. Then you would just run the command Here are the three separate files within the .zip above. Program.csConsole.WriteLine(MojeeIO.Mojee.Replace(":rocket:")); AppSettings.json{
"Mojee": {
"LicenseKey": "Q3JxcHd2dXR7b3JvcXNxcG5zdG5ydw-Ui5R443SQl/UwhoYzWQ8pEFxrGlGSUJdq94PNu8b/CyLBKWeer8rmw"
}
} mojee-test.csproj<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>mojee_test</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="mojee" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project> You can also add Mojee to any existing .NET app by running the command To create a new Console app and add Mojee, you would run the following commands:
The Mojee license key is configured by adding the appsettings.json file. More details available in the Mojee docs at https://docs.mojee.io/license_key_configuration/. Thanks in advance for the assistance. |
Interesting. Thanks for running the code. This will help us narrow down the root cause. |
This is where exception gets thrown first, formatting is rip.. |
@schizobeyond-tech Just to confirm, if you start the |
|
Thanks for the confirmation. We will still try to reproduce and see if there is anything that can be done with to avoid this crypto requirement, although I suspect not much can be done. We will keep this thread updated with any new information as it becomes available. Thanks again for reporting the exception! |
You can try using libsodium or port of it to C# libsodium-core which should have in-lib implementation for crypto functions instead of calling out to very bloated winapi helper services for crypto https://github.com/ektrah/libsodium-core (not active anymore) |
Thanks for the tip. Retype and Mojee use cryptographic functionality within the .NET We will take a good look at libsodium-core. |
Windows 11 Pro N For Workstation 22H2, fresh instal, tried both NPM and dotnet, running retype start or build produces same error always.
The text was updated successfully, but these errors were encountered: