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