xref: /freebsd/lib/libgssapi/gss_unwrap.3 (revision 25e6e9e6c5c763bf1872dd3e85c3f32278895cba)
1c0b9f4feSDoug Rabson.\" -*- nroff -*-
2c0b9f4feSDoug Rabson.\"
3c0b9f4feSDoug Rabson.\" Copyright (c) 2005 Doug Rabson
4c0b9f4feSDoug Rabson.\" All rights reserved.
5c0b9f4feSDoug Rabson.\"
6c0b9f4feSDoug Rabson.\" Redistribution and use in source and binary forms, with or without
7c0b9f4feSDoug Rabson.\" modification, are permitted provided that the following conditions
8c0b9f4feSDoug Rabson.\" are met:
9c0b9f4feSDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
10c0b9f4feSDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
11c0b9f4feSDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
12c0b9f4feSDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
13c0b9f4feSDoug Rabson.\"    documentation and/or other materials provided with the distribution.
14c0b9f4feSDoug Rabson.\"
15c0b9f4feSDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16c0b9f4feSDoug Rabson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17c0b9f4feSDoug Rabson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18c0b9f4feSDoug Rabson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19c0b9f4feSDoug Rabson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20c0b9f4feSDoug Rabson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21c0b9f4feSDoug Rabson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22c0b9f4feSDoug Rabson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23c0b9f4feSDoug Rabson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24c0b9f4feSDoug Rabson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25c0b9f4feSDoug Rabson.\" SUCH DAMAGE.
26c0b9f4feSDoug Rabson.\"
27c0b9f4feSDoug Rabson.\"	$FreeBSD$
28c0b9f4feSDoug Rabson.\"
29c0b9f4feSDoug Rabson.\" The following commands are required for all man pages.
30d76ba3efSGavin Atkinson.Dd January 26, 2010
31c0b9f4feSDoug Rabson.Dt GSS_UNWRAP 3 PRM
32aa12cea2SUlrich Spörlein.Os
33c0b9f4feSDoug Rabson.Sh NAME
34c0b9f4feSDoug Rabson.Nm gss_unwrap ,
35c0b9f4feSDoug Rabson.Nm gss_unseal
36c0b9f4feSDoug Rabson.Nd Convert a message previously protected by
37c0b9f4feSDoug Rabson.Xr gss_wrap 3
38c0b9f4feSDoug Rabsonback to a usable form
39c0b9f4feSDoug Rabson.\" This next command is for sections 2 and 3 only.
40c0b9f4feSDoug Rabson.\" .Sh LIBRARY
41c0b9f4feSDoug Rabson.Sh SYNOPSIS
42c0b9f4feSDoug Rabson.In "gssapi/gssapi.h"
43c0b9f4feSDoug Rabson.Ft OM_uint32
44c0b9f4feSDoug Rabson.Fo gss_unwrap
45c0b9f4feSDoug Rabson.Fa "OM_uint32 *minor_status"
46c0b9f4feSDoug Rabson.Fa "const gss_ctx_id_t context_handle"
47c0b9f4feSDoug Rabson.Fa "const gss_buffer_t input_message_buffer"
48c0b9f4feSDoug Rabson.Fa "gss_buffer_t output_message_buffer"
49c0b9f4feSDoug Rabson.Fa "int *conf_state"
50c0b9f4feSDoug Rabson.Fa "gss_qop_t *qop_state"
51c0b9f4feSDoug Rabson.Fc
52c0b9f4feSDoug Rabson.Ft OM_uint32
53c0b9f4feSDoug Rabson.Fo gss_unseal
54c0b9f4feSDoug Rabson.Fa "OM_uint32 *minor_status"
55c0b9f4feSDoug Rabson.Fa "gss_ctx_id_t context_handle"
56c0b9f4feSDoug Rabson.Fa "gss_buffer_t input_message_buffer"
57c0b9f4feSDoug Rabson.Fa "gss_buffer_t output_message_buffer"
58c0b9f4feSDoug Rabson.Fa "int *conf_state"
59c0b9f4feSDoug Rabson.Fa "gss_qop_t *qop_state"
60c0b9f4feSDoug Rabson.Fc
61c0b9f4feSDoug Rabson.Sh DESCRIPTION
62c0b9f4feSDoug RabsonConverts a message previously protected by
63c0b9f4feSDoug Rabson.Xr gss_wrap 3
64c0b9f4feSDoug Rabsonback to a usable form,
65c0b9f4feSDoug Rabsonverifying the embedded MIC.
66c0b9f4feSDoug RabsonThe
67c0b9f4feSDoug Rabson.Dv conf_state
68c0b9f4feSDoug Rabsonparameter indicates whether the message was encrypted;
69c0b9f4feSDoug Rabsonthe
70c0b9f4feSDoug Rabson.Dv qop_state
71c0b9f4feSDoug Rabsonparameter indicates the strength of protection that was used to provide the
72c0b9f4feSDoug Rabsonconfidentiality and integrity services.
73c0b9f4feSDoug Rabson.Pp
74c0b9f4feSDoug RabsonSince some application-level protocols may wish to use tokens emitted
75c0b9f4feSDoug Rabsonby
76c0b9f4feSDoug Rabson.Xr gss_wrap 3
77c0b9f4feSDoug Rabsonto provide "secure framing",
78c0b9f4feSDoug Rabsonimplementations must support the wrapping and unwrapping of
79c0b9f4feSDoug Rabsonzero-length messages.
80c0b9f4feSDoug Rabson.Pp
81c0b9f4feSDoug RabsonThe
82c0b9f4feSDoug Rabson.Fn gss_unseal
83c0b9f4feSDoug Rabsonroutine is an obsolete variant of
84c0b9f4feSDoug Rabson.Fn gss_unwrap .
85c0b9f4feSDoug RabsonIt is
86c0b9f4feSDoug Rabsonprovided for backwards
87c0b9f4feSDoug Rabsoncompatibility with applications using the GSS-API V1 interface.
88c0b9f4feSDoug RabsonA distinct entrypoint (as opposed to #define) is provided,
89c0b9f4feSDoug Rabsonboth to allow GSS-API V1 applications to link
90c0b9f4feSDoug Rabsonand to retain the slight parameter type differences between the
91c0b9f4feSDoug Rabsonobsolete versions of this routine and its current form.
92c0b9f4feSDoug Rabson.Sh PARAMETERS
936a557179SJoel Dahl.Bl -tag -width ".It output_message_buffer"
94c0b9f4feSDoug Rabson.It minor_status
95c0b9f4feSDoug RabsonMechanism specific status code.
96c0b9f4feSDoug Rabson.It context_handle
97c0b9f4feSDoug RabsonIdentifies the context on which the message arrived.
98c0b9f4feSDoug Rabson.It input_message_buffer
99c0b9f4feSDoug RabsonProtected message.
100c0b9f4feSDoug Rabson.It output_message_buffer
101c0b9f4feSDoug RabsonBuffer to receive unwrapped message.
102c0b9f4feSDoug RabsonStorage associated with this buffer must
103a4dec862SJoel Dahlbe freed by the application after use
104c0b9f4feSDoug Rabsonwith a call to
105c0b9f4feSDoug Rabson.Xr gss_release_buffer 3 .
106c0b9f4feSDoug Rabson.It conf_state
107c0b9f4feSDoug Rabson.Bl -tag -width "Non-zero"
108c0b9f4feSDoug Rabson.It Non-zero
109c0b9f4feSDoug RabsonConfidentiality and integrity protection were used.
110c0b9f4feSDoug Rabson.It Zero
111c0b9f4feSDoug RabsonIntegrity service only was used.
112c0b9f4feSDoug Rabson.El
113c0b9f4feSDoug Rabson.Pp
114c0b9f4feSDoug RabsonSpecify NULL if not required.
115c0b9f4feSDoug Rabson.It qop_state
116c0b9f4feSDoug RabsonQuality of protection provided. Specify NULL if not required.
117c0b9f4feSDoug Rabson.El
118c0b9f4feSDoug Rabson.Sh RETURN VALUES
1196a557179SJoel Dahl.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
120c0b9f4feSDoug Rabson.It GSS_S_COMPLETE
121c0b9f4feSDoug RabsonSuccessful completion.
122c0b9f4feSDoug Rabson.It GSS_S_DEFECTIVE_TOKEN
123c0b9f4feSDoug RabsonThe token failed consistency checks.
124c0b9f4feSDoug Rabson.It GSS_S_BAD_SIG
125c0b9f4feSDoug RabsonThe MIC was incorrect
126c0b9f4feSDoug Rabson.It GSS_S_DUPLICATE_TOKEN
127c0b9f4feSDoug RabsonThe token was valid, and contained a correct
128c0b9f4feSDoug RabsonMIC for the message, but it had already been
129c0b9f4feSDoug Rabsonprocessed.
130c0b9f4feSDoug Rabson.It GSS_S_OLD_TOKEN
131c0b9f4feSDoug RabsonThe token was valid, and contained a correct MIC
132c0b9f4feSDoug Rabsonfor the message, but it is too old to check for
133c0b9f4feSDoug Rabsonduplication.
134c0b9f4feSDoug Rabson.It GSS_S_UNSEQ_TOKEN
135c0b9f4feSDoug RabsonThe token was valid, and contained a correct MIC
136c0b9f4feSDoug Rabsonfor the message, but has been verified out of
137c0b9f4feSDoug Rabsonsequence; a later token has already been
138c0b9f4feSDoug Rabsonreceived.
139c0b9f4feSDoug Rabson.It GSS_S_GAP_TOKEN
140c0b9f4feSDoug RabsonThe token was valid, and contained a correct MIC
141c0b9f4feSDoug Rabsonfor the message, but has been verified out of
142c0b9f4feSDoug Rabsonsequence; an earlier expected token has not yet
143c0b9f4feSDoug Rabsonbeen received.
144c0b9f4feSDoug Rabson.It GSS_S_CONTEXT_EXPIRED
145c0b9f4feSDoug RabsonThe context has already expired.
146c0b9f4feSDoug Rabson.It GSS_S_NO_CONTEXT
147c0b9f4feSDoug RabsonThe context_handle parameter did not identify a valid context.
148c0b9f4feSDoug Rabson.El
149c0b9f4feSDoug Rabson.Sh SEE ALSO
150*25e6e9e6SJoel Dahl.Xr gss_release_buffer 3 ,
151*25e6e9e6SJoel Dahl.Xr gss_wrap 3
152c0b9f4feSDoug Rabson.Sh STANDARDS
1536a557179SJoel Dahl.Bl -tag -width ".It RFC 2743"
154c0b9f4feSDoug Rabson.It RFC 2743
155c0b9f4feSDoug RabsonGeneric Security Service Application Program Interface Version 2, Update 1
156c0b9f4feSDoug Rabson.It RFC 2744
157c0b9f4feSDoug RabsonGeneric Security Service API Version 2 : C-bindings
15863d46d1dSUlrich Spörlein.El
159c0b9f4feSDoug Rabson.Sh HISTORY
160c0b9f4feSDoug RabsonThe
161c0b9f4feSDoug Rabson.Nm
162d76ba3efSGavin Atkinsonfunction first appeared in
163c0b9f4feSDoug Rabson.Fx 7.0 .
164c0b9f4feSDoug Rabson.Sh AUTHORS
165c0b9f4feSDoug RabsonJohn Wray, Iris Associates
16660b9f20aSDoug Rabson.Sh COPYRIGHT
16760b9f20aSDoug RabsonCopyright (C) The Internet Society (2000).  All Rights Reserved.
16860b9f20aSDoug Rabson.Pp
16960b9f20aSDoug RabsonThis document and translations of it may be copied and furnished to
17060b9f20aSDoug Rabsonothers, and derivative works that comment on or otherwise explain it
17160b9f20aSDoug Rabsonor assist in its implementation may be prepared, copied, published
17260b9f20aSDoug Rabsonand distributed, in whole or in part, without restriction of any
17360b9f20aSDoug Rabsonkind, provided that the above copyright notice and this paragraph are
17460b9f20aSDoug Rabsonincluded on all such copies and derivative works.  However, this
17560b9f20aSDoug Rabsondocument itself may not be modified in any way, such as by removing
17660b9f20aSDoug Rabsonthe copyright notice or references to the Internet Society or other
17760b9f20aSDoug RabsonInternet organizations, except as needed for the purpose of
17860b9f20aSDoug Rabsondeveloping Internet standards in which case the procedures for
17960b9f20aSDoug Rabsoncopyrights defined in the Internet Standards process must be
18060b9f20aSDoug Rabsonfollowed, or as required to translate it into languages other than
18160b9f20aSDoug RabsonEnglish.
18260b9f20aSDoug Rabson.Pp
18360b9f20aSDoug RabsonThe limited permissions granted above are perpetual and will not be
18460b9f20aSDoug Rabsonrevoked by the Internet Society or its successors or assigns.
18560b9f20aSDoug Rabson.Pp
18660b9f20aSDoug RabsonThis document and the information contained herein is provided on an
18760b9f20aSDoug Rabson"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
18860b9f20aSDoug RabsonTASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
18960b9f20aSDoug RabsonBUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
19060b9f20aSDoug RabsonHEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
19160b9f20aSDoug RabsonMERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
192