Skip to content
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

Remove cert pinning from the SDK #537

Merged
merged 3 commits into from
Apr 29, 2024
Merged

Conversation

joshafeinberg
Copy link
Member

No description provided.

Copy link
Contributor

@devPalacio devPalacio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also remove:

  • processResources { task ->
    filesMatching('**/*.crt') { fcd ->
    def inputstream = fcd.open()
    def certDatas = com.dropbox.maven.pem_converter.PemLoader.load(
    new InputStreamReader(inputstream, "UTF-8")
    )
    inputstream.close()
    def crtPath = fcd.getPath()
    def rawPath = crtPath.substring(0, crtPath.length() - 4) + ".raw"
    def rawFile = new File(task.getDestinationDir(), rawPath);
    rawFile.getParentFile().mkdirs();
    def out = new DataOutputStream(new FileOutputStream(rawFile))
    com.dropbox.maven.pem_converter.RawLoader.store(certDatas, out)
    out.close()
    fcd.exclude()
    }
    }
    • Used to convert cert to raw format, no longer needed
  • https://github.com/dropbox/dropbox-sdk-java/tree/main/gradle/dropbox-pem-converter-plugin/com/dropbox/maven/pem_converter
    • used by processResources, also no longer needed

@wdziemia
Copy link
Contributor

Could you also remove:

  • processResources { task ->
    filesMatching('**/*.crt') { fcd ->
    def inputstream = fcd.open()
    def certDatas = com.dropbox.maven.pem_converter.PemLoader.load(
    new InputStreamReader(inputstream, "UTF-8")
    )
    inputstream.close()
    def crtPath = fcd.getPath()
    def rawPath = crtPath.substring(0, crtPath.length() - 4) + ".raw"
    def rawFile = new File(task.getDestinationDir(), rawPath);
    rawFile.getParentFile().mkdirs();
    def out = new DataOutputStream(new FileOutputStream(rawFile))
    com.dropbox.maven.pem_converter.RawLoader.store(certDatas, out)
    out.close()
    fcd.exclude()
    }
    }

    • Used to convert cert to raw format, no longer needed
  • https://github.com/dropbox/dropbox-sdk-java/tree/main/gradle/dropbox-pem-converter-plugin/com/dropbox/maven/pem_converter

    • used by processResources, also no longer needed

@devPalacio Can the crt also be dropped?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wdziemia crt is already deleted :)

@joshafeinberg joshafeinberg merged commit d5e243d into main Apr 29, 2024
3 checks passed
@joshafeinberg joshafeinberg deleted the jfein/remove-cert-pinning branch April 29, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants