[PATCH] KDESasl API extension

Marc Mutz mutz at kde.org
Sat Apr 5 14:46:35 BST 2003


Hi!

The attached patch adds a few methods to KDESasl that makes the use of 
different SASL mechanisms more transparent for the user of KDESasl:

- setMethod() now enforces mMethod to be all-uppercase (as required by
  the RFC and to get rid of the permanent need to compare the mMethod
  with mechanism strings case-insensitively.
- (new method) QCString method() const returns the current mechanism.
  Should this be inline?
- (new method) bool clientStarts() const returns whether the SASL
  dialogue is started with a client response (true) or a server
  challenge (false).
- (new method) bool isClearTextMethod() const returns whether the
  mechanism is a clear text one, ie. one that shouldn't be used without
  TLS cover.
- (new method) bool dialogComplete( int ) const returns whether the SASL
  dialogue has been completed. Ideally, this would be determined by the
  state of the KDESasl object itself, yet there is no d-pointer present
  to add such a state variable (or apply the Strategy pattern) and thus,
  the API user needs to maintain a count of the number of responses
  generated itself. Fortunately, all currently supported mechanisms have
  a fixed number of challenge/response roundtrips.
- (classdoc) Mention LOGIN is not a SASL mechanism, but the native IMAP
  auth method.
- (classdoc) Mention LOGIN and PLAIN are clear text.
- (classdoc) Add example code on the usage of the extended API.
- Add default arguments for get*Response parameters for the sake of
  mechanisms that start with a client response.

Marc

-- 
It takes 5 minutes to create [a OpenPGP key].
Of course it takes a bit more time to get it signed...
                                                 -- David Faure
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdesasl.diff
Type: text/x-diff
Size: 4944 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030405/ebea3e9c/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030405/ebea3e9c/attachment.sig>


More information about the kde-core-devel mailing list