-
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
Replace usage of OSCoreCtx(from cf) by OscoreSeting in SecurityInfo #1208
Conversation
Signed-off-by: Rikard Höglund <rikard.hoglund@ri.se> Also-by: Simon Bernard <sbernard@sierrawireless.com> Also-by: Michał Wadowski <Michal.Wadowski@orange.com>
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com> Also-by: Simon Bernard <sbernard@sierrawireless.com>
ec4130b
to
ab5bdab
Compare
public Integer getAeadAlgorithm() { | ||
return aeadAlgorithm; | ||
} | ||
|
||
public Integer getHmacAlgorithm() { | ||
return hmacAlgorithm; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to replace Integer
by dedicated class/enum, like I did in : https://github.com/eclipse/leshan/pull/1204/files#diff-593f0c45e56ce01047c78d607542064f008dda0112d69f3c3097a237c5a0e32cR26
|
||
private static OSCoreCtx getContext(OscoreSetting oscoreSetting) { | ||
try { | ||
OSCoreCtx osCoreCtx = new OSCoreCtx(oscoreSetting.getMasterSecret(), true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure to understand the second argument (boolean) ?
The javadoc says:
* @param client is this originally the client's context
But still not clear to me, I don't know if I should use true or false. (with true or false integration tests seems to be happy 🤔 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the constructor of OSCoreCtx the boolean client
only matters in the case if sender_id or recipient_id is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. That parameter is only relevant if the sender ID and recipient ID is not defined. I think the original intention was for an application the be able to create a very simple OSCORE context for testing.
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com> Also-by: Simon Bernard <sbernard@sierrawireless.com>
This is now integrated in |
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com> Also-by: Simon Bernard <sbernard@sierrawireless.com>
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com> Also-by: Simon Bernard <sbernard@sierrawireless.com>
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com> Also-by: Simon Bernard <sbernard@sierrawireless.com>
I cherry-pick some @Michal-Wadowski's improvement from #1175.
Which should allow to start to work on support of Oscore in server demos. (#1204)