Generic Security Services API Library Functions gsswrap(3GS)
NAME
gsswrap - attach a cryptographic message
SYNOPSIS
cc [ flag... ] file... -lgss [ library... ]
#include
OMuint32 gsswrap(OMuint32 *minorstatus,
const gssctxidt contexthandle, int confreqflag,
gssqopt qopreq, const gssbuffert inputmessagebuffer,
int *confstate, gssbuffert outputmessagebuffer);
DESCRIPTION
The gsswrap() function attaches a cryptographic MIC and
optionally encrypts the specified inputmessage. The
outputmessage contains both the MIC and the message. The
qopreq parameter allows a choice between several crypto-
graphic algorithms, if supported by the chosen mechanism.
Since some application-level protocols may wish to use
tokens emitted by gsswrap() to provide secure framing, the
GS-API supports the wrapping of zero-length messages.
PARAMETERS
The parameter descriptions for gsswrap() follow:
minorstatus The status code returned by the
underlying mechanism.
contexthandle Identifies the context on which the
message will be sent.
confreqflag If the value of confreqflag is
non-zero, both confidentiality and
integrity services are requested.
If the value is zero, then only
integrity service is requested.
qopreq Specifies the required quality of
protection. A mechanism-specific
default may be requested by setting
qopreq to GSCQOPDEFAULT. If an
unsupported protection strength is
requested, gsswrap() will return a
majorstatus of GSBADQOP.
SunOS 5.11 Last change: 15 Jan 2003 1
Generic Security Services API Library Functions gsswrap(3GS)
inputmessagebuffer The message to be protected.
confstate If the value of confstate is non-
zero, confidentiality, data origin
authentication, and integrity ser-
vices have been applied. If the
value is zero, then integrity ser-
vices have been applied. Specify
NUL if this parameter is not
required.
outputmessagebuffer The buffer to receive the protected
message. Storage associated with
this message must be freed by the
application after use with a call
to gssreleasebuffer(3GS).
ERORS
gsswrap() may return the following status codes:
GSCOMPLETE Successful completion.
GSCONTEXTEXPIRED The context has already expired.
GSNOCONTEXT The contexthandle parameter did
not identify a valid context.
GSBADQOP The specified QOP is not supported
by the mechanism.
GSFAILURE The underlying mechanism detected
an error for which no specific GS
status code is defined. The
mechanism-specific status code
reported by means of the
minorstatus parameter details the
error condition.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 15 Jan 2003 2
Generic Security Services API Library Functions gsswrap(3GS)
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWgss (32-bit)
SUNWgssx (64-bit)
MT-Level Safe
SEE ALSO
gssreleasebuffer(3GS), attributes(5)
Solaris Security for Developers Guide
SunOS 5.11 Last change: 15 Jan 2003 3
|