
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12329 ec53bebd-3082-4978-b11e-865c3cabbd6b
182 lines
4.5 KiB
Groff
182 lines
4.5 KiB
Groff
.\" Copyright (c) 2003 Kungliga Tekniska Högskolan
|
|
.\" (Royal Institute of Technology, Stockholm, Sweden).
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\"
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\"
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" 3. Neither the name of the Institute nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" $Id$
|
|
.\"
|
|
.Dd March 25, 2003
|
|
.Dt KRB5_CCACHE 3
|
|
.Os HEIMDAL
|
|
.Sh NAME
|
|
.Nm krb5_checksum ,
|
|
.Nm krb5_c_get_checksum ,
|
|
.Nm krb5_c_make_checksum ,
|
|
.Nm krb5_c_verify_checksum ,
|
|
.Nm krb5_c_set_checksum ,
|
|
.Nm krb5_copy_checksum ,
|
|
.Nm krb5_free_checksum ,
|
|
.Nm krb5_free_checksum_contents
|
|
.Nd create and verify checksums
|
|
.Sh LIBRARY
|
|
Kerberos 5 Library (libkrb5, -lkrb5)
|
|
.Sh SYNOPSIS
|
|
.In krb5.h
|
|
.Pp
|
|
.Ft krb5_error_code
|
|
.Fo krb5_c_make_checksum
|
|
.Fa "krb5_context context"
|
|
.Fa "krb5_cksumtype cksumtype"
|
|
.Fa "const krb5_keyblock *key"
|
|
.Fa "krb5_keyusage usage"
|
|
.Fa "const krb5_data *input"
|
|
.Fa "krb5_checksum *cksum"
|
|
.Fc
|
|
.Ft krb5_error_code
|
|
.Fo krb5_c_verify_checksum
|
|
.Fa "krb5_context context
|
|
.Fa "const krb5_keyblock *key"
|
|
.Fa "krb5_keyusage usage"
|
|
.Fa "const krb5_data *data"
|
|
.Fa "const krb5_checksum *cksum"
|
|
.Fa "krb5_boolean *valid"
|
|
.Fc
|
|
.Ft void
|
|
.Fo krb5_free_checksum
|
|
.Fa "krb5_context context'
|
|
.Fa "krb5_checksum *cksum"
|
|
.Fc
|
|
.Ft void
|
|
.Fo krb5_free_checksum_contents.
|
|
.Fa "krb5_context context"
|
|
.Fa "krb5_checksum *cksum"
|
|
.Fc
|
|
.Ft krb5_error_code
|
|
.Fo krb5_copy_checksum
|
|
.Fa "krb5_context context"
|
|
.Fa "const krb5_checksum *old"
|
|
.Fa "krb5_checksum **new"
|
|
.Fc
|
|
.Ft krb5_error_code
|
|
.Fo krb5_c_checksum_length
|
|
.Fa "krb5_context context"
|
|
.Fa "krb5_cksumtype cksumtype"
|
|
.Fa "size_t *length"
|
|
.Fc
|
|
.Ft krb5_error_code
|
|
.Fo krb5_c_get_checksum
|
|
.Fa "krb5_context context"
|
|
.Fa "const krb5_checksum *cksum"
|
|
.Fa "krb5_cksumtype *type"
|
|
.Fa "krb5_data **data"
|
|
.Fc
|
|
.Ft krb5_error_code
|
|
.Fo krb5_c_set_checksum
|
|
.Fa "krb5_context context"
|
|
.Fa "krb5_checksum *cksum"
|
|
.Fa "krb5_cksumtype type"
|
|
.Fa "const krb5_data *data"
|
|
.Fc
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Li krb5_checksum
|
|
structure holds a Kerberos checksum.
|
|
.Pp
|
|
There is no component inside
|
|
.Li krb5_checksum
|
|
that is directly referable.
|
|
.Pp
|
|
.Fn krb5_c_make_checksum
|
|
creates a checksum
|
|
.Fa cksum
|
|
with the checksum type
|
|
.Fa cksumtype
|
|
of the data in
|
|
.Fa data .
|
|
.Fa key
|
|
and
|
|
.Fa usage
|
|
are used if the checksum is a keyed checksum type.
|
|
Returns 0 or an error code.
|
|
.Pp
|
|
.Fn krb5_c_verify_checksum
|
|
verifies the checksum
|
|
of
|
|
.Fa data
|
|
in
|
|
.Fa cksum
|
|
that was created with
|
|
.Fa key
|
|
using the key usage
|
|
.Fa usage .
|
|
.Fa verify
|
|
is set to non-zero if the checksum verifies correctly and zero if not.
|
|
Returns 0 or an error code.
|
|
.Pp
|
|
.Fn krb5_c_checksum_length
|
|
returns the length of the checksum.
|
|
.Pp
|
|
.Fn krb5_copy_checksum
|
|
returns a copy of the checksum
|
|
.Fn krb5_free_checksum
|
|
should use used to free the
|
|
.Fa new
|
|
checksum.
|
|
.Pp
|
|
.Fn krb5_free_checksum
|
|
free the checksum and the content of the checksum.
|
|
.Pp
|
|
.Fn krb5_free_checksum_contents
|
|
frees the content of checksum in
|
|
.Fa cksum .
|
|
.Pp
|
|
.Fn krb5_c_set_checksum
|
|
sets the
|
|
.Li krb5_checksum
|
|
structure given
|
|
.Fa type
|
|
and
|
|
.Fa data .
|
|
The content of
|
|
.Fa cksum
|
|
should be freeed with
|
|
.Fn krb5_c_free_checksum_contents .
|
|
.Pp
|
|
.Fn krb5_c_get_checksum
|
|
retrieves the components of the
|
|
.Li krb5_checksum .
|
|
structure.
|
|
.Fa data
|
|
should be free with
|
|
.Fn krb5_free_data .
|
|
.Sh SEE ALSO
|
|
.Xr krb5 3 ,
|
|
.Xr krb5_free_data 3 ,
|
|
.Xr kerberos 8
|