---
name: "gss_get_mic"
section: "3"
platform: "linux"
package: "gss-man"
version: "1.0.4-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gss_get_mic"
---

# gss\_get\_mic(3)

API function

## NAME

gss\_get\_mic - API function

## SYNOPSIS

**#include \<gss.h\>**

**OM\_uint32 gss\_get\_mic(OM\_uint32 \*** *minor\_status***, const gss\_ctx\_id\_t** *context\_handle***, gss\_qop\_t** *qop\_req***, const gss\_buffer\_t** *message\_buffer***, gss\_buffer\_t** *message\_token***);**

## ARGUMENTS

- OM\_uint32 \* minor\_status

  (Integer, modify) Mechanism specific status code.

- const gss\_ctx\_id\_t context\_handle

  (gss\_ctx\_id\_t, read) Identifies the context on\
     which the message will be sent.

- gss\_qop\_t qop\_req

  (gss\_qop\_t, read, optional) Specifies requested quality\
     of protection.  Callers are encouraged, on portability grounds,\
     to accept the default quality of protection offered by the chosen\
     mechanism, which may be requested by specifying GSS\_C\_QOP\_DEFAULT\
     for this parameter.  If an unsupported protection strength is\
     requested, gss\_get\_mic will return a major\_status of\
     GSS\_S\_BAD\_QOP.

- const gss\_buffer\_t message\_buffer

  (buffer, opaque, read) Message to be protected.

- gss\_buffer\_t message\_token

  (buffer, opaque, modify) Buffer to receive token.  The\
     application must free storage associated with this buffer after\
     use with a call to **gss\_release\_buffer()**.

## DESCRIPTION

Generates a cryptographic MIC for the supplied message, and places the MIC in a token for transfer to the peer application. The qop\_req parameter allows a choice between several cryptographic algorithms, if supported by the chosen mechanism.

Since some application-level protocols may wish to use tokens emitted by **gss\_wrap()** to provide "secure framing", implementations must support derivation of MICs from zero-length messages.

## RETURN VALUE

\`GSS\_S\_COMPLETE\`: Successful completion.

\`GSS\_S\_CONTEXT\_EXPIRED\`: The context has already expired.

\`GSS\_S\_NO\_CONTEXT\`: The context\_handle parameter did not identify a valid context.

\`GSS\_S\_BAD\_QOP\`: The specified QOP is not supported by the mechanism.

## REPORTING BUGS

Report bugs to \<bug-gss@gnu.org\>. GNU Generic Security Service home page: http://www.gnu.org/software/gss/ General help using GNU software: http://www.gnu.org/gethelp/

## COPYRIGHT

Copyright © 2003-2022 Simon Josefsson.\
 Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

## SEE ALSO

The full documentation for **gss** is maintained as a Texinfo manual.  If the **info** and **gss** programs are properly installed at your site, the command

-

  **info gss**

should give you access to the complete manual.
