-
Notifications
You must be signed in to change notification settings - Fork 49
Implement support for GSSAPI extension RFC 5801 #124
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
Conversation
@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. |
07f4fa3
to
4086dae
Compare
I don't particularly want implementation-specific tests, but will let @DirectXMan12 decide that. |
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.
missing a not None
on a non-optional parameter, otherwise looks good.
gssapi/raw/ext_rfc5801.pyx
Outdated
gss_OID *mech_type) nogil | ||
|
||
|
||
def inquire_saslname_for_mech(OID mech): |
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.
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.
Updated. Thanks @DirectXMan12! :) |
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.
couple small nits that I missed before, otherwise good.
|
||
Returns: | ||
InquireSASLNameResult: the results of inquiry; a mech's SASL name, | ||
name, and description. |
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.
missing a Raises
clause.
sasl_name (bytes): SASL name of the mechanism | ||
|
||
Returns: | ||
OID: the mechanism with corresponding SASL name. |
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.
missing a Raises
clause.
gssapi/raw/ext_rfc5801.pyx
Outdated
cdef gss_buffer_desc mech_desc | ||
cdef gss_OID m = GSS_C_NO_OID | ||
|
||
if mech is not None: |
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.
no need for this, because you have the not None
clause above.
gssapi/raw/ext_rfc5801.pyx
Outdated
raise GSSError(maj_stat, min_stat) | ||
|
||
|
||
def inquire_mech_for_saslname(bytes sasl_name): |
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.
this should also be not None
, presumably.
Will merge once we get Travis working |
dab96c7
to
d64b9a2
Compare
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 <[email protected]>
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.