Skip to content

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Aug 14, 2023

The previous version used ml-gradle 3.x and Java Client 4. With ml-gradle 4.x using Java Client 5 and higher, an X509TrustManager must be explicitly provided (has to do with the Java Client changing from using Apache HTTP to OkHttp between major versions 4 and 5). Setting restTrustManager accomplishes that.

Also had to bump up the SSL version to the standard TLSv1.2.

This project will receive more updates soon so that it is easier to test with.

The previous version used ml-gradle 3.x and Java Client 4. With ml-gradle 4.x using Java Client 5 and higher, an X509TrustManager must be explicitly provided (has to do with the Java Client changing from using Apache HTTP to OkHttp between major versions 4 and 5). Setting `restTrustManager` accomplishes that. 

Also had to bump up the SSL version to the standard TLSv1.2.

This project will receive more updates soon so that it is easier to test with.
@rjrudin rjrudin requested a review from BillFarber August 14, 2023 19:41
sslContext.init(key, trust, null)

restSslContext = sslContext
restTrustManager = trust[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for trust to be an empty array?

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 believe that would require using a JVM with an empty cacerts file with no trust managers. That seems very unlikely, and given that this is only example code, that's something a user would get a hard error on - which is probably better than failing by not passing in any trust manager at all.

@rjrudin rjrudin merged commit cd72487 into dev Aug 14, 2023
@rjrudin rjrudin deleted the feature/2way-clean branch August 14, 2023 20:10
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