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

WIP : Add support for GS2 SASL (RFC 5801) #360

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adiaholic
Copy link
Contributor

@adiaholic adiaholic commented Jan 27, 2020

The code currently is shabby, and will be reformatted.
I am making attempts on this issue unit test by unit test.

This PR progress constitutes :

  • ASN.1 DER encoding over GSS-API mechanism's Object Identifier.
  • Finish SASL Mechanism name generation.
  • Generate GSS Tokens for Authentication exchange.
  • SASL Authentication Exhange.
  • Channel bindings.

This is an attempt at solving SMACK-717.

@adiaholic
Copy link
Contributor Author

There is $bouncyCastleVersion in version.gradle

Yes Thanks

@GitCop
Copy link

GitCop commented May 14, 2020

There were the following issues with your Pull Request

  • Commit: d6f0c41

  • Your commit message body contains a line that is longer than 72 characters

  • Commit: 029d762

  • Your commit message body contains a line that is longer than 72 characters

Guidelines are available at https://github.com/igniterealtime/Smack/wiki/Guidelines-for-Smack-Developers-and-Contributors


This message was auto-generated by https://gitcop.com

@@ -10,6 +10,7 @@ dependencies {
compile "org.jxmpp:jxmpp-core:$jxmppVersion"
compile "org.jxmpp:jxmpp-jid:$jxmppVersion"
compile "org.minidns:minidns-core:$miniDnsVersion"
compile "org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion"
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Indentation

gssManager = GSSManager.getInstance();

try {
userName = gssManager.createName(connection.getUser().asEntityBareJid().asEntityBareJidString(),GSSName.NT_USER_NAME);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Missing spaces after comma.
checkstyle will probably let you know of this as well :P

import java.io.InputStream;
import java.io.OutputStream;

public class GssContext implements GSSContext {
Copy link
Member

Choose a reason for hiding this comment

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

Having classes with names that only differ in capitalization may cause issues on non-unix systems like windows.
While windows is not supported, I'd recommend using a different name for the interface anyway just to not complicate the situation further.

Copy link
Member

Choose a reason for hiding this comment

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

I see that the GSSContext class is coming out of a library, so maybe this isn't an issue after all?

@@ -193,4 +197,4 @@ private static int paddingToLen(int padlen) {
}
}

}
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Missing newline

return GS2_PREFIX + base32Encoding;
}

private static String getbinary55Bits(String sha1_hash) {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: better use camelCase for the method name

@Neustradamus
Copy link
Contributor

@adiaholic: Any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants