xref: /freebsd/lib/libgssapi/gss_delete_sec_context.3 (revision 63d1fd5970ec814904aa0f4580b10a0d302d08b2)
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 January 26, 2010
31.Dt GSS_DELETE_SEC_CONTEXT 3 PRM
32.Os
33.Sh NAME
34.Nm gss_delete_sec_context
35.Nd Discard a security context
36.\" This next command is for sections 2 and 3 only.
37.\" .Sh LIBRARY
38.Sh SYNOPSIS
39.In "gssapi/gssapi.h"
40.Ft OM_uint32
41.Fo gss_delete_sec_context
42.Fa "OM_uint32 *minor_status"
43.Fa "gss_ctx_id_t *context_handle"
44.Fa "gss_buffer_t output_token"
45.Fc
46.Sh DESCRIPTION
47Delete a security context.
48.Fn gss_delete_sec_context
49will delete the local data structures associated with the specified
50security context,
51and may generate an output_token,
52which when passed to the peer
53.Fn gss_process_context_token
54will instruct it to do likewise.
55If no token is required by the mechanism,
56the GSS-API should set the length field of the output_token (if
57provided) to zero.
58No further security services may be obtained using the context
59specified by
60.Fa context_handle .
61.Pp
62In addition to deleting established security contexts,
63.Fn gss_delete_sec_context
64must also be able to delete "half-built" security contexts resulting
65from an incomplete sequence of
66.Fn gss_init_sec_context
67/
68.Fn gss_accept_sec_context
69calls.
70.Pp
71The
72.Fa output_token
73parameter is retained for compatibility with version 1 of the GSS-API.
74It is recommended that both peer applications invoke
75.Fn gss_delete_sec_context
76passing the value
77.Dv GSS_C_NO_BUFFER
78for the
79.Fa output_token
80parameter,
81indicating that no token is required,
82and that
83.Fn gss_delete_sec_context
84should simply delete local context data structures.
85If the application does pass a valid buffer to
86.Fn gss_delete_sec_context ,
87mechanisms are encouraged to return a zero-length token,
88indicating that no peer action is necessary,
89and that no token should be transferred by the application.
90.Sh PARAMETERS
91.Bl -tag -width ".It context_handle"
92.It minor_status
93Mechanism specific status code.
94.It context_handle
95Context handle identifying context to delete.
96After deleting the context,
97the GSS-API will set this context handle to
98.Dv GSS_C_NO_CONTEXT .
99.It output_token
100Token to be sent to remote application to instruct it to also delete
101the context.
102It is recommended that applications specify
103.Dv GSS_C_NO_BUFFER
104for this parameter,
105requesting local deletion only.
106If a buffer parameter is provided by the application,
107the mechanism may return a token in it;
108mechanisms that implement only local deletion should set the length
109field of this token to zero to indicate to the application that no
110token is to be sent to the peer.
111.El
112.Sh RETURN VALUES
113.Bl -tag -width ".It context_handle"
114.It GSS_S_COMPLETE
115Successful completion
116.It GSS_S_NO_CONTEXT
117No valid context was supplied
118.El
119.Sh SEE ALSO
120.Xr gss_accept_sec_context 3 ,
121.Xr gss_init_sec_context 3 ,
122.Xr gss_process_context_token 3
123.Sh STANDARDS
124.Bl -tag -width ".It RFC 2743"
125.It RFC 2743
126Generic Security Service Application Program Interface Version 2, Update 1
127.It RFC 2744
128Generic Security Service API Version 2 : C-bindings
129.El
130.Sh HISTORY
131The
132.Nm
133function first appeared in
134.Fx 7.0 .
135.Sh AUTHORS
136John Wray, Iris Associates
137.Sh COPYRIGHT
138Copyright (C) The Internet Society (2000).  All Rights Reserved.
139.Pp
140This document and translations of it may be copied and furnished to
141others, and derivative works that comment on or otherwise explain it
142or assist in its implementation may be prepared, copied, published
143and distributed, in whole or in part, without restriction of any
144kind, provided that the above copyright notice and this paragraph are
145included on all such copies and derivative works.  However, this
146document itself may not be modified in any way, such as by removing
147the copyright notice or references to the Internet Society or other
148Internet organizations, except as needed for the purpose of
149developing Internet standards in which case the procedures for
150copyrights defined in the Internet Standards process must be
151followed, or as required to translate it into languages other than
152English.
153.Pp
154The limited permissions granted above are perpetual and will not be
155revoked by the Internet Society or its successors or assigns.
156.Pp
157This document and the information contained herein is provided on an
158"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
159TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
160BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
161HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
162MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
163