1.\" -*- nroff -*- 2.\" 3.\" Copyright (c) 2005 Doug Rabson 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" 29.\" The following commands are required for all man pages. 30.Dd October 30, 2007 31.Os 32.Dt GSS_UNWRAP 3 PRM 33.Sh NAME 34.Nm gss_unwrap , 35.Nm gss_unseal 36.Nd Convert a message previously protected by 37.Xr gss_wrap 3 38back to a usable form 39.\" This next command is for sections 2 and 3 only. 40.\" .Sh LIBRARY 41.Sh SYNOPSIS 42.In "gssapi/gssapi.h" 43.Ft OM_uint32 44.Fo gss_unwrap 45.Fa "OM_uint32 *minor_status" 46.Fa "const gss_ctx_id_t context_handle" 47.Fa "const gss_buffer_t input_message_buffer" 48.Fa "gss_buffer_t output_message_buffer" 49.Fa "int *conf_state" 50.Fa "gss_qop_t *qop_state" 51.Fc 52.Ft OM_uint32 53.Fo gss_unseal 54.Fa "OM_uint32 *minor_status" 55.Fa "gss_ctx_id_t context_handle" 56.Fa "gss_buffer_t input_message_buffer" 57.Fa "gss_buffer_t output_message_buffer" 58.Fa "int *conf_state" 59.Fa "gss_qop_t *qop_state" 60.Fc 61.Sh DESCRIPTION 62Converts a message previously protected by 63.Xr gss_wrap 3 64back to a usable form, 65verifying the embedded MIC. 66The 67.Dv conf_state 68parameter indicates whether the message was encrypted; 69the 70.Dv qop_state 71parameter indicates the strength of protection that was used to provide the 72confidentiality and integrity services. 73.Pp 74Since some application-level protocols may wish to use tokens emitted 75by 76.Xr gss_wrap 3 77to provide "secure framing", 78implementations must support the wrapping and unwrapping of 79zero-length messages. 80.Pp 81The 82.Fn gss_unseal 83routine is an obsolete variant of 84.Fn gss_unwrap . 85It is 86provided for backwards 87compatibility with applications using the GSS-API V1 interface. 88A distinct entrypoint (as opposed to #define) is provided, 89both to allow GSS-API V1 applications to link 90and to retain the slight parameter type differences between the 91obsolete versions of this routine and its current form. 92.Sh PARAMETERS 93.Bl -tag 94.It minor_status 95Mechanism specific status code. 96.It context_handle 97Identifies the context on which the message arrived. 98.It input_message_buffer 99Protected message. 100.It output_message_buffer 101Buffer to receive unwrapped message. 102Storage associated with this buffer must 103be freed by the application after use use 104with a call to 105.Xr gss_release_buffer 3 . 106.It conf_state 107.Bl -tag -width "Non-zero" 108.It Non-zero 109Confidentiality and integrity protection were used. 110.It Zero 111Integrity service only was used. 112.El 113.Pp 114Specify NULL if not required. 115.It qop_state 116Quality of protection provided. Specify NULL if not required. 117.El 118.Sh RETURN VALUES 119.Bl -tag 120.It GSS_S_COMPLETE 121Successful completion. 122.It GSS_S_DEFECTIVE_TOKEN 123The token failed consistency checks. 124.It GSS_S_BAD_SIG 125The MIC was incorrect 126.It GSS_S_DUPLICATE_TOKEN 127The token was valid, and contained a correct 128MIC for the message, but it had already been 129processed. 130.It GSS_S_OLD_TOKEN 131The token was valid, and contained a correct MIC 132for the message, but it is too old to check for 133duplication. 134.It GSS_S_UNSEQ_TOKEN 135The token was valid, and contained a correct MIC 136for the message, but has been verified out of 137sequence; a later token has already been 138received. 139.It GSS_S_GAP_TOKEN 140The token was valid, and contained a correct MIC 141for the message, but has been verified out of 142sequence; an earlier expected token has not yet 143been received. 144.It GSS_S_CONTEXT_EXPIRED 145The context has already expired. 146.It GSS_S_NO_CONTEXT 147The context_handle parameter did not identify a valid context. 148.El 149.Sh SEE ALSO 150.Xr gss_wrap 3 , 151.Xr gss_release_buffer 3 152.Sh STANDARDS 153.Bl -tag 154.It RFC 2743 155Generic Security Service Application Program Interface Version 2, Update 1 156.It RFC 2744 157Generic Security Service API Version 2 : C-bindings 158.Sh HISTORY 159The 160.Nm 161manual page example first appeared in 162.Fx 7.0 . 163.Sh AUTHORS 164John Wray, Iris Associates 165.Sh COPYRIGHT 166Copyright (C) The Internet Society (2000). All Rights Reserved. 167.Pp 168This document and translations of it may be copied and furnished to 169others, and derivative works that comment on or otherwise explain it 170or assist in its implementation may be prepared, copied, published 171and distributed, in whole or in part, without restriction of any 172kind, provided that the above copyright notice and this paragraph are 173included on all such copies and derivative works. However, this 174document itself may not be modified in any way, such as by removing 175the copyright notice or references to the Internet Society or other 176Internet organizations, except as needed for the purpose of 177developing Internet standards in which case the procedures for 178copyrights defined in the Internet Standards process must be 179followed, or as required to translate it into languages other than 180English. 181.Pp 182The limited permissions granted above are perpetual and will not be 183revoked by the Internet Society or its successors or assigns. 184.Pp 185This document and the information contained herein is provided on an 186"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 187TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 188BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 189HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 190MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 191