-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conversation
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.
Only pom.xml has changed, approved!
b24506a
removed temporary identifier
Replaced bouncy castle hex function with functionality from guava that we use for other functions
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.
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()); |
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.
Does it require being upper case to decode then? As we are not obviously uppercasing in the other usages
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.
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(); |
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.
remove comment
Should this still uppercase the encoded data or is that defaulted to?
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.
it defaults to uppercase
Base Encoding
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.