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

Extract method in SelfSigned #411

Merged
merged 1 commit into from
Sep 21, 2018
Merged

Conversation

ignasi35
Copy link
Contributor

This is a noop change. extracts a method in preparation for a refactor that will eventually move this code to ssl-config.

Copy link
Contributor

@raboof raboof left a comment

Choose a reason for hiding this comment

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

OK if travis agrees

Copy link
Member

@johanandren johanandren left a comment

Choose a reason for hiding this comment

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

LGTM, I guess

@ignasi35
Copy link
Contributor Author

The plan is to move the extracted function away so that we can build SSLContext (et al.) given any keystore. I think this could eventually be part of a new testkit module in https://github.com/lightbend/ssl-config

There is quite a few places/projects that have very similar needs (fake certs, trust stores built on-the-fly,...).

The long term effort would solve #89

Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

👍

@ignasi35 ignasi35 self-assigned this Sep 21, 2018
@octonato octonato merged commit 78cd120 into akka:master Sep 21, 2018
@octonato
Copy link
Member

Travis said yes!

tmf.init(keyStore)
val tms: Array[TrustManager] = tmf.getTrustManagers
val x509TrustManager: X509TrustManager = tms(0).asInstanceOf[X509TrustManager]

val kmf: KeyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm)
Copy link
Member

Choose a reason for hiding this comment

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

@ignasi35 was the change from "SunX509" to KeyManagerFactory.getDefaultAlgorithm intentional?

Copy link
Member

Choose a reason for hiding this comment

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

Moreover, is it significant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was intentional and I think it's not significant.

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.

5 participants