2 .\" Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GSS_UNWRAP 3GSS "Jan 15, 2003"
8 gss_unwrap \- verify a message with attached cryptographic message
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lgss\fR [ \fIlibrary\fR... ]
13 #include <gssapi/gssapi.h>
15 \fBOM_uint32\fR \fBgss_unwrap\fR(\fBOM_uint32 *\fR\fIminor_status\fR,
16 \fBconst gss_ctx_id_t\fR \fIcontext_handle\fR,
17 \fBconst gss_buffer_t\fR \fIinput_message_buffer\fR,
18 \fBgss_buffer_t\fR \fIoutput_message_buffer\fR, \fBint *\fR\fIconf_state\fR,
19 \fBgss_qop_t *\fR\fIqop_state\fR);
25 The \fBgss_unwrap()\fR function converts a message previously protected by
26 \fBgss_wrap\fR(3GSS) back to a usable form, verifying the embedded \fBMIC\fR.
27 The \fIconf_state\fR parameter indicates whether the message was encrypted; the
28 \fIqop_state\fR parameter indicates the strength of protection that was used to
29 provide the confidentiality and integrity services.
32 Since some application-level protocols may wish to use tokens emitted by
33 \fBgss_wrap\fR(3GSS) to provide secure framing, the \fBGSS-API\fR supports the
34 wrapping and unwrapping of zero-length messages.
38 The parameter descriptions for \fBgss_unwrap()\fR follow:
42 \fB\fIminor_status\fR\fR
45 The status code returned by the underlying mechanism.
51 \fB\fIcontext_handle\fR\fR
54 Identifies the context on which the message arrived.
60 \fB\fIinput_message_buffer\fR\fR
63 The message to be protected.
69 \fB\fIoutput_message_buffer\fR\fR
72 The buffer to receive the unwrapped message. Storage associated with this
73 buffer must be freed by the application after use with a call to
74 \fBgss_release_buffer\fR(3GSS).
80 \fB\fIconf_state\fR\fR
83 If the value of \fIconf_state\fR is non-zero, then confidentiality and
84 integrity protection were used. If the value is zero, only integrity service
85 was used. Specify \fBNULL\fR if this parameter is not required.
94 Specifies the quality of protection provided. Specify \fBNULL\fR if this
95 parameter is not required.
101 \fBgss_unwrap()\fR may return the following status codes:
105 \fB\fBGSS_S_COMPLETE\fR\fR
108 Successful completion.
114 \fB\fBGSS_S_DEFECTIVE_TOKEN\fR\fR
117 The token failed consistency checks.
123 \fB\fBGSS_S_BAD_SIG\fR\fR
126 The \fBMIC\fR was incorrect.
132 \fB\fBGSS_S_DUPLICATE_TOKEN\fR\fR
135 The token was valid, and contained a correct \fBMIC\fR for the message, but it
136 had already been processed.
142 \fB\fBGSS_S_OLD_TOKEN\fR\fR
145 The token was valid, and contained a correct \fBMIC\fR for the message, but it
146 is too old to check for duplication.
152 \fB\fBGSS_S_UNSEQ_TOKEN\fR\fR
155 The token was valid, and contained a correct \fBMIC\fR for the message, but has
156 been verified out of sequence; a later token has already been received.
162 \fB\fBGSS_S_GAP_TOKEN\fR\fR
165 The token was valid, and contained a correct \fBMIC\fR for the message, but has
166 been verified out of sequence; an earlier expected token has not yet been
173 \fB\fBGSS_S_CONTEXT_EXPIRED\fR\fR
176 The context has already expired.
182 \fB\fBGSS_S_NO_CONTEXT\fR\fR
185 The \fIcontext_handle\fR parameter did not identify a valid context.
191 \fB\fBGSS_S_FAILURE\fR\fR
194 The underlying mechanism detected an error for which no specific \fBGSS\fR
195 status code is defined. The mechanism-specific status code reported by means
196 of the \fIminor_status\fR parameter details the error condition.
202 See \fBattributes\fR(5) for descriptions of the following attributes:
210 ATTRIBUTE TYPE ATTRIBUTE VALUE
218 \fBgss_release_buffer\fR(3GSS), \fBgss_wrap\fR(3GSS), \fBattributes\fR(5)
221 \fISolaris Security for Developers Guide\fR