xref: /freebsd/lib/libgssapi/gss_delete_sec_context.3 (revision c0b9f4fe659b6839541970eb5675e57f4d814969)
1c0b9f4feSDoug Rabson.\" -*- nroff -*-
2c0b9f4feSDoug Rabson.\"
3c0b9f4feSDoug Rabson.\" Copyright (c) 2005 Doug Rabson
4c0b9f4feSDoug Rabson.\" All rights reserved.
5c0b9f4feSDoug Rabson.\"
6c0b9f4feSDoug Rabson.\" Redistribution and use in source and binary forms, with or without
7c0b9f4feSDoug Rabson.\" modification, are permitted provided that the following conditions
8c0b9f4feSDoug Rabson.\" are met:
9c0b9f4feSDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
10c0b9f4feSDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
11c0b9f4feSDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
12c0b9f4feSDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
13c0b9f4feSDoug Rabson.\"    documentation and/or other materials provided with the distribution.
14c0b9f4feSDoug Rabson.\"
15c0b9f4feSDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16c0b9f4feSDoug Rabson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17c0b9f4feSDoug Rabson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18c0b9f4feSDoug Rabson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19c0b9f4feSDoug Rabson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20c0b9f4feSDoug Rabson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21c0b9f4feSDoug Rabson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22c0b9f4feSDoug Rabson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23c0b9f4feSDoug Rabson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24c0b9f4feSDoug Rabson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25c0b9f4feSDoug Rabson.\" SUCH DAMAGE.
26c0b9f4feSDoug Rabson.\"
27c0b9f4feSDoug Rabson.\"	$FreeBSD$
28c0b9f4feSDoug Rabson.\"
29c0b9f4feSDoug Rabson.\" Copyright (C) The Internet Society (2000).  All Rights Reserved.
30c0b9f4feSDoug Rabson.\"
31c0b9f4feSDoug Rabson.\" This document and translations of it may be copied and furnished to
32c0b9f4feSDoug Rabson.\" others, and derivative works that comment on or otherwise explain it
33c0b9f4feSDoug Rabson.\" or assist in its implementation may be prepared, copied, published
34c0b9f4feSDoug Rabson.\" and distributed, in whole or in part, without restriction of any
35c0b9f4feSDoug Rabson.\" kind, provided that the above copyright notice and this paragraph are
36c0b9f4feSDoug Rabson.\" included on all such copies and derivative works.  However, this
37c0b9f4feSDoug Rabson.\" document itself may not be modified in any way, such as by removing
38c0b9f4feSDoug Rabson.\" the copyright notice or references to the Internet Society or other
39c0b9f4feSDoug Rabson.\" Internet organizations, except as needed for the purpose of
40c0b9f4feSDoug Rabson.\" developing Internet standards in which case the procedures for
41c0b9f4feSDoug Rabson.\" copyrights defined in the Internet Standards process must be
42c0b9f4feSDoug Rabson.\" followed, or as required to translate it into languages other than
43c0b9f4feSDoug Rabson.\" English.
44c0b9f4feSDoug Rabson.\"
45c0b9f4feSDoug Rabson.\" The limited permissions granted above are perpetual and will not be
46c0b9f4feSDoug Rabson.\" revoked by the Internet Society or its successors or assigns.
47c0b9f4feSDoug Rabson.\"
48c0b9f4feSDoug Rabson.\" This document and the information contained herein is provided on an
49c0b9f4feSDoug Rabson.\" "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
50c0b9f4feSDoug Rabson.\" TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
51c0b9f4feSDoug Rabson.\" BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
52c0b9f4feSDoug Rabson.\" HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
53c0b9f4feSDoug Rabson.\" MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
54c0b9f4feSDoug Rabson.\"
55c0b9f4feSDoug Rabson.\" The following commands are required for all man pages.
56c0b9f4feSDoug Rabson.Dd November 12, 2005
57c0b9f4feSDoug Rabson.Os
58c0b9f4feSDoug Rabson.Dt GSS_DELETE_SEC_CONTEXT 3 PRM
59c0b9f4feSDoug Rabson.Sh NAME
60c0b9f4feSDoug Rabson.Nm gss_delete_sec_context
61c0b9f4feSDoug Rabson.Nd Discard a security context
62c0b9f4feSDoug Rabson.\" This next command is for sections 2 and 3 only.
63c0b9f4feSDoug Rabson.\" .Sh LIBRARY
64c0b9f4feSDoug Rabson.Sh SYNOPSIS
65c0b9f4feSDoug Rabson.In "gssapi/gssapi.h"
66c0b9f4feSDoug Rabson.Ft OM_uint32
67c0b9f4feSDoug Rabson.Fo gss_delete_sec_context
68c0b9f4feSDoug Rabson.Fa "OM_uint32 *minor_status"
69c0b9f4feSDoug Rabson.Fa "gss_ctx_id_t *context_handle"
70c0b9f4feSDoug Rabson.Fa "gss_buffer_t output_token"
71c0b9f4feSDoug Rabson.Fc
72c0b9f4feSDoug Rabson.Sh DESCRIPTION
73c0b9f4feSDoug RabsonDelete a security context.
74c0b9f4feSDoug Rabson.Fn gss_delete_sec_context
75c0b9f4feSDoug Rabsonwill delete the local data structures associated with the specified
76c0b9f4feSDoug Rabsonsecurity context,
77c0b9f4feSDoug Rabsonand may generate an output_token,
78c0b9f4feSDoug Rabsonwhich when passed to the peer
79c0b9f4feSDoug Rabson.Fn gss_process_context_token
80c0b9f4feSDoug Rabsonwill instruct it to do likewise.
81c0b9f4feSDoug RabsonIf no token is required by the mechanism,
82c0b9f4feSDoug Rabsonthe GSS-API should set the length field of the output_token (if
83c0b9f4feSDoug Rabsonprovided) to zero.
84c0b9f4feSDoug RabsonNo further security services may be obtained using the context
85c0b9f4feSDoug Rabsonspecified by
86c0b9f4feSDoug Rabson.Fa context_handle .
87c0b9f4feSDoug Rabson.Pp
88c0b9f4feSDoug RabsonIn addition to deleting established security contexts,
89c0b9f4feSDoug Rabson.Fn gss_delete_sec_context
90c0b9f4feSDoug Rabsonmust also be able to delete "half-built" security contexts resulting
91c0b9f4feSDoug Rabsonfrom an incomplete sequence of
92c0b9f4feSDoug Rabson.Fn gss_init_sec_context
93c0b9f4feSDoug Rabson/
94c0b9f4feSDoug Rabson.Fn gss_accept_sec_context
95c0b9f4feSDoug Rabsoncalls.
96c0b9f4feSDoug Rabson.Pp
97c0b9f4feSDoug RabsonThe
98c0b9f4feSDoug Rabson.Fa output_token
99c0b9f4feSDoug Rabsonparameter is retained for compatibility with version 1 of the GSS-API.
100c0b9f4feSDoug RabsonIt is recommended that both peer applications invoke
101c0b9f4feSDoug Rabson.Fn gss_delete_sec_context
102c0b9f4feSDoug Rabsonpassing the value
103c0b9f4feSDoug Rabson.Dv GSS_C_NO_BUFFER
104c0b9f4feSDoug Rabsonfor the
105c0b9f4feSDoug Rabson.Fa output_token
106c0b9f4feSDoug Rabsonparameter,
107c0b9f4feSDoug Rabsonindicating that no token is required,
108c0b9f4feSDoug Rabsonand that
109c0b9f4feSDoug Rabson.Fn gss_delete_sec_context
110c0b9f4feSDoug Rabsonshould simply delete local context data structures.
111c0b9f4feSDoug RabsonIf the application does pass a valid buffer to
112c0b9f4feSDoug Rabson.Fn gss_delete_sec_context ,
113c0b9f4feSDoug Rabsonmechanisms are encouraged to return a zero-length token,
114c0b9f4feSDoug Rabsonindicating that no peer action is necessary,
115c0b9f4feSDoug Rabsonand that no token should be transferred by the application.
116c0b9f4feSDoug Rabson.Sh PARAMETERS
117c0b9f4feSDoug Rabson.Bl -tag
118c0b9f4feSDoug Rabson.It minor_status
119c0b9f4feSDoug RabsonMechanism specific status code.
120c0b9f4feSDoug Rabson.It context_handle
121c0b9f4feSDoug RabsonContext handle identifying context to delete.
122c0b9f4feSDoug RabsonAfter deleting the context,
123c0b9f4feSDoug Rabsonthe GSS-API will set this context handle to
124c0b9f4feSDoug Rabson.Dv GSS_C_NO_CONTEXT .
125c0b9f4feSDoug Rabson.It output_token
126c0b9f4feSDoug RabsonToken to be sent to remote application to instruct it to also delete
127c0b9f4feSDoug Rabsonthe context.
128c0b9f4feSDoug RabsonIt is recommended that applications specify
129c0b9f4feSDoug Rabson.Dv GSS_C_NO_BUFFER
130c0b9f4feSDoug Rabsonfor this parameter,
131c0b9f4feSDoug Rabsonrequesting local deletion only.
132c0b9f4feSDoug RabsonIf a buffer parameter is provided by the application,
133c0b9f4feSDoug Rabsonthe mechanism may return a token in it;
134c0b9f4feSDoug Rabsonmechanisms that implement only local deletion should set the length
135c0b9f4feSDoug Rabsonfield of this token to zero to indicate to the application that no
136c0b9f4feSDoug Rabsontoken is to be sent to the peer.
137c0b9f4feSDoug Rabson.El
138c0b9f4feSDoug Rabson.Sh RETURN VALUES
139c0b9f4feSDoug Rabson.Bl -tag
140c0b9f4feSDoug Rabson.It GSS_S_COMPLETE
141c0b9f4feSDoug RabsonSuccessful completion
142c0b9f4feSDoug Rabson.It GSS_S_NO_CONTEXT
143c0b9f4feSDoug RabsonNo valid context was supplied
144c0b9f4feSDoug Rabson.El
145c0b9f4feSDoug Rabson.Sh SEE ALSO
146c0b9f4feSDoug Rabson.Xr gss_process_context_token 3 ,
147c0b9f4feSDoug Rabson.Xr gss_init_sec_context 3 ,
148c0b9f4feSDoug Rabson.Xr gss_accept_sec_context 3
149c0b9f4feSDoug Rabson.Sh STANDARDS
150c0b9f4feSDoug Rabson.Bl -tag
151c0b9f4feSDoug Rabson.It RFC 2743
152c0b9f4feSDoug RabsonGeneric Security Service Application Program Interface Version 2, Update 1
153c0b9f4feSDoug Rabson.It RFC 2744
154c0b9f4feSDoug RabsonGeneric Security Service API Version 2 : C-bindings
155c0b9f4feSDoug Rabson.\" .Sh HISTORY
156c0b9f4feSDoug Rabson.El
157c0b9f4feSDoug Rabson.Sh HISTORY
158c0b9f4feSDoug RabsonThe
159c0b9f4feSDoug Rabson.Nm
160c0b9f4feSDoug Rabsonmanual page example first appeared in
161c0b9f4feSDoug Rabson.Fx 7.0 .
162c0b9f4feSDoug Rabson.Sh AUTHORS
163c0b9f4feSDoug RabsonJohn Wray, Iris Associates
164