1.\" Copyright (c) 2006 - 2007 Kungliga Tekniska Högskolan 2.\" (Royal Institute of Technology, Stockholm, Sweden). 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" 3. Neither the name of the Institute nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" $Id$ 33.\" 34.Dd February 18, 2007 35.Dt KRB5_DIGEST 3 36.Os HEIMDAL 37.Sh NAME 38.Nm krb5_digest , 39.Nm krb5_digest_alloc , 40.Nm krb5_digest_free , 41.Nm krb5_digest_set_server_cb , 42.Nm krb5_digest_set_type , 43.Nm krb5_digest_set_hostname , 44.Nm krb5_digest_get_server_nonce , 45.Nm krb5_digest_set_server_nonce , 46.Nm krb5_digest_get_opaque , 47.Nm krb5_digest_set_opaque , 48.Nm krb5_digest_get_identifier , 49.Nm krb5_digest_set_identifier , 50.Nm krb5_digest_init_request , 51.Nm krb5_digest_set_client_nonce , 52.Nm krb5_digest_set_digest , 53.Nm krb5_digest_set_username , 54.Nm krb5_digest_set_authid , 55.Nm krb5_digest_set_authentication_user , 56.Nm krb5_digest_set_realm , 57.Nm krb5_digest_set_method , 58.Nm krb5_digest_set_uri , 59.Nm krb5_digest_set_nonceCount , 60.Nm krb5_digest_set_qop , 61.Nm krb5_digest_request , 62.Nm krb5_digest_get_responseData , 63.Nm krb5_digest_get_rsp , 64.Nm krb5_digest_get_tickets , 65.Nm krb5_digest_get_client_binding , 66.Nm krb5_digest_get_a1_hash 67.Nd remote digest (HTTP-DIGEST, SASL, CHAP) suppport 68.Sh LIBRARY 69Kerberos 5 Library (libkrb5, -lkrb5) 70.Sh SYNOPSIS 71.In krb5.h 72.Pp 73.Li "typedef struct krb5_digest *krb5_digest;" 74.Pp 75.Ft krb5_error_code 76.Fo krb5_digest_alloc 77.Fa "krb5_context context" 78.Fa "krb5_digest *digest" 79.Fc 80.Ft void 81.Fo krb5_digest_free 82.Fa "krb5_digest digest" 83.Fc 84.Ft krb5_error_code 85.Fo krb5_digest_set_type 86.Fa "krb5_context context" 87.Fa "krb5_digest digest" 88.Fa "const char *type" 89.Fc 90.Ft krb5_error_code 91.Fo krb5_digest_set_server_cb 92.Fa "krb5_context context" 93.Fa "krb5_digest digest" 94.Fa "const char *type" 95.Fa "const char *binding" 96.Fc 97.Ft krb5_error_code 98.Fo krb5_digest_set_hostname 99.Fa "krb5_context context" 100.Fa "krb5_digest digest" 101.Fa "const char *hostname" 102.Fc 103.Ft "const char *" 104.Fo krb5_digest_get_server_nonce 105.Fa "krb5_context context" 106.Fa "krb5_digest digest" 107.Fc 108.Ft krb5_error_code 109.Fo krb5_digest_set_server_nonce 110.Fa "krb5_context context" 111.Fa "krb5_digest digest" 112.Fa "const char *nonce" 113.Fc 114.Ft "const char *" 115.Fo krb5_digest_get_opaque 116.Fa "krb5_context context" 117.Fa "krb5_digest digest" 118.Fc 119.Ft krb5_error_code 120.Fo krb5_digest_set_opaque 121.Fa "krb5_context context" 122.Fa "krb5_digest digest" 123.Fa "const char *opaque" 124.Fc 125.Ft "const char *" 126.Fo krb5_digest_get_identifier 127.Fa "krb5_context context" 128.Fa "krb5_digest digest" 129.Fc 130.Ft krb5_error_code 131.Fo krb5_digest_set_identifier 132.Fa "krb5_context context" 133.Fa "krb5_digest digest" 134.Fa "const char *id" 135.Fc 136.Ft krb5_error_code 137.Fo krb5_digest_init_request 138.Fa "krb5_context context" 139.Fa "krb5_digest digest" 140.Fa "krb5_realm realm" 141.Fa "krb5_ccache ccache" 142.Fc 143.Ft krb5_error_code 144.Fo krb5_digest_set_client_nonce 145.Fa "krb5_context context" 146.Fa "krb5_digest digest" 147.Fa "const char *nonce" 148.Fc 149.Ft krb5_error_code 150.Fo krb5_digest_set_digest 151.Fa "krb5_context context" 152.Fa "krb5_digest digest" 153.Fa "const char *dgst" 154.Fc 155.Ft krb5_error_code 156.Fo krb5_digest_set_username 157.Fa "krb5_context context" 158.Fa "krb5_digest digest" 159.Fa "const char *username" 160.Fc 161.Ft krb5_error_code 162.Fo krb5_digest_set_authid 163.Fa "krb5_context context" 164.Fa "krb5_digest digest" 165.Fa "const char *authid" 166.Fc 167.Ft krb5_error_code 168.Fo krb5_digest_set_authentication_user 169.Fa "krb5_context context" 170.Fa "krb5_digest digest" 171.Fa "krb5_principal authentication_user" 172.Fc 173.Ft krb5_error_code 174.Fo krb5_digest_set_realm 175.Fa "krb5_context context" 176.Fa "krb5_digest digest" 177.Fa "const char *realm" 178.Fc 179.Ft krb5_error_code 180.Fo krb5_digest_set_method 181.Fa "krb5_context context" 182.Fa "krb5_digest digest" 183.Fa "const char *method" 184.Fc 185.Ft krb5_error_code 186.Fo krb5_digest_set_uri 187.Fa "krb5_context context" 188.Fa "krb5_digest digest" 189.Fa "const char *uri" 190.Fc 191.Ft krb5_error_code 192.Fo krb5_digest_set_nonceCount 193.Fa "krb5_context context" 194.Fa "krb5_digest digest" 195.Fa "const char *nonce_count" 196.Fc 197.Ft krb5_error_code 198.Fo krb5_digest_set_qop 199.Fa "krb5_context context" 200.Fa "krb5_digest digest" 201.Fa "const char *qop" 202.Fc 203.Ft krb5_error_code 204.Fo krb5_digest_request 205.Fa "krb5_context context" 206.Fa "krb5_digest digest" 207.Fa "krb5_realm realm" 208.Fa "krb5_ccache ccache" 209.Fc 210.Ft "const char *" 211.Fo krb5_digest_get_responseData 212.Fa "krb5_context context" 213.Fa "krb5_digest digest" 214.Fc 215.Ft "const char *" 216.Fo krb5_digest_get_rsp 217.Fa "krb5_context context" 218.Fa "krb5_digest digest" 219.Fc 220.Ft krb5_error_code 221.Fo krb5_digest_get_tickets 222.Fa "krb5_context context" 223.Fa "krb5_digest digest" 224.Fa "Ticket **tickets" 225.Fc 226.Ft krb5_error_code 227.Fo krb5_digest_get_client_binding 228.Fa "krb5_context context" 229.Fa "krb5_digest digest" 230.Fa "char **type" 231.Fa "char **binding" 232.Fc 233.Ft krb5_error_code 234.Fo krb5_digest_get_a1_hash 235.Fa "krb5_context context" 236.Fa "krb5_digest digest" 237.Fa "krb5_data *data" 238.Fc 239.Sh DESCRIPTION 240The 241.Fn krb5_digest_alloc 242function allocatates the 243.Fa digest 244structure. The structure should be freed with 245.Fn krb5_digest_free 246when it is no longer being used. 247.Pp 248.Fn krb5_digest_alloc 249returns 0 to indicate success. 250Otherwise an kerberos code is returned and the pointer that 251.Fa digest 252points to is set to 253.Dv NULL . 254.Pp 255.Fn krb5_digest_free 256free the structure 257.Fa digest . 258.Sh SEE ALSO 259.Xr krb5 3 , 260.Xr kerberos 8 261