]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libgssapi/gss_unwrap.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libgssapi / gss_unwrap.3
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 .\"     $FreeBSD$
28 .\"
29 .\" The following commands are required for all man pages.
30 .Dd January 26, 2010
31 .Dt GSS_UNWRAP 3 PRM
32 .Os
33 .Sh NAME
34 .Nm gss_unwrap ,
35 .Nm gss_unseal
36 .Nd Convert a message previously protected by
37 .Xr gss_wrap 3
38 back to a usable form
39 .\" This next command is for sections 2 and 3 only.
40 .\" .Sh LIBRARY
41 .Sh SYNOPSIS
42 .In "gssapi/gssapi.h"
43 .Ft OM_uint32
44 .Fo gss_unwrap
45 .Fa "OM_uint32 *minor_status"
46 .Fa "const gss_ctx_id_t context_handle"
47 .Fa "const gss_buffer_t input_message_buffer"
48 .Fa "gss_buffer_t output_message_buffer"
49 .Fa "int *conf_state"
50 .Fa "gss_qop_t *qop_state"
51 .Fc
52 .Ft OM_uint32
53 .Fo gss_unseal
54 .Fa "OM_uint32 *minor_status"
55 .Fa "gss_ctx_id_t context_handle"
56 .Fa "gss_buffer_t input_message_buffer"
57 .Fa "gss_buffer_t output_message_buffer"
58 .Fa "int *conf_state"
59 .Fa "gss_qop_t *qop_state"
60 .Fc
61 .Sh DESCRIPTION
62 Converts a message previously protected by
63 .Xr gss_wrap 3
64 back to a usable form,
65 verifying the embedded MIC.
66 The
67 .Dv conf_state
68 parameter indicates whether the message was encrypted;
69 the
70 .Dv qop_state
71 parameter indicates the strength of protection that was used to provide the
72 confidentiality and integrity services.
73 .Pp
74 Since some application-level protocols may wish to use tokens emitted
75 by
76 .Xr gss_wrap 3
77 to provide "secure framing",
78 implementations must support the wrapping and unwrapping of
79 zero-length messages.
80 .Pp
81 The
82 .Fn gss_unseal
83 routine is an obsolete variant of
84 .Fn gss_unwrap .
85 It is
86 provided for backwards
87 compatibility with applications using the GSS-API V1 interface.
88 A distinct entrypoint (as opposed to #define) is provided,
89 both to allow GSS-API V1 applications to link
90 and to retain the slight parameter type differences between the
91 obsolete versions of this routine and its current form.
92 .Sh PARAMETERS
93 .Bl -tag -width ".It output_message_buffer"
94 .It minor_status
95 Mechanism specific status code.
96 .It context_handle
97 Identifies the context on which the message arrived.
98 .It input_message_buffer
99 Protected message.
100 .It output_message_buffer
101 Buffer to receive unwrapped message.
102 Storage associated with this buffer must
103 be freed by the application after use
104 with a call to
105 .Xr gss_release_buffer 3 .
106 .It conf_state
107 .Bl -tag -width "Non-zero"
108 .It Non-zero
109 Confidentiality and integrity protection were used.
110 .It Zero
111 Integrity service only was used.
112 .El
113 .Pp
114 Specify NULL if not required.
115 .It qop_state
116 Quality of protection provided. Specify NULL if not required.
117 .El
118 .Sh RETURN VALUES
119 .Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
120 .It GSS_S_COMPLETE
121 Successful completion.
122 .It GSS_S_DEFECTIVE_TOKEN
123 The token failed consistency checks.
124 .It GSS_S_BAD_SIG
125 The MIC was incorrect
126 .It GSS_S_DUPLICATE_TOKEN
127 The token was valid, and contained a correct
128 MIC for the message, but it had already been
129 processed.
130 .It GSS_S_OLD_TOKEN
131 The token was valid, and contained a correct MIC
132 for the message, but it is too old to check for
133 duplication.
134 .It GSS_S_UNSEQ_TOKEN
135 The token was valid, and contained a correct MIC
136 for the message, but has been verified out of
137 sequence; a later token has already been
138 received.
139 .It GSS_S_GAP_TOKEN
140 The token was valid, and contained a correct MIC
141 for the message, but has been verified out of
142 sequence; an earlier expected token has not yet
143 been received.
144 .It GSS_S_CONTEXT_EXPIRED
145 The context has already expired.
146 .It GSS_S_NO_CONTEXT
147 The context_handle parameter did not identify a valid context.
148 .El
149 .Sh SEE ALSO
150 .Xr gss_wrap 3 ,
151 .Xr gss_release_buffer 3
152 .Sh STANDARDS
153 .Bl -tag -width ".It RFC 2743"
154 .It RFC 2743
155 Generic Security Service Application Program Interface Version 2, Update 1
156 .It RFC 2744
157 Generic Security Service API Version 2 : C-bindings
158 .El
159 .Sh HISTORY
160 The
161 .Nm
162 function first appeared in
163 .Fx 7.0 .
164 .Sh AUTHORS
165 John Wray, Iris Associates
166 .Sh COPYRIGHT
167 Copyright (C) The Internet Society (2000).  All Rights Reserved.
168 .Pp
169 This document and translations of it may be copied and furnished to
170 others, and derivative works that comment on or otherwise explain it
171 or assist in its implementation may be prepared, copied, published
172 and distributed, in whole or in part, without restriction of any
173 kind, provided that the above copyright notice and this paragraph are
174 included on all such copies and derivative works.  However, this
175 document itself may not be modified in any way, such as by removing
176 the copyright notice or references to the Internet Society or other
177 Internet organizations, except as needed for the purpose of
178 developing Internet standards in which case the procedures for
179 copyrights defined in the Internet Standards process must be
180 followed, or as required to translate it into languages other than
181 English.
182 .Pp
183 The limited permissions granted above are perpetual and will not be
184 revoked by the Internet Society or its successors or assigns.
185 .Pp
186 This document and the information contained herein is provided on an
187 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
188 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
189 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
190 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
191 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.