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

Update smbj and bouncy castle to support SMBv3 #182

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Conversation

ekelly-1898
Copy link
Contributor

Description

Upgrade SMBJ to support SMBv3.

Motivation and Context

Explanation of why these changes are being proposed, including any links to other relevant issues or pull requests.

How Has This Been Tested?

Integration tests succeed.

compliance-r7
compliance-r7 previously approved these changes Apr 24, 2024
Copy link

@compliance-r7 compliance-r7 left a comment

Choose a reason for hiding this comment

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

Only pom.xml has changed, approved!

mgrundie-r7
mgrundie-r7 previously approved these changes Apr 29, 2024
rkirk-r7
rkirk-r7 previously approved these changes Apr 30, 2024
@pwatson-r7 pwatson-r7 closed this Sep 11, 2024
@pwatson-r7 pwatson-r7 reopened this Sep 11, 2024
@pwatson-r7 pwatson-r7 closed this Sep 11, 2024
@pwatson-r7 pwatson-r7 reopened this Sep 12, 2024
pwatson-r7 and others added 2 commits September 12, 2024 09:12
removed temporary identifier
Replaced bouncy castle hex function with functionality from guava that we use for other functions
Copy link
Collaborator

@rkirk-r7 rkirk-r7 left a comment

Choose a reason for hiding this comment

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

looks good to me although struggling to follow the uppercasing requirements

@@ -76,7 +76,7 @@ public static ContextHandle fromHex(final String hString) {
if (hString == null || hString.length() > (bytes.length * 2)) {
throw new IllegalArgumentException("hString is invalid: " + hString);
}
final byte[] handle = Hex.decode(hString);
final byte[] handle = BaseEncoding.base16().decode(hString.toUpperCase());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it require being upper case to decode then? As we are not obviously uppercasing in the other usages

Copy link
Contributor

@pwatson-r7 pwatson-r7 Sep 13, 2024

Choose a reason for hiding this comment

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

The BaseEncoding encodes and decodes using uppercase characters by default.
BaseEncoding.base16().decode

@@ -132,7 +135,7 @@ public String getDataAsBinaryStr() {
}

public String getDataAsHexStr() {
return Hex.toHexString(data).toUpperCase();
return BaseEncoding.base16().encode(data); //Hex.toHexString(data).toUpperCase();
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove comment

Should this still uppercase the encoded data or is that defaulted to?

Copy link
Contributor

Choose a reason for hiding this comment

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

it defaults to uppercase
Base Encoding

@pwatson-r7 pwatson-r7 merged commit 1020389 into master Sep 13, 2024
9 checks passed
@pwatson-r7 pwatson-r7 deleted the upgrade-smbj branch September 13, 2024 10:05
@pwatson-r7 pwatson-r7 restored the upgrade-smbj branch September 13, 2024 13:32
@pwatson-r7 pwatson-r7 deleted the upgrade-smbj branch September 13, 2024 13:33
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.

6 participants