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