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