Skip to content

Conversation

@markusthoemmes
Copy link
Contributor

Much like appending to ca-certificates.crt, this adds support for adding additional certificates to JKS files so that Java can use the additional certificates as well. The behavior is the same in that only existing truststore files will be appended to and the process is otherwise skipped entirely.

Much like appending to ca-certificates.crt, this adds support for adding additional certificates to JKS files so that Java can use the additional certificates as well. The behavior is the same in that only existing truststore files will be appended to and the process is otherwise skipped entirely.
Copy link

@konradzapalowicz konradzapalowicz left a comment

Choose a reason for hiding this comment

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

I like the code, it plugs nicely into the existing implementation. I've left feedback related to understanding how the corner cases are expected to be handled where I felt I needed additional clarity. Thanks for coding it ⭐

}

// Default password for Java cacerts truststore.
javaTruststorePassword = []byte("changeit")

Choose a reason for hiding this comment

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

should it be changed now and if not then could you expand the docs and write when

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the default truststore password, it's not a prompt to change it in the future.

}

// Write all modified Java truststores back to disk.
for _, ts := range existingTruststores {

Choose a reason for hiding this comment

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

it feels that this could be a private func, wouldn't testing benefit from that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see testing benefiting from that tbh. I've only externalized loadJavaTruststores for scoping reasons.

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.

2 participants