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

Implement support for GSSAPI extension RFC 5801 #124

Merged
merged 1 commit into from
Sep 14, 2017

Conversation

cipherboy
Copy link
Contributor

RFC 5801 provides SASL-specific mechanism inquiry
calls for GSSAPI. The inquire_mech_for_saslname
call allows resolving mechs by their respective
SASL names, and inquire_saslname_for_mech allows
the reverse operation, also providing a mechanism
name and description. These calls are implemented
as part of the raw interface.

@cipherboy
Copy link
Contributor Author

@DirectXMan12 / @frozencemetery Would you like specific tests on this one as well? They'd again have to be implementation-specific, as the RFC doesn't specify OID<->SASL Name mappings and/or mech names/descriptions.

@cipherboy cipherboy force-pushed the rfc5801 branch 2 times, most recently from 07f4fa3 to 4086dae Compare July 24, 2017 14:41
@frozencemetery
Copy link
Member

I don't particularly want implementation-specific tests, but will let @DirectXMan12 decide that.

Copy link
Member

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

missing a not None on a non-optional parameter, otherwise looks good.

gss_OID *mech_type) nogil


def inquire_saslname_for_mech(OID mech):
Copy link
Member

Choose a reason for hiding this comment

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

RFC 5801 doesn't mark mech as optional, so this should be marked not None -- it shouldn't be an option to pass no mech.

@cipherboy
Copy link
Contributor Author

Updated. Thanks @DirectXMan12! :)

Copy link
Member

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

couple small nits that I missed before, otherwise good.


Returns:
InquireSASLNameResult: the results of inquiry; a mech's SASL name,
name, and description.
Copy link
Member

Choose a reason for hiding this comment

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

missing a Raises clause.

sasl_name (bytes): SASL name of the mechanism

Returns:
OID: the mechanism with corresponding SASL name.
Copy link
Member

Choose a reason for hiding this comment

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

missing a Raises clause.

cdef gss_buffer_desc mech_desc
cdef gss_OID m = GSS_C_NO_OID

if mech is not None:
Copy link
Member

Choose a reason for hiding this comment

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

no need for this, because you have the not None clause above.

raise GSSError(maj_stat, min_stat)


def inquire_mech_for_saslname(bytes sasl_name):
Copy link
Member

Choose a reason for hiding this comment

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

this should also be not None, presumably.

@DirectXMan12
Copy link
Member

Will merge once we get Travis working

RFC 5801 provides SASL-specific mechanism inquiry
calls for GSSAPI. The inquire_mech_for_saslname
call allows resolving mechs by their respective
SASL names, and inquire_saslname_for_mech allows
the reverse operation, also providing a mechanism
name and description. These calls are implemented
as part of the raw interface.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
@frozencemetery frozencemetery merged commit d64b9a2 into pythongssapi:master Sep 14, 2017
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.

None yet

3 participants