xref: /freebsd/lib/libgssapi/gss_wrap_size_limit.3 (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
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_WRAP_SIZE_LIMIT 3 PRM
32.Os
33.Sh NAME
34.Nm gss_wrap_size_limit
35.Nd Determine maximum message sizes
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_wrap_size_limit
42.Fa "OM_uint32 *minor_status"
43.Fa "const gss_ctx_id_t context_handle"
44.Fa "int conf_req_flag"
45.Fa "gss_qop_t qop_req"
46.Fa "OM_uint32 req_output_size"
47.Fa "OM_uint32 *max_input_size"
48.Fc
49.Sh DESCRIPTION
50Allows an application to determine the maximum message size that,
51if presented to
52.Xr gss_wrap 3
53with the same
54.Dv conf_req_flag
55and
56.Dv qop_req
57parameters,
58will result in an output token containing no more than
59.Dv req_output_size
60bytes.
61.Pp
62This call is intended for use by applications that
63communicate over protocols that impose a maximum message size.
64It enables the application to fragment messages prior to applying protection.
65.Pp
66GSS-API implementations are recommended but not required to detect
67invalid QOP values when
68.Fn gss_wrap_size_limit
69is called.
70This routine guarantees only a maximum message size,
71not the availability of specific QOP values for message protection.
72.Pp
73Successful completion of this call does not guarantee that
74.Xr gss_wrap 3
75will be able to protect a message of length max_input_size bytes,
76since this ability may depend on the availability of system resources
77at the time that
78.Xr gss_wrap 3
79is called.
80However, if the implementation itself imposes an upper limit on
81the length of messages that may be processed by gss_wrap,
82the implementation should not return a value via
83.Dv max_input_bytes
84that is greater than this length.
85.Sh PARAMETERS
86.Bl -tag -width ".It req_output_size"
87.It minor_status
88Mechanism specific status code.
89.It context_handle
90A handle that refers to the security over which the messages will be sent.
91.It conf_req_flag
92Indicates whether
93.Xr gss_wrap 3
94will be asked to apply confidentiality protection
95in addition to integrity protection.
96.It qop_req
97Indicates the level of protection that
98.Xr gss_wrap 3
99will be asked to provide.
100.It req_output_size
101The desired maximum size for tokens emitted by
102.Xr gss_wrap 3 .
103.It max_input_size
104The maximum input message size that may be presented to
105.Xr gss_wrap 3
106in order to guarantee that the emitted token shall
107be no larger than
108.Dv req_output_size
109bytes.
110.El
111.Sh RETURN VALUES
112.Bl -tag -width ".It GSS_S_CONTEXT_EXPIRED"
113.It GSS_S_COMPLETE
114Successful completion.
115.It GSS_S_NO_CONTEXT
116The referenced context could not be accessed.
117.It GSS_S_CONTEXT_EXPIRED
118The context has expired.
119.It GSS_S_BAD_QOP
120The specified QOP is not supported by the mechanism.
121.El
122.Sh SEE ALSO
123.Xr gss_wrap 3
124.Sh STANDARDS
125.Bl -tag -width ".It RFC 2743"
126.It RFC 2743
127Generic Security Service Application Program Interface Version 2, Update 1
128.It RFC 2744
129Generic Security Service API Version 2 : C-bindings
130.El
131.Sh HISTORY
132The
133.Nm
134function first appeared in
135.Fx 7.0 .
136.Sh AUTHORS
137John Wray, Iris Associates
138.Sh COPYRIGHT
139Copyright (C) The Internet Society (2000).  All Rights Reserved.
140.Pp
141This document and translations of it may be copied and furnished to
142others, and derivative works that comment on or otherwise explain it
143or assist in its implementation may be prepared, copied, published
144and distributed, in whole or in part, without restriction of any
145kind, provided that the above copyright notice and this paragraph are
146included on all such copies and derivative works.  However, this
147document itself may not be modified in any way, such as by removing
148the copyright notice or references to the Internet Society or other
149Internet organizations, except as needed for the purpose of
150developing Internet standards in which case the procedures for
151copyrights defined in the Internet Standards process must be
152followed, or as required to translate it into languages other than
153English.
154.Pp
155The limited permissions granted above are perpetual and will not be
156revoked by the Internet Society or its successors or assigns.
157.Pp
158This document and the information contained herein is provided on an
159"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
160TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
161BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
162HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
163MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
164