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_GET_MIC 3GSS "Jan 14, 2003"
8 gss_get_mic \- calculate a cryptographic message
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lgss\fR [ \fIlibrary\fR... ]
13 #include <gssapi/gssapi.h>
15 \fBOM_uint32\fR \fBgss_get_mic\fR(\fBOM_uint32 *\fR\fIminor_status\fR,
16 \fBconst gss_ctx_id_t\fR \fIcontext_handle\fR, \fBgss_qop_t\fR \fIqop_req\fR,
17 \fBconst gss_buffer_t\fR \fImessage_buffer\fR, \fBgss_buffer_t\fR \fImsg_token\fR);
23 The \fBgss_get_mic()\fR function generates a cryptographic \fBMIC\fR for the
24 supplied message, and places the \fBMIC\fR in a token for transfer to the peer
25 application. The \fIqop_req\fR parameter allows a choice between several
26 cryptographic algorithms, if supported by the chosen mechanism.
29 Since some application-level protocols may wish to use tokens emitted by
30 \fBgss_wrap\fR(3GSS) to provide secure framing, the \fBGSS-API\fR allows
31 \fBMIC\fRs to be derived from zero-length messages.
35 The parameter descriptions for \fBgss_get_mic()\fR follow:
39 \fB\fIminor_status\fR\fR
42 The status code returned by the underlying mechanism.
48 \fB\fIcontext_handle\fR\fR
51 Identifies the context on which the message will be sent.
60 Specifies the requested quality of protection. Callers are encouraged, on
61 portability grounds, to accept the default quality of protection offered by the
62 chosen mechanism, which may be requested by specifying \fBGSS_C_QOP_DEFAULT\fR
63 for this parameter. If an unsupported protection strength is requested,
64 \fBgss_get_mic()\fR will return a \fImajor_status\fR of \fBGSS_S_BAD_QOP\fR.
70 \fB\fImessage_buffer\fR\fR
73 The message to be protected.
82 The buffer to receive the token. Storage associated with this message must be
83 freed by the application after use with a call to
84 \fBgss_release_buffer\fR(3GSS).
90 \fBgss_get_mic()\fR may return the following status codes:
94 \fB\fBGSS_S_COMPLETE\fR\fR
97 Successful completion.
103 \fB\fBGSS_S_CONTEXT_EXPIRED\fR\fR
106 The context has already expired.
112 \fB\fBGSS_S_NO_CONTEXT\fR\fR
115 The \fIcontext_handle\fR parameter did not identify a valid context.
121 \fB\fBGSS_S_BAD_QOP\fR\fR
124 The specified \fBQOP\fR is not supported by the mechanism.
130 \fB\fBGSS_S_FAILURE\fR\fR
133 The underlying mechanism detected an error for which no specific \fBGSS\fR
134 status code is defined. The mechanism-specific status code reported by means
135 of the \fIminor_status\fR parameter details the error condition.
141 See \fBattributes\fR(5) for descriptions of the following attributes:
149 ATTRIBUTE TYPE ATTRIBUTE VALUE
157 \fBgss_release_buffer\fR(3GSS), \fBgss_wrap\fR(3GSS), \fBattributes\fR(5)
160 \fISolaris Security for Developers Guide\fR