1.. saslman:: sasl_client_start(3) 2 3.. _sasl-reference-manpages-library-sasl_client_start: 4 5 6=========================================================== 7**sasl_client_start** - Begin an authentication negotiation 8=========================================================== 9 10Synopsis 11======== 12 13.. code-block:: C 14 15 #include <sasl/sasl.h> 16 17 int sasl_client_start(sasl_conn_t * conn, 18 const char * mechlist, 19 sasl_interact_t ** prompt_need, 20 const char ** clientout, 21 unsigned * clientoutlen, 22 const char ** mech); 23 24Description 25=========== 26 27.. c:function:: int sasl_client_start(sasl_conn_t * conn, 28 const char * mechlist, 29 sasl_interact_t ** prompt_need, 30 const char ** clientout, 31 unsigned * clientoutlen, 32 const char ** mech); 33 34 **sasl_client_start()** selects a mechanism for authentication and starts the 35 authentication session. The mechlist is the list of mechanisms the client 36 might like to use. The mech‐ anisms in the list are not necessarily supported 37 by the client or even valid. SASL determines which of these to use based 38 upon the security preferences specified earlier. The list of mechanisms is 39 typically a list of mechanisms the server supports acquired from a capability 40 request. 41 42 If :c:macro:`SASL_INTERACT` is returned the library needs some values to be 43 filled in before it can proceed. The `prompt_need` structure will be filled in 44 with requests. The application should fulfill these requests and call 45 sasl_client_start again with identical parameters (the `prompt_need` parameter 46 will be the same pointer as before but filled in by the application). 47 48 :param conn: is the SASL connection context 49 50 :param mechlist: is a list of mechanisms the server has available. 51 Punctuation is ignored. 52 53 :param prompt_need: is filled in with a list of prompts needed to 54 continue (if necessary). 55 56 :param clientout: is created. It is the initial 57 client response to send to the server. It is the job of 58 the client to send it over the network to the server. Any 59 protocol specific encoding (such as base64 encoding) necessary 60 needs to be done by the client. 61 62 If the protocol lacks client‐send‐first capability, then 63 set clientout to NULL. 64 65 If there is no initial client‐send, then \*clientout will 66 be set to NULL on return. 67 68 :param clientoutlen: length of `clientout`. 69 70 :param mech: contains the name of the chosen SASL 71 mechanism (on success) 72 73Return Value 74============ 75 76SASL callback functions should return SASL return codes. 77See sasl.h for a complete list. :c:macro:`SASL_CONTINUE` indicates success 78and that there are more steps needed in the authentication. 79 80Other return codes indicate errors and should either be handled or the authentication 81session should be quit. 82 83See Also 84======== 85 86:rfc:`4422`,:saslman:`sasl(3)`, :saslman:`sasl_callbacks(3)`, 87:saslman:`sasl_client_init(3)`, :saslman:`sasl_client_new(3)`, 88:saslman:`sasl_client_step(3)`, :saslman:`sasl_errors(3)` 89