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

Replace usage of OSCoreCtx(from cf) by OscoreSeting in SecurityInfo #1208

Closed
wants to merge 2 commits into from

Conversation

sbernard31
Copy link
Contributor

@sbernard31 sbernard31 commented Feb 21, 2022

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)

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>
Comment on lines +55 to +61
public Integer getAeadAlgorithm() {
return aeadAlgorithm;
}

public Integer getHmacAlgorithm() {
return hmacAlgorithm;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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


private static OSCoreCtx getContext(OscoreSetting oscoreSetting) {
try {
OSCoreCtx osCoreCtx = new OSCoreCtx(oscoreSetting.getMasterSecret(), true,
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'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 🤔 )

Copy link
Contributor

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.

Copy link
Contributor

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.

sbernard31 pushed a commit that referenced this pull request Mar 23, 2022
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
@sbernard31
Copy link
Contributor Author

This is now integrated in oscore branch (commit 992b356)

@sbernard31 sbernard31 closed this Mar 23, 2022
sbernard31 pushed a commit that referenced this pull request Apr 28, 2022
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
@sbernard31 sbernard31 deleted the oscore_setting branch April 28, 2022 15:59
sbernard31 pushed a commit that referenced this pull request May 12, 2022
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
sbernard31 pushed a commit that referenced this pull request Jun 7, 2022
Signed-off-by: Michał Wadowski <Michal.Wadowski@orange.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
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