-
Notifications
You must be signed in to change notification settings - Fork 370
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
NPE in serverHandshaker. #1245
Comments
Reading rfc5246§7.4.4, I would say this is an issue in the code.
|
@boaks if you ok I will provide a fix with a null check tomorrow ? |
I would prefer to adapt the javadoc of the I had X509TrustManager.getAcceptedIssuers() in mind, when I implemented it. And so I also defined DtlsConnectorConfig.Builder.setTrustStore accordingly. Empty array = trust all, don't send issuers. |
The RFC just defines, that a empty list is valid (in my experience, especially for systems, which supports many self-signed certificates, that's the only way to go). |
We agree that the rfc just says that the list can be empty. So allow null and/or empty is an API question. For trustStore I can understand :
But for ceritifcateVerifier I don't get the benefits to force implementer to return an empty list for acceptedIssuer ? why not considering null like empty ? |
FMPOV, someone who reads the (corrected :-) )javadoc should be able to provide a empty array instead of |
That also part of the commit introducing the |
About your last comment, I didn't understand could you give me a link to the code ? |
|
I would prefer a "empty array" but if you insist in |
Just to mention: support |
As a user I just respected the javadoc to implement I will not insist, I just don't see (for now) any good argument to not allow About 98675f3#diff-0f4638ef3b80663963d3545f6910623bR173 : I didn't see it as an argument. It could be considered as a bug. About CertPathUtil, I didn't get the point. This is called only by Maybe there is a miss understanding but I see |
There are either bugs in the implementation or the javadoc. As I tried to explain, I'm used to the definitions of the java Trust API, and so my implementation assume a "empty array". Changing that to support
With that we have two bug in the code or one in the javadoc.
If user gets used to use the |
I don't see this cost as
I don't see that as those lines of code seems to not exist anymore.
I disagree as I don't consider this is similar cases. Again I understand your choice for truststore but here this is different to me. But anyway I don't think this details deserve more time, do what you prefer. |
OK, so I go for change/adapt the javadoc. |
If
CertificateVerifier.getAcceptedIssuers()
returns null this generate an NPE.The javadoc says :
So there is bug either in javadoc or in the code ?
My bet is that allowing null make sense as it seems optional to me to provide AcceptedIssuers. (I should double check this)
If there is a bug in the code we should fix it for the 2.2. (#1244)
The text was updated successfully, but these errors were encountered: