-
Notifications
You must be signed in to change notification settings - Fork 408
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
trustedCertificates from LeshanServerBuilder doesn't allow subtypes of Certificate #418
Comments
it sounds a good idea. I suppose if we change this for I look at the underlying DTLS library (scandium) and it seems that only X509Certificate (and subclasses) was supported. Maybe we should change |
Sounds perfect, I'll upload a pull request later. |
I didn't change the type of |
API break is not really an issue, if we really think the new one is better. You previously talk about using I don't know what could be the best choice,
|
The reason was to not break API compatibility, do you think it would be better to use the list? I would be happy to switch it. |
Is there a reason why you would want to change the trust anchor (the argument for using a |
what do you mean by "once it has been established" ? |
Well, the trust anchor is explicitly configured by a user of the library, i.e. the user establishes the trust anchor by setting the |
Ok I see. Often in leshan we use 2 kinds of signature (collection+vargs) for convenience : public LwM2mObject(int id, Collection<LwM2mObjectInstance> instances) {
}
public LwM2mObject(int id, LwM2mObjectInstance... instances) {
} I don't know if is it worth it ? |
It seems there is no strong reason/opinion to go to collection for now. This is not set in stone and could be changed later if needed. |
…anServerBuilder Signed-off-by: Alexis Hernandez <alexis22229@gmail.com>
Fixed by #419 |
Problem:
The field LeshanServerBuilder#trustedCertificates doesn't allow to specify subtypes of
Certificate
, I need to cast my types just to comply with value type.Solution
Modify the field to type to allow subtypes of Certificate, one way could be to use
List<? extends Certificate> trustedCertificates
.We could keep backwards compatibility, in case this is viable, I can upload a pull request with the changes.
The text was updated successfully, but these errors were encountered: