1krb5_sendauth - Client function for sendauth protocol. 2======================================================== 3 4.. 5 6.. c:function:: krb5_error_code krb5_sendauth(krb5_context context, krb5_auth_context * auth_context, krb5_pointer fd, char * appl_version, krb5_principal client, krb5_principal server, krb5_flags ap_req_options, krb5_data * in_data, krb5_creds * in_creds, krb5_ccache ccache, krb5_error ** error, krb5_ap_rep_enc_part ** rep_result, krb5_creds ** out_creds) 7 8.. 9 10 11:param: 12 13 **[in]** **context** - Library context 14 15 **[inout]** **auth_context** - Pre-existing or newly created auth context 16 17 **[in]** **fd** - File descriptor that describes network socket 18 19 **[in]** **appl_version** - Application protocol version to be matched with the receiver's application version 20 21 **[in]** **client** - Client principal 22 23 **[in]** **server** - Server principal 24 25 **[in]** **ap_req_options** - Options (see AP_OPTS macros) 26 27 **[in]** **in_data** - Data to be sent to the server 28 29 **[in]** **in_creds** - Input credentials, or NULL to use *ccache* 30 31 **[in]** **ccache** - Credential cache 32 33 **[out]** **error** - If non-null, contains KRB_ERROR message returned from server 34 35 **[out]** **rep_result** - If non-null and *ap_req_options* is #AP_OPTS_MUTUAL_REQUIRED, contains the result of mutual authentication exchange 36 37 **[out]** **out_creds** - If non-null, the retrieved credentials 38 39 40.. 41 42 43:retval: 44 - 0 Success; otherwise - Kerberos error codes 45 46 47.. 48 49 50 51 52 53 54 55This function performs the client side of a sendauth/recvauth exchange by sending and receiving messages over *fd* . 56 57 58 59Credentials may be specified in three ways: 60 61 62 63 64 65 - If *in_creds* is NULL, credentials are obtained with krb5_get_credentials() using the principals *client* and *server* . *server* must be non-null; *client* may NULL to use the default principal of *ccache* . 66 67 68 69 - If *in_creds* is non-null, but does not contain a ticket, credentials for the exchange are obtained with krb5_get_credentials() using *in_creds* . In this case, the values of *client* and *server* are unused. 70 71 72 73 - If *in_creds* is a complete credentials structure, it used directly. In this case, the values of *client* , *server* , and *ccache* are unused. 74 75 If the server is using a different application protocol than that specified in *appl_version* , an error will be returned. 76 77 78 79Use krb5_free_creds() to free *out_creds* , krb5_free_ap_rep_enc_part() to free *rep_result* , and krb5_free_error() to free *error* when they are no longer needed. 80 81 82 83 84 85 86 87 88 89 90.. 91 92.. seealso:: 93 krb5_recvauth() 94 95 96 97 98 99