Skip to content

Instantly share code, notes, and snippets.

@kotx
Last active July 9, 2024 22:41
Show Gist options
  • Save kotx/28d7f95a811167e6c875595947fee150 to your computer and use it in GitHub Desktop.
Save kotx/28d7f95a811167e6c875595947fee150 to your computer and use it in GitHub Desktop.
Cryptomator without the license key checks
diff --git a/domain/src/main/java/org/cryptomator/domain/usecases/DoLicenseCheck.java b/domain/src/main/java/org/cryptomator/domain/usecases/DoLicenseCheck.java
index dd624e0..caa8ce9 100644
--- a/domain/src/main/java/org/cryptomator/domain/usecases/DoLicenseCheck.java
+++ b/domain/src/main/java/org/cryptomator/domain/usecases/DoLicenseCheck.java
@@ -43,18 +43,11 @@ public class DoLicenseCheck {
}
public LicenseCheck execute() throws BackendException {
- license = useLicenseOrRetrieveFromDb(license);
- try {
- final Claims claims = Jwts.parserBuilder().setSigningKey(getPublicKey(ANDROID_PUB_KEY)).build().parseClaimsJws(license).getBody();
- return claims::getSubject;
- } catch (JwtException | FatalBackendException e) {
- if (e instanceof SignatureException && isDesktopSupporterCertificate(license)) {
- throw new DesktopSupporterCertificateException(license);
+ return new LicenseCheck() {
+ public String mail() {
+ return "";
}
- throw new LicenseNotValidException(license);
- } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
- throw new FatalBackendException(e);
- }
+ };
}
private String useLicenseOrRetrieveFromDb(String license) throws NoLicenseAvailableException {
DROPBOX_API_KEY = "bf16cwjfe0r54vr"
ONEDRIVE_API_KEY = "b57c3880-c857-4588-b02e-5da3c5b2174c"
ONEDRIVE_API_REDIRCT_URI = "msauth://org.cryptomator/%2FMI0AUvjnpgOvKXEd5IvIxLoDN0%3D"
PCLOUD_CLIENT_ID = "uIVcDmySfxb"
@nusiloot
Copy link

nusiloot commented Jul 9, 2024

Doesn't seem to work anymore, too bad.
Thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment