Skip to content

Instantly share code, notes, and snippets.

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

CogniCrypt (report 28) for EteSync

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

  • Method: build

  • Line: 232

  • Issue details: ConstraintError-1

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

    • First parameter (with value \TLS) should be any of {TLSv1.2, TLSv1.3}.

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