Skip to content

Instantly share code, notes, and snippets.

@misterAnderson90
Created March 31, 2022 14:41
Show Gist options
  • Save misterAnderson90/f6abffd18a8e09ffddc8330b47b49911 to your computer and use it in GitHub Desktop.
Save misterAnderson90/f6abffd18a8e09ffddc8330b47b49911 to your computer and use it in GitHub Desktop.

CogniCrypt (report 25) for EteSync

  • Class: com.etesync.syncadapter.HttpClient$Builder

  • Method: build

  • Line: 233

  • Issue details: RequiredPredicateError-2

    • RequiredPredicateError violating CrySL rule for javax.net.ssl.SSLContext.

    • First parameter was not properly generated as generated Key Managers.

Code

 val sslContext = SSLContext.getInstance("TLS")
 sslContext.init(
      if (keyManager != null) arrayOf(keyManager) else null,
      arrayOf(trustManager),
      null)
 orig.sslSocketFactory(sslContext.socketFactory, trustManager)
 orig.hostnameVerifier(hostnameVerifier)

 return HttpClient(orig.build(), certManager)
}

Questions

  1. How likely might this warning reveal a security threat to this app?

    a. Very unlikely;

    b. Unlikely;

    c. I cannot evaluate this;

    d. Likely;

    e. Very likely;

  2. Are you likely to accept a patch that fixes this particular issue?

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