xref: /freebsd/lib/libgssapi/gss_verify_mic.3 (revision 61e21613)
1.\" -*- nroff -*-
2.\"
3.\" Copyright (c) 2005 Doug Rabson
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" The following commands are required for all man pages.
28.Dd January 26, 2010
29.Dt GSS_VERIFY_MIC 3 PRM
30.Os
31.Sh NAME
32.Nm gss_verify_mic ,
33.Nm gss_verify
34.Nd Check a MIC against a message; verify integrity of a received message
35.\" This next command is for sections 2 and 3 only.
36.\" .Sh LIBRARY
37.Sh SYNOPSIS
38.In "gssapi/gssapi.h"
39.Ft OM_uint32
40.Fo gss_verify_mic
41.Fa "OM_uint32 *minor_status"
42.Fa "const gss_ctx_id_t context_handle"
43.Fa "const gss_buffer_t message_buffer"
44.Fa "const gss_buffer_t token_buffer"
45.Fa "gss_qop_t *qop_state"
46.Fc
47.Ft OM_uint32
48.Fo gss_verify
49.Fa "OM_uint32 *minor_status"
50.Fa "gss_ctx_id_t context_handle"
51.Fa "gss_buffer_t message_buffer"
52.Fa "gss_buffer_t token_buffer"
53.Fa "gss_qop_t *qop_state"
54.Fc
55.Sh DESCRIPTION
56Verifies that a cryptographic MIC,
57contained in the token parameter,
58fits the supplied message.
59The
60.Fa qop_state
61parameter allows a message recipient to determine the strength of
62protection that was applied to the message.
63.Pp
64Since some application-level protocols may wish to use tokens emitted
65by
66.Fn gss_wrap
67to provide "secure framing",
68implementations must support the calculation and verification of MICs
69over zero-length messages.
70.Pp
71The
72.Fn gss_verify
73routine is an obsolete variant of
74.Fn gss_verify_mic .
75It is provided for backwards
76compatibility with applications using the GSS-API V1 interface.
77A distinct entrypoint (as opposed to #define) is provided,
78both to allow GSS-API V1 applications to link
79and to retain the slight parameter type differences between the
80obsolete versions of this routine and its current form.
81.Sh PARAMETERS
82.Bl -tag -width ".It context_handle"
83.It minor_status
84Mechanism specific status code.
85.It context_handle
86Identifies the context on which the message arrived.
87.It message_buffer
88Message to be verified.
89.It token_buffer
90Token associated with message.
91.It qop_state
92Quality of protection gained from MIC.
93Specify
94.Dv NULL
95if not required.
96.El
97.Sh RETURN VALUES
98.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
99.It GSS_S_COMPLETE
100Successful completion
101.It GSS_S_DEFECTIVE_TOKEN
102The token failed consistency checks
103.It GSS_S_BAD_SIG
104The MIC was incorrect
105.It GSS_S_DUPLICATE_TOKEN
106The token was valid,
107and contained a correct MIC for the message,
108but it had already been processed
109.It GSS_S_OLD_TOKEN
110The token was valid,
111and contained a correct MIC for the message,
112but it is too old to check for duplication
113.It GSS_S_UNSEQ_TOKEN
114The token was valid,
115and contained a correct MIC for the message,
116but has been verified out of sequence;
117a later token has already been received.
118.It GSS_S_GAP_TOKEN
119The token was valid,
120and contained a correct MIC for the message,
121but has been verified out of sequence;
122an earlier expected token has not yet been received
123.It GSS_S_CONTEXT_EXPIRED
124The context has already expired
125.It GSS_S_NO_CONTEXT
126The context_handle parameter did not identify a valid context
127.El
128.Sh SEE ALSO
129.Xr gss_wrap 3
130.Sh STANDARDS
131.Bl -tag -width ".It RFC 2743"
132.It RFC 2743
133Generic Security Service Application Program Interface Version 2, Update 1
134.It RFC 2744
135Generic Security Service API Version 2 : C-bindings
136.El
137.Sh HISTORY
138The
139.Nm
140function first appeared in
141.Fx 7.0 .
142.Sh AUTHORS
143John Wray, Iris Associates
144.Sh COPYRIGHT
145Copyright (C) The Internet Society (2000).  All Rights Reserved.
146.Pp
147This document and translations of it may be copied and furnished to
148others, and derivative works that comment on or otherwise explain it
149or assist in its implementation may be prepared, copied, published
150and distributed, in whole or in part, without restriction of any
151kind, provided that the above copyright notice and this paragraph are
152included on all such copies and derivative works.  However, this
153document itself may not be modified in any way, such as by removing
154the copyright notice or references to the Internet Society or other
155Internet organizations, except as needed for the purpose of
156developing Internet standards in which case the procedures for
157copyrights defined in the Internet Standards process must be
158followed, or as required to translate it into languages other than
159English.
160.Pp
161The limited permissions granted above are perpetual and will not be
162revoked by the Internet Society or its successors or assigns.
163.Pp
164This document and the information contained herein is provided on an
165"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
166TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
167BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
168HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
169MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
170