1 # 1 "special.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "special.c"
5 /*
6  * CDDL HEADER START
7  *
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License (the "License").
10  * You may not use this file except in compliance with the License.
11  *
12  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13  * or http://www.opensolaris.org/os/licensing.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19  * If applicable, add the following below this CDDL HEADER, with the
20  * fields enclosed by brackets "[]" replaced with your own identifying
21  * information: Portions Copyright [yyyy] [name of copyright owner]
22  *
23  * CDDL HEADER END
24  */
25 
26 /*
27  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 
32 /*
33  * special.c
34  *
35  * This module contains code required to remove special contents from
36  * the contents file when a pkgrm is done on a system upgraded to use
37  * the new database.
38  */
39 
40 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
41 /*
42  * CDDL HEADER START
43  *
44  * The contents of this file are subject to the terms of the
45  * Common Development and Distribution License (the "License").
46  * You may not use this file except in compliance with the License.
47  *
48  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
49  * or http://www.opensolaris.org/os/licensing.
50  * See the License for the specific language governing permissions
51  * and limitations under the License.
52  *
53  * When distributing Covered Code, include this CDDL HEADER in each
54  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
55  * If applicable, add the following below this CDDL HEADER, with the
56  * fields enclosed by brackets "[]" replaced with your own identifying
57  * information: Portions Copyright [yyyy] [name of copyright owner]
58  *
59  * CDDL HEADER END
60  */
61 
62 /*
63  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
64  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
65  */
66 
67 /*	Copyright (c) 1988 AT&T	*/
68 /*	  All Rights Reserved  	*/
69 
70 /*
71  * User-visible pieces of the ANSI C standard I/O package.
72  */
73 
74 
75 
76 
77 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
78 /*
79  * CDDL HEADER START
80  *
81  * The contents of this file are subject to the terms of the
82  * Common Development and Distribution License (the "License").
83  * You may not use this file except in compliance with the License.
84  *
85  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
86  * or http://www.opensolaris.org/os/licensing.
87  * See the License for the specific language governing permissions
88  * and limitations under the License.
89  *
90  * When distributing Covered Code, include this CDDL HEADER in each
91  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
92  * If applicable, add the following below this CDDL HEADER, with the
93  * fields enclosed by brackets "[]" replaced with your own identifying
94  * information: Portions Copyright [yyyy] [name of copyright owner]
95  *
96  * CDDL HEADER END
97  */
98 
99 /*
100  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
101  * Copyright 2016 Joyent, Inc.
102  *
103  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
104  * Use is subject to license terms.
105  */
106 
107 
108 
109 
110 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
111 /*
112  * CDDL HEADER START
113  *
114  * The contents of this file are subject to the terms of the
115  * Common Development and Distribution License, Version 1.0 only
116  * (the "License").  You may not use this file except in compliance
117  * with the License.
118  *
119  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
120  * or http://www.opensolaris.org/os/licensing.
121  * See the License for the specific language governing permissions
122  * and limitations under the License.
123  *
124  * When distributing Covered Code, include this CDDL HEADER in each
125  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
126  * If applicable, add the following below this CDDL HEADER, with the
127  * fields enclosed by brackets "[]" replaced with your own identifying
128  * information: Portions Copyright [yyyy] [name of copyright owner]
129  *
130  * CDDL HEADER END
131  */
132 /*
133  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
134  * Use is subject to license terms.
135  */
136 /*
137  * Copyright 2015 EveryCity Ltd. All rights reserved.
138  */
139 
140 
141 
142 
143 /*
144  * This file contains definitions designed to enable different compilers
145  * to be used harmoniously on Solaris systems.
146  */
147 
148 
149 
150 
151 
152 /*
153  * Allow for version tests for compiler bugs and features.
154  */
155 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
156 /*
157  * analogous to lint's PRINTFLIKEn
158  */
159 
160 
161 
162 
163 
164 /*
165  * Handle the kernel printf routines that can take '%b' too
166  */
167 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
168 /*
169  * This one's pretty obvious -- the function never returns
170  */
171 
172 
173 /*
174  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
175  * behaviour.
176  *
177  * Should only be used on 'extern inline' definitions for GCC.
178  */
179 
180 
181 
182 
183 
184 
185 /*
186  * The function has control flow such that it may return multiple times (in
187  * the manner of setjmp or vfork)
188  */
189 
190 
191 
192 
193 
194 
195 /*
196  * This is an appropriate label for functions that do not
197  * modify their arguments, e.g. strlen()
198  */
199 
200 
201 /*
202  * This is a stronger form of __pure__. Can be used for functions
203  * that do not modify their arguments and don't depend on global
204  * memory.
205  */
206 
207 
208 
209 
210 /*
211  * This attribute, attached to a variable, means that the variable is meant to
212  * be possibly unused. GCC will not produce a warning for this variable.
213  */
214 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
215 /*
216  * Shorthand versions for readability
217  */
218 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
219 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
220 /*
221  * CDDL HEADER START
222  *
223  * The contents of this file are subject to the terms of the
224  * Common Development and Distribution License (the "License").
225  * You may not use this file except in compliance with the License.
226  *
227  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
228  * or http://www.opensolaris.org/os/licensing.
229  * See the License for the specific language governing permissions
230  * and limitations under the License.
231  *
232  *
233  * When distributing Covered Code, include this CDDL HEADER in each
234  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
235  * If applicable, add the following below this CDDL HEADER, with the
236  * fields enclosed by brackets "[]" replaced with your own identifying
237  * information: Portions Copyright [yyyy] [name of copyright owner]
238  *
239  * CDDL HEADER END
240  */
241 
242 /*
243  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
244  * Use is subject to license terms.
245  * Copyright 2016 Joyent, Inc.
246  */
247 
248 
249 
250 
251 /*
252  * This header file serves to group a set of well known defines and to
253  * set these for each instruction set architecture.  These defines may
254  * be divided into two groups;  characteristics of the processor and
255  * implementation choices for Solaris on a processor.
256  *
257  * Processor Characteristics:
258  *
259  * _LITTLE_ENDIAN / _BIG_ENDIAN:
260  *	The natural byte order of the processor.  A pointer to an int points
261  *	to the least/most significant byte of that int.
262  *
263  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
264  *	The processor specific direction of stack growth.  A push onto the
265  *	stack increases/decreases the stack pointer, so it stores data at
266  *	successively higher/lower addresses.  (Stackless machines ignored
267  *	without regrets).
268  *
269  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
270  *	A pointer to a long long points to the most/least significant long
271  *	within that long long.
272  *
273  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
274  *	The C compiler assigns bit fields from the high/low to the low/high end
275  *	of an int (most to least significant vs. least to most significant).
276  *
277  * _IEEE_754:
278  *	The processor (or supported implementations of the processor)
279  *	supports the ieee-754 floating point standard.  No other floating
280  *	point standards are supported (or significant).  Any other supported
281  *	floating point formats are expected to be cased on the ISA processor
282  *	symbol.
283  *
284  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
285  *	The C Compiler implements objects of type `char' as `unsigned' or
286  *	`signed' respectively.  This is really an implementation choice of
287  *	the compiler writer, but it is specified in the ABI and tends to
288  *	be uniform across compilers for an instruction set architecture.
289  *	Hence, it has the properties of a processor characteristic.
290  *
291  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
292  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
293  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
294  *	The ABI defines alignment requirements of each of the primitive
295  *	object types.  Some, if not all, may be hardware requirements as
296  * 	well.  The values are expressed in "byte-alignment" units.
297  *
298  * _MAX_ALIGNMENT:
299  *	The most stringent alignment requirement as specified by the ABI.
300  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
301  *
302  * _MAX_ALIGNMENT_TYPE:
303  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
304  *
305  * _ALIGNMENT_REQUIRED:
306  *	True or false (1 or 0) whether or not the hardware requires the ABI
307  *	alignment.
308  *
309  * _LONG_LONG_ALIGNMENT_32
310  *	The 32-bit ABI supported by a 64-bit kernel may have different
311  *	alignment requirements for primitive object types.  The value of this
312  *	identifier is expressed in "byte-alignment" units.
313  *
314  * _HAVE_CPUID_INSN
315  *	This indicates that the architecture supports the 'cpuid'
316  *	instruction as defined by Intel.  (Intel allows other vendors
317  *	to extend the instruction for their own purposes.)
318  *
319  *
320  * Implementation Choices:
321  *
322  * _ILP32 / _LP64:
323  *	This specifies the compiler data type implementation as specified in
324  *	the relevant ABI.  The choice between these is strongly influenced
325  *	by the underlying hardware, but is not absolutely tied to it.
326  *	Currently only two data type models are supported:
327  *
328  *	_ILP32:
329  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
330  *		and Solaris implementation.  Due to its historical standing,
331  *		this is the default case.
332  *
333  *	_LP64:
334  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
335  *		implementation for 64-bit ABIs such as SPARC V9.
336  *
337  *	_I32LPx:
338  *		A compilation environment where 'int' is 32-bit, and
339  *		longs and pointers are simply the same size.
340  *
341  *	In all cases, Char is 8 bits and Short is 16 bits.
342  *
343  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
344  *	This specifies the form of the disk VTOC (or label):
345  *
346  *	_SUNOS_VTOC_8:
347  *		This is a VTOC form which is upwardly compatible with the
348  *		SunOS 4.x disk label and allows 8 partitions per disk.
349  *
350  *	_SUNOS_VTOC_16:
351  *		In this format the incore vtoc image matches the ondisk
352  *		version.  It allows 16 slices per disk, and is not
353  *		compatible with the SunOS 4.x disk label.
354  *
355  *	Note that these are not the only two VTOC forms possible and
356  *	additional forms may be added.  One possible form would be the
357  *	SVr4 VTOC form.  The symbol for that is reserved now, although
358  *	it is not implemented.
359  *
360  *	_SVR4_VTOC_16:
361  *		This VTOC form is compatible with the System V Release 4
362  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
363  *		16 partitions per disk.
364  *
365  *
366  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
367  *	This describes the type of addresses used by system DMA:
368  *
369  *	_DMA_USES_PHYSADDR:
370  *		This type of DMA, used in the x86 implementation,
371  *		requires physical addresses for DMA buffers.  The 24-bit
372  *		addresses used by some legacy boards is the source of the
373  *		"low-memory" (<16MB) requirement for some devices using DMA.
374  *
375  *	_DMA_USES_VIRTADDR:
376  *		This method of DMA allows the use of virtual addresses for
377  *		DMA transfers.
378  *
379  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
380  *      This indicates the presence/absence of an fdisk table.
381  *
382  *      _FIRMWARE_NEEDS_FDISK
383  *              The fdisk table is required by system firmware.  If present,
384  *              it allows a disk to be subdivided into multiple fdisk
385  *              partitions, each of which is equivalent to a separate,
386  *              virtual disk.  This enables the co-existence of multiple
387  *              operating systems on a shared hard disk.
388  *
389  *      _NO_FDISK_PRESENT
390  *              If the fdisk table is absent, it is assumed that the entire
391  *              media is allocated for a single operating system.
392  *
393  * _HAVE_TEM_FIRMWARE
394  *	Defined if this architecture has the (fallback) option of
395  *	using prom_* calls for doing I/O if a suitable kernel driver
396  *	is not available to do it.
397  *
398  * _DONT_USE_1275_GENERIC_NAMES
399  *		Controls whether or not device tree node names should
400  *		comply with the IEEE 1275 "Generic Names" Recommended
401  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
402  *		names identifying the particular device will be used.
403  *
404  * __i386_COMPAT
405  *	This indicates whether the i386 ABI is supported as a *non-native*
406  *	mode for the platform.  When this symbol is defined:
407  *	-	32-bit xstat-style system calls are enabled
408  *	-	32-bit xmknod-style system calls are enabled
409  *	-	32-bit system calls use i386 sizes -and- alignments
410  *
411  *	Note that this is NOT defined for the i386 native environment!
412  *
413  * __x86
414  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
415  *	which is useful only insofar as these two architectures share
416  *	common attributes.  Analogous to __sparc.
417  *
418  * _PSM_MODULES
419  *	This indicates whether or not the implementation uses PSM
420  *	modules for processor support, reading /etc/mach from inside
421  *	the kernel to extract a list.
422  *
423  * _RTC_CONFIG
424  *	This indicates whether or not the implementation uses /etc/rtc_config
425  *	to configure the real-time clock in the kernel.
426  *
427  * _UNIX_KRTLD
428  *	This indicates that the implementation uses a dynamically
429  *	linked unix + krtld to form the core kernel image at boot
430  *	time, or (in the absence of this symbol) a prelinked kernel image.
431  *
432  * _OBP
433  *	This indicates the firmware interface is OBP.
434  *
435  * _SOFT_HOSTID
436  *	This indicates that the implementation obtains the hostid
437  *	from the file /etc/hostid, rather than from hardware.
438  */
439 
440 
441 
442 
443 
444 /*
445  * The following set of definitions characterize Solaris on AMD's
446  * 64-bit systems.
447  */
448 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
449 /*
450  * Define the appropriate "processor characteristics"
451  */
452 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
453 /*
454  * Define the appropriate "implementation choices".
455  */
456 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
457 /*
458  * The following set of definitions characterize the Solaris on SPARC systems.
459  *
460  * The symbol __sparc indicates any of the SPARC family of processor
461  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
462  *
463  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
464  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
465  * to SPARC V8 for the former to be subsumed into the latter definition.)
466  *
467  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
468  * by Version 9 of the SPARC Architecture Manual.
469  *
470  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
471  * relevant when the symbol __sparc is defined.
472  */
473 /*
474  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
475  * to support backwards builds.  This workaround should be removed in s10_71.
476  */
477 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
478 
479 
480 
481 
482 
483 /*
484  * Values of _POSIX_C_SOURCE
485  *
486  *		undefined   not a POSIX compilation
487  *		1	    POSIX.1-1990 compilation
488  *		2	    POSIX.2-1992 compilation
489  *		199309L	    POSIX.1b-1993 compilation (Real Time)
490  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
491  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
492  *		200809L     POSIX.1-2008 compilation
493  */
494 
495 
496 
497 
498 /*
499  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
500  * and _STDC_C99 are Sun implementation specific macros created in order to
501  * compress common standards specified feature test macros for easier reading.
502  * These macros should not be used by the application developer as
503  * unexpected results may occur. Instead, the user should reference
504  * standards(5) for correct usage of the standards feature test macros.
505  *
506  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
507  *                      X/Open or POSIX or in the negative, when neither
508  *                      X/Open or POSIX defines a symbol.
509  *
510  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
511  *                      by the compiler. For Sun compilers the value of
512  *                      __STDC__ is either 1, 0, or not defined based on the
513  *                      compilation mode (see cc(1)). When the value of
514  *                      __STDC__ is 1 and in the absence of any other feature
515  *                      test macros, the namespace available to the application
516  *                      is limited to only those symbols defined by the C
517  *                      Standard. _STRICT_STDC provides a more readable means
518  *                      of identifying symbols defined by the standard, or in
519  *                      the negative, symbols that are extensions to the C
520  *                      Standard. See additional comments for GNU C differences.
521  *
522  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
523  *                      defined by the compiler and indicates the version of
524  *                      the C standard. A value of 199901L indicates a
525  *                      compiler that complies with ISO/IEC 9899:1999, other-
526  *                      wise known as the C99 standard.
527  *
528  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
529  *                      is 201112L indicating a compiler that compiles with
530  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
531  *
532  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
533  *                      by the standards, and the user has not explicitly
534  *                      relaxed the strictness via __EXTENSIONS__.
535  */
536 
537 
538 
539 
540 
541 /*
542  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
543  * 99899:2011 specify the following predefined macro name:
544  *
545  * __STDC__	The integer constant 1, intended to indicate a conforming
546  *		implementation.
547  *
548  * Furthermore, a strictly conforming program shall use only those features
549  * of the language and library specified in these standards. A conforming
550  * implementation shall accept any strictly conforming program.
551  *
552  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
553  * strictly conforming environments and __STDC__ to 0 for environments that
554  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
555  * C semantics, Sun's C compiler does not define __STDC__.
556  *
557  * The GNU C project interpretation is that __STDC__ should always be defined
558  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
559  * or not extensions to the C standard are used. Violations of conforming
560  * behavior are conditionally flagged as warnings via the use of the
561  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
562  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
563  * conforming environments using the -ansi or -std=<standard> options.
564  *
565  * In the absence of any other compiler options, Sun and GNU set the value
566  * of __STDC__ as follows when using the following options:
567  *
568  *				Value of __STDC__  __STRICT_ANSI__
569  *
570  * cc -Xa (default)			0	      undefined
571  * cc -Xt (transitional)		0             undefined
572  * cc -Xc (strictly conforming)		1	      undefined
573  * cc -Xs (K&R C)		    undefined	      undefined
574  *
575  * gcc (default)			1	      undefined
576  * gcc -ansi, -std={c89, c99,...)  	1              defined
577  * gcc -traditional (K&R)	    undefined	      undefined
578  *
579  * The default compilation modes for Sun C compilers versus GNU C compilers
580  * results in a differing value for __STDC__ which results in a more
581  * restricted namespace when using Sun compilers. To allow both GNU and Sun
582  * interpretations to peacefully co-exist, we use the following Sun
583  * implementation _STRICT_STDC_ macro:
584  */
585 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
586 /*
587  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
588  */
589 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
590 /*
591  * Use strict symbol visibility.
592  */
593 
594 
595 
596 
597 
598 /*
599  * Large file interfaces:
600  *
601  *	_LARGEFILE_SOURCE
602  *		1		large file-related additions to POSIX
603  *				interfaces requested (fseeko, etc.)
604  *	_LARGEFILE64_SOURCE
605  *		1		transitional large-file-related interfaces
606  *				requested (seek64, stat64, etc.)
607  *
608  * The corresponding announcement macros are respectively:
609  *	_LFS_LARGEFILE
610  *	_LFS64_LARGEFILE
611  * (These are set in <unistd.h>.)
612  *
613  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
614  * well.
615  *
616  * The large file interfaces are made visible regardless of the initial values
617  * of the feature test macros under certain circumstances:
618  *    -	If no explicit standards-conforming environment is requested (neither
619  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
620  *	__STDC__ does not imply standards conformance).
621  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
622  * 	is defined).
623  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
624  *	defined).  (Note that this dependency is an artifact of the current
625  *	kernel implementation and may change in future releases.)
626  */
627 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
628 /*
629  * Large file compilation environment control:
630  *
631  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
632  * types and governs the mapping between file-related source function symbol
633  * names and the corresponding binary entry points.
634  *
635  * In the 32-bit environment, the default value is 32; if not set, set it to
636  * the default here, to simplify tests in other headers.
637  *
638  * In the 64-bit compilation environment, the only value allowed is 64.
639  */
640 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
641 /*
642  * Use of _XOPEN_SOURCE
643  *
644  * The following X/Open specifications are supported:
645  *
646  * X/Open Portability Guide, Issue 3 (XPG3)
647  * X/Open CAE Specification, Issue 4 (XPG4)
648  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
649  * X/Open CAE Specification, Issue 5 (XPG5)
650  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
651  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
652  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
653  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
654  *
655  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
656  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
657  *     Version 2 (SUSv2)
658  * XPG6 is the result of a merge of the X/Open and POSIX specifications
659  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
660  *     addition to UNIX 03 and SUSv3.
661  * XPG7 is also referred to as UNIX 08 and SUSv4.
662  *
663  * When writing a conforming X/Open application, as per the specification
664  * requirements, the appropriate feature test macros must be defined at
665  * compile time. These are as follows. For more info, see standards(5).
666  *
667  * Feature Test Macro				     Specification
668  * ------------------------------------------------  -------------
669  * _XOPEN_SOURCE                                         XPG3
670  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
671  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
672  * _XOPEN_SOURCE = 500                                   XPG5
673  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
674  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
675  *
676  * In order to simplify the guards within the headers, the following
677  * implementation private test macros have been created. Applications
678  * must NOT use these private test macros as unexpected results will
679  * occur.
680  *
681  * Note that in general, the use of these private macros is cumulative.
682  * For example, the use of _XPG3 with no other restrictions on the X/Open
683  * namespace will make the symbols visible for XPG3 through XPG6
684  * compilation environments. The use of _XPG4_2 with no other X/Open
685  * namespace restrictions indicates that the symbols were introduced in
686  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
687  * environments, but not for XPG3 or XPG4 compilation environments.
688  *
689  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
690  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
691  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
692  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
693  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
694  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
695  */
696 
697 /* X/Open Portability Guide, Issue 3 */
698 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
699 /*
700  * _XOPEN_VERSION is defined by the X/Open specifications and is not
701  * normally defined by the application, except in the case of an XPG4
702  * application.  On the implementation side, _XOPEN_VERSION defined with
703  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
704  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
705  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
706  * application and with a value of 600 indicates an XPG6 (UNIX 03)
707  * application and with a value of 700 indicates an XPG7 (UNIX 08).
708  * The appropriate version is determined by the use of the
709  * feature test macros described earlier.  The value of _XOPEN_VERSION
710  * defaults to 3 otherwise indicating support for XPG3 applications.
711  */
712 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
713 /*
714  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
715  * conforming environments.  ISO 9899:1999 says it does.
716  *
717  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
718  * defined in all but strictly conforming environments that disallow it.
719  */
720 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
721 /*
722  * The following macro defines a value for the ISO C99 restrict
723  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
724  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
725  * if any other compiler is used. This allows for the use of single
726  * prototype declarations regardless of compiler version.
727  */
728 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
729 /*
730  * The following macro defines a value for the ISO C11 _Noreturn
731  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
732  * an ISO C11 compiler is used and "" (null string) if any other
733  * compiler is used. This allows for the use of single prototype
734  * declarations regardless of compiler version.
735  */
736 
737 
738 
739 
740 
741 
742 
743 /*
744  * The following macro indicates header support for the ANSI C++
745  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
746  */
747 
748 
749 /*
750  * The following macro indicates header support for the C99 standard,
751  * ISO/IEC 9899:1999, Programming Languages - C.
752  */
753 
754 
755 /*
756  * The following macro indicates header support for the C99 standard,
757  * ISO/IEC 9899:2011, Programming Languages - C.
758  */
759 
760 
761 /*
762  * The following macro indicates header support for DTrace. The value is an
763  * integer that corresponds to the major version number for DTrace.
764  */
765 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
766 
767 
768 
769 
770 
771 /*
772  * Do all of our 'redefine_extname' processing before
773  * declarations of the associated functions are seen.
774  * This is necessary to keep gcc happy.
775  */
776 
777 
778 /* large file compilation environment setup */
779 
780 
781 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
782 #pragma redefine_extname fopen fopen64
783 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
784 
785 
786 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
787 #pragma redefine_extname freopen freopen64
788 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
789 
790 
791 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
792 #pragma redefine_extname tmpfile tmpfile64
793 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
794 
795 
796 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
797 #pragma redefine_extname fgetpos fgetpos64
798 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
799 
800 
801 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
802 #pragma redefine_extname fsetpos fsetpos64
803 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
804 
805 
806 
807 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
808 #pragma redefine_extname fseeko fseeko64
809 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
810 
811 
812 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
813 #pragma redefine_extname ftello ftello64
814 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
815 
816 
817 
818 
819 /* In the LP64 compilation environment, all APIs are already large file */
820 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
821 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
822 /*
823  * CDDL HEADER START
824  *
825  * The contents of this file are subject to the terms of the
826  * Common Development and Distribution License, Version 1.0 only
827  * (the "License").  You may not use this file except in compliance
828  * with the License.
829  *
830  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
831  * or http://www.opensolaris.org/os/licensing.
832  * See the License for the specific language governing permissions
833  * and limitations under the License.
834  *
835  * When distributing Covered Code, include this CDDL HEADER in each
836  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
837  * If applicable, add the following below this CDDL HEADER, with the
838  * fields enclosed by brackets "[]" replaced with your own identifying
839  * information: Portions Copyright [yyyy] [name of copyright owner]
840  *
841  * CDDL HEADER END
842  */
843 /*
844  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
845  * Copyright 2014 PALO, Richard.
846  *
847  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
848  * Use is subject to license terms.
849  */
850 
851 /*	Copyright (c) 1988 AT&T	*/
852 /*	  All Rights Reserved  	*/
853 
854 /*
855  * An application should not include this header directly.  Instead it
856  * should be included only through the inclusion of other Sun headers.
857  *
858  * The contents of this header is limited to identifiers specified in the
859  * C Standard.  Any new identifiers specified in future amendments to the
860  * C Standard must be placed in this header.  If these new identifiers
861  * are required to also be in the C++ Standard "std" namespace, then for
862  * anything other than macro definitions, corresponding "using" directives
863  * must also be added to <stdio.h>.
864  */
865 
866 /*
867  * User-visible pieces of the ANSI C standard I/O package.
868  */
869 
870 
871 
872 
873 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
874 /*
875  * CDDL HEADER START
876  *
877  * The contents of this file are subject to the terms of the
878  * Common Development and Distribution License (the "License").
879  * You may not use this file except in compliance with the License.
880  *
881  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
882  * or http://www.opensolaris.org/os/licensing.
883  * See the License for the specific language governing permissions
884  * and limitations under the License.
885  *
886  * When distributing Covered Code, include this CDDL HEADER in each
887  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
888  * If applicable, add the following below this CDDL HEADER, with the
889  * fields enclosed by brackets "[]" replaced with your own identifying
890  * information: Portions Copyright [yyyy] [name of copyright owner]
891  *
892  * CDDL HEADER END
893  */
894 
895 /*
896  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
897  * Copyright 2016 Joyent, Inc.
898  *
899  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
900  * Use is subject to license terms.
901  */
902 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
903 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
904 /*
905  * This file and its contents are supplied under the terms of the
906  * Common Development and Distribution License ("CDDL"), version 1.0.
907  * You may only use this file in accordance with the terms of version
908  * 1.0 of the CDDL.
909  *
910  * A full copy of the text of the CDDL should have accompanied this
911  * source.  A copy of the CDDL is also available via the Internet at
912  * http://www.illumos.org/license/CDDL.
913  */
914 
915 /*
916  * Copyright 2014-2016 PALO, Richard.
917  */
918 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
919 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
920 /*
921  * CDDL HEADER START
922  *
923  * The contents of this file are subject to the terms of the
924  * Common Development and Distribution License, Version 1.0 only
925  * (the "License").  You may not use this file except in compliance
926  * with the License.
927  *
928  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
929  * or http://www.opensolaris.org/os/licensing.
930  * See the License for the specific language governing permissions
931  * and limitations under the License.
932  *
933  * When distributing Covered Code, include this CDDL HEADER in each
934  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
935  * If applicable, add the following below this CDDL HEADER, with the
936  * fields enclosed by brackets "[]" replaced with your own identifying
937  * information: Portions Copyright [yyyy] [name of copyright owner]
938  *
939  * CDDL HEADER END
940  */
941 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
942 /*	  All Rights Reserved	*/
943 
944 
945 /*
946  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
947  *
948  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
949  * Use is subject to license terms.
950  */
951 
952 
953 
954 
955 /*
956  * An application should not include this header directly.  Instead it
957  * should be included only through the inclusion of other Sun headers.
958  *
959  * The purpose of this header is to provide the type definitions for
960  * the va_list argument used by a number of printf and printf like
961  * functions. The headers that define these various function prototypes
962  * #include this header directly. These include but are not necessarily
963  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
964  * <syslog.h>. The type definitions included in this header are for
965  * the benefit of consumers of va_list.
966  *
967  * Any application that accepts variable argument lists must as documented,
968  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
969  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
970  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
971  * in <sys/va_impl.h> for more detailed information regarding implementation
972  * and compiler specific protocols.
973  */
974 
975 /*
976  * The common definitions exported by this header or compilers using
977  * this header are:
978  *
979  * the identifier __builtin_va_alist for the variable list pseudo parameter
980  * the type __va_alist_type for the variable list pseudo parameter
981  * the type __va_list defining the type of the variable list iterator
982  *
983  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
984  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
985  * defined by the compilation system, not the user of the system.
986  */
987 
988 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
989 /*
990  * CDDL HEADER START
991  *
992  * The contents of this file are subject to the terms of the
993  * Common Development and Distribution License (the "License").
994  * You may not use this file except in compliance with the License.
995  *
996  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
997  * or http://www.opensolaris.org/os/licensing.
998  * See the License for the specific language governing permissions
999  * and limitations under the License.
1000  *
1001  *
1002  * When distributing Covered Code, include this CDDL HEADER in each
1003  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1004  * If applicable, add the following below this CDDL HEADER, with the
1005  * fields enclosed by brackets "[]" replaced with your own identifying
1006  * information: Portions Copyright [yyyy] [name of copyright owner]
1007  *
1008  * CDDL HEADER END
1009  */
1010 
1011 /*
1012  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1013  * Use is subject to license terms.
1014  * Copyright 2016 Joyent, Inc.
1015  */
1016 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1017 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1018 typedef __builtin_va_list __gnuc_va_list;
1019 /*
1020  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1021  *	defined with __va_list instead of plain old va_list.
1022  *	Perhaps that should be fixed!
1023  */
1024 typedef __builtin_va_list __va_list;
1025 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1026 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1027 /*
1028  * CDDL HEADER START
1029  *
1030  * The contents of this file are subject to the terms of the
1031  * Common Development and Distribution License, Version 1.0 only
1032  * (the "License").  You may not use this file except in compliance
1033  * with the License.
1034  *
1035  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1036  * or http://www.opensolaris.org/os/licensing.
1037  * See the License for the specific language governing permissions
1038  * and limitations under the License.
1039  *
1040  * When distributing Covered Code, include this CDDL HEADER in each
1041  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1042  * If applicable, add the following below this CDDL HEADER, with the
1043  * fields enclosed by brackets "[]" replaced with your own identifying
1044  * information: Portions Copyright [yyyy] [name of copyright owner]
1045  *
1046  * CDDL HEADER END
1047  */
1048 /*
1049  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1050  * Use is subject to license terms.
1051  */
1052 
1053 
1054 
1055 
1056 #pragma ident "%Z%%M%	%I%	%E% SMI"
1057 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1058 typedef struct __FILE __FILE;
1059 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1060 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1061 /*
1062  * CDDL HEADER START
1063  *
1064  * The contents of this file are subject to the terms of the
1065  * Common Development and Distribution License (the "License").
1066  * You may not use this file except in compliance with the License.
1067  *
1068  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1069  * or http://www.opensolaris.org/os/licensing.
1070  * See the License for the specific language governing permissions
1071  * and limitations under the License.
1072  *
1073  * When distributing Covered Code, include this CDDL HEADER in each
1074  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1075  * If applicable, add the following below this CDDL HEADER, with the
1076  * fields enclosed by brackets "[]" replaced with your own identifying
1077  * information: Portions Copyright [yyyy] [name of copyright owner]
1078  *
1079  * CDDL HEADER END
1080  */
1081 
1082 /*
1083  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1084  * Use is subject to license terms.
1085  */
1086 
1087 
1088 
1089 
1090 #pragma ident "%Z%%M%	%I%	%E% SMI"
1091 
1092 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1093 /*
1094  * CDDL HEADER START
1095  *
1096  * The contents of this file are subject to the terms of the
1097  * Common Development and Distribution License (the "License").
1098  * You may not use this file except in compliance with the License.
1099  *
1100  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1101  * or http://www.opensolaris.org/os/licensing.
1102  * See the License for the specific language governing permissions
1103  * and limitations under the License.
1104  *
1105  *
1106  * When distributing Covered Code, include this CDDL HEADER in each
1107  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1108  * If applicable, add the following below this CDDL HEADER, with the
1109  * fields enclosed by brackets "[]" replaced with your own identifying
1110  * information: Portions Copyright [yyyy] [name of copyright owner]
1111  *
1112  * CDDL HEADER END
1113  */
1114 
1115 /*
1116  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1117  * Use is subject to license terms.
1118  * Copyright 2016 Joyent, Inc.
1119  */
1120 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1121 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1122 struct __FILE /* needs to be binary-compatible with old versions */
1123 {
1124 
1125 
1126 
1127 
1128  int _cnt; /* number of available characters in buffer */
1129  unsigned char *_ptr; /* next character from/to here in buffer */
1130 
1131  unsigned char *_base; /* the buffer */
1132  unsigned char _flag; /* the state of the stream */
1133  unsigned char _magic; /* Old home of the file descriptor */
1134     /* Only fileno(3C) can retrieve the value now */
1135  unsigned __orientation:2; /* the orientation of the stream */
1136  unsigned __ionolock:1; /* turn off implicit locking */
1137  unsigned __seekable:1; /* is file seekable? */
1138  unsigned __extendedfd:1; /* enable extended FILE */
1139  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1140  unsigned __filler:10;
1141 };
1142 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1143 
1144 /*
1145  * If feature test macros are set that enable interfaces that use types
1146  * defined in <sys/types.h>, get those types by doing the include.
1147  *
1148  * Note that in asking for the interfaces associated with this feature test
1149  * macro one also asks for definitions of the POSIX types.
1150  */
1151 
1152 
1153 
1154 
1155 
1156 
1157 /*
1158  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1159  * underscores added to avoid polluting the ANSI C name space).  See the
1160  * commentary there for further explanation.
1161  */
1162 
1163 typedef long long __longlong_t;
1164 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1165 typedef __FILE FILE;
1166 
1167 
1168 
1169 
1170 
1171 
1172 
1173 typedef unsigned int size_t; /* (historical version) */
1174 
1175 
1176 
1177 
1178 
1179 
1180 typedef __longlong_t fpos_t;
1181 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1182 /*
1183  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1184  * is chosen for historical reasons rather than for truly processor related
1185  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1186  * UNIX historical value of 20 so it is allowed to fall through.
1187  */
1188 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1189 extern __FILE __iob[60];
1190 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1191 extern int remove(const char *);
1192 extern int rename(const char *, const char *);
1193 extern FILE *tmpfile(void);
1194 extern char *tmpnam(char *);
1195 extern int fclose(FILE *);
1196 extern int fflush(FILE *);
1197 extern FILE *fopen(const char *, const char *);
1198 extern FILE *freopen(const char *,
1199    const char *, FILE *);
1200 extern void setbuf(FILE *, char *);
1201 extern int setvbuf(FILE *, char *, int,
1202    size_t);
1203 /* PRINTFLIKE2 */
1204 extern int fprintf(FILE *, const char *, ...);
1205 /* SCANFLIKE2 */
1206 extern int fscanf(FILE *, const char *, ...);
1207 /* PRINTFLIKE1 */
1208 extern int printf(const char *, ...);
1209 /* SCANFLIKE1 */
1210 extern int scanf(const char *, ...);
1211 /* PRINTFLIKE2 */
1212 extern int sprintf(char *, const char *, ...);
1213 /* SCANFLIKE2 */
1214 extern int sscanf(const char *,
1215    const char *, ...);
1216 extern int vfprintf(FILE *, const char *,
1217    __va_list);
1218 extern int vprintf(const char *, __va_list);
1219 extern int vsprintf(char *, const char *,
1220    __va_list);
1221 extern int fgetc(FILE *);
1222 extern char *fgets(char *, int, FILE *);
1223 extern int fputc(int, FILE *);
1224 extern int fputs(const char *, FILE *);
1225 
1226 
1227 extern int getc(FILE *);
1228 extern int putc(int, FILE *);
1229 
1230 
1231 
1232 extern int getchar(void);
1233 extern int putchar(int);
1234 
1235 
1236 /*
1237  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1238  * environment has been requested, we remove it.
1239  */
1240 
1241 extern char *gets(char *);
1242 
1243 extern int puts(const char *);
1244 extern int ungetc(int, FILE *);
1245 extern size_t fread(void *, size_t, size_t,
1246  FILE *);
1247 extern size_t fwrite(const void *, size_t, size_t,
1248  FILE *);
1249 
1250 extern int fgetpos(FILE *, fpos_t *);
1251 extern int fsetpos(FILE *, const fpos_t *);
1252 
1253 extern int fseek(FILE *, long, int);
1254 extern long ftell(FILE *);
1255 extern void rewind(FILE *);
1256 
1257 
1258 extern void clearerr(FILE *);
1259 extern int feof(FILE *);
1260 extern int ferror(FILE *);
1261 
1262 extern void perror(const char *);
1263 
1264 
1265 extern int __filbuf(FILE *);
1266 extern int __flsbuf(int, FILE *);
1267 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1268 
1269 /*
1270  * If feature test macros are set that enable interfaces that use types
1271  * defined in <sys/types.h>, get those types by doing the include.
1272  *
1273  * Note that in asking for the interfaces associated with this feature test
1274  * macro one also asks for definitions of the POSIX types.
1275  */
1276 
1277 /*
1278  * Allow global visibility for symbols defined in
1279  * C++ "std" namespace in <iso/stdio_iso.h>.
1280  */
1281 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1282 /*
1283  * This header needs to be included here because it relies on the global
1284  * visibility of FILE and size_t in the C++ environment.
1285  */
1286 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1287 /*
1288  * CDDL HEADER START
1289  *
1290  * The contents of this file are subject to the terms of the
1291  * Common Development and Distribution License, Version 1.0 only
1292  * (the "License").  You may not use this file except in compliance
1293  * with the License.
1294  *
1295  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1296  * or http://www.opensolaris.org/os/licensing.
1297  * See the License for the specific language governing permissions
1298  * and limitations under the License.
1299  *
1300  * When distributing Covered Code, include this CDDL HEADER in each
1301  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1302  * If applicable, add the following below this CDDL HEADER, with the
1303  * fields enclosed by brackets "[]" replaced with your own identifying
1304  * information: Portions Copyright [yyyy] [name of copyright owner]
1305  *
1306  * CDDL HEADER END
1307  */
1308 /*
1309  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1310  *
1311  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1312  * Use is subject to license terms.
1313  */
1314 
1315 /*
1316  * An application should not include this header directly.  Instead it
1317  * should be included only through the inclusion of other Sun headers.
1318  *
1319  * The contents of this header is limited to identifiers specified in
1320  * the C99 standard and in conflict with the C++ implementation of the
1321  * standard header.  The C++ standard may adopt the C99 standard at
1322  * which point it is expected that the symbols included here will
1323  * become part of the C++ std namespace.
1324  */
1325 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1326 /*
1327  * The following have been added as a result of the ISO/IEC 9899:1999
1328  * standard. For a strictly conforming C application, visibility is
1329  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1330  * For non-strictly conforming C applications, there are no restrictions
1331  * on the C namespace.
1332  */
1333 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1334 extern int vfscanf(FILE *, const char *, __va_list);
1335 extern int vscanf(const char *, __va_list);
1336 extern int vsscanf(const char *, const char *,
1337   __va_list);
1338 
1339 
1340 
1341 
1342 extern int snprintf(char *, size_t, const char *,
1343  ...);
1344 extern int vsnprintf(char *, size_t, const char *,
1345  __va_list);
1346 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1347 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1348 typedef __longlong_t off_t;
1349 
1350 
1351 
1352 
1353 
1354 typedef __longlong_t off64_t;
1355 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1356 typedef __longlong_t fpos64_t;
1357 
1358 
1359 
1360 /*
1361  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1362  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1363  * not be polluted with this name.
1364  */
1365 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1366 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1367 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1368 extern unsigned char _sibuf[], _sobuf[];
1369 
1370 
1371 /* large file compilation environment setup */
1372 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1373 extern unsigned char *_bufendtab[];
1374 extern FILE *_lastbuf;
1375 
1376 
1377 /* In the LP64 compilation environment, all APIs are already large file */
1378 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1379 typedef int ssize_t; /* (historical version) */
1380 
1381 
1382 
1383 
1384 
1385 
1386 extern char *tmpnam_r(char *);
1387 
1388 
1389 
1390 
1391 extern int fcloseall(void);
1392 extern void setbuffer(FILE *, char *, size_t);
1393 extern int setlinebuf(FILE *);
1394 /* PRINTFLIKE2 */
1395 extern int asprintf(char **, const char *, ...);
1396 /* PRINTFLIKE2 */
1397 extern int vasprintf(char **, const char *, __va_list);
1398 
1399 
1400 
1401 
1402  /* || defined(_XPG7) */
1403 extern ssize_t getdelim(char **, size_t *,
1404  int, FILE *);
1405 extern ssize_t getline(char **, size_t *,
1406  FILE *);
1407 
1408 
1409 /*
1410  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1411  */
1412 
1413 
1414 
1415 extern FILE *fdopen(int, const char *);
1416 extern char *ctermid(char *);
1417 extern int fileno(FILE *);
1418 
1419 
1420 
1421 /*
1422  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1423  */
1424 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1425 /*
1426  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1427  */
1428 
1429 
1430 extern FILE *popen(const char *, const char *);
1431 extern char *tempnam(const char *, const char *);
1432 extern int pclose(FILE *);
1433 
1434 extern int getsubopt(char **, char *const *, char **);
1435 
1436 
1437 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1438 
1439 extern char *cuserid(char *);
1440 extern int getopt(int, char *const *, const char *);
1441 extern char *optarg;
1442 extern int optind, opterr, optopt;
1443 extern int getw(FILE *);
1444 extern int putw(int, FILE *);
1445 
1446 
1447 
1448 
1449 /*
1450  * The following are defined as part of the Large File Summit interfaces.
1451  */
1452 
1453 extern int fseeko(FILE *, off_t, int);
1454 extern off_t ftello(FILE *);
1455 
1456 
1457 /*
1458  * The following are defined as part of the transitional Large File Summit
1459  * interfaces.
1460  */
1461 
1462 
1463 extern FILE *fopen64(const char *, const char *);
1464 extern FILE *freopen64(const char *, const char *, FILE *);
1465 extern FILE *tmpfile64(void);
1466 extern int fgetpos64(FILE *, fpos64_t *);
1467 extern int fsetpos64(FILE *, const fpos64_t *);
1468 extern int fseeko64(FILE *, off64_t, int);
1469 extern off64_t ftello64(FILE *);
1470 
1471 
1472 /*
1473  * XPG7 symbols
1474  */
1475 
1476 extern FILE *fmemopen(void *, size_t,
1477       const char *);
1478 extern FILE *open_memstream(char **, size_t *);
1479 # 37 "special.c" 2
1480 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1
1481 /*
1482  * CDDL HEADER START
1483  *
1484  * The contents of this file are subject to the terms of the
1485  * Common Development and Distribution License (the "License").
1486  * You may not use this file except in compliance with the License.
1487  *
1488  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1489  * or http://www.opensolaris.org/os/licensing.
1490  * See the License for the specific language governing permissions
1491  * and limitations under the License.
1492  *
1493  * When distributing Covered Code, include this CDDL HEADER in each
1494  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1495  * If applicable, add the following below this CDDL HEADER, with the
1496  * fields enclosed by brackets "[]" replaced with your own identifying
1497  * information: Portions Copyright [yyyy] [name of copyright owner]
1498  *
1499  * CDDL HEADER END
1500  */
1501 
1502 /*
1503  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1504  * Copyright (c) 2013 Gary Mills
1505  *
1506  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
1507  */
1508 
1509 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
1510 
1511 /*	Copyright (c) 1988 AT&T	*/
1512 /*	  All Rights Reserved  	*/
1513 
1514 
1515 
1516 
1517 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1
1518 /*
1519  * CDDL HEADER START
1520  *
1521  * The contents of this file are subject to the terms of the
1522  * Common Development and Distribution License, Version 1.0 only
1523  * (the "License").  You may not use this file except in compliance
1524  * with the License.
1525  *
1526  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1527  * or http://www.opensolaris.org/os/licensing.
1528  * See the License for the specific language governing permissions
1529  * and limitations under the License.
1530  *
1531  * When distributing Covered Code, include this CDDL HEADER in each
1532  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1533  * If applicable, add the following below this CDDL HEADER, with the
1534  * fields enclosed by brackets "[]" replaced with your own identifying
1535  * information: Portions Copyright [yyyy] [name of copyright owner]
1536  *
1537  * CDDL HEADER END
1538  */
1539 /*
1540  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1541  * Copyright 2014 PALO, Richard.
1542  *
1543  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
1544  * Use is subject to license terms.
1545  */
1546 
1547 /*	Copyright (c) 1988 AT&T	*/
1548 /*	  All Rights Reserved  	*/
1549 
1550 
1551 /*
1552  * An application should not include this header directly.  Instead it
1553  * should be included only through the inclusion of other Sun headers.
1554  *
1555  * The contents of this header is limited to identifiers specified in the
1556  * C Standard.  Any new identifiers specified in future amendments to the
1557  * C Standard must be placed in this header.  If these new identifiers
1558  * are required to also be in the C++ Standard "std" namespace, then for
1559  * anything other than macro definitions, corresponding "using" directives
1560  * must also be added to <locale.h>.
1561  */
1562 
1563 
1564 
1565 
1566 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1567 /*
1568  * CDDL HEADER START
1569  *
1570  * The contents of this file are subject to the terms of the
1571  * Common Development and Distribution License (the "License").
1572  * You may not use this file except in compliance with the License.
1573  *
1574  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1575  * or http://www.opensolaris.org/os/licensing.
1576  * See the License for the specific language governing permissions
1577  * and limitations under the License.
1578  *
1579  * When distributing Covered Code, include this CDDL HEADER in each
1580  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1581  * If applicable, add the following below this CDDL HEADER, with the
1582  * fields enclosed by brackets "[]" replaced with your own identifying
1583  * information: Portions Copyright [yyyy] [name of copyright owner]
1584  *
1585  * CDDL HEADER END
1586  */
1587 
1588 /*
1589  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1590  * Copyright 2016 Joyent, Inc.
1591  *
1592  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1593  * Use is subject to license terms.
1594  */
1595 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
1596 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
1597 /*
1598  * This file and its contents are supplied under the terms of the
1599  * Common Development and Distribution License ("CDDL"), version 1.0.
1600  * You may only use this file in accordance with the terms of version
1601  * 1.0 of the CDDL.
1602  *
1603  * A full copy of the text of the CDDL should have accompanied this
1604  * source.  A copy of the CDDL is also available via the Internet at
1605  * http://www.illumos.org/license/CDDL.
1606  */
1607 
1608 /*
1609  * Copyright 2014-2016 PALO, Richard.
1610  */
1611 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2
1612 
1613 
1614 
1615 
1616 
1617 unsigned char __mb_cur_max(void);
1618 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
1619 typedef struct {
1620  int quot;
1621  int rem;
1622 } div_t;
1623 
1624 typedef struct {
1625  long quot;
1626  long rem;
1627 } ldiv_t;
1628 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
1629 /*
1630  * wchar_t is a built-in type in standard C++ and as such is not
1631  * defined here when using standard C++. However, the GNU compiler
1632  * fixincludes utility nonetheless creates its own version of this
1633  * header for use by gcc and g++. In that version it adds a redundant
1634  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
1635  * header we need to include the following magic comment:
1636  *
1637  * we must use the C++ compiler's type
1638  *
1639  * The above comment should not be removed or changed until GNU
1640  * gcc/fixinc/inclhack.def is updated to bypass this header.
1641  */
1642 
1643 
1644 
1645 
1646 
1647 
1648 typedef long wchar_t;
1649 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h"
1650 extern void abort(void) __attribute__((__noreturn__));
1651 extern int abs(int);
1652 extern int atexit(void (*)(void));
1653 extern double atof(const char *);
1654 extern int atoi(const char *);
1655 extern long int atol(const char *);
1656 extern void *bsearch(const void *, const void *, size_t, size_t,
1657  int (*)(const void *, const void *));
1658 
1659 
1660 
1661 
1662 
1663 
1664 extern void *calloc(size_t, size_t);
1665 extern div_t div(int, int);
1666 extern void exit(int)
1667  __attribute__((__noreturn__));
1668 extern void free(void *);
1669 extern char *getenv(const char *);
1670 extern long int labs(long);
1671 extern ldiv_t ldiv(long, long);
1672 extern void *malloc(size_t);
1673 extern int mblen(const char *, size_t);
1674 extern size_t mbstowcs(wchar_t *, const char *,
1675  size_t);
1676 extern int mbtowc(wchar_t *, const char *, size_t);
1677 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
1678 
1679 
1680 
1681 
1682 
1683 extern int rand(void);
1684 extern void *realloc(void *, size_t);
1685 extern void srand(unsigned int);
1686 extern double strtod(const char *, char **);
1687 extern long int strtol(const char *, char **, int);
1688 extern unsigned long int strtoul(const char *,
1689  char **, int);
1690 extern int system(const char *);
1691 extern int wctomb(char *, wchar_t);
1692 extern size_t wcstombs(char *, const wchar_t *,
1693  size_t);
1694 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
1695 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1
1696 /*
1697  * CDDL HEADER START
1698  *
1699  * The contents of this file are subject to the terms of the
1700  * Common Development and Distribution License, Version 1.0 only
1701  * (the "License").  You may not use this file except in compliance
1702  * with the License.
1703  *
1704  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1705  * or http://www.opensolaris.org/os/licensing.
1706  * See the License for the specific language governing permissions
1707  * and limitations under the License.
1708  *
1709  * When distributing Covered Code, include this CDDL HEADER in each
1710  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1711  * If applicable, add the following below this CDDL HEADER, with the
1712  * fields enclosed by brackets "[]" replaced with your own identifying
1713  * information: Portions Copyright [yyyy] [name of copyright owner]
1714  *
1715  * CDDL HEADER END
1716  */
1717 /*
1718  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1719  *
1720  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1721  * Use is subject to license terms.
1722  */
1723 
1724 /*
1725  * An application should not include this header directly.  Instead it
1726  * should be included only through the inclusion of other Sun headers.
1727  *
1728  * The contents of this header is limited to identifiers specified in
1729  * the C99 standard and in conflict with the C++ implementation of the
1730  * standard header.  The C++ standard may adopt the C99 standard at
1731  * which point it is expected that the symbols included here will
1732  * become part of the C++ std namespace.
1733  */
1734 
1735 
1736 
1737 
1738 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1739 /*
1740  * CDDL HEADER START
1741  *
1742  * The contents of this file are subject to the terms of the
1743  * Common Development and Distribution License (the "License").
1744  * You may not use this file except in compliance with the License.
1745  *
1746  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1747  * or http://www.opensolaris.org/os/licensing.
1748  * See the License for the specific language governing permissions
1749  * and limitations under the License.
1750  *
1751  * When distributing Covered Code, include this CDDL HEADER in each
1752  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1753  * If applicable, add the following below this CDDL HEADER, with the
1754  * fields enclosed by brackets "[]" replaced with your own identifying
1755  * information: Portions Copyright [yyyy] [name of copyright owner]
1756  *
1757  * CDDL HEADER END
1758  */
1759 
1760 /*
1761  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1762  * Copyright 2016 Joyent, Inc.
1763  *
1764  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1765  * Use is subject to license terms.
1766  */
1767 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2
1768 
1769 
1770 
1771 
1772 
1773 /*
1774  * The following have been added as a result of the ISO/IEC 9899:1999
1775  * standard. For a strictly conforming C application, visibility is
1776  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1777  * For non-strictly conforming C applications, there are no restrictions
1778  * on the C namespace.
1779  */
1780 
1781 
1782 typedef struct {
1783  long long quot;
1784  long long rem;
1785 } lldiv_t;
1786 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h"
1787 extern void _Exit(int);
1788 extern float strtof(const char *, char **);
1789 extern long double strtold(const char *, char **);
1790 
1791 
1792 extern long long atoll(const char *);
1793 extern long long llabs(long long);
1794 extern lldiv_t lldiv(long long, long long);
1795 extern long long strtoll(const char *, char **,
1796  int);
1797 extern unsigned long long strtoull(const char *,
1798  char **, int);
1799 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
1800 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1
1801 /*
1802  * This file and its contents are supplied under the terms of the
1803  * Common Development and Distribution License ("CDDL"), version 1.0.
1804  * You may only use this file in accordance with the terms of version
1805  * 1.0 of the CDDL.
1806  *
1807  * A full copy of the text of the CDDL should have accompanied this
1808  * source.  A copy of the CDDL is also available via the Internet at
1809  * http://www.illumos.org/license/CDDL.
1810  */
1811 
1812 /*
1813  * Copyright 2016 Joyent, Inc.
1814  */
1815 
1816 /*
1817  * An application should not include this header directly.  Instead it
1818  * should be included only through the inclusion of other illumos headers.
1819  *
1820  * The contents of this header is limited to identifiers specified in
1821  * the C11 standard and in conflict with the C++ implementation of the
1822  * standard header.  The C++ standard may adopt the C11 standard at
1823  * which point it is expected that the symbols included here will
1824  * become part of the C++ std namespace.
1825  */
1826 
1827 
1828 
1829 
1830 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1831 /*
1832  * CDDL HEADER START
1833  *
1834  * The contents of this file are subject to the terms of the
1835  * Common Development and Distribution License (the "License").
1836  * You may not use this file except in compliance with the License.
1837  *
1838  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1839  * or http://www.opensolaris.org/os/licensing.
1840  * See the License for the specific language governing permissions
1841  * and limitations under the License.
1842  *
1843  * When distributing Covered Code, include this CDDL HEADER in each
1844  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1845  * If applicable, add the following below this CDDL HEADER, with the
1846  * fields enclosed by brackets "[]" replaced with your own identifying
1847  * information: Portions Copyright [yyyy] [name of copyright owner]
1848  *
1849  * CDDL HEADER END
1850  */
1851 
1852 /*
1853  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1854  * Copyright 2016 Joyent, Inc.
1855  *
1856  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1857  * Use is subject to license terms.
1858  */
1859 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2
1860 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
1861 /*
1862  * The following have been added as a result of the ISO/IEC 9899:2011
1863  * standard. For a strictly conforming C application, visibility is
1864  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1865  * For non-strictly conforming C applications, there are no restrictions
1866  * on the C namespace.
1867  */
1868 
1869 /*
1870  * Work around fix-includes and other bad actors with using multiple headers.
1871  */
1872 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h"
1873 extern void *aligned_alloc(size_t, size_t);
1874 extern int at_quick_exit(void (*)(void));
1875 extern void quick_exit(int);
1876 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
1877 
1878 
1879 
1880 
1881 
1882 /*
1883  * Allow global visibility for symbols defined in
1884  * C++ "std" namespace in <iso/stdlib_iso.h>.
1885  */
1886 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1887 /*
1888  * Allow global visibility for symbols defined in
1889  * C++ "std" namespace in <iso/stdlib_c11.h>.
1890  */
1891 # 101 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1892 typedef unsigned int uid_t; /* UID type		*/
1893 
1894 
1895 /* large file compilation environment setup */
1896 
1897 
1898 
1899 
1900 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1901 #pragma redefine_extname mkstemp mkstemp64
1902 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1903 
1904 
1905 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1906 #pragma redefine_extname mkstemps mkstemps64
1907 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1908 
1909 
1910 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1911 #pragma redefine_extname mkostemp mkostemp64
1912 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1913 
1914 
1915 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1916 #pragma redefine_extname mkostemps mkostemps64
1917 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1918 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1919 /* In the LP64 compilation environment, all APIs are already large file */
1920 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1921 extern int rand_r(unsigned int *);
1922 
1923 
1924 extern void _exithandle(void);
1925 
1926 
1927 
1928 
1929 extern double drand48(void);
1930 extern double erand48(unsigned short *);
1931 extern long jrand48(unsigned short *);
1932 extern void lcong48(unsigned short *);
1933 extern long lrand48(void);
1934 extern long mrand48(void);
1935 extern long nrand48(unsigned short *);
1936 extern unsigned short *seed48(unsigned short *);
1937 extern void srand48(long);
1938 extern int putenv(char *);
1939 extern void setkey(const char *);
1940 
1941 
1942 /*
1943  * swab() has historically been in <stdlib.h> as delivered from AT&T
1944  * and continues to be visible in the default compilation environment.
1945  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
1946  * in <unistd.h>. As a result, with respect to X/Open namespace the
1947  * swab() declaration in this header is only visible for the XPG3
1948  * environment.
1949  */
1950 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
1951 extern void swab(const char *, char *, ssize_t);
1952 
1953 
1954 
1955 
1956 
1957 extern int mkstemp(char *);
1958 
1959 extern int mkstemps(char *, int);
1960 
1961 
1962 
1963 
1964 
1965 extern int mkstemp64(char *);
1966 
1967 extern int mkstemps64(char *, int);
1968 
1969 
1970 
1971 
1972 extern char *mkdtemp(char *);
1973 
1974 
1975 
1976 extern int mkostemp(char *, int);
1977 extern int mkostemps(char *, int, int);
1978 
1979 
1980 extern int mkostemp64(char *, int);
1981 extern int mkostemps64(char *, int, int);
1982 
1983 
1984 
1985 
1986 
1987 
1988 extern long a64l(const char *);
1989 extern char *ecvt(double, int, int *, int *);
1990 extern char *fcvt(double, int, int *, int *);
1991 extern char *gcvt(double, int, char *);
1992 extern int getsubopt(char **, char *const *, char **);
1993 extern int grantpt(int);
1994 extern char *initstate(unsigned, char *, size_t);
1995 extern char *l64a(long);
1996 extern char *mktemp(char *);
1997 extern char *ptsname(int);
1998 extern long random(void);
1999 extern char *realpath(const char *, char *);
2000 extern char *setstate(const char *);
2001 extern void srandom(unsigned);
2002 extern int unlockpt(int);
2003 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
2004 
2005 extern int ttyslot(void);
2006 extern void *valloc(size_t);
2007 
2008 
2009 
2010 
2011 
2012 
2013 extern int posix_memalign(void **, size_t, size_t);
2014 extern int posix_openpt(int);
2015 extern int setenv(const char *, const char *, int);
2016 extern int unsetenv(const char *);
2017 
2018 
2019 
2020 
2021 extern char *canonicalize_file_name(const char *);
2022 extern int clearenv(void);
2023 extern void closefrom(int);
2024 extern int daemon(int, int);
2025 extern int dup2(int, int);
2026 extern int dup3(int, int, int);
2027 extern int fdwalk(int (*)(void *, int), void *);
2028 extern char *qecvt(long double, int, int *, int *);
2029 extern char *qfcvt(long double, int, int *, int *);
2030 extern char *qgcvt(long double, int, char *);
2031 extern char *getcwd(char *, size_t);
2032 extern const char *getexecname(void);
2033 
2034 
2035 
2036 
2037 
2038 
2039 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2040 #pragma redefine_extname getlogin getloginx
2041 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h"
2042 
2043 
2044 
2045 
2046 
2047 
2048 extern char *getlogin(void);
2049 
2050 
2051 extern int getopt(int, char *const *, const char *);
2052 extern char *optarg;
2053 extern int optind, opterr, optopt;
2054 extern char *getpass(const char *);
2055 extern char *getpassphrase(const char *);
2056 extern int getpw(uid_t, char *);
2057 extern int isatty(int);
2058 extern void *memalign(size_t, size_t);
2059 extern char *ttyname(int);
2060 extern char *mkdtemp(char *);
2061 extern const char *getprogname(void);
2062 extern void setprogname(const char *);
2063 
2064 
2065 extern char *lltostr(long long, char *);
2066 extern char *ulltostr(unsigned long long, char *);
2067 
2068 
2069 
2070 
2071 /* OpenBSD compatibility functions */
2072 
2073 
2074 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1
2075 /*
2076  * CDDL HEADER START
2077  *
2078  * The contents of this file are subject to the terms of the
2079  * Common Development and Distribution License, Version 1.0 only
2080  * (the "License").  You may not use this file except in compliance
2081  * with the License.
2082  *
2083  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2084  * or http://www.opensolaris.org/os/licensing.
2085  * See the License for the specific language governing permissions
2086  * and limitations under the License.
2087  *
2088  * When distributing Covered Code, include this CDDL HEADER in each
2089  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2090  * If applicable, add the following below this CDDL HEADER, with the
2091  * fields enclosed by brackets "[]" replaced with your own identifying
2092  * information: Portions Copyright [yyyy] [name of copyright owner]
2093  *
2094  * CDDL HEADER END
2095  */
2096 /*
2097  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2098  *
2099  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2100  * Use is subject to license terms.
2101  */
2102 
2103 
2104 
2105 
2106 /*
2107  * This file, <inttypes.h>, is specified by the ISO C standard,
2108  * standard, ISO/IEC 9899:1999 Programming language - C and is
2109  * also defined by SUSv3.
2110  *
2111  * ISO	  International Organization for Standardization.
2112  * SUSv3  Single Unix Specification, Version 3
2113  */
2114 
2115 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2116 /*
2117  * CDDL HEADER START
2118  *
2119  * The contents of this file are subject to the terms of the
2120  * Common Development and Distribution License (the "License").
2121  * You may not use this file except in compliance with the License.
2122  *
2123  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2124  * or http://www.opensolaris.org/os/licensing.
2125  * See the License for the specific language governing permissions
2126  * and limitations under the License.
2127  *
2128  * When distributing Covered Code, include this CDDL HEADER in each
2129  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2130  * If applicable, add the following below this CDDL HEADER, with the
2131  * fields enclosed by brackets "[]" replaced with your own identifying
2132  * information: Portions Copyright [yyyy] [name of copyright owner]
2133  *
2134  * CDDL HEADER END
2135  */
2136 
2137 /*
2138  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2139  * Copyright 2016 Joyent, Inc.
2140  *
2141  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2142  * Use is subject to license terms.
2143  */
2144 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
2145 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1
2146 /*
2147  * CDDL HEADER START
2148  *
2149  * The contents of this file are subject to the terms of the
2150  * Common Development and Distribution License, Version 1.0 only
2151  * (the "License").  You may not use this file except in compliance
2152  * with the License.
2153  *
2154  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2155  * or http://www.opensolaris.org/os/licensing.
2156  * See the License for the specific language governing permissions
2157  * and limitations under the License.
2158  *
2159  * When distributing Covered Code, include this CDDL HEADER in each
2160  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2161  * If applicable, add the following below this CDDL HEADER, with the
2162  * fields enclosed by brackets "[]" replaced with your own identifying
2163  * information: Portions Copyright [yyyy] [name of copyright owner]
2164  *
2165  * CDDL HEADER END
2166  */
2167 /*
2168  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
2169  * Use is subject to license terms.
2170  */
2171 
2172 
2173 
2174 
2175 #pragma ident "%Z%%M%	%I%	%E% SMI"
2176 
2177 /*
2178  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
2179  * vast majority of the facilities specified for <inttypes.h> as defined
2180  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
2181  *
2182  * Kernel/Driver developers are encouraged to include this file to access
2183  * the fixed size types, limits and utility macros. Application developers
2184  * should use the standard defined header <inttypes.h>.
2185  */
2186 
2187 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2188 /*
2189  * CDDL HEADER START
2190  *
2191  * The contents of this file are subject to the terms of the
2192  * Common Development and Distribution License (the "License").
2193  * You may not use this file except in compliance with the License.
2194  *
2195  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2196  * or http://www.opensolaris.org/os/licensing.
2197  * See the License for the specific language governing permissions
2198  * and limitations under the License.
2199  *
2200  * When distributing Covered Code, include this CDDL HEADER in each
2201  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2202  * If applicable, add the following below this CDDL HEADER, with the
2203  * fields enclosed by brackets "[]" replaced with your own identifying
2204  * information: Portions Copyright [yyyy] [name of copyright owner]
2205  *
2206  * CDDL HEADER END
2207  */
2208 
2209 /*
2210  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2211  * Copyright 2016 Joyent, Inc.
2212  *
2213  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2214  * Use is subject to license terms.
2215  */
2216 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
2217 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
2218 /*
2219  * CDDL HEADER START
2220  *
2221  * The contents of this file are subject to the terms of the
2222  * Common Development and Distribution License, Version 1.0 only
2223  * (the "License").  You may not use this file except in compliance
2224  * with the License.
2225  *
2226  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2227  * or http://www.opensolaris.org/os/licensing.
2228  * See the License for the specific language governing permissions
2229  * and limitations under the License.
2230  *
2231  * When distributing Covered Code, include this CDDL HEADER in each
2232  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2233  * If applicable, add the following below this CDDL HEADER, with the
2234  * fields enclosed by brackets "[]" replaced with your own identifying
2235  * information: Portions Copyright [yyyy] [name of copyright owner]
2236  *
2237  * CDDL HEADER END
2238  */
2239 /*
2240  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2241  *
2242  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2243  * Use is subject to license terms.
2244  */
2245 
2246 
2247 
2248 
2249 /*
2250  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
2251  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
2252  * Programming language - C.
2253  *
2254  * Programs/Modules should not directly include this file.  Access to the
2255  * types defined in this file should be through the inclusion of one of the
2256  * following files:
2257  *
2258  *	<sys/types.h>		Provides only the "_t" types defined in this
2259  *				file which is a subset of the contents of
2260  *				<inttypes.h>.  (This can be appropriate for
2261  *				all programs/modules except those claiming
2262  *				ANSI-C conformance.)
2263  *
2264  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2265  *				components of <inttypes.h>.
2266  *
2267  *	<inttypes.h>		For use by applications.
2268  *
2269  * See these files for more details.
2270  */
2271 
2272 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2273 /*
2274  * CDDL HEADER START
2275  *
2276  * The contents of this file are subject to the terms of the
2277  * Common Development and Distribution License (the "License").
2278  * You may not use this file except in compliance with the License.
2279  *
2280  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2281  * or http://www.opensolaris.org/os/licensing.
2282  * See the License for the specific language governing permissions
2283  * and limitations under the License.
2284  *
2285  * When distributing Covered Code, include this CDDL HEADER in each
2286  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2287  * If applicable, add the following below this CDDL HEADER, with the
2288  * fields enclosed by brackets "[]" replaced with your own identifying
2289  * information: Portions Copyright [yyyy] [name of copyright owner]
2290  *
2291  * CDDL HEADER END
2292  */
2293 
2294 /*
2295  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2296  * Copyright 2016 Joyent, Inc.
2297  *
2298  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2299  * Use is subject to license terms.
2300  */
2301 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
2302 
2303 
2304 
2305 
2306 
2307 /*
2308  * Basic / Extended integer types
2309  *
2310  * The following defines the basic fixed-size integer types.
2311  *
2312  * Implementations are free to typedef them to Standard C integer types or
2313  * extensions that they support. If an implementation does not support one
2314  * of the particular integer data types below, then it should not define the
2315  * typedefs and macros corresponding to that data type.  Note that int8_t
2316  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
2317  * as an unsigned entity because there is no way to define an eight bit
2318  * signed integral.
2319  */
2320 
2321 typedef char int8_t;
2322 
2323 
2324 
2325 typedef short int16_t;
2326 typedef int int32_t;
2327 
2328 
2329 
2330 
2331 
2332 
2333 typedef long long int64_t;
2334 
2335 
2336 
2337 typedef unsigned char uint8_t;
2338 typedef unsigned short uint16_t;
2339 typedef unsigned int uint32_t;
2340 
2341 
2342 
2343 
2344 typedef unsigned long long uint64_t;
2345 
2346 
2347 
2348 /*
2349  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
2350  * and unsigned integer types supported by the implementation.
2351  */
2352 
2353 typedef int64_t intmax_t;
2354 typedef uint64_t uintmax_t;
2355 
2356 
2357 
2358 
2359 
2360 /*
2361  * intptr_t and uintptr_t are signed and unsigned integer types large enough
2362  * to hold any data pointer; that is, data pointers can be assigned into or
2363  * from these integer types without losing precision.
2364  */
2365 
2366 
2367 
2368 
2369 typedef int intptr_t;
2370 typedef unsigned int uintptr_t;
2371 
2372 
2373 /*
2374  * The following define the fastest integer types that can hold the
2375  * specified number of bits.
2376  */
2377 
2378 typedef char int_fast8_t;
2379 
2380 
2381 
2382 typedef int int_fast16_t;
2383 typedef int int_fast32_t;
2384 
2385 
2386 
2387 
2388 typedef long long int_fast64_t;
2389 
2390 
2391 
2392 typedef unsigned char uint_fast8_t;
2393 typedef unsigned int uint_fast16_t;
2394 typedef unsigned int uint_fast32_t;
2395 
2396 
2397 
2398 
2399 typedef unsigned long long uint_fast64_t;
2400 
2401 
2402 
2403 /*
2404  * The following define the smallest integer types that can hold the
2405  * specified number of bits.
2406  */
2407 
2408 typedef char int_least8_t;
2409 
2410 
2411 
2412 typedef short int_least16_t;
2413 typedef int int_least32_t;
2414 
2415 
2416 
2417 
2418 typedef long long int_least64_t;
2419 
2420 
2421 
2422 /*
2423  * If these are changed, please update char16_t and char32_t in head/uchar.h.
2424  */
2425 typedef unsigned char uint_least8_t;
2426 typedef unsigned short uint_least16_t;
2427 typedef unsigned int uint_least32_t;
2428 
2429 
2430 
2431 
2432 typedef unsigned long long uint_least64_t;
2433 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
2434 
2435 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
2436 /*
2437  * CDDL HEADER START
2438  *
2439  * The contents of this file are subject to the terms of the
2440  * Common Development and Distribution License, Version 1.0 only
2441  * (the "License").  You may not use this file except in compliance
2442  * with the License.
2443  *
2444  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2445  * or http://www.opensolaris.org/os/licensing.
2446  * See the License for the specific language governing permissions
2447  * and limitations under the License.
2448  *
2449  * When distributing Covered Code, include this CDDL HEADER in each
2450  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2451  * If applicable, add the following below this CDDL HEADER, with the
2452  * fields enclosed by brackets "[]" replaced with your own identifying
2453  * information: Portions Copyright [yyyy] [name of copyright owner]
2454  *
2455  * CDDL HEADER END
2456  */
2457 /*
2458  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2459  *
2460  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2461  * Use is subject to license terms.
2462  */
2463 
2464 
2465 
2466 
2467 /*
2468  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
2469  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
2470  * Programming language - C.
2471  *
2472  * Programs/Modules should not directly include this file.  Access to the
2473  * types defined in this file should be through the inclusion of one of the
2474  * following files:
2475  *
2476  *	<limits.h>		This nested inclusion is disabled for strictly
2477  *				ANSI-C conforming compilations.  The *_MIN
2478  *				definitions are not visible to POSIX or XPG
2479  *				conforming applications (due to what may be
2480  *				a bug in the specification - this is under
2481  *				investigation)
2482  *
2483  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2484  *				components of <inttypes.h>.
2485  *
2486  *	<inttypes.h>		For use by applications.
2487  *
2488  * See these files for more details.
2489  */
2490 
2491 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2492 /*
2493  * CDDL HEADER START
2494  *
2495  * The contents of this file are subject to the terms of the
2496  * Common Development and Distribution License (the "License").
2497  * You may not use this file except in compliance with the License.
2498  *
2499  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2500  * or http://www.opensolaris.org/os/licensing.
2501  * See the License for the specific language governing permissions
2502  * and limitations under the License.
2503  *
2504  * When distributing Covered Code, include this CDDL HEADER in each
2505  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2506  * If applicable, add the following below this CDDL HEADER, with the
2507  * fields enclosed by brackets "[]" replaced with your own identifying
2508  * information: Portions Copyright [yyyy] [name of copyright owner]
2509  *
2510  * CDDL HEADER END
2511  */
2512 
2513 /*
2514  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2515  * Copyright 2016 Joyent, Inc.
2516  *
2517  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2518  * Use is subject to license terms.
2519  */
2520 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
2521 
2522 
2523 
2524 
2525 
2526 /*
2527  * Limits
2528  *
2529  * The following define the limits for the types defined in <sys/int_types.h>.
2530  *
2531  * INTMAX_MIN (minimum value of the largest supported signed integer type),
2532  * INTMAX_MAX (maximum value of the largest supported signed integer type),
2533  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
2534  * type) can be set to implementation defined limits.
2535  *
2536  * NOTE : A programmer can test to see whether an implementation supports
2537  * a particular size of integer by testing if the macro that gives the
2538  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
2539  * tests false, the implementation does not support unsigned 64 bit integers.
2540  *
2541  * The type of these macros is intentionally unspecified.
2542  *
2543  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
2544  * where the ABI specifies "char" as unsigned when the translation mode is
2545  * not ANSI-C.
2546  */
2547 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
2548 /*
2549  * The following 2 macros are provided for testing whether the types
2550  * intptr_t and uintptr_t (integers large enough to hold a void *) are
2551  * defined in this header. They are needed in case the architecture can't
2552  * represent a pointer in any standard integral type.
2553  */
2554 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
2555 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
2556 
2557 
2558 
2559 
2560 
2561 
2562 /*
2563  * Maximum value of a "size_t".  SIZE_MAX was previously defined
2564  * in <limits.h>, however, the standards specify it be defined
2565  * in <stdint.h>. The <stdint.h> headers includes this header as
2566  * does <limits.h>. The value of SIZE_MAX should not deviate
2567  * from the value of ULONG_MAX defined <sys/types.h>.
2568  */
2569 
2570 
2571 
2572 
2573 
2574 
2575 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
2576 
2577 
2578 
2579 
2580 /*
2581  * Maximum limit of wchar_t. The WCHAR_* macros are also
2582  * defined in <iso/wchar_iso.h>, but inclusion of that header
2583  * will break ISO/IEC C namespace.
2584  */
2585 
2586 
2587 
2588 
2589 /* Maximum limit of wint_t */
2590 
2591 
2592 
2593 
2594 /*
2595  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
2596  * when including <limits.h> that the suffix _MAX is reserved but not the
2597  * suffix _MIN.  However, until that issue is resolved....
2598  */
2599 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
2600 /* Minimum value of a pointer-holding signed integer type */
2601 
2602 
2603 
2604 
2605 
2606 
2607 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
2608 
2609 
2610 
2611 
2612 
2613 
2614 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
2615 
2616 
2617 
2618 
2619 /*
2620  * Minimum limit of wchar_t. The WCHAR_* macros are also
2621  * defined in <iso/wchar_iso.h>, but inclusion of that header
2622  * will break ISO/IEC C namespace.
2623  */
2624 
2625 
2626 
2627 
2628 /* Minimum limit of wint_t */
2629 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
2630 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
2631 /*
2632  * CDDL HEADER START
2633  *
2634  * The contents of this file are subject to the terms of the
2635  * Common Development and Distribution License, Version 1.0 only
2636  * (the "License").  You may not use this file except in compliance
2637  * with the License.
2638  *
2639  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2640  * or http://www.opensolaris.org/os/licensing.
2641  * See the License for the specific language governing permissions
2642  * and limitations under the License.
2643  *
2644  * When distributing Covered Code, include this CDDL HEADER in each
2645  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2646  * If applicable, add the following below this CDDL HEADER, with the
2647  * fields enclosed by brackets "[]" replaced with your own identifying
2648  * information: Portions Copyright [yyyy] [name of copyright owner]
2649  *
2650  * CDDL HEADER END
2651  */
2652 /*
2653  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2654  *
2655  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2656  * Use is subject to license terms.
2657  */
2658 
2659 
2660 
2661 
2662 /*
2663  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
2664  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
2665  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
2666  * Programming language - C.
2667  *
2668  * Programs/Modules should not directly include this file.  Access to the
2669  * types defined in this file should be through the inclusion of one of the
2670  * following files:
2671  *
2672  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2673  *				components of <inttypes.h>.
2674  *
2675  *	<inttypes.h>		For use by applications.
2676  *
2677  * See these files for more details.
2678  *
2679  * Use at your own risk.  This file will track the evolution of the revision
2680  * of the current ISO C standard.  As of February 1996, the committee is
2681  * squarely behind the fixed sized types.
2682  */
2683 
2684 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2685 /*
2686  * CDDL HEADER START
2687  *
2688  * The contents of this file are subject to the terms of the
2689  * Common Development and Distribution License (the "License").
2690  * You may not use this file except in compliance with the License.
2691  *
2692  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2693  * or http://www.opensolaris.org/os/licensing.
2694  * See the License for the specific language governing permissions
2695  * and limitations under the License.
2696  *
2697  * When distributing Covered Code, include this CDDL HEADER in each
2698  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2699  * If applicable, add the following below this CDDL HEADER, with the
2700  * fields enclosed by brackets "[]" replaced with your own identifying
2701  * information: Portions Copyright [yyyy] [name of copyright owner]
2702  *
2703  * CDDL HEADER END
2704  */
2705 
2706 /*
2707  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2708  * Copyright 2016 Joyent, Inc.
2709  *
2710  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2711  * Use is subject to license terms.
2712  */
2713 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2
2714 
2715 
2716 
2717 
2718 
2719 /*
2720  * Constants
2721  *
2722  * The following macros create constants of the types defined in
2723  * <sys/int_types.h>. The intent is that:
2724  *	Constants defined using these macros have a specific size and
2725  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
2726  *	are for examples only. Implementations are permitted to use other
2727  *	suffixes.
2728  *
2729  * The "CSTYLED" comments are flags to an internal code style analysis tool
2730  * telling it to silently accept the line which follows.  This internal
2731  * standard requires a space between arguments, but the historical,
2732  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
2733  */
2734 /* CSTYLED */
2735 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
2736 /* CSTYLED */
2737 
2738 
2739 
2740 
2741 /* CSTYLED */
2742 
2743 /* CSTYLED */
2744 
2745 /* CSTYLED */
2746 
2747 
2748 
2749 
2750 
2751 
2752 /* CSTYLED */
2753 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h"
2754 /* CSTYLED */
2755 
2756 /* CSTYLED */
2757 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
2758 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1
2759 /*
2760  * CDDL HEADER START
2761  *
2762  * The contents of this file are subject to the terms of the
2763  * Common Development and Distribution License, Version 1.0 only
2764  * (the "License").  You may not use this file except in compliance
2765  * with the License.
2766  *
2767  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2768  * or http://www.opensolaris.org/os/licensing.
2769  * See the License for the specific language governing permissions
2770  * and limitations under the License.
2771  *
2772  * When distributing Covered Code, include this CDDL HEADER in each
2773  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2774  * If applicable, add the following below this CDDL HEADER, with the
2775  * fields enclosed by brackets "[]" replaced with your own identifying
2776  * information: Portions Copyright [yyyy] [name of copyright owner]
2777  *
2778  * CDDL HEADER END
2779  */
2780 /*
2781  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2782  *
2783  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2784  * Use is subject to license terms.
2785  */
2786 
2787 
2788 
2789 
2790 /*
2791  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
2792  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
2793  * Programming language - C.
2794  *
2795  * ISO  International Organization for Standardization.
2796  *
2797  * Programs/Modules should not directly include this file.  Access to the
2798  * types defined in this file should be through the inclusion of one of the
2799  * following files:
2800  *
2801  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2802  *				components of <inttypes.h>.
2803  *
2804  *	<inttypes.h>		For use by applications.
2805  *
2806  * See these files for more details.
2807  */
2808 
2809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2810 /*
2811  * CDDL HEADER START
2812  *
2813  * The contents of this file are subject to the terms of the
2814  * Common Development and Distribution License (the "License").
2815  * You may not use this file except in compliance with the License.
2816  *
2817  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2818  * or http://www.opensolaris.org/os/licensing.
2819  * See the License for the specific language governing permissions
2820  * and limitations under the License.
2821  *
2822  * When distributing Covered Code, include this CDDL HEADER in each
2823  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2824  * If applicable, add the following below this CDDL HEADER, with the
2825  * fields enclosed by brackets "[]" replaced with your own identifying
2826  * information: Portions Copyright [yyyy] [name of copyright owner]
2827  *
2828  * CDDL HEADER END
2829  */
2830 
2831 /*
2832  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2833  * Copyright 2016 Joyent, Inc.
2834  *
2835  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2836  * Use is subject to license terms.
2837  */
2838 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2
2839 
2840 
2841 
2842 
2843 
2844 /*
2845  * Formatted I/O
2846  *
2847  * The following macros can be used even when an implementation has not
2848  * extended the printf/scanf family of functions.
2849  *
2850  * The form of the names of the macros is either "PRI" for printf specifiers
2851  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
2852  * followed by the datatype size. For example, PRId32 is the macro for
2853  * the printf d conversion specifier with the flags for 32 bit datatype.
2854  *
2855  * An example using one of these macros:
2856  *
2857  *	uint64_t u;
2858  *	printf("u = %016" PRIx64 "\n", u);
2859  *
2860  * For the purpose of example, the definitions of the printf/scanf macros
2861  * below have the values appropriate for a machine with 8 bit shorts, 16
2862  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
2863  * mode, and 64 bit long longs.
2864  */
2865 
2866 /*
2867  * fprintf macros for signed integers
2868  */
2869 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
2870 /*
2871  * fprintf macros for unsigned integers
2872  */
2873 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
2874 /*
2875  * fprintf macros for pointers
2876  */
2877 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
2878 /*
2879  * fscanf macros for signed integers
2880  */
2881 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
2882 /*
2883  * fscanf macros for unsigned integers
2884  */
2885 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h"
2886 /*
2887  * The following macros define I/O formats for intmax_t and uintmax_t.
2888  */
2889 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2
2890 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
2891 
2892 
2893 
2894 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1
2895 /*
2896  * CDDL HEADER START
2897  *
2898  * The contents of this file are subject to the terms of the
2899  * Common Development and Distribution License, Version 1.0 only
2900  * (the "License").  You may not use this file except in compliance
2901  * with the License.
2902  *
2903  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2904  * or http://www.opensolaris.org/os/licensing.
2905  * See the License for the specific language governing permissions
2906  * and limitations under the License.
2907  *
2908  * When distributing Covered Code, include this CDDL HEADER in each
2909  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2910  * If applicable, add the following below this CDDL HEADER, with the
2911  * fields enclosed by brackets "[]" replaced with your own identifying
2912  * information: Portions Copyright [yyyy] [name of copyright owner]
2913  *
2914  * CDDL HEADER END
2915  */
2916 /*
2917  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
2918  * Use is subject to license terms.
2919  */
2920 
2921 
2922 
2923 
2924 #pragma ident "%Z%%M%	%I%	%E% SMI"
2925 
2926 /*
2927  * This header is included by <stdint.h> which was introduced by
2928  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
2929  * The header is a subset of the <inttypes.h> header.
2930  */
2931 
2932 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
2933 /*
2934  * CDDL HEADER START
2935  *
2936  * The contents of this file are subject to the terms of the
2937  * Common Development and Distribution License, Version 1.0 only
2938  * (the "License").  You may not use this file except in compliance
2939  * with the License.
2940  *
2941  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2942  * or http://www.opensolaris.org/os/licensing.
2943  * See the License for the specific language governing permissions
2944  * and limitations under the License.
2945  *
2946  * When distributing Covered Code, include this CDDL HEADER in each
2947  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2948  * If applicable, add the following below this CDDL HEADER, with the
2949  * fields enclosed by brackets "[]" replaced with your own identifying
2950  * information: Portions Copyright [yyyy] [name of copyright owner]
2951  *
2952  * CDDL HEADER END
2953  */
2954 /*
2955  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2956  *
2957  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2958  * Use is subject to license terms.
2959  */
2960 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
2961 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
2962 /*
2963  * CDDL HEADER START
2964  *
2965  * The contents of this file are subject to the terms of the
2966  * Common Development and Distribution License, Version 1.0 only
2967  * (the "License").  You may not use this file except in compliance
2968  * with the License.
2969  *
2970  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2971  * or http://www.opensolaris.org/os/licensing.
2972  * See the License for the specific language governing permissions
2973  * and limitations under the License.
2974  *
2975  * When distributing Covered Code, include this CDDL HEADER in each
2976  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2977  * If applicable, add the following below this CDDL HEADER, with the
2978  * fields enclosed by brackets "[]" replaced with your own identifying
2979  * information: Portions Copyright [yyyy] [name of copyright owner]
2980  *
2981  * CDDL HEADER END
2982  */
2983 /*
2984  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2985  *
2986  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2987  * Use is subject to license terms.
2988  */
2989 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
2990 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1
2991 /*
2992  * CDDL HEADER START
2993  *
2994  * The contents of this file are subject to the terms of the
2995  * Common Development and Distribution License, Version 1.0 only
2996  * (the "License").  You may not use this file except in compliance
2997  * with the License.
2998  *
2999  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3000  * or http://www.opensolaris.org/os/licensing.
3001  * See the License for the specific language governing permissions
3002  * and limitations under the License.
3003  *
3004  * When distributing Covered Code, include this CDDL HEADER in each
3005  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3006  * If applicable, add the following below this CDDL HEADER, with the
3007  * fields enclosed by brackets "[]" replaced with your own identifying
3008  * information: Portions Copyright [yyyy] [name of copyright owner]
3009  *
3010  * CDDL HEADER END
3011  */
3012 /*
3013  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3014  *
3015  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3016  * Use is subject to license terms.
3017  */
3018 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2
3019 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2
3020 
3021 
3022 
3023 
3024 
3025 
3026 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
3027 
3028 /*
3029  * wchar_t is a built-in type in standard C++ and as such is not
3030  * defined here when using standard C++. However, the GNU compiler
3031  * fixincludes utility nonetheless creates its own version of this
3032  * header for use by gcc and g++. In that version it adds a redundant
3033  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
3034  * header we need to include the following magic comment:
3035  *
3036  * we must use the C++ compiler's type
3037  *
3038  * The above comment should not be removed or changed until GNU
3039  * gcc/fixinc/inclhack.def is updated to bypass this header.
3040  */
3041 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
3042 typedef struct {
3043  intmax_t quot;
3044  intmax_t rem;
3045 } imaxdiv_t;
3046 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h"
3047 extern intmax_t imaxabs(intmax_t);
3048 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
3049 extern intmax_t strtoimax(const char *, char **,
3050  int);
3051 extern uintmax_t strtoumax(const char *, char **,
3052  int);
3053 extern intmax_t wcstoimax(const wchar_t *,
3054  wchar_t **, int);
3055 extern uintmax_t wcstoumax(const wchar_t *,
3056  wchar_t **, int);
3057 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2
3058 extern uint32_t arc4random(void);
3059 extern void arc4random_buf(void *, size_t);
3060 extern uint32_t arc4random_uniform(uint32_t);
3061 extern void freezero(void *, size_t);
3062 extern void *recallocarray(void *, size_t, size_t, size_t);
3063 # 38 "special.c" 2
3064 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h" 1
3065 /*
3066  * CDDL HEADER START
3067  *
3068  * The contents of this file are subject to the terms of the
3069  * Common Development and Distribution License, Version 1.0 only
3070  * (the "License").  You may not use this file except in compliance
3071  * with the License.
3072  *
3073  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3074  * or http://www.opensolaris.org/os/licensing.
3075  * See the License for the specific language governing permissions
3076  * and limitations under the License.
3077  *
3078  * When distributing Covered Code, include this CDDL HEADER in each
3079  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3080  * If applicable, add the following below this CDDL HEADER, with the
3081  * fields enclosed by brackets "[]" replaced with your own identifying
3082  * information: Portions Copyright [yyyy] [name of copyright owner]
3083  *
3084  * CDDL HEADER END
3085  */
3086 /*	Copyright (c) 1988 AT&T	*/
3087 /*	  All Rights Reserved  	*/
3088 
3089 /*
3090  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3091  * Copyright 2016 Joyent, Inc.
3092  * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
3093  *
3094  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3095  * Use is subject to license terms.
3096  */
3097 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
3098 extern void __assert(const char *, const char *, int);
3099 
3100 
3101 /*
3102  * In C11 the static_assert macro is always defined, unlike the assert macro.
3103  */
3104 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/assert.h"
3105 /*
3106  * Note that the ANSI C Standard requires all headers to be idempotent except
3107  * <assert.h> which is explicitly required not to be idempotent (section 4.1.2).
3108  * Therefore, it is by intent that the header guards (#ifndef _ASSERT_H) do
3109  * not span this entire file.
3110  */
3111 # 39 "special.c" 2
3112 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 1
3113 /*
3114  * CDDL HEADER START
3115  *
3116  * The contents of this file are subject to the terms of the
3117  * Common Development and Distribution License, Version 1.0 only
3118  * (the "License").  You may not use this file except in compliance
3119  * with the License.
3120  *
3121  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3122  * or http://www.opensolaris.org/os/licensing.
3123  * See the License for the specific language governing permissions
3124  * and limitations under the License.
3125  *
3126  * When distributing Covered Code, include this CDDL HEADER in each
3127  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3128  * If applicable, add the following below this CDDL HEADER, with the
3129  * fields enclosed by brackets "[]" replaced with your own identifying
3130  * information: Portions Copyright [yyyy] [name of copyright owner]
3131  *
3132  * CDDL HEADER END
3133  */
3134 /*	Copyright (c) 1988 AT&T	*/
3135 /*	  All Rights Reserved  	*/
3136 
3137 
3138 /*
3139  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
3140  * Use is subject to license terms.
3141  */
3142 
3143 
3144 
3145 
3146 
3147 #pragma ident "%Z%%M%	%I%	%E% SMI"
3148 
3149 /*
3150  * Error codes
3151  */
3152 
3153 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
3154 /*
3155  * CDDL HEADER START
3156  *
3157  * The contents of this file are subject to the terms of the
3158  * Common Development and Distribution License, Version 1.0 only
3159  * (the "License").  You may not use this file except in compliance
3160  * with the License.
3161  *
3162  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3163  * or http://www.opensolaris.org/os/licensing.
3164  * See the License for the specific language governing permissions
3165  * and limitations under the License.
3166  *
3167  * When distributing Covered Code, include this CDDL HEADER in each
3168  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3169  * If applicable, add the following below this CDDL HEADER, with the
3170  * fields enclosed by brackets "[]" replaced with your own identifying
3171  * information: Portions Copyright [yyyy] [name of copyright owner]
3172  *
3173  * CDDL HEADER END
3174  */
3175 /*
3176  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
3177  * Use is subject to license terms.
3178  */
3179 
3180 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
3181 /*	  All Rights Reserved  	*/
3182 
3183 /*
3184  * University Copyright- Copyright (c) 1982, 1986, 1988
3185  * The Regents of the University of California
3186  * All Rights Reserved
3187  *
3188  * University Acknowledgment- Portions of this document are derived from
3189  * software developed by the University of California, Berkeley, and its
3190  * contributors.
3191  */
3192 
3193 
3194 
3195 
3196 #pragma ident "%Z%%M%	%I%	%E% SMI"
3197 
3198 
3199 
3200 
3201 
3202 /*
3203  * Error codes
3204  */
3205 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3206 /* Filesystem Quotas */
3207 
3208 
3209 /* Convergent Error Returns */
3210 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3211 /* Interprocess Robust Locks */
3212 
3213 
3214 
3215 /* stream problems */
3216 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3217 /* Interprocess Robust Locks */
3218 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3219 /* shared library problems */
3220 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3221 /* BSD Networking Software */
3222  /* argument errors */
3223 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3224     /* protocol family */
3225 
3226 
3227  /* operational errors */
3228 
3229 
3230 
3231     /* of reset */
3232 
3233 
3234 
3235 
3236 
3237 /* XENIX has 135 - 142 */
3238 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
3239 /* SUN Network File System */
3240 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h" 2
3241 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/errno.h"
3242 extern int *___errno();
3243 # 40 "special.c" 2
3244 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 1
3245 /*
3246  * CDDL HEADER START
3247  *
3248  * The contents of this file are subject to the terms of the
3249  * Common Development and Distribution License (the "License").
3250  * You may not use this file except in compliance with the License.
3251  *
3252  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3253  * or http://www.opensolaris.org/os/licensing.
3254  * See the License for the specific language governing permissions
3255  * and limitations under the License.
3256  *
3257  * When distributing Covered Code, include this CDDL HEADER in each
3258  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3259  * If applicable, add the following below this CDDL HEADER, with the
3260  * fields enclosed by brackets "[]" replaced with your own identifying
3261  * information: Portions Copyright [yyyy] [name of copyright owner]
3262  *
3263  * CDDL HEADER END
3264  */
3265 
3266 /*
3267  * Copyright 2014 PALO, Richard.
3268  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3269  * Copyright (c) 2013 Gary Mills
3270  *
3271  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
3272  */
3273 
3274 /*	Copyright (c) 1988 AT&T	*/
3275 /*	  All Rights Reserved  	*/
3276 
3277 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
3278 
3279 
3280 
3281 
3282 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3283 /*
3284  * CDDL HEADER START
3285  *
3286  * The contents of this file are subject to the terms of the
3287  * Common Development and Distribution License (the "License").
3288  * You may not use this file except in compliance with the License.
3289  *
3290  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3291  * or http://www.opensolaris.org/os/licensing.
3292  * See the License for the specific language governing permissions
3293  * and limitations under the License.
3294  *
3295  * When distributing Covered Code, include this CDDL HEADER in each
3296  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3297  * If applicable, add the following below this CDDL HEADER, with the
3298  * fields enclosed by brackets "[]" replaced with your own identifying
3299  * information: Portions Copyright [yyyy] [name of copyright owner]
3300  *
3301  * CDDL HEADER END
3302  */
3303 
3304 /*
3305  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3306  * Copyright 2016 Joyent, Inc.
3307  *
3308  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3309  * Use is subject to license terms.
3310  */
3311 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
3312 
3313 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
3314 /*
3315  * This file and its contents are supplied under the terms of the
3316  * Common Development and Distribution License ("CDDL"), version 1.0.
3317  * You may only use this file in accordance with the terms of version
3318  * 1.0 of the CDDL.
3319  *
3320  * A full copy of the text of the CDDL should have accompanied this
3321  * source.  A copy of the CDDL is also available via the Internet at
3322  * http://www.illumos.org/license/CDDL.
3323  */
3324 
3325 /*
3326  * Copyright 2014-2016 PALO, Richard.
3327  */
3328 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
3329 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
3330 /*
3331  * CDDL HEADER START
3332  *
3333  * The contents of this file are subject to the terms of the
3334  * Common Development and Distribution License (the "License").
3335  * You may not use this file except in compliance with the License.
3336  *
3337  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3338  * or http://www.opensolaris.org/os/licensing.
3339  * See the License for the specific language governing permissions
3340  * and limitations under the License.
3341  *
3342  * When distributing Covered Code, include this CDDL HEADER in each
3343  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3344  * If applicable, add the following below this CDDL HEADER, with the
3345  * fields enclosed by brackets "[]" replaced with your own identifying
3346  * information: Portions Copyright [yyyy] [name of copyright owner]
3347  *
3348  * CDDL HEADER END
3349  */
3350 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3351 /*	  All Rights Reserved  	*/
3352 
3353 
3354 /*
3355  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3356  * Use is subject to license terms.
3357  *
3358  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3359  * Copyright 2016 Joyent, Inc.
3360  */
3361 
3362 
3363 
3364 
3365 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3366 /*
3367  * CDDL HEADER START
3368  *
3369  * The contents of this file are subject to the terms of the
3370  * Common Development and Distribution License (the "License").
3371  * You may not use this file except in compliance with the License.
3372  *
3373  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3374  * or http://www.opensolaris.org/os/licensing.
3375  * See the License for the specific language governing permissions
3376  * and limitations under the License.
3377  *
3378  * When distributing Covered Code, include this CDDL HEADER in each
3379  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3380  * If applicable, add the following below this CDDL HEADER, with the
3381  * fields enclosed by brackets "[]" replaced with your own identifying
3382  * information: Portions Copyright [yyyy] [name of copyright owner]
3383  *
3384  * CDDL HEADER END
3385  */
3386 
3387 /*
3388  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3389  * Copyright 2016 Joyent, Inc.
3390  *
3391  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3392  * Use is subject to license terms.
3393  */
3394 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3395 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
3396 /*
3397  * CDDL HEADER START
3398  *
3399  * The contents of this file are subject to the terms of the
3400  * Common Development and Distribution License (the "License").
3401  * You may not use this file except in compliance with the License.
3402  *
3403  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3404  * or http://www.opensolaris.org/os/licensing.
3405  * See the License for the specific language governing permissions
3406  * and limitations under the License.
3407  *
3408  *
3409  * When distributing Covered Code, include this CDDL HEADER in each
3410  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3411  * If applicable, add the following below this CDDL HEADER, with the
3412  * fields enclosed by brackets "[]" replaced with your own identifying
3413  * information: Portions Copyright [yyyy] [name of copyright owner]
3414  *
3415  * CDDL HEADER END
3416  */
3417 
3418 /*
3419  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3420  * Use is subject to license terms.
3421  * Copyright 2016 Joyent, Inc.
3422  */
3423 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3424 
3425 /*
3426  * Machine dependent definitions moved to <sys/machtypes.h>.
3427  */
3428 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
3429 /*
3430  * CDDL HEADER START
3431  *
3432  * The contents of this file are subject to the terms of the
3433  * Common Development and Distribution License, Version 1.0 only
3434  * (the "License").  You may not use this file except in compliance
3435  * with the License.
3436  *
3437  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3438  * or http://www.opensolaris.org/os/licensing.
3439  * See the License for the specific language governing permissions
3440  * and limitations under the License.
3441  *
3442  * When distributing Covered Code, include this CDDL HEADER in each
3443  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3444  * If applicable, add the following below this CDDL HEADER, with the
3445  * fields enclosed by brackets "[]" replaced with your own identifying
3446  * information: Portions Copyright [yyyy] [name of copyright owner]
3447  *
3448  * CDDL HEADER END
3449  */
3450 /*
3451  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3452  * Use is subject to license terms.
3453  */
3454 
3455 
3456 
3457 
3458 #pragma ident "%Z%%M%	%I%	%E% SMI"
3459 
3460 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3461 /*
3462  * CDDL HEADER START
3463  *
3464  * The contents of this file are subject to the terms of the
3465  * Common Development and Distribution License (the "License").
3466  * You may not use this file except in compliance with the License.
3467  *
3468  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3469  * or http://www.opensolaris.org/os/licensing.
3470  * See the License for the specific language governing permissions
3471  * and limitations under the License.
3472  *
3473  * When distributing Covered Code, include this CDDL HEADER in each
3474  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3475  * If applicable, add the following below this CDDL HEADER, with the
3476  * fields enclosed by brackets "[]" replaced with your own identifying
3477  * information: Portions Copyright [yyyy] [name of copyright owner]
3478  *
3479  * CDDL HEADER END
3480  */
3481 
3482 /*
3483  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3484  * Copyright 2016 Joyent, Inc.
3485  *
3486  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3487  * Use is subject to license terms.
3488  */
3489 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
3490 
3491 
3492 
3493 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
3494 /*
3495  * CDDL HEADER START
3496  *
3497  * The contents of this file are subject to the terms of the
3498  * Common Development and Distribution License (the "License").
3499  * You may not use this file except in compliance with the License.
3500  *
3501  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3502  * or http://www.opensolaris.org/os/licensing.
3503  * See the License for the specific language governing permissions
3504  * and limitations under the License.
3505  *
3506  * When distributing Covered Code, include this CDDL HEADER in each
3507  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3508  * If applicable, add the following below this CDDL HEADER, with the
3509  * fields enclosed by brackets "[]" replaced with your own identifying
3510  * information: Portions Copyright [yyyy] [name of copyright owner]
3511  *
3512  * CDDL HEADER END
3513  */
3514 /*
3515  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3516  * Use is subject to license terms.
3517  */
3518 
3519 
3520 
3521 
3522 #pragma ident "%Z%%M%	%I%	%E% SMI"
3523 
3524 
3525 
3526 
3527 
3528 /*
3529  * Machine dependent types:
3530  *
3531  *	intel ia32 Version
3532  */
3533 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
3534 typedef struct _label_t { long val[6]; } label_t;
3535 
3536 
3537 
3538 typedef unsigned char lock_t; /* lock work for busy wait */
3539 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
3540 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3541 
3542 /*
3543  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
3544  * committee's working draft for the revision of the current ISO C standard,
3545  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
3546  * required by any standard but constitute a useful, general purpose set
3547  * of type definitions which is namespace clean with respect to all standards.
3548  */
3549 
3550 
3551 
3552 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
3553 /*
3554  * CDDL HEADER START
3555  *
3556  * The contents of this file are subject to the terms of the
3557  * Common Development and Distribution License, Version 1.0 only
3558  * (the "License").  You may not use this file except in compliance
3559  * with the License.
3560  *
3561  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3562  * or http://www.opensolaris.org/os/licensing.
3563  * See the License for the specific language governing permissions
3564  * and limitations under the License.
3565  *
3566  * When distributing Covered Code, include this CDDL HEADER in each
3567  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3568  * If applicable, add the following below this CDDL HEADER, with the
3569  * fields enclosed by brackets "[]" replaced with your own identifying
3570  * information: Portions Copyright [yyyy] [name of copyright owner]
3571  *
3572  * CDDL HEADER END
3573  */
3574 /*
3575  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3576  *
3577  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3578  * Use is subject to license terms.
3579  */
3580 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3581 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3582 /*
3583  * Strictly conforming ANSI C environments prior to the 1999
3584  * revision of the C Standard (ISO/IEC 9899:1999) do not have
3585  * the long long data type.
3586  */
3587 
3588 typedef long long longlong_t;
3589 typedef unsigned long long u_longlong_t;
3590 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3591 /*
3592  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
3593  * to use them instead of int32_t and uint32_t because DEC had
3594  * shipped 64-bit wide.
3595  */
3596 
3597 
3598 
3599 
3600 typedef long t_scalar_t; /* historical versions */
3601 typedef unsigned long t_uscalar_t;
3602 
3603 
3604 /*
3605  * POSIX Extensions
3606  */
3607 typedef unsigned char uchar_t;
3608 typedef unsigned short ushort_t;
3609 typedef unsigned int uint_t;
3610 typedef unsigned long ulong_t;
3611 
3612 typedef char *caddr_t; /* ?<core address> type */
3613 typedef long daddr_t; /* <disk address> type */
3614 typedef short cnt_t; /* ?<count> type */
3615 
3616 
3617 
3618 
3619 
3620 
3621 typedef int ptrdiff_t; /* (historical version) */
3622 
3623 
3624 
3625 /*
3626  * VM-related types
3627  */
3628 typedef ulong_t pfn_t; /* page frame number */
3629 typedef ulong_t pgcnt_t; /* number of pages */
3630 typedef long spgcnt_t; /* signed number of pages */
3631 
3632 typedef uchar_t use_t; /* use count for swap.  */
3633 typedef short sysid_t;
3634 typedef short index_t;
3635 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
3636 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
3637 
3638 /*
3639  * The size of off_t and related types depends on the setting of
3640  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
3641  * related to those defined here.)
3642  *
3643  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
3644  * explicitly 64 bits wide become available.
3645  */
3646 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3647 typedef u_longlong_t ino_t; /* expanded inode type	*/
3648 typedef longlong_t blkcnt_t; /* count of file blocks */
3649 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
3650 typedef u_longlong_t fsfilcnt_t; /* count of files */
3651 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3652 typedef u_longlong_t ino64_t; /* expanded inode type	*/
3653 typedef longlong_t blkcnt64_t; /* count of file blocks */
3654 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
3655 typedef u_longlong_t fsfilcnt64_t; /* count of files */
3656 
3657 
3658 
3659 
3660 
3661 
3662 typedef long blksize_t; /* used for block sizes */
3663 
3664 
3665 
3666 
3667 
3668 typedef enum { B_FALSE, B_TRUE } boolean_t;
3669 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3670 /*
3671  * The {u,}pad64_t types can be used in structures such that those structures
3672  * may be accessed by code produced by compilation environments which don't
3673  * support a 64 bit integral datatype.  The intention is not to allow
3674  * use of these fields in such environments, but to maintain the alignment
3675  * and offsets of the structure.
3676  *
3677  * Similar comments for {u,}pad128_t.
3678  *
3679  * Note that these types do NOT generate any stronger alignment constraints
3680  * than those available in the underlying ABI.  See <sys/isa_defs.h>
3681  */
3682 
3683 typedef int64_t pad64_t;
3684 typedef uint64_t upad64_t;
3685 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3686 typedef union {
3687  long double _q;
3688  int32_t _l[4];
3689 } pad128_t;
3690 
3691 typedef union {
3692  long double _q;
3693  uint32_t _l[4];
3694 } upad128_t;
3695 
3696 typedef longlong_t offset_t;
3697 typedef u_longlong_t u_offset_t;
3698 typedef u_longlong_t len_t;
3699 typedef u_longlong_t diskaddr_t;
3700 
3701 
3702 
3703 
3704 /*
3705  * Definitions remaining from previous partial support for 64-bit file
3706  * offsets.  This partial support for devices greater than 2gb requires
3707  * compiler support for long long.
3708  */
3709 
3710 typedef union {
3711  offset_t _f; /* Full 64 bit offset value */
3712  struct {
3713   int32_t _l; /* lower 32 bits of offset value */
3714   int32_t _u; /* upper 32 bits of offset value */
3715  } _p;
3716 } lloff_t;
3717 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3718 typedef union {
3719  longlong_t _f; /* Full 64 bit disk address value */
3720  struct {
3721   int32_t _l; /* lower 32 bits of disk address value */
3722   int32_t _u; /* upper 32 bits of disk address value */
3723  } _p;
3724 } lldaddr_t;
3725 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3726 typedef uint_t k_fltset_t; /* kernel fault set type */
3727 
3728 /*
3729  * The following type is for various kinds of identifiers.  The
3730  * actual type must be the same for all since some system calls
3731  * (such as sigsend) take arguments that may be any of these
3732  * types.  The enumeration type idtype_t defined in sys/procset.h
3733  * is used to indicate what type of id is being specified --
3734  * a process id, process group id, session id, scheduling class id,
3735  * user id, group id, project id, task id or zone id.
3736  */
3737 
3738 
3739 
3740 typedef long id_t; /* (historical version) */
3741 
3742 
3743 typedef id_t lgrp_id_t; /* lgroup ID */
3744 
3745 /*
3746  * Type useconds_t is an unsigned integral type capable of storing
3747  * values at least in the range of zero to 1,000,000.
3748  */
3749 typedef uint_t useconds_t; /* Time, in microseconds */
3750 
3751 
3752 
3753 typedef long suseconds_t; /* signed # of microseconds */
3754 
3755 
3756 /*
3757  * Typedefs for dev_t components.
3758  */
3759 
3760 
3761 
3762 
3763 typedef ulong_t major_t; /* (historical version) */
3764 typedef ulong_t minor_t; /* (historical version) */
3765 
3766 
3767 /*
3768  * The data type of a thread priority.
3769  */
3770 typedef short pri_t;
3771 
3772 /*
3773  * The data type for a CPU flags field.  (Can be extended to larger unsigned
3774  * types, if needed, limited by ability to update atomically.)
3775  */
3776 typedef ushort_t cpu_flag_t;
3777 
3778 /*
3779  * For compatibility reasons the following typedefs (prefixed o_)
3780  * can't grow regardless of the EFT definition. Although,
3781  * applications should not explicitly use these typedefs
3782  * they may be included via a system header definition.
3783  * WARNING: These typedefs may be removed in a future
3784  * release.
3785  *		ex. the definitions in s5inode.h (now obsoleted)
3786  *			remained small to preserve compatibility
3787  *			in the S5 file system type.
3788  */
3789 typedef ushort_t o_mode_t; /* old file attribute type */
3790 typedef short o_dev_t; /* old device type	*/
3791 typedef ushort_t o_uid_t; /* old UID type		*/
3792 typedef o_uid_t o_gid_t; /* old GID type		*/
3793 typedef short o_nlink_t; /* old file link type	*/
3794 typedef short o_pid_t; /* old process id type	*/
3795 typedef ushort_t o_ino_t; /* old inode type	*/
3796 
3797 
3798 /*
3799  * POSIX and XOPEN Declarations
3800  */
3801 typedef int key_t; /* IPC key type		*/
3802 
3803 
3804 
3805 typedef ulong_t mode_t; /* (historical version) */
3806 
3807 
3808 
3809 
3810 
3811 
3812 
3813 typedef uid_t gid_t; /* GID type		*/
3814 
3815 typedef uint32_t datalink_id_t;
3816 typedef uint32_t vrid_t;
3817 
3818 typedef id_t taskid_t;
3819 typedef id_t projid_t;
3820 typedef id_t poolid_t;
3821 typedef id_t zoneid_t;
3822 typedef id_t ctid_t;
3823 
3824 /*
3825  * POSIX definitions are same as defined in thread.h and synch.h.
3826  * Any changes made to here should be reflected in corresponding
3827  * files as described in comments.
3828  */
3829 typedef uint_t pthread_t; /* = thread_t in thread.h */
3830 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
3831 
3832 /* "Magic numbers" tagging synchronization object types */
3833 
3834 
3835 
3836 
3837 
3838 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
3839  struct {
3840   uint16_t __pthread_mutex_flag1;
3841   uint8_t __pthread_mutex_flag2;
3842   uint8_t __pthread_mutex_ceiling;
3843   uint16_t __pthread_mutex_type;
3844   uint16_t __pthread_mutex_magic;
3845  } __pthread_mutex_flags;
3846  union {
3847   struct {
3848    uint8_t __pthread_mutex_pad[8];
3849   } __pthread_mutex_lock64;
3850   struct {
3851    uint32_t __pthread_ownerpid;
3852    uint32_t __pthread_lockword;
3853   } __pthread_mutex_lock32;
3854   upad64_t __pthread_mutex_owner64;
3855  } __pthread_mutex_lock;
3856  upad64_t __pthread_mutex_data;
3857 } pthread_mutex_t;
3858 
3859 typedef struct _pthread_cond { /* = cond_t in synch.h */
3860  struct {
3861   uint8_t __pthread_cond_flag[4];
3862   uint16_t __pthread_cond_type;
3863   uint16_t __pthread_cond_magic;
3864  } __pthread_cond_flags;
3865  upad64_t __pthread_cond_data;
3866 } pthread_cond_t;
3867 
3868 /*
3869  * UNIX 98 Extension
3870  */
3871 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
3872  int32_t __pthread_rwlock_readers;
3873  uint16_t __pthread_rwlock_type;
3874  uint16_t __pthread_rwlock_magic;
3875  pthread_mutex_t __pthread_rwlock_mutex;
3876  pthread_cond_t __pthread_rwlock_readercv;
3877  pthread_cond_t __pthread_rwlock_writercv;
3878 } pthread_rwlock_t;
3879 
3880 /*
3881  * SUSV3
3882  */
3883 typedef struct {
3884  uint32_t __pthread_barrier_count;
3885  uint32_t __pthread_barrier_current;
3886  upad64_t __pthread_barrier_cycle;
3887  upad64_t __pthread_barrier_reserved;
3888  pthread_mutex_t __pthread_barrier_lock;
3889  pthread_cond_t __pthread_barrier_cond;
3890 } pthread_barrier_t;
3891 
3892 typedef pthread_mutex_t pthread_spinlock_t;
3893 
3894 /*
3895  * attributes for threads, dynamically allocated by library
3896  */
3897 typedef struct _pthread_attr {
3898  void *__pthread_attrp;
3899 } pthread_attr_t;
3900 
3901 /*
3902  * attributes for mutex, dynamically allocated by library
3903  */
3904 typedef struct _pthread_mutexattr {
3905  void *__pthread_mutexattrp;
3906 } pthread_mutexattr_t;
3907 
3908 /*
3909  * attributes for cond, dynamically allocated by library
3910  */
3911 typedef struct _pthread_condattr {
3912  void *__pthread_condattrp;
3913 } pthread_condattr_t;
3914 
3915 /*
3916  * pthread_once
3917  */
3918 typedef struct _once {
3919  upad64_t __pthread_once_pad[4];
3920 } pthread_once_t;
3921 
3922 /*
3923  * UNIX 98 Extensions
3924  * attributes for rwlock, dynamically allocated by library
3925  */
3926 typedef struct _pthread_rwlockattr {
3927  void *__pthread_rwlockattrp;
3928 } pthread_rwlockattr_t;
3929 
3930 /*
3931  * SUSV3
3932  * attributes for pthread_barrier_t, dynamically allocated by library
3933  */
3934 typedef struct {
3935  void *__pthread_barrierattrp;
3936 } pthread_barrierattr_t;
3937 
3938 typedef ulong_t dev_t; /* expanded device type */
3939 
3940 
3941 
3942 
3943 
3944 typedef ulong_t nlink_t; /* (historical version) */
3945 typedef long pid_t; /* (historical version) */
3946 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3947 typedef long time_t; /* time of day in seconds */
3948 
3949 
3950 
3951 
3952 typedef long clock_t; /* relative time in a specified resolution */
3953 
3954 
3955 
3956 
3957 typedef int clockid_t; /* clock identifier type */
3958 
3959 
3960 
3961 
3962 typedef int timer_t; /* timer identifier type */
3963 
3964 
3965 
3966 
3967 /* BEGIN CSTYLED */
3968 typedef unsigned char unchar;
3969 typedef unsigned short ushort;
3970 typedef unsigned int uint;
3971 typedef unsigned long ulong;
3972 /* END CSTYLED */
3973 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3974 /*
3975  * The following is the value of type id_t to use to indicate the
3976  * caller's current id.  See procset.h for the type idtype_t
3977  * which defines which kind of id is being specified.
3978  */
3979 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
3980 /*
3981  * The following value of type pfn_t is used to indicate
3982  * invalid page frame number.
3983  */
3984 
3985 
3986 
3987 /* BEGIN CSTYLED */
3988 typedef unsigned char u_char;
3989 typedef unsigned short u_short;
3990 typedef unsigned int u_int;
3991 typedef unsigned long u_long;
3992 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
3993 typedef quad_t quad; /* used by UFS */
3994 /* END CSTYLED */
3995 
3996 /*
3997  * Nested include for BSD/sockets source compatibility.
3998  * (The select macros used to be defined here).
3999  */
4000 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
4001 /*
4002  * CDDL HEADER START
4003  *
4004  * The contents of this file are subject to the terms of the
4005  * Common Development and Distribution License (the "License").
4006  * You may not use this file except in compliance with the License.
4007  *
4008  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4009  * or http://www.opensolaris.org/os/licensing.
4010  * See the License for the specific language governing permissions
4011  * and limitations under the License.
4012  *
4013  * When distributing Covered Code, include this CDDL HEADER in each
4014  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4015  * If applicable, add the following below this CDDL HEADER, with the
4016  * fields enclosed by brackets "[]" replaced with your own identifying
4017  * information: Portions Copyright [yyyy] [name of copyright owner]
4018  *
4019  * CDDL HEADER END
4020  */
4021 
4022 /*
4023  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4024  *
4025  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4026  *
4027  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4028  * Use is subject to license terms.
4029  */
4030 
4031 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4032 /*	  All Rights Reserved	*/
4033 
4034 /*
4035  * University Copyright- Copyright (c) 1982, 1986, 1988
4036  * The Regents of the University of California
4037  * All Rights Reserved
4038  *
4039  * University Acknowledgment- Portions of this document are derived from
4040  * software developed by the University of California, Berkeley, and its
4041  * contributors.
4042  */
4043 
4044 
4045 
4046 
4047 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4048 /*
4049  * CDDL HEADER START
4050  *
4051  * The contents of this file are subject to the terms of the
4052  * Common Development and Distribution License (the "License").
4053  * You may not use this file except in compliance with the License.
4054  *
4055  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4056  * or http://www.opensolaris.org/os/licensing.
4057  * See the License for the specific language governing permissions
4058  * and limitations under the License.
4059  *
4060  * When distributing Covered Code, include this CDDL HEADER in each
4061  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4062  * If applicable, add the following below this CDDL HEADER, with the
4063  * fields enclosed by brackets "[]" replaced with your own identifying
4064  * information: Portions Copyright [yyyy] [name of copyright owner]
4065  *
4066  * CDDL HEADER END
4067  */
4068 
4069 /*
4070  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4071  * Copyright 2016 Joyent, Inc.
4072  *
4073  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4074  * Use is subject to license terms.
4075  */
4076 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
4077 
4078 
4079 
4080 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4081 /*
4082  * CDDL HEADER START
4083  *
4084  * The contents of this file are subject to the terms of the
4085  * Common Development and Distribution License, Version 1.0 only
4086  * (the "License").  You may not use this file except in compliance
4087  * with the License.
4088  *
4089  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4090  * or http://www.opensolaris.org/os/licensing.
4091  * See the License for the specific language governing permissions
4092  * and limitations under the License.
4093  *
4094  * When distributing Covered Code, include this CDDL HEADER in each
4095  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4096  * If applicable, add the following below this CDDL HEADER, with the
4097  * fields enclosed by brackets "[]" replaced with your own identifying
4098  * information: Portions Copyright [yyyy] [name of copyright owner]
4099  *
4100  * CDDL HEADER END
4101  */
4102 /*
4103  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4104  * Use is subject to license terms.
4105  */
4106 
4107 /*
4108  * Implementation-private.  This header should not be included
4109  * directly by an application.  The application should instead
4110  * include <time.h> which includes this header conditionally
4111  * depending on which feature test macros are defined. By default,
4112  * this header is included by <time.h>.  X/Open and POSIX
4113  * standards requirements result in this header being included
4114  * by <time.h> only under a restricted set of conditions.
4115  */
4116 
4117 
4118 
4119 
4120 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4121 /*
4122  * CDDL HEADER START
4123  *
4124  * The contents of this file are subject to the terms of the
4125  * Common Development and Distribution License (the "License").
4126  * You may not use this file except in compliance with the License.
4127  *
4128  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4129  * or http://www.opensolaris.org/os/licensing.
4130  * See the License for the specific language governing permissions
4131  * and limitations under the License.
4132  *
4133  * When distributing Covered Code, include this CDDL HEADER in each
4134  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4135  * If applicable, add the following below this CDDL HEADER, with the
4136  * fields enclosed by brackets "[]" replaced with your own identifying
4137  * information: Portions Copyright [yyyy] [name of copyright owner]
4138  *
4139  * CDDL HEADER END
4140  */
4141 
4142 /*
4143  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4144  * Copyright 2016 Joyent, Inc.
4145  *
4146  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4147  * Use is subject to license terms.
4148  */
4149 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
4150 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
4151 /*
4152  * Time expressed in seconds and nanoseconds
4153  */
4154 
4155 typedef struct timespec { /* definition per POSIX.4 */
4156  time_t tv_sec; /* seconds */
4157  long tv_nsec; /* and nanoseconds */
4158 } timespec_t;
4159 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
4160 typedef struct timespec timestruc_t; /* definition per SVr4 */
4161 
4162 /*
4163  * The following has been left in for backward compatibility. Portable
4164  * applications should not use the structure name timestruc.
4165  */
4166 
4167 
4168 
4169 
4170 
4171 /*
4172  * Timer specification
4173  */
4174 typedef struct itimerspec { /* definition per POSIX.4 */
4175  struct timespec it_interval; /* timer period */
4176  struct timespec it_value; /* timer expiration */
4177 } itimerspec_t;
4178 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
4179 
4180 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
4181 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4182 /*	  All Rights Reserved  	*/
4183 
4184 
4185 /*
4186  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
4187  * All rights reserved.  The Berkeley software License Agreement
4188  * specifies the terms and conditions for redistribution.
4189  */
4190 
4191 /*
4192  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4193  *
4194  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4195  * Use is subject to license terms.
4196  *
4197  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4198  */
4199 
4200 /*
4201  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
4202  */
4203 
4204 
4205 
4206 
4207 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4208 /*
4209  * CDDL HEADER START
4210  *
4211  * The contents of this file are subject to the terms of the
4212  * Common Development and Distribution License (the "License").
4213  * You may not use this file except in compliance with the License.
4214  *
4215  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4216  * or http://www.opensolaris.org/os/licensing.
4217  * See the License for the specific language governing permissions
4218  * and limitations under the License.
4219  *
4220  * When distributing Covered Code, include this CDDL HEADER in each
4221  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4222  * If applicable, add the following below this CDDL HEADER, with the
4223  * fields enclosed by brackets "[]" replaced with your own identifying
4224  * information: Portions Copyright [yyyy] [name of copyright owner]
4225  *
4226  * CDDL HEADER END
4227  */
4228 
4229 /*
4230  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4231  * Copyright 2016 Joyent, Inc.
4232  *
4233  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4234  * Use is subject to license terms.
4235  */
4236 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4237 
4238 /*
4239  * Structure returned by gettimeofday(2) system call,
4240  * and used in other calls.
4241  */
4242 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4243 struct timeval {
4244  time_t tv_sec; /* seconds */
4245  suseconds_t tv_usec; /* and microseconds */
4246 };
4247 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4248 struct timezone {
4249  int tz_minuteswest; /* minutes west of Greenwich */
4250  int tz_dsttime; /* type of dst correction */
4251 };
4252 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4253 /*
4254  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
4255  * including <sys/select.h> which relies on the presense of the itimerval
4256  * structure.
4257  */
4258 
4259 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4260 /*
4261  * CDDL HEADER START
4262  *
4263  * The contents of this file are subject to the terms of the
4264  * Common Development and Distribution License (the "License").
4265  * You may not use this file except in compliance with the License.
4266  *
4267  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4268  * or http://www.opensolaris.org/os/licensing.
4269  * See the License for the specific language governing permissions
4270  * and limitations under the License.
4271  *
4272  * When distributing Covered Code, include this CDDL HEADER in each
4273  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4274  * If applicable, add the following below this CDDL HEADER, with the
4275  * fields enclosed by brackets "[]" replaced with your own identifying
4276  * information: Portions Copyright [yyyy] [name of copyright owner]
4277  *
4278  * CDDL HEADER END
4279  */
4280 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4281 /*	  All Rights Reserved  	*/
4282 
4283 
4284 /*
4285  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4286  * Use is subject to license terms.
4287  *
4288  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4289  * Copyright 2016 Joyent, Inc.
4290  */
4291 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4292 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4293 /*
4294  * Operations on timevals.
4295  */
4296 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4297 /*
4298  * Names of the interval timers, and structure
4299  * defining a timer setting.
4300  */
4301 
4302 
4303 
4304     /* time and when system is running on */
4305     /* behalf of the process. */
4306 
4307     /* time profiling of multithreaded */
4308     /* programs. */
4309 
4310 
4311 struct itimerval {
4312  struct timeval it_interval; /* timer interval */
4313  struct timeval it_value; /* current value */
4314 };
4315 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4316 /*
4317  *	Definitions for commonly used resolutions.
4318  */
4319 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4320 /*
4321  * Time expressed as a 64-bit nanosecond counter.
4322  */
4323 typedef longlong_t hrtime_t;
4324 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4325 int adjtime(struct timeval *, struct timeval *);
4326 
4327 
4328 
4329 
4330 int futimesat(int, const char *, const struct timeval *);
4331 
4332 
4333 
4334 
4335 
4336 int getitimer(int, struct itimerval *);
4337 int utimes(const char *, const struct timeval *);
4338 
4339 
4340 
4341 
4342 int setitimer(int, struct itimerval *,
4343  struct itimerval *);
4344 
4345 
4346 
4347 
4348 /*
4349  * gettimeofday() and settimeofday() were included in SVr4 due to their
4350  * common use in BSD based applications.  They were to be included exactly
4351  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
4352  * parameter was unused and deleted it, thereby making a routine included
4353  * for compatibility, incompatible.
4354  *
4355  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
4356  * parameters.
4357  *
4358  * This has caused general disagreement in the application community as to
4359  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
4360  * The flag _SVID_GETTOD may be used to force the SVID version.
4361  */
4362 
4363 
4364 
4365 
4366 
4367 int settimeofday(struct timeval *, void *);
4368 
4369 hrtime_t gethrtime(void);
4370 hrtime_t gethrvtime(void);
4371 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
4372 int gettimeofday(struct timeval *, void *);
4373 
4374 
4375 
4376 
4377 /*
4378  * The inclusion of <time.h> is historical and was added for
4379  * backward compatibility in delta 1.2 when a number of definitions
4380  * were moved out of <sys/time.h>.  More recently, the timespec and
4381  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
4382  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
4383  * which is now included by <time.h>.  This change was due to POSIX
4384  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
4385  * non-X/Open applications, including this header will still make
4386  * visible these definitions.
4387  */
4388 
4389 
4390 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
4391 /*
4392  * CDDL HEADER START
4393  *
4394  * The contents of this file are subject to the terms of the
4395  * Common Development and Distribution License (the "License").
4396  * You may not use this file except in compliance with the License.
4397  *
4398  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4399  * or http://www.opensolaris.org/os/licensing.
4400  * See the License for the specific language governing permissions
4401  * and limitations under the License.
4402  *
4403  * When distributing Covered Code, include this CDDL HEADER in each
4404  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4405  * If applicable, add the following below this CDDL HEADER, with the
4406  * fields enclosed by brackets "[]" replaced with your own identifying
4407  * information: Portions Copyright [yyyy] [name of copyright owner]
4408  *
4409  * CDDL HEADER END
4410  */
4411 /*	Copyright (c) 1988 AT&T	*/
4412 /*	  All Rights Reserved  	*/
4413 
4414 
4415 /*
4416  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4417  *
4418  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4419  * Use is subject to license terms.
4420  */
4421 /*
4422  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
4423  * Copyright 2016 Joyent, Inc.
4424  */
4425 
4426 
4427 
4428 
4429 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4430 /*
4431  * CDDL HEADER START
4432  *
4433  * The contents of this file are subject to the terms of the
4434  * Common Development and Distribution License (the "License").
4435  * You may not use this file except in compliance with the License.
4436  *
4437  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4438  * or http://www.opensolaris.org/os/licensing.
4439  * See the License for the specific language governing permissions
4440  * and limitations under the License.
4441  *
4442  * When distributing Covered Code, include this CDDL HEADER in each
4443  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4444  * If applicable, add the following below this CDDL HEADER, with the
4445  * fields enclosed by brackets "[]" replaced with your own identifying
4446  * information: Portions Copyright [yyyy] [name of copyright owner]
4447  *
4448  * CDDL HEADER END
4449  */
4450 
4451 /*
4452  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4453  * Copyright 2016 Joyent, Inc.
4454  *
4455  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4456  * Use is subject to license terms.
4457  */
4458 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4459 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
4460 /*
4461  * CDDL HEADER START
4462  *
4463  * The contents of this file are subject to the terms of the
4464  * Common Development and Distribution License, Version 1.0 only
4465  * (the "License").  You may not use this file except in compliance
4466  * with the License.
4467  *
4468  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4469  * or http://www.opensolaris.org/os/licensing.
4470  * See the License for the specific language governing permissions
4471  * and limitations under the License.
4472  *
4473  * When distributing Covered Code, include this CDDL HEADER in each
4474  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4475  * If applicable, add the following below this CDDL HEADER, with the
4476  * fields enclosed by brackets "[]" replaced with your own identifying
4477  * information: Portions Copyright [yyyy] [name of copyright owner]
4478  *
4479  * CDDL HEADER END
4480  */
4481 /*	Copyright (c) 1988 AT&T	*/
4482 /*	  All Rights Reserved  	*/
4483 
4484 /*
4485  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4486  * Copyright 2014 PALO, Richard.
4487  *
4488  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4489  * Use is subject to license terms.
4490  */
4491 
4492 /*
4493  * An application should not include this header directly.  Instead it
4494  * should be included only through the inclusion of other Sun headers.
4495  *
4496  * The contents of this header is limited to identifiers specified in the
4497  * C Standard.  Any new identifiers specified in future amendments to the
4498  * C Standard must be placed in this header.  If these new identifiers
4499  * are required to also be in the C++ Standard "std" namespace, then for
4500  * anything other than macro definitions, corresponding "using" directives
4501  * must also be added to <time.h.h>.
4502  */
4503 
4504 
4505 
4506 
4507 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4508 /*
4509  * CDDL HEADER START
4510  *
4511  * The contents of this file are subject to the terms of the
4512  * Common Development and Distribution License (the "License").
4513  * You may not use this file except in compliance with the License.
4514  *
4515  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4516  * or http://www.opensolaris.org/os/licensing.
4517  * See the License for the specific language governing permissions
4518  * and limitations under the License.
4519  *
4520  * When distributing Covered Code, include this CDDL HEADER in each
4521  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4522  * If applicable, add the following below this CDDL HEADER, with the
4523  * fields enclosed by brackets "[]" replaced with your own identifying
4524  * information: Portions Copyright [yyyy] [name of copyright owner]
4525  *
4526  * CDDL HEADER END
4527  */
4528 
4529 /*
4530  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4531  * Copyright 2016 Joyent, Inc.
4532  *
4533  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4534  * Use is subject to license terms.
4535  */
4536 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
4537 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
4538 /*
4539  * This file and its contents are supplied under the terms of the
4540  * Common Development and Distribution License ("CDDL"), version 1.0.
4541  * You may only use this file in accordance with the terms of version
4542  * 1.0 of the CDDL.
4543  *
4544  * A full copy of the text of the CDDL should have accompanied this
4545  * source.  A copy of the CDDL is also available via the Internet at
4546  * http://www.illumos.org/license/CDDL.
4547  */
4548 
4549 /*
4550  * Copyright 2014-2016 PALO, Richard.
4551  */
4552 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
4553 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
4554 struct tm { /* see ctime(3) */
4555  int tm_sec;
4556  int tm_min;
4557  int tm_hour;
4558  int tm_mday;
4559  int tm_mon;
4560  int tm_year;
4561  int tm_wday;
4562  int tm_yday;
4563  int tm_isdst;
4564 };
4565 
4566 
4567 extern char *asctime(const struct tm *);
4568 extern clock_t clock(void);
4569 extern char *ctime(const time_t *);
4570 extern double difftime(time_t, time_t);
4571 extern struct tm *gmtime(const time_t *);
4572 extern struct tm *localtime(const time_t *);
4573 extern time_t mktime(struct tm *);
4574 extern time_t time(time_t *);
4575 extern size_t strftime(char *, size_t, const char *,
4576  const struct tm *);
4577 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4578 /*
4579  * C11 requires sys/time_impl.h for the definition of the struct timespec.
4580  */
4581 
4582 
4583 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4584 /*
4585  * CDDL HEADER START
4586  *
4587  * The contents of this file are subject to the terms of the
4588  * Common Development and Distribution License (the "License").
4589  * You may not use this file except in compliance with the License.
4590  *
4591  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4592  * or http://www.opensolaris.org/os/licensing.
4593  * See the License for the specific language governing permissions
4594  * and limitations under the License.
4595  *
4596  * When distributing Covered Code, include this CDDL HEADER in each
4597  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4598  * If applicable, add the following below this CDDL HEADER, with the
4599  * fields enclosed by brackets "[]" replaced with your own identifying
4600  * information: Portions Copyright [yyyy] [name of copyright owner]
4601  *
4602  * CDDL HEADER END
4603  */
4604 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4605 /*	  All Rights Reserved  	*/
4606 
4607 
4608 /*
4609  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4610  * Use is subject to license terms.
4611  *
4612  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4613  * Copyright 2016 Joyent, Inc.
4614  */
4615 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4616 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
4617 /*
4618  * CDDL HEADER START
4619  *
4620  * The contents of this file are subject to the terms of the
4621  * Common Development and Distribution License, Version 1.0 only
4622  * (the "License").  You may not use this file except in compliance
4623  * with the License.
4624  *
4625  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4626  * or http://www.opensolaris.org/os/licensing.
4627  * See the License for the specific language governing permissions
4628  * and limitations under the License.
4629  *
4630  * When distributing Covered Code, include this CDDL HEADER in each
4631  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4632  * If applicable, add the following below this CDDL HEADER, with the
4633  * fields enclosed by brackets "[]" replaced with your own identifying
4634  * information: Portions Copyright [yyyy] [name of copyright owner]
4635  *
4636  * CDDL HEADER END
4637  */
4638 /*
4639  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4640  * Use is subject to license terms.
4641  */
4642 
4643 /*
4644  * Implementation-private.  This header should not be included
4645  * directly by an application.  The application should instead
4646  * include <time.h> which includes this header conditionally
4647  * depending on which feature test macros are defined. By default,
4648  * this header is included by <time.h>.  X/Open and POSIX
4649  * standards requirements result in this header being included
4650  * by <time.h> only under a restricted set of conditions.
4651  */
4652 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
4653 
4654 
4655 /*
4656  * Allow global visibility for symbols defined in
4657  * C++ "std" namespace in <iso/time_iso.h>.
4658  */
4659 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
4660 extern struct tm *gmtime_r(const time_t *,
4661    struct tm *);
4662 extern struct tm *localtime_r(const time_t *,
4663    struct tm *);
4664 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
4665 extern char *strptime(const char *, const char *,
4666   struct tm *);
4667 
4668 
4669 
4670 
4671 
4672 /*
4673  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
4674  * definition of the sigevent structure.  Both require the inclusion
4675  * of <signal.h> and <time.h> when using the timer_create() function.
4676  * However, X/Open also specifies that the sigevent structure be defined
4677  * in <time.h> as described in the header <signal.h>.  This prevents
4678  * compiler warnings for applications that only include <time.h> and not
4679  * also <signal.h>.  The sigval union and the sigevent structure is
4680  * therefore defined both here and in <sys/siginfo.h> which gets included
4681  * via inclusion of <signal.h>.
4682  */
4683 
4684 
4685 union sigval {
4686  int sival_int; /* integer value */
4687  void *sival_ptr; /* pointer value */
4688 };
4689 
4690 
4691 
4692 
4693 struct sigevent {
4694  int sigev_notify; /* notification mode */
4695  int sigev_signo; /* signal number */
4696  union sigval sigev_value; /* signal value */
4697  void (*sigev_notify_function)(union sigval);
4698  pthread_attr_t *sigev_notify_attributes;
4699  int __sigev_pad2;
4700 };
4701 
4702 
4703 extern int clock_getres(clockid_t, struct timespec *);
4704 extern int clock_gettime(clockid_t, struct timespec *);
4705 extern int clock_settime(clockid_t, const struct timespec *);
4706 extern int timer_create(clockid_t, struct sigevent *,
4707   timer_t *);
4708 extern int timer_delete(timer_t);
4709 extern int timer_getoverrun(timer_t);
4710 extern int timer_gettime(timer_t, struct itimerspec *);
4711 extern int timer_settime(timer_t, int, const struct itimerspec *,
4712   struct itimerspec *);
4713 
4714 extern int nanosleep(const struct timespec *, struct timespec *);
4715 extern int clock_nanosleep(clockid_t, int,
4716  const struct timespec *, struct timespec *);
4717 
4718 
4719 
4720 
4721 
4722 
4723 extern void tzset(void);
4724 extern char *tzname[2];
4725 
4726 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
4727 
4728 
4729 extern long _sysconf(int); /* System Private interface to sysconf() */
4730 
4731     /* 3 is _SC_CLK_TCK */
4732 
4733 
4734 
4735 
4736 
4737 extern long timezone;
4738 extern int daylight;
4739 
4740 
4741 
4742 
4743 
4744 
4745 extern time_t timegm(struct tm *);
4746 extern int cftime(char *, char *, const time_t *);
4747 extern int ascftime(char *, const char *, const struct tm *);
4748 extern long altzone;
4749 
4750 
4751 
4752 
4753 extern struct tm *getdate(const char *);
4754 
4755 
4756 
4757 
4758 
4759 extern int getdate_err;
4760 
4761 
4762 
4763 /*
4764  * ctime_r() & asctime_r() prototypes are defined here.
4765  */
4766 
4767 /*
4768  * Previous releases of Solaris, starting at 2.3, provided definitions of
4769  * various functions as specified in POSIX.1c, Draft 6.  For some of these
4770  * functions, the final POSIX 1003.1c standard had a different number of
4771  * arguments and return values.
4772  *
4773  * The following segment of this header provides support for the standard
4774  * interfaces while supporting applications written under earlier
4775  * releases.  The application defines appropriate values of the feature
4776  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
4777  * whether it was written to expect the Draft 6 or standard versions of
4778  * these interfaces, before including this header.  This header then
4779  * provides a mapping from the source version of the interface to an
4780  * appropriate binary interface.  Such mappings permit an application
4781  * to be built from libraries and objects which have mixed expectations
4782  * of the definitions of these functions.
4783  *
4784  * For applications using the Draft 6 definitions, the binary symbol is the
4785  * same as the source symbol, and no explicit mapping is needed.  For the
4786  * standard interface, the function func() is mapped to the binary symbol
4787  * _posix_func().  The preferred mechanism for the remapping is a compiler
4788  * #pragma.  If the compiler does not provide such a #pragma, the header file
4789  * defines a static function func() which calls the _posix_func() version;
4790  * this has to be done instead of #define since POSIX specifies that an
4791  * application can #undef the symbol and still be bound to the correct
4792  * implementation.  Unfortunately, the statics confuse lint so we fallback to
4793  * #define in that case.
4794  *
4795  * NOTE: Support for the Draft 6 definitions is provided for compatibility
4796  * only.  New applications/libraries should use the standard definitions.
4797  */
4798 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
4799 extern char *asctime_r(const struct tm *, char *, int);
4800 extern char *ctime_r(const time_t *, char *, int);
4801 # 292 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
4802 typedef struct _locale *locale_t;
4803 
4804 
4805 extern size_t strftime_l(char *, size_t,
4806  const char *, const struct tm *, locale_t);
4807 
4808 
4809 
4810 
4811 
4812 /*
4813  * Note, the C11 standard requires that all the various base values that are
4814  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
4815  */
4816 
4817 
4818 extern int timespec_get(struct timespec *, int);
4819 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4820 
4821 
4822 /*
4823  * The inclusion of <sys/select.h> is needed for the FD_CLR,
4824  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
4825  * select() prototype defined in the XOpen specifications
4826  * beginning with XSH4v2.  Placement required after definition
4827  * for itimerval.
4828  */
4829 
4830 
4831 
4832 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
4833 /*
4834  * CDDL HEADER START
4835  *
4836  * The contents of this file are subject to the terms of the
4837  * Common Development and Distribution License (the "License").
4838  * You may not use this file except in compliance with the License.
4839  *
4840  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4841  * or http://www.opensolaris.org/os/licensing.
4842  * See the License for the specific language governing permissions
4843  * and limitations under the License.
4844  *
4845  * When distributing Covered Code, include this CDDL HEADER in each
4846  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4847  * If applicable, add the following below this CDDL HEADER, with the
4848  * fields enclosed by brackets "[]" replaced with your own identifying
4849  * information: Portions Copyright [yyyy] [name of copyright owner]
4850  *
4851  * CDDL HEADER END
4852  */
4853 
4854 /*
4855  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4856  *
4857  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4858  *
4859  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
4860  * Use is subject to license terms.
4861  */
4862 
4863 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4864 /*	  All Rights Reserved	*/
4865 
4866 /*
4867  * University Copyright- Copyright (c) 1982, 1986, 1988
4868  * The Regents of the University of California
4869  * All Rights Reserved
4870  *
4871  * University Acknowledgment- Portions of this document are derived from
4872  * software developed by the University of California, Berkeley, and its
4873  * contributors.
4874  */
4875 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
4876 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
4877 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4878 /*
4879  * The sigset_t type is defined in <sys/signal.h> and duplicated
4880  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
4881  * now allows the visibility of signal.h in this header, however
4882  * an order of inclusion problem occurs as a result of inclusion
4883  * of <sys/select.h> in <signal.h> under certain conditions.
4884  * Rather than include <sys/signal.h> here, we've duplicated
4885  * the sigset_t type instead. This type is required for the XPG6
4886  * introduced pselect() function also declared in this header.
4887  */
4888 
4889 
4890 typedef struct { /* signal set type */
4891  unsigned int __sigbits[4];
4892 } sigset_t;
4893 
4894 
4895 
4896 
4897 /*
4898  * Select uses bit masks of file descriptors in longs.
4899  * These macros manipulate such bit fields.
4900  * FD_SETSIZE may be defined by the user, but the default here
4901  * should be >= NOFILE (param.h).
4902  */
4903 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4904 typedef long fd_mask;
4905 
4906 typedef long fds_mask;
4907 
4908 /*
4909  *  The value of _NBBY needs to be consistant with the value
4910  *  of NBBY in <sys/param.h>.
4911  */
4912 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4913 typedef struct fd_set {
4914 
4915 
4916 
4917  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
4918 } fd_set;
4919 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
4920 extern int select(int, fd_set *, fd_set *,
4921  fd_set *, struct timeval *);
4922 
4923 
4924 extern int pselect(int, fd_set *, fd_set *,
4925  fd_set *, const struct timespec *,
4926  const sigset_t *);
4927 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
4928 
4929 
4930 
4931 /*
4932  * _VOID was defined to be either void or char but this is not
4933  * required because previous SunOS compilers have accepted the void
4934  * type. However, because many system header and source files use the
4935  * void keyword, the volatile keyword, and ANSI C function prototypes,
4936  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
4937  * should therefore not be used and remains for source compatibility
4938  * only.
4939  */
4940 /* CSTYLED */
4941 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
4942 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
4943 /*
4944  * CDDL HEADER START
4945  *
4946  * The contents of this file are subject to the terms of the
4947  * Common Development and Distribution License (the "License").
4948  * You may not use this file except in compliance with the License.
4949  *
4950  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4951  * or http://www.opensolaris.org/os/licensing.
4952  * See the License for the specific language governing permissions
4953  * and limitations under the License.
4954  *
4955  * When distributing Covered Code, include this CDDL HEADER in each
4956  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4957  * If applicable, add the following below this CDDL HEADER, with the
4958  * fields enclosed by brackets "[]" replaced with your own identifying
4959  * information: Portions Copyright [yyyy] [name of copyright owner]
4960  *
4961  * CDDL HEADER END
4962  */
4963 
4964 /*
4965  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
4966  *	  All Rights Reserved
4967  *
4968  */
4969 
4970 /*
4971  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4972  * Use is subject to license terms.
4973  */
4974 
4975 /*
4976  * WARNING: This is an implementation-specific header,
4977  * its contents are not guaranteed. Applications
4978  * should include <unistd.h> and not this header.
4979  */
4980 
4981 
4982 
4983 
4984 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
4985 /*
4986  * CDDL HEADER START
4987  *
4988  * The contents of this file are subject to the terms of the
4989  * Common Development and Distribution License (the "License").
4990  * You may not use this file except in compliance with the License.
4991  *
4992  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4993  * or http://www.opensolaris.org/os/licensing.
4994  * See the License for the specific language governing permissions
4995  * and limitations under the License.
4996  *
4997  * When distributing Covered Code, include this CDDL HEADER in each
4998  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4999  * If applicable, add the following below this CDDL HEADER, with the
5000  * fields enclosed by brackets "[]" replaced with your own identifying
5001  * information: Portions Copyright [yyyy] [name of copyright owner]
5002  *
5003  * CDDL HEADER END
5004  */
5005 
5006 /*
5007  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5008  * Copyright 2016 Joyent, Inc.
5009  *
5010  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5011  * Use is subject to license terms.
5012  */
5013 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
5014 
5015 
5016 
5017 
5018 
5019 /* command names for confstr */
5020 
5021 
5022 
5023 /*
5024  * command names for large file configuration information
5025  */
5026 /* large file compilation environment configuration */
5027 
5028 
5029 
5030 
5031 /* transitional large file interface configuration */
5032 
5033 
5034 
5035 
5036 
5037 /* UNIX 98 */
5038 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5039 /* UNIX 03 */
5040 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5041 /* command names for POSIX sysconf */
5042 
5043 /* POSIX.1 names */
5044 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5045 /* SVR4 names */
5046 
5047 
5048 
5049 
5050 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
5051 
5052 
5053 
5054 
5055 /* POSIX.4 names */
5056 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5057 /* XPG4 names */
5058 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5059 /* additional XSH4/XCU4 command names for sysconf */
5060 
5061 
5062 
5063 /* additional XPG4v2 (UNIX 95) command names */
5064 
5065 
5066 
5067 
5068 
5069 /* defined for XTI (XNS Issue 5) */
5070 
5071 
5072 
5073 
5074 
5075 
5076 
5077 /*
5078  * Hardware specific items
5079  * Note that not all items are supported on all architectures
5080  */
5081 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5082 /*
5083  * POSIX.1c (pthreads) names. These values are defined above
5084  * the sub-500 range. See psarc case 1995/257.
5085  */
5086 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5087 /* UNIX 98 */
5088 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5089 /* UNIX 03 */
5090 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5091 /* command names for POSIX pathconf */
5092 
5093 /* POSIX.1 names */
5094 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5095 /* POSIX.4 names */
5096 
5097 
5098 
5099 /* UNIX 03 names */
5100 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5101 /* UNIX 08 names */
5102 
5103 
5104 /*
5105  * Large File Summit names
5106  *
5107  * This value matches the MIPS ABI choice, but leaves a large gap in the
5108  * value space.
5109  */
5110 
5111 
5112 /*
5113  * Extended attributes
5114  */
5115 
5116 
5117 
5118 /*
5119  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
5120  */
5121 
5122 
5123 /*
5124  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
5125  */
5126 
5127 
5128 
5129 /*
5130  * The value of 0 is returned when
5131  * ACL's are not supported
5132  */
5133 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5134 /*
5135  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
5136  * should not rely on this value, it has been aligned with the current
5137  * standard to avoid confusion if used.
5138  */
5139 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
5140 /* UNIX 03 names */
5141 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h" 2
5142 
5143 
5144 
5145 
5146 
5147 /* Symbolic constants for the "access" routine: */
5148 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5149 /* Symbolic constants for the "lseek" routine: */
5150 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5151 /* Path names: */
5152 
5153 
5154 
5155 
5156 /*
5157  * compile-time symbolic constants,
5158  * Support does not mean the feature is enabled.
5159  * Use pathconf/sysconf to obtain actual configuration value.
5160  */
5161 
5162 /* Values unchanged in UNIX 03 */
5163 
5164 
5165 
5166 
5167 
5168 /*
5169  * POSIX.1b compile-time symbolic constants.
5170  */
5171 # 134 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5172 /*
5173  * POSIX.1c compile-time symbolic constants.
5174  */
5175 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5176 /* New in UNIX 03 */
5177 # 167 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5178 /*
5179  * Support for the POSIX.1 mutex protocol attribute. For realtime applications
5180  * which need mutexes to support priority inheritance/ceiling.
5181  */
5182 # 187 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5183 /*
5184  * Large File Summit-related announcement macros.  The system supports both
5185  * the additional and transitional Large File Summit interfaces.  (The final
5186  * two macros provide a finer granularity breakdown of _LFS64_LARGEFILE.)
5187  */
5188 
5189 
5190 
5191 
5192 
5193 /* large file compilation environment setup */
5194 
5195 
5196 
5197 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5198 #pragma redefine_extname ftruncate ftruncate64
5199 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5200 
5201 
5202 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5203 #pragma redefine_extname lseek lseek64
5204 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5205 
5206 
5207 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5208 #pragma redefine_extname pread pread64
5209 # 202 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5210 
5211 
5212 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5213 #pragma redefine_extname pwrite pwrite64
5214 # 203 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5215 
5216 
5217 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5218 #pragma redefine_extname truncate truncate64
5219 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5220 
5221 
5222 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5223 #pragma redefine_extname lockf lockf64
5224 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5225 
5226 
5227 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5228 #pragma redefine_extname tell tell64
5229 # 206 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5230 # 218 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5231 /* In the LP64 compilation environment, the APIs are already large file */
5232 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5233 extern int access(const char *, int);
5234 
5235 extern int acct(const char *);
5236 
5237 extern unsigned alarm(unsigned);
5238 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5239 
5240 
5241 extern int brk(void *);
5242 
5243 extern int chdir(const char *);
5244 extern int chown(const char *, uid_t, gid_t);
5245 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5246 
5247 
5248 extern int chroot(const char *);
5249 
5250 extern int close(int);
5251 
5252 
5253 
5254 
5255 
5256 
5257 extern char *ctermid(char *);
5258 
5259 
5260 extern char *ctermid_r(char *);
5261 
5262 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5263 
5264 extern char *cuserid(char *);
5265 
5266 extern int dup(int);
5267 extern int dup2(int, int);
5268 extern int dup3(int, int, int);
5269 
5270 
5271 
5272 
5273 extern void endusershell(void);
5274 
5275 extern int execl(const char *, const char *, ...);
5276 extern int execle(const char *, const char *, ...);
5277 extern int execlp(const char *, const char *, ...);
5278 extern int execv(const char *, char *const *);
5279 extern int execve(const char *, char *const *, char *const *);
5280 extern int execvp(const char *, char *const *);
5281 extern void _exit(int)
5282  __attribute__((__noreturn__));
5283 /*
5284  * The following fattach prototype is duplicated in <stropts.h>. The
5285  * duplication is necessitated by XPG4.2 which requires the prototype
5286  * be defined in <stropts.h>.
5287  */
5288 
5289 extern int fattach(int, const char *);
5290 
5291 
5292 extern int fchdir(int);
5293 extern int fchown(int, uid_t, gid_t);
5294 
5295 
5296 extern int fchroot(int);
5297 
5298 
5299 
5300 extern int fdatasync(int);
5301 
5302 /*
5303  * The following fdetach prototype is duplicated in <stropts.h>. The
5304  * duplication is necessitated by XPG4.2 which requires the prototype
5305  * be defined in <stropts.h>.
5306  */
5307 
5308 extern int fdetach(const char *);
5309 
5310 extern pid_t fork(void);
5311 
5312 extern pid_t fork1(void);
5313 extern pid_t forkall(void);
5314 
5315 extern long fpathconf(int, int);
5316 
5317 
5318 extern int fsync(int);
5319 
5320 
5321 
5322 
5323 extern int ftruncate(int, off_t);
5324 
5325 extern char *getcwd(char *, size_t);
5326 
5327 
5328 extern int getdtablesize(void);
5329 
5330 extern gid_t getegid(void);
5331 extern uid_t geteuid(void);
5332 extern gid_t getgid(void);
5333 extern int getgroups(int, gid_t *);
5334 
5335 extern long gethostid(void);
5336 
5337 
5338 
5339 
5340 extern int gethostname(char *, int);
5341 # 372 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5342 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
5343 
5344 extern int getpagesize(void);
5345 
5346 extern pid_t getpgid(pid_t);
5347 
5348 extern pid_t getpid(void);
5349 extern pid_t getppid(void);
5350 extern pid_t getpgrp(void);
5351 
5352 
5353 char *gettxt(const char *, const char *);
5354 
5355 
5356 extern pid_t getsid(pid_t);
5357 
5358 extern uid_t getuid(void);
5359 
5360 extern char *getusershell(void);
5361 
5362 /*
5363  * The following ioctl prototype is duplicated in <stropts.h>. The
5364  * duplication is necessitated by XPG4.2 which requires the prototype
5365  * be defined in <stropts.h>.
5366  */
5367 
5368 extern int ioctl(int, int, ...);
5369 extern int isaexec(const char *, char *const *, char *const *);
5370 extern int issetugid(void);
5371 
5372 extern int isatty(int);
5373 
5374 extern int lchown(const char *, uid_t, gid_t);
5375 
5376 extern int link(const char *, const char *);
5377 
5378 extern offset_t llseek(int, offset_t, int);
5379 
5380 
5381 
5382 
5383 extern int lockf(int, int, off_t);
5384 
5385 extern off_t lseek(int, off_t, int);
5386 
5387 
5388 extern int nice(int);
5389 
5390 
5391 extern int mincore(caddr_t, size_t, char *);
5392 
5393 extern long pathconf(const char *, int);
5394 extern int pause(void);
5395 extern int pipe(int *);
5396 extern int pipe2(int *, int);
5397 
5398 
5399 
5400 extern ssize_t pread(int, void *, size_t, off_t);
5401 
5402 
5403 extern void profil(unsigned short *, size_t, unsigned long, unsigned int);
5404 
5405 /*
5406  * pthread_atfork() is also declared in <pthread.h> as per SUSv3. The
5407  * declarations are identical. A change to either one may also require
5408  * appropriate namespace updates in order to avoid redeclaration
5409  * warnings in the case where both prototypes are exposed via inclusion
5410  * of both <pthread.h> and <unistd.h>.
5411  */
5412 
5413 
5414 
5415 extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
5416 
5417 
5418 
5419 extern int ptrace(int, pid_t, int, int);
5420 
5421 
5422 
5423 
5424 extern ssize_t pwrite(int, const void *, size_t, off_t);
5425 
5426 
5427 /* per RFC 3542; This is also defined in netdb.h */
5428 extern int rcmd_af(char **, unsigned short, const char *, const char *,
5429  const char *, int *, int);
5430 
5431 extern ssize_t read(int, void *, size_t);
5432 
5433 
5434 extern ssize_t readlink(const char *, char *,
5435  size_t);
5436 
5437 
5438 
5439 
5440 
5441 
5442 extern int rename(const char *, const char *);
5443 
5444 
5445 
5446 
5447 
5448 
5449 
5450 extern int resolvepath(const char *, char *, size_t);
5451 /* per RFC 3542; This is also defined in netdb.h */
5452 extern int rexec_af(char **, unsigned short, const char *, const char *,
5453  const char *, int *, int);
5454 
5455 extern int rmdir(const char *);
5456 
5457 /* per RFC 3542; This is also defined in netdb.h */
5458 extern int rresvport_af(int *, int);
5459 
5460 
5461 
5462 
5463 extern void *sbrk(intptr_t);
5464 
5465 
5466 extern int setegid(gid_t);
5467 extern int seteuid(uid_t);
5468 
5469 extern int setgid(gid_t);
5470 
5471 extern int setgroups(int, const gid_t *);
5472 extern int sethostname(char *, int);
5473 
5474 extern int setpgid(pid_t, pid_t);
5475 
5476 extern pid_t setpgrp(void);
5477 extern int setregid(gid_t, gid_t);
5478 extern int setreuid(uid_t, uid_t);
5479 
5480 extern pid_t setsid(void);
5481 extern int setuid(uid_t);
5482 
5483 extern void setusershell(void);
5484 
5485 extern unsigned sleep(unsigned);
5486 
5487 extern int stime(const time_t *);
5488 
5489 
5490 
5491 
5492 
5493 
5494 extern int symlink(const char *, const char *);
5495 extern void sync(void);
5496 # 534 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5497 extern long sysconf(int);
5498 extern pid_t tcgetpgrp(int);
5499 extern int tcsetpgrp(int, pid_t);
5500 
5501 
5502 
5503 extern off_t tell(int);
5504 
5505 
5506 
5507 
5508 extern int truncate(const char *, off_t);
5509 
5510 extern char *ttyname(int);
5511 
5512 extern useconds_t ualarm(useconds_t, useconds_t);
5513 
5514 extern int unlink(const char *);
5515 
5516 extern char *getwd(char *);
5517 extern int usleep(useconds_t);
5518 extern pid_t vfork(void) __attribute__((__returns_twice__));
5519 #pragma unknown_control_flow(vfork)
5520 
5521 
5522 extern void vhangup(void);
5523 
5524 extern ssize_t write(int, const void *, size_t);
5525 
5526 extern void yield(void);
5527 
5528 
5529 
5530 
5531  /* || defined(_XPG7) */
5532 extern int faccessat(int, const char *, int, int);
5533 extern int fchownat(int, const char *, uid_t, gid_t, int);
5534 extern int linkat(int, const char *, int, const char *, int);
5535 extern ssize_t readlinkat(int, const char *,
5536  char *, size_t);
5537 extern int renameat(int, const char *, int, const char *);
5538 extern int symlinkat(const char *, int, const char *);
5539 extern int unlinkat(int, const char *, int);
5540 
5541 
5542 extern int get_nprocs(void);
5543 extern int get_nprocs_conf(void);
5544 
5545 
5546 /* transitional large file interface versions */
5547 
5548 
5549 extern int ftruncate64(int, off64_t);
5550 extern off64_t lseek64(int, off64_t, int);
5551 extern ssize_t pread64(int, void *, size_t, off64_t);
5552 extern ssize_t pwrite64(int, const void *, size_t, off64_t);
5553 extern off64_t tell64(int);
5554 extern int truncate64(const char *, off64_t);
5555 extern int lockf64(int, int, off64_t);
5556 
5557 
5558 /*
5559  * getlogin_r() & ttyname_r() prototypes are defined here.
5560  */
5561 
5562 /*
5563  * Previous releases of Solaris, starting at 2.3, provided definitions of
5564  * various functions as specified in POSIX.1c, Draft 6.  For some of these
5565  * functions, the final POSIX 1003.1c standard had a different number of
5566  * arguments and return values.
5567  *
5568  * The following segment of this header provides support for the standard
5569  * interfaces while supporting applications written under earlier
5570  * releases.  The application defines appropriate values of the feature
5571  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
5572  * whether it was written to expect the Draft 6 or standard versions of
5573  * these interfaces, before including this header.  This header then
5574  * provides a mapping from the source version of the interface to an
5575  * appropriate binary interface.  Such mappings permit an application
5576  * to be built from libraries and objects which have mixed expectations
5577  * of the definitions of these functions.
5578  *
5579  * For applications using the Draft 6 definitions, the binary symbol is the
5580  * same as the source symbol, and no explicit mapping is needed.  For the
5581  * standard interface, the function func() is mapped to the binary symbol
5582  * _posix_func().  The preferred mechanism for the remapping is a compiler
5583  * #pragma.  If the compiler does not provide such a #pragma, the header file
5584  * defines a static function func() which calls the _posix_func() version;
5585  * this has to be done instead of #define since POSIX specifies that an
5586  * application can #undef the symbol and still be bound to the correct
5587  * implementation.  Unfortunately, the statics confuse lint so we fallback to
5588  * #define in that case.
5589  *
5590  * NOTE: Support for the Draft 6 definitions is provided for compatibility
5591  * only.  New applications/libraries should use the standard definitions.
5592  */
5593 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5594 
5595 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5596 #pragma redefine_extname getlogin_r getloginx_r
5597 # 693 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/unistd.h"
5598 
5599 
5600 
5601 
5602 
5603 
5604 extern char *getlogin_r(char *, int);
5605 
5606 extern char *ttyname_r(int, char *, int);
5607 
5608 
5609 
5610 
5611 
5612 
5613 extern int getentropy(void *, size_t);
5614 # 41 "special.c" 2
5615 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 1
5616 /*
5617  * CDDL HEADER START
5618  *
5619  * The contents of this file are subject to the terms of the
5620  * Common Development and Distribution License (the "License").
5621  * You may not use this file except in compliance with the License.
5622  *
5623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5624  * or http://www.opensolaris.org/os/licensing.
5625  * See the License for the specific language governing permissions
5626  * and limitations under the License.
5627  *
5628  * When distributing Covered Code, include this CDDL HEADER in each
5629  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5630  * If applicable, add the following below this CDDL HEADER, with the
5631  * fields enclosed by brackets "[]" replaced with your own identifying
5632  * information: Portions Copyright [yyyy] [name of copyright owner]
5633  *
5634  * CDDL HEADER END
5635  */
5636 
5637 /*
5638  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5639  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5640  */
5641 
5642 /*	Copyright (c) 1988 AT&T	*/
5643 /*	  All Rights Reserved  	*/
5644 
5645 
5646 
5647 
5648 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 1
5649 /*
5650  * CDDL HEADER START
5651  *
5652  * The contents of this file are subject to the terms of the
5653  * Common Development and Distribution License, Version 1.0 only
5654  * (the "License").  You may not use this file except in compliance
5655  * with the License.
5656  *
5657  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5658  * or http://www.opensolaris.org/os/licensing.
5659  * See the License for the specific language governing permissions
5660  * and limitations under the License.
5661  *
5662  * When distributing Covered Code, include this CDDL HEADER in each
5663  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5664  * If applicable, add the following below this CDDL HEADER, with the
5665  * fields enclosed by brackets "[]" replaced with your own identifying
5666  * information: Portions Copyright [yyyy] [name of copyright owner]
5667  *
5668  * CDDL HEADER END
5669  */
5670 /*	Copyright (c) 1988 AT&T	*/
5671 /*	  All Rights Reserved  	*/
5672 
5673 
5674 /*
5675  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5676  * Copyright 2014 PALO, Richard.
5677  *
5678  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5679  * Use is subject to license terms.
5680  */
5681 
5682 /*
5683  * An application should not include this header directly.  Instead it
5684  * should be included only through the inclusion of other Sun headers.
5685  *
5686  * The contents of this header is limited to identifiers specified in the
5687  * C Standard.  Any new identifiers specified in future amendments to the
5688  * C Standard must be placed in this header.  If these new identifiers
5689  * are required to also be in the C++ Standard "std" namespace, then for
5690  * anything other than macro definitions, corresponding "using" directives
5691  * must also be added to <string.h>.
5692  */
5693 
5694 
5695 
5696 
5697 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5698 /*
5699  * CDDL HEADER START
5700  *
5701  * The contents of this file are subject to the terms of the
5702  * Common Development and Distribution License (the "License").
5703  * You may not use this file except in compliance with the License.
5704  *
5705  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5706  * or http://www.opensolaris.org/os/licensing.
5707  * See the License for the specific language governing permissions
5708  * and limitations under the License.
5709  *
5710  * When distributing Covered Code, include this CDDL HEADER in each
5711  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5712  * If applicable, add the following below this CDDL HEADER, with the
5713  * fields enclosed by brackets "[]" replaced with your own identifying
5714  * information: Portions Copyright [yyyy] [name of copyright owner]
5715  *
5716  * CDDL HEADER END
5717  */
5718 
5719 /*
5720  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5721  * Copyright 2016 Joyent, Inc.
5722  *
5723  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5724  * Use is subject to license terms.
5725  */
5726 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
5727 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
5728 /*
5729  * This file and its contents are supplied under the terms of the
5730  * Common Development and Distribution License ("CDDL"), version 1.0.
5731  * You may only use this file in accordance with the terms of version
5732  * 1.0 of the CDDL.
5733  *
5734  * A full copy of the text of the CDDL should have accompanied this
5735  * source.  A copy of the CDDL is also available via the Internet at
5736  * http://www.illumos.org/license/CDDL.
5737  */
5738 
5739 /*
5740  * Copyright 2014-2016 PALO, Richard.
5741  */
5742 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h" 2
5743 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
5744 extern int memcmp(const void *, const void *, size_t);
5745 extern void *memcpy(void *, const void *, size_t);
5746 extern void *memmove(void *, const void *, size_t);
5747 extern void *memset(void *, int, size_t);
5748 extern char *strcat(char *, const char *);
5749 extern int strcmp(const char *, const char *);
5750 extern char *strcpy(char *, const char *);
5751 extern int strcoll(const char *, const char *);
5752 extern size_t strcspn(const char *, const char *);
5753 extern char *strerror(int);
5754 extern size_t strlen(const char *);
5755 extern char *strncat(char *, const char *, size_t);
5756 extern int strncmp(const char *, const char *, size_t);
5757 extern char *strncpy(char *, const char *, size_t);
5758 extern size_t strspn(const char *, const char *);
5759 extern char *strtok(char *, const char *);
5760 extern size_t strxfrm(char *, const char *, size_t);
5761 
5762 /*
5763  * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
5764  * function signatures for the following functions be replaced by
5765  * two declarations, both of which have the same behavior.
5766  */
5767 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/string_iso.h"
5768 extern void *memchr(const void *, int, size_t);
5769 extern char *strchr(const char *, int);
5770 extern char *strpbrk(const char *, const char *);
5771 extern char *strrchr(const char *, int);
5772 extern char *strstr(const char *, const char *);
5773 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h" 2
5774 
5775 /*
5776  * Allow global visibility for symbols defined in
5777  * C++ "std" namespace in <iso/string_iso.h>.
5778  */
5779 # 72 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/string.h"
5780 extern int strerror_r(int, char *, size_t);
5781 
5782 
5783 
5784 
5785 
5786 extern char *strtok_r(char *, const char *,
5787  char **);
5788 
5789 
5790 
5791 
5792 extern void *memccpy(void *, const void *,
5793   int, size_t);
5794 
5795 
5796 
5797 
5798 extern char *stpcpy(char *, const char *);
5799 extern char *stpncpy(char *, const char *, size_t);
5800 extern char *strndup(const char *, size_t);
5801 extern size_t strnlen(const char *, size_t);
5802 extern char *strsignal(int);
5803 
5804 
5805 
5806 
5807 
5808 
5809 extern int strcoll_l(const char *, const char *, locale_t);
5810 extern size_t strxfrm_l(char *, const char *,
5811     size_t, locale_t);
5812 extern int strcasecmp_l(const char *, const char *, locale_t);
5813 extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
5814 extern char *strerror_l(int, locale_t);
5815 
5816 
5817 
5818 
5819 
5820 /* Note that some of these are also declared in strings.h for XPG4_2+ */
5821 extern void explicit_bzero(void *, size_t);
5822 extern int uucopy(const void *, void *, size_t);
5823 extern int uucopystr(const void *, void *, size_t);
5824 extern int ffs(int);
5825 extern int ffsl(long);
5826 extern int ffsll(long long);
5827 extern int fls(int);
5828 extern int flsl(long);
5829 extern int flsll(long long);
5830 extern void *memmem(const void *, size_t, const void *, size_t);
5831 extern char *strcasestr(const char *, const char *);
5832 extern char *strnstr(const char *, const char *, size_t);
5833 extern size_t strlcpy(char *, const char *, size_t);
5834 extern size_t strlcat(char *, const char *, size_t);
5835 extern char *strsep(char **stringp, const char *delim);
5836 extern char *strchrnul(const char *, int);
5837 extern char *strcasestr_l(const char *, const char *, locale_t);
5838 extern int strcasecmp(const char *, const char *);
5839 extern int strncasecmp(const char *, const char *, size_t);
5840 
5841 
5842 
5843 
5844 
5845 extern char *strdup(const char *);
5846 
5847 
5848 
5849 
5850 
5851 
5852 /*
5853  * gcc provides this inlining facility but Studio C does not.
5854  * We should use it exclusively once Studio C also provides it.
5855  */
5856 extern void *__builtin_alloca(size_t);
5857 # 42 "special.c" 2
5858 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
5859 /*
5860  * CDDL HEADER START
5861  *
5862  * The contents of this file are subject to the terms of the
5863  * Common Development and Distribution License (the "License").
5864  * You may not use this file except in compliance with the License.
5865  *
5866  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5867  * or http://www.opensolaris.org/os/licensing.
5868  * See the License for the specific language governing permissions
5869  * and limitations under the License.
5870  *
5871  * When distributing Covered Code, include this CDDL HEADER in each
5872  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5873  * If applicable, add the following below this CDDL HEADER, with the
5874  * fields enclosed by brackets "[]" replaced with your own identifying
5875  * information: Portions Copyright [yyyy] [name of copyright owner]
5876  *
5877  * CDDL HEADER END
5878  */
5879 /*	Copyright (c) 1988 AT&T	*/
5880 /*	  All Rights Reserved  	*/
5881 
5882 
5883 /*
5884  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5885  *
5886  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
5887  * Use is subject to license terms.
5888  */
5889 /*
5890  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
5891  * Copyright 2016 Joyent, Inc.
5892  */
5893 # 43 "special.c" 2
5894 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
5895 /*
5896  * CDDL HEADER START
5897  *
5898  * The contents of this file are subject to the terms of the
5899  * Common Development and Distribution License (the "License").
5900  * You may not use this file except in compliance with the License.
5901  *
5902  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5903  * or http://www.opensolaris.org/os/licensing.
5904  * See the License for the specific language governing permissions
5905  * and limitations under the License.
5906  *
5907  * When distributing Covered Code, include this CDDL HEADER in each
5908  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5909  * If applicable, add the following below this CDDL HEADER, with the
5910  * fields enclosed by brackets "[]" replaced with your own identifying
5911  * information: Portions Copyright [yyyy] [name of copyright owner]
5912  *
5913  * CDDL HEADER END
5914  */
5915 
5916 /*
5917  * Copyright (c) 2013 Gary Mills
5918  *
5919  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
5920  * Use is subject to license terms.
5921  */
5922 
5923 /*	Copyright (c) 1988 AT&T	*/
5924 /*	  All Rights Reserved  	*/
5925 
5926 
5927 
5928 
5929 
5930 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
5931 /*
5932  * CDDL HEADER START
5933  *
5934  * The contents of this file are subject to the terms of the
5935  * Common Development and Distribution License (the "License").
5936  * You may not use this file except in compliance with the License.
5937  *
5938  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5939  * or http://www.opensolaris.org/os/licensing.
5940  * See the License for the specific language governing permissions
5941  * and limitations under the License.
5942  *
5943  * When distributing Covered Code, include this CDDL HEADER in each
5944  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5945  * If applicable, add the following below this CDDL HEADER, with the
5946  * fields enclosed by brackets "[]" replaced with your own identifying
5947  * information: Portions Copyright [yyyy] [name of copyright owner]
5948  *
5949  * CDDL HEADER END
5950  */
5951 
5952 /*
5953  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5954  * Copyright 2016 Joyent, Inc.
5955  *
5956  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5957  * Use is subject to license terms.
5958  */
5959 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
5960 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
5961 /*
5962  * CDDL HEADER START
5963  *
5964  * The contents of this file are subject to the terms of the
5965  * Common Development and Distribution License (the "License").
5966  * You may not use this file except in compliance with the License.
5967  *
5968  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5969  * or http://www.opensolaris.org/os/licensing.
5970  * See the License for the specific language governing permissions
5971  * and limitations under the License.
5972  *
5973  *
5974  * When distributing Covered Code, include this CDDL HEADER in each
5975  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5976  * If applicable, add the following below this CDDL HEADER, with the
5977  * fields enclosed by brackets "[]" replaced with your own identifying
5978  * information: Portions Copyright [yyyy] [name of copyright owner]
5979  *
5980  * CDDL HEADER END
5981  */
5982 
5983 /*
5984  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
5985  * Use is subject to license terms.
5986  * Copyright 2016 Joyent, Inc.
5987  */
5988 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
5989 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
5990 /*
5991  * CDDL HEADER START
5992  *
5993  * The contents of this file are subject to the terms of the
5994  * Common Development and Distribution License, Version 1.0 only
5995  * (the "License").  You may not use this file except in compliance
5996  * with the License.
5997  *
5998  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5999  * or http://www.opensolaris.org/os/licensing.
6000  * See the License for the specific language governing permissions
6001  * and limitations under the License.
6002  *
6003  * When distributing Covered Code, include this CDDL HEADER in each
6004  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6005  * If applicable, add the following below this CDDL HEADER, with the
6006  * fields enclosed by brackets "[]" replaced with your own identifying
6007  * information: Portions Copyright [yyyy] [name of copyright owner]
6008  *
6009  * CDDL HEADER END
6010  */
6011 /*
6012  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6013  * Use is subject to license terms.
6014  */
6015 
6016 /*	Copyright (c) 1988 AT&T	*/
6017 /*	  All Rights Reserved  	*/
6018 
6019 
6020 /*
6021  * An application should not include this header directly.  Instead it
6022  * should be included only through the inclusion of other Sun headers.
6023  *
6024  * The contents of this header is limited to identifiers specified in the
6025  * C Standard.  Any new identifiers specified in future amendments to the
6026  * C Standard must be placed in this header.  If these new identifiers
6027  * are required to also be in the C++ Standard "std" namespace, then for
6028  * anything other than macro definitions, corresponding "using" directives
6029  * must also be added to <limits.h>.
6030  */
6031 
6032 
6033 
6034 
6035 #pragma ident "%Z%%M%	%I%	%E% SMI"
6036 
6037 
6038 
6039 
6040 
6041 /*
6042  * Sizes of integral types
6043  */
6044 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
6045      /* min value of a "long int" */
6046 
6047 
6048 
6049 
6050 
6051      /* min value of a long long */
6052 
6053      /* max value of a long long */
6054 
6055      /* max value of "unsigned long long */
6056 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
6057 
6058 /*
6059  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
6060  * committee's working draft for the revision of the current ISO C standard,
6061  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
6062  * required by any standard but constitute a useful, general purpose set
6063  * of type definitions and limits which is namespace clean with respect to
6064  * all standards.
6065  */
6066 
6067 
6068 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
6069 /*
6070  * CDDL HEADER START
6071  *
6072  * The contents of this file are subject to the terms of the
6073  * Common Development and Distribution License, Version 1.0 only
6074  * (the "License").  You may not use this file except in compliance
6075  * with the License.
6076  *
6077  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6078  * or http://www.opensolaris.org/os/licensing.
6079  * See the License for the specific language governing permissions
6080  * and limitations under the License.
6081  *
6082  * When distributing Covered Code, include this CDDL HEADER in each
6083  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6084  * If applicable, add the following below this CDDL HEADER, with the
6085  * fields enclosed by brackets "[]" replaced with your own identifying
6086  * information: Portions Copyright [yyyy] [name of copyright owner]
6087  *
6088  * CDDL HEADER END
6089  */
6090 /*
6091  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6092  *
6093  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6094  * Use is subject to license terms.
6095  */
6096 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
6097 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6098 /*
6099  * ARG_MAX is calculated as follows:
6100  * NCARGS - space for other stuff on initial stack
6101  * like aux vectors, saved registers, etc..
6102  */
6103 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6104 /*
6105  * POSIX conformant definitions - An implementation may define
6106  * other symbols which reflect the actual implementation. Alternate
6107  * definitions may not be as restrictive as the POSIX definitions.
6108  */
6109 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6110 /* POSIX.1c conformant */
6111 
6112 
6113 
6114 
6115 
6116 /* UNIX 03 conformant */
6117 
6118 
6119 
6120 
6121 
6122 /*
6123  * POSIX.2 and XPG4-XSH4 conformant definitions
6124  */
6125 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6126 /* UNIX 03 conformant */
6127 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6128 /*
6129  * For dual definitions for PASS_MAX and sysconf.c
6130  */
6131 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6132     /* NLS printf() and scanf() */
6133 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6134 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
6135 
6136 
6137 
6138        /* of a double */
6139 
6140 
6141        /* of a "float" */
6142 
6143 
6144 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
6145 
6146 
6147        /* of a double */
6148 
6149        /* of a float */
6150 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6151 /*
6152  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
6153  * related text states:
6154  *
6155  * A definition of one of the values from Table 2-5 shall be omitted from the
6156  * <limits.h> on specific implementations where the corresponding value is
6157  * equal to or greater than the stated minimum, but where the value can vary
6158  * depending on the file to which it is applied. The actual value supported for
6159  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
6160  *
6161  * This is clear that any machine supporting multiple file system types
6162  * and/or a network can not include this define, regardless of protection
6163  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
6164  *
6165  * #define	NAME_MAX	14
6166  */
6167 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
6168     /* Increased for illumos */
6169 # 44 "special.c" 2
6170 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fnmatch.h" 1
6171 /*
6172  * CDDL HEADER START
6173  *
6174  * The contents of this file are subject to the terms of the
6175  * Common Development and Distribution License, Version 1.0 only
6176  * (the "License").  You may not use this file except in compliance
6177  * with the License.
6178  *
6179  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6180  * or http://www.opensolaris.org/os/licensing.
6181  * See the License for the specific language governing permissions
6182  * and limitations under the License.
6183  *
6184  * When distributing Covered Code, include this CDDL HEADER in each
6185  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6186  * If applicable, add the following below this CDDL HEADER, with the
6187  * fields enclosed by brackets "[]" replaced with your own identifying
6188  * information: Portions Copyright [yyyy] [name of copyright owner]
6189  *
6190  * CDDL HEADER END
6191  */
6192 /*
6193  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6194  * Copyright (c) 1994 by Sun Microsystems, Inc.
6195  * Copyright 1985, 1994 by Mortice Kern Systems Inc.  All rights reserved.
6196  */
6197 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/fnmatch.h"
6198     /* matched by period in pattern	*/
6199 
6200 
6201 
6202 
6203 
6204 
6205 extern int fnmatch(const char *, const char *, int);
6206 # 45 "special.c" 2
6207 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6208 /*
6209  * CDDL HEADER START
6210  *
6211  * The contents of this file are subject to the terms of the
6212  * Common Development and Distribution License (the "License").
6213  * You may not use this file except in compliance with the License.
6214  *
6215  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6216  * or http://www.opensolaris.org/os/licensing.
6217  * See the License for the specific language governing permissions
6218  * and limitations under the License.
6219  *
6220  * When distributing Covered Code, include this CDDL HEADER in each
6221  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6222  * If applicable, add the following below this CDDL HEADER, with the
6223  * fields enclosed by brackets "[]" replaced with your own identifying
6224  * information: Portions Copyright [yyyy] [name of copyright owner]
6225  *
6226  * CDDL HEADER END
6227  */
6228 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6229 /*	  All Rights Reserved  	*/
6230 
6231 
6232 /*
6233  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6234  * Use is subject to license terms.
6235  *
6236  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6237  * Copyright 2016 Joyent, Inc.
6238  */
6239 # 46 "special.c" 2
6240 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 1
6241 /*
6242  * CDDL HEADER START
6243  *
6244  * The contents of this file are subject to the terms of the
6245  * Common Development and Distribution License (the "License").
6246  * You may not use this file except in compliance with the License.
6247  *
6248  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6249  * or http://www.opensolaris.org/os/licensing.
6250  * See the License for the specific language governing permissions
6251  * and limitations under the License.
6252  *
6253  * When distributing Covered Code, include this CDDL HEADER in each
6254  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6255  * If applicable, add the following below this CDDL HEADER, with the
6256  * fields enclosed by brackets "[]" replaced with your own identifying
6257  * information: Portions Copyright [yyyy] [name of copyright owner]
6258  *
6259  * CDDL HEADER END
6260  */
6261 
6262 /*
6263  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6264  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
6265  */
6266 
6267 /*	Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.	*/
6268 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T	*/
6269 /*	All Rights Reserved	*/
6270 
6271 
6272 
6273 
6274 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6275 /*
6276  * CDDL HEADER START
6277  *
6278  * The contents of this file are subject to the terms of the
6279  * Common Development and Distribution License (the "License").
6280  * You may not use this file except in compliance with the License.
6281  *
6282  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6283  * or http://www.opensolaris.org/os/licensing.
6284  * See the License for the specific language governing permissions
6285  * and limitations under the License.
6286  *
6287  * When distributing Covered Code, include this CDDL HEADER in each
6288  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6289  * If applicable, add the following below this CDDL HEADER, with the
6290  * fields enclosed by brackets "[]" replaced with your own identifying
6291  * information: Portions Copyright [yyyy] [name of copyright owner]
6292  *
6293  * CDDL HEADER END
6294  */
6295 
6296 /*
6297  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6298  * Copyright 2016 Joyent, Inc.
6299  *
6300  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6301  * Use is subject to license terms.
6302  */
6303 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
6304 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6305 /*
6306  * CDDL HEADER START
6307  *
6308  * The contents of this file are subject to the terms of the
6309  * Common Development and Distribution License (the "License").
6310  * You may not use this file except in compliance with the License.
6311  *
6312  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6313  * or http://www.opensolaris.org/os/licensing.
6314  * See the License for the specific language governing permissions
6315  * and limitations under the License.
6316  *
6317  * When distributing Covered Code, include this CDDL HEADER in each
6318  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6319  * If applicable, add the following below this CDDL HEADER, with the
6320  * fields enclosed by brackets "[]" replaced with your own identifying
6321  * information: Portions Copyright [yyyy] [name of copyright owner]
6322  *
6323  * CDDL HEADER END
6324  */
6325 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6326 /*	  All Rights Reserved  	*/
6327 
6328 
6329 /*
6330  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6331  * Use is subject to license terms.
6332  *
6333  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6334  * Copyright 2016 Joyent, Inc.
6335  */
6336 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
6337 
6338 
6339 
6340 
6341 
6342 /*
6343  * The implementation specific header <sys/time_impl.h> includes a
6344  * definition for timestruc_t needed by the stat structure.  However,
6345  * including either <time.h>, which includes <sys/time_impl.h>, or
6346  * including <sys/time_impl.h> directly will break both X/Open and
6347  * POSIX namespace. Preceeding tag, structure, and structure member
6348  * names with underscores eliminates the namespace breakage and at the
6349  * same time, with unique type names, eliminates the possibility of
6350  * timespec_t or timestruct_t naming conflicts that could otherwise
6351  * result based on the order of inclusion of <sys/stat.h> and
6352  * <sys/time.h>.  The header <sys/time_std_impl.h> contains the
6353  * standards namespace safe versions of these definitions.
6354  */
6355 
6356 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
6357 /*
6358  * CDDL HEADER START
6359  *
6360  * The contents of this file are subject to the terms of the
6361  * Common Development and Distribution License, Version 1.0 only
6362  * (the "License").  You may not use this file except in compliance
6363  * with the License.
6364  *
6365  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6366  * or http://www.opensolaris.org/os/licensing.
6367  * See the License for the specific language governing permissions
6368  * and limitations under the License.
6369  *
6370  * When distributing Covered Code, include this CDDL HEADER in each
6371  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6372  * If applicable, add the following below this CDDL HEADER, with the
6373  * fields enclosed by brackets "[]" replaced with your own identifying
6374  * information: Portions Copyright [yyyy] [name of copyright owner]
6375  *
6376  * CDDL HEADER END
6377  */
6378 /*
6379  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6380  * Use is subject to license terms.
6381  */
6382 
6383 /*
6384  * Implementation-private.  This header should not be included
6385  * directly by an application.  The application should instead
6386  * include <time.h> which includes this header conditionally
6387  * depending on which feature test macros are defined. By default,
6388  * this header is included by <time.h>.  X/Open and POSIX
6389  * standards requirements result in this header being included
6390  * by <time.h> only under a restricted set of conditions.
6391  */
6392 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
6393 
6394 
6395 
6396 
6397 
6398 
6399 /*
6400  * stat structure, used by stat(2) and fstat(2)
6401  */
6402 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6403 /*
6404  * large file compilation environment setup
6405  */
6406 
6407 
6408 
6409 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6410 #pragma redefine_extname fstat fstat64
6411 # 160 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6412 
6413 
6414 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6415 #pragma redefine_extname stat stat64
6416 # 161 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6417 
6418 
6419 
6420 
6421 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6422 #pragma redefine_extname fstatat fstatat64
6423 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6424 
6425 
6426 
6427 
6428 
6429 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6430 #pragma redefine_extname lstat lstat64
6431 # 168 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6432 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6433 /*
6434  * In the LP64 compilation environment, map large file interfaces
6435  * back to native versions where possible.
6436  */
6437 # 211 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6438 /*
6439  * User level stat structure definitions.
6440  */
6441 # 242 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6442 struct stat {
6443  dev_t st_dev;
6444  long st_pad1[3]; /* reserved for network id */
6445  ino_t st_ino;
6446  mode_t st_mode;
6447  nlink_t st_nlink;
6448  uid_t st_uid;
6449  gid_t st_gid;
6450  dev_t st_rdev;
6451  long st_pad2[2];
6452  off_t st_size;
6453 
6454 
6455 
6456 
6457  timestruc_t st_atim;
6458  timestruc_t st_mtim;
6459  timestruc_t st_ctim;
6460 
6461 
6462 
6463 
6464 
6465  blksize_t st_blksize;
6466  blkcnt_t st_blocks;
6467  char st_fstype[16];
6468  long st_pad4[8]; /* expansion area */
6469 };
6470 
6471 
6472 
6473 /* transitional large file interface version */
6474 # 303 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6475 struct stat64 {
6476  dev_t st_dev;
6477  long st_pad1[3]; /* reserved for network id */
6478  ino64_t st_ino;
6479  mode_t st_mode;
6480  nlink_t st_nlink;
6481  uid_t st_uid;
6482  gid_t st_gid;
6483  dev_t st_rdev;
6484  long st_pad2[2];
6485  off64_t st_size;
6486 
6487  timestruc_t st_atim;
6488  timestruc_t st_mtim;
6489  timestruc_t st_ctim;
6490 
6491 
6492 
6493 
6494 
6495  blksize_t st_blksize;
6496  blkcnt64_t st_blocks;
6497  char st_fstype[16];
6498  long st_pad4[8]; /* expansion area */
6499 };
6500 # 401 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6501 /* MODE MASKS */
6502 
6503 /* de facto standard definitions */
6504 
6505 
6506 
6507 
6508 
6509 
6510 /* XENIX definitions are not relevant to Solaris */
6511 # 428 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6512 /* the following macros are for POSIX conformance */
6513 # 454 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6514 /* POSIX.4 macros */
6515 
6516 
6517 
6518 
6519 
6520 
6521 /*
6522  * A version number is included in the x86 SVR4 stat and mknod interfaces
6523  * so that SVR4 binaries can be supported.  An LP64 kernel that supports
6524  * the i386 ABI need to be aware of this too.
6525  */
6526 # 476 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6527  /* || defined(_XPG7) */
6528 /* for use with futimens() and utimensat() */
6529 # 486 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h"
6530 extern int fchmod(int, mode_t);
6531 
6532 
6533 extern int chmod(const char *, mode_t);
6534 extern int mkdir(const char *, mode_t);
6535 extern int mkfifo(const char *, mode_t);
6536 extern mode_t umask(mode_t);
6537 
6538 /* transitional large file interfaces */
6539 
6540 
6541 extern int fstat64(int, struct stat64 *);
6542 extern int stat64(const char *, struct stat64 *);
6543 extern int lstat64(const char *, struct stat64 *);
6544 
6545 
6546 extern int fstatat64(int, const char *, struct stat64 *, int);
6547 
6548 
6549 
6550 
6551 
6552  /* || defined(_XPG7) */
6553 extern int mkdirat(int, const char *, mode_t);
6554 extern int mkfifoat(int, const char *, mode_t);
6555 extern int mknodat(int, const char *, mode_t, dev_t);
6556 extern int fchmodat(int, const char *, mode_t, int);
6557 extern int futimens(int, const struct timespec[2]);
6558 extern int utimensat(int, const char *, const struct timespec[2], int);
6559 
6560 
6561 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 1
6562 /*
6563  * CDDL HEADER START
6564  *
6565  * The contents of this file are subject to the terms of the
6566  * Common Development and Distribution License (the "License").
6567  * You may not use this file except in compliance with the License.
6568  *
6569  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6570  * or http://www.opensolaris.org/os/licensing.
6571  * See the License for the specific language governing permissions
6572  * and limitations under the License.
6573  *
6574  * When distributing Covered Code, include this CDDL HEADER in each
6575  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6576  * If applicable, add the following below this CDDL HEADER, with the
6577  * fields enclosed by brackets "[]" replaced with your own identifying
6578  * information: Portions Copyright [yyyy] [name of copyright owner]
6579  *
6580  * CDDL HEADER END
6581  */
6582 
6583 /*
6584  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
6585  * Use is subject to license terms.
6586  */
6587 
6588 
6589 
6590 
6591 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
6592 /*
6593  * CDDL HEADER START
6594  *
6595  * The contents of this file are subject to the terms of the
6596  * Common Development and Distribution License (the "License").
6597  * You may not use this file except in compliance with the License.
6598  *
6599  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6600  * or http://www.opensolaris.org/os/licensing.
6601  * See the License for the specific language governing permissions
6602  * and limitations under the License.
6603  *
6604  * When distributing Covered Code, include this CDDL HEADER in each
6605  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6606  * If applicable, add the following below this CDDL HEADER, with the
6607  * fields enclosed by brackets "[]" replaced with your own identifying
6608  * information: Portions Copyright [yyyy] [name of copyright owner]
6609  *
6610  * CDDL HEADER END
6611  */
6612 
6613 /*
6614  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6615  * Copyright 2016 Joyent, Inc.
6616  *
6617  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6618  * Use is subject to license terms.
6619  */
6620 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
6621 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6622 /*
6623  * CDDL HEADER START
6624  *
6625  * The contents of this file are subject to the terms of the
6626  * Common Development and Distribution License (the "License").
6627  * You may not use this file except in compliance with the License.
6628  *
6629  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6630  * or http://www.opensolaris.org/os/licensing.
6631  * See the License for the specific language governing permissions
6632  * and limitations under the License.
6633  *
6634  * When distributing Covered Code, include this CDDL HEADER in each
6635  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6636  * If applicable, add the following below this CDDL HEADER, with the
6637  * fields enclosed by brackets "[]" replaced with your own identifying
6638  * information: Portions Copyright [yyyy] [name of copyright owner]
6639  *
6640  * CDDL HEADER END
6641  */
6642 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6643 /*	  All Rights Reserved  	*/
6644 
6645 
6646 /*
6647  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6648  * Use is subject to license terms.
6649  *
6650  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6651  * Copyright 2016 Joyent, Inc.
6652  */
6653 # 32 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat_impl.h" 2
6654 
6655 
6656 
6657 
6658 
6659 /*
6660  * The implementation specific header for <sys/stat.h>
6661  */
6662 
6663 
6664 
6665 
6666 
6667 extern int fstat(int, struct stat *);
6668 extern int stat(const char *, struct stat *);
6669 
6670 
6671 
6672 extern int fstatat(int, const char *, struct stat *, int);
6673 
6674 
6675 
6676 extern int lstat(const char *, struct stat *);
6677 extern int mknod(const char *, mode_t, dev_t);
6678 # 518 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stat.h" 2
6679 # 47 "special.c" 2
6680 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
6681 /*
6682  * CDDL HEADER START
6683  *
6684  * The contents of this file are subject to the terms of the
6685  * Common Development and Distribution License (the "License").
6686  * You may not use this file except in compliance with the License.
6687  *
6688  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6689  * or http://www.opensolaris.org/os/licensing.
6690  * See the License for the specific language governing permissions
6691  * and limitations under the License.
6692  *
6693  * When distributing Covered Code, include this CDDL HEADER in each
6694  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6695  * If applicable, add the following below this CDDL HEADER, with the
6696  * fields enclosed by brackets "[]" replaced with your own identifying
6697  * information: Portions Copyright [yyyy] [name of copyright owner]
6698  *
6699  * CDDL HEADER END
6700  */
6701 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6702 /*	  All Rights Reserved  	*/
6703 
6704 /*
6705  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
6706  * Use is subject to license terms.
6707  */
6708 
6709 
6710 
6711 
6712 #pragma ident "%Z%%M%	%I%	%E% SMI"
6713 
6714 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
6715 /*
6716  * CDDL HEADER START
6717  *
6718  * The contents of this file are subject to the terms of the
6719  * Common Development and Distribution License (the "License").
6720  * You may not use this file except in compliance with the License.
6721  *
6722  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6723  * or http://www.opensolaris.org/os/licensing.
6724  * See the License for the specific language governing permissions
6725  * and limitations under the License.
6726  *
6727  * When distributing Covered Code, include this CDDL HEADER in each
6728  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6729  * If applicable, add the following below this CDDL HEADER, with the
6730  * fields enclosed by brackets "[]" replaced with your own identifying
6731  * information: Portions Copyright [yyyy] [name of copyright owner]
6732  *
6733  * CDDL HEADER END
6734  */
6735 /*	Copyright (c) 1988 AT&T	*/
6736 /*	  All Rights Reserved  	*/
6737 
6738 
6739 /*
6740  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6741  *
6742  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
6743  * Use is subject to license terms.
6744  */
6745 /*
6746  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
6747  * Copyright 2016 Joyent, Inc.
6748  */
6749 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
6750 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
6751 extern char *errstr;
6752 
6753 struct ainfo {
6754  char *local;
6755  mode_t mode;
6756  char owner[64 +1];
6757  char group[64 +1];
6758  major_t major;
6759  minor_t minor;
6760 };
6761 
6762 struct cinfo {
6763  long cksum;
6764  fsblkcnt_t size;
6765  time_t modtime;
6766 };
6767 
6768 struct pinfo {
6769  char status;
6770  char pkg[64 +1];
6771  char editflag;
6772  char aclass[64 +1];
6773  struct pinfo
6774   *next;
6775 };
6776 
6777 struct cfent {
6778  short volno;
6779  char ftype;
6780  char pkg_class[64 +1];
6781  int pkg_class_idx;
6782  char *path;
6783  struct ainfo ainfo;
6784  struct cinfo cinfo;
6785  short npkgs;
6786  struct pinfo
6787   *pinfo;
6788 };
6789 
6790 /* averify() & cverify() error codes */
6791 # 48 "special.c" 2
6792 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
6793 /*
6794  * CDDL HEADER START
6795  *
6796  * The contents of this file are subject to the terms of the
6797  * Common Development and Distribution License (the "License").
6798  * You may not use this file except in compliance with the License.
6799  *
6800  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6801  * or http://www.opensolaris.org/os/licensing.
6802  * See the License for the specific language governing permissions
6803  * and limitations under the License.
6804  *
6805  * When distributing Covered Code, include this CDDL HEADER in each
6806  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6807  * If applicable, add the following below this CDDL HEADER, with the
6808  * fields enclosed by brackets "[]" replaced with your own identifying
6809  * information: Portions Copyright [yyyy] [name of copyright owner]
6810  *
6811  * CDDL HEADER END
6812  */
6813 
6814 /*
6815  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6816  * Use is subject to license terms.
6817  */
6818 
6819 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
6820 /* All Rights Reserved */
6821 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
6822 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6823 /*
6824  * CDDL HEADER START
6825  *
6826  * The contents of this file are subject to the terms of the
6827  * Common Development and Distribution License (the "License").
6828  * You may not use this file except in compliance with the License.
6829  *
6830  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6831  * or http://www.opensolaris.org/os/licensing.
6832  * See the License for the specific language governing permissions
6833  * and limitations under the License.
6834  *
6835  * When distributing Covered Code, include this CDDL HEADER in each
6836  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6837  * If applicable, add the following below this CDDL HEADER, with the
6838  * fields enclosed by brackets "[]" replaced with your own identifying
6839  * information: Portions Copyright [yyyy] [name of copyright owner]
6840  *
6841  * CDDL HEADER END
6842  */
6843 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6844 /*	  All Rights Reserved  	*/
6845 
6846 
6847 /*
6848  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6849  * Use is subject to license terms.
6850  *
6851  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6852  * Copyright 2016 Joyent, Inc.
6853  */
6854 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
6855 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
6856 /*
6857  * CDDL HEADER START
6858  *
6859  * The contents of this file are subject to the terms of the
6860  * Common Development and Distribution License (the "License").
6861  * You may not use this file except in compliance with the License.
6862  *
6863  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6864  * or http://www.opensolaris.org/os/licensing.
6865  * See the License for the specific language governing permissions
6866  * and limitations under the License.
6867  *
6868  * When distributing Covered Code, include this CDDL HEADER in each
6869  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6870  * If applicable, add the following below this CDDL HEADER, with the
6871  * fields enclosed by brackets "[]" replaced with your own identifying
6872  * information: Portions Copyright [yyyy] [name of copyright owner]
6873  *
6874  * CDDL HEADER END
6875  */
6876 
6877 /*
6878  * Copyright (c) 2013 Gary Mills
6879  *
6880  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
6881  * Use is subject to license terms.
6882  */
6883 
6884 /*	Copyright (c) 1988 AT&T	*/
6885 /*	  All Rights Reserved  	*/
6886 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
6887 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
6888 /*
6889  * CDDL HEADER START
6890  *
6891  * The contents of this file are subject to the terms of the
6892  * Common Development and Distribution License (the "License").
6893  * You may not use this file except in compliance with the License.
6894  *
6895  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6896  * or http://www.opensolaris.org/os/licensing.
6897  * See the License for the specific language governing permissions
6898  * and limitations under the License.
6899  *
6900  * When distributing Covered Code, include this CDDL HEADER in each
6901  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6902  * If applicable, add the following below this CDDL HEADER, with the
6903  * fields enclosed by brackets "[]" replaced with your own identifying
6904  * information: Portions Copyright [yyyy] [name of copyright owner]
6905  *
6906  * CDDL HEADER END
6907  */
6908 
6909 /*
6910  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6911  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6912  */
6913 
6914 /*	Copyright (c) 1988 AT&T	*/
6915 /*	  All Rights Reserved  	*/
6916 
6917 /*
6918  * User-visible pieces of the ANSI C standard I/O package.
6919  */
6920 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
6921 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
6922 /*
6923  * CDDL HEADER START
6924  *
6925  * The contents of this file are subject to the terms of the
6926  * Common Development and Distribution License, Version 1.0 only
6927  * (the "License").  You may not use this file except in compliance
6928  * with the License.
6929  *
6930  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6931  * or http://www.opensolaris.org/os/licensing.
6932  * See the License for the specific language governing permissions
6933  * and limitations under the License.
6934  *
6935  * When distributing Covered Code, include this CDDL HEADER in each
6936  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6937  * If applicable, add the following below this CDDL HEADER, with the
6938  * fields enclosed by brackets "[]" replaced with your own identifying
6939  * information: Portions Copyright [yyyy] [name of copyright owner]
6940  *
6941  * CDDL HEADER END
6942  */
6943 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6944 /*	  All Rights Reserved  	*/
6945 
6946 
6947 
6948 
6949 
6950 #pragma ident "%Z%%M%	%I%	%E% SMI"
6951 
6952 
6953 
6954 
6955 
6956 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
6957 /*
6958  * CDDL HEADER START
6959  *
6960  * The contents of this file are subject to the terms of the
6961  * Common Development and Distribution License (the "License").
6962  * You may not use this file except in compliance with the License.
6963  *
6964  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6965  * or http://www.opensolaris.org/os/licensing.
6966  * See the License for the specific language governing permissions
6967  * and limitations under the License.
6968  *
6969  * When distributing Covered Code, include this CDDL HEADER in each
6970  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6971  * If applicable, add the following below this CDDL HEADER, with the
6972  * fields enclosed by brackets "[]" replaced with your own identifying
6973  * information: Portions Copyright [yyyy] [name of copyright owner]
6974  *
6975  * CDDL HEADER END
6976  */
6977 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
6978 /*	  All Rights Reserved  	*/
6979 
6980 
6981 /*
6982  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
6983  * Use is subject to license terms.
6984  *
6985  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
6986  * Copyright 2016 Joyent, Inc.
6987  */
6988 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
6989 
6990 struct pkgdev {
6991  int rdonly;
6992  int mntflg;
6993  longlong_t capacity; /* number of 512-blocks on device */
6994  char *name;
6995  char *dirname;
6996  char *pathname;
6997  char *mount;
6998  char *fstyp;
6999  char *cdevice;
7000  char *bdevice;
7001  char *norewind;
7002 };
7003 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7004 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
7005 /*
7006  * CDDL HEADER START
7007  *
7008  * The contents of this file are subject to the terms of the
7009  * Common Development and Distribution License (the "License").
7010  * You may not use this file except in compliance with the License.
7011  *
7012  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7013  * or http://www.opensolaris.org/os/licensing.
7014  * See the License for the specific language governing permissions
7015  * and limitations under the License.
7016  *
7017  * When distributing Covered Code, include this CDDL HEADER in each
7018  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7019  * If applicable, add the following below this CDDL HEADER, with the
7020  * fields enclosed by brackets "[]" replaced with your own identifying
7021  * information: Portions Copyright [yyyy] [name of copyright owner]
7022  *
7023  * CDDL HEADER END
7024  */
7025 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7026 /*	  All Rights Reserved  	*/
7027 
7028 /*
7029  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
7030  * Use is subject to license terms.
7031  */
7032 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7033 # 1 "/usr/include/openssl/bio.h" 1 3 4
7034 /* crypto/bio/bio.h */
7035 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7036  * All rights reserved.
7037  *
7038  * This package is an SSL implementation written
7039  * by Eric Young (eay@cryptsoft.com).
7040  * The implementation was written so as to conform with Netscapes SSL.
7041  *
7042  * This library is free for commercial and non-commercial use as long as
7043  * the following conditions are aheared to.  The following conditions
7044  * apply to all code found in this distribution, be it the RC4, RSA,
7045  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
7046  * included with this distribution is covered by the same copyright terms
7047  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
7048  *
7049  * Copyright remains Eric Young's, and as such any Copyright notices in
7050  * the code are not to be removed.
7051  * If this package is used in a product, Eric Young should be given attribution
7052  * as the author of the parts of the library used.
7053  * This can be in the form of a textual message at program startup or
7054  * in documentation (online or textual) provided with the package.
7055  *
7056  * Redistribution and use in source and binary forms, with or without
7057  * modification, are permitted provided that the following conditions
7058  * are met:
7059  * 1. Redistributions of source code must retain the copyright
7060  *    notice, this list of conditions and the following disclaimer.
7061  * 2. Redistributions in binary form must reproduce the above copyright
7062  *    notice, this list of conditions and the following disclaimer in the
7063  *    documentation and/or other materials provided with the distribution.
7064  * 3. All advertising materials mentioning features or use of this software
7065  *    must display the following acknowledgement:
7066  *    "This product includes cryptographic software written by
7067  *     Eric Young (eay@cryptsoft.com)"
7068  *    The word 'cryptographic' can be left out if the rouines from the library
7069  *    being used are not cryptographic related :-).
7070  * 4. If you include any Windows specific code (or a derivative thereof) from
7071  *    the apps directory (application code) you must include an acknowledgement:
7072  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
7073  *
7074  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
7075  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7076  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7077  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7078  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7079  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7080  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7081  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7082  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7083  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7084  * SUCH DAMAGE.
7085  *
7086  * The licence and distribution terms for any publically available version or
7087  * derivative of this code cannot be changed.  i.e. this code cannot simply be
7088  * copied and put under another distribution licence
7089  * [including the GNU Public Licence.]
7090  */
7091 
7092 
7093 
7094 
7095 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
7096 /* e_os2.h */
7097 /* ====================================================================
7098  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
7099  *
7100  * Redistribution and use in source and binary forms, with or without
7101  * modification, are permitted provided that the following conditions
7102  * are met:
7103  *
7104  * 1. Redistributions of source code must retain the above copyright
7105  *    notice, this list of conditions and the following disclaimer.
7106  *
7107  * 2. Redistributions in binary form must reproduce the above copyright
7108  *    notice, this list of conditions and the following disclaimer in
7109  *    the documentation and/or other materials provided with the
7110  *    distribution.
7111  *
7112  * 3. All advertising materials mentioning features or use of this
7113  *    software must display the following acknowledgment:
7114  *    "This product includes software developed by the OpenSSL Project
7115  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7116  *
7117  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7118  *    endorse or promote products derived from this software without
7119  *    prior written permission. For written permission, please contact
7120  *    openssl-core@openssl.org.
7121  *
7122  * 5. Products derived from this software may not be called "OpenSSL"
7123  *    nor may "OpenSSL" appear in their names without prior written
7124  *    permission of the OpenSSL Project.
7125  *
7126  * 6. Redistributions of any form whatsoever must retain the following
7127  *    acknowledgment:
7128  *    "This product includes software developed by the OpenSSL Project
7129  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7130  *
7131  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7132  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7133  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7134  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7135  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7136  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7137  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7138  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7139  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7140  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7141  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7142  * OF THE POSSIBILITY OF SUCH DAMAGE.
7143  * ====================================================================
7144  *
7145  * This product includes cryptographic software written by Eric Young
7146  * (eay@cryptsoft.com).  This product includes software written by Tim
7147  * Hudson (tjh@cryptsoft.com).
7148  *
7149  */
7150 
7151 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
7152 /* opensslconf.h */
7153 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
7154 
7155 
7156 
7157 
7158 /* OpenSSL was configured with the following options: */
7159 # 108 "/usr/include/openssl/opensslconf.h" 3 4
7160 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
7161    asks for it.  This is a transient feature that is provided for those
7162    who haven't had the time to do the appropriate changes in their
7163    applications.  */
7164 # 204 "/usr/include/openssl/opensslconf.h" 3 4
7165 /* crypto/opensslconf.h.in */
7166 
7167 /* Generate 80386 code? */
7168 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
7169 # 65 "/usr/include/openssl/e_os2.h" 3 4
7170 /******************************************************************************
7171  * Detect operating systems.  This probably needs completing.
7172  * The result is that at least one OPENSSL_SYS_os macro should be defined.
7173  * However, if none is defined, Unix is assumed.
7174  **/
7175 
7176 
7177 
7178 /* ---------------------- Macintosh, before MacOS X ----------------------- */
7179 
7180 
7181 
7182 
7183 
7184 /* ---------------------- NetWare ----------------------------------------- */
7185 
7186 
7187 
7188 
7189 
7190 /* --------------------- Microsoft operating systems ---------------------- */
7191 
7192 /*
7193  * Note that MSDOS actually denotes 32-bit environments running on top of
7194  * MS-DOS, such as DJGPP one.
7195  */
7196 
7197 
7198 
7199 
7200 
7201 /*
7202  * For 32 bit environment, there seems to be the CygWin environment and then
7203  * all the others that try to do the same thing Microsoft does...
7204  */
7205 # 129 "/usr/include/openssl/e_os2.h" 3 4
7206 /* Anything that tries to look like Microsoft is "Windows" */
7207 # 138 "/usr/include/openssl/e_os2.h" 3 4
7208 /*
7209  * DLL settings.  This part is a bit tough, because it's up to the
7210  * application implementor how he or she will link the application, so it
7211  * requires some macro to be used.
7212  */
7213 # 152 "/usr/include/openssl/e_os2.h" 3 4
7214 /* ------------------------------- OpenVMS -------------------------------- */
7215 # 166 "/usr/include/openssl/e_os2.h" 3 4
7216 /* -------------------------------- OS/2 ---------------------------------- */
7217 
7218 
7219 
7220 
7221 
7222 /* -------------------------------- Unix ---------------------------------- */
7223 # 207 "/usr/include/openssl/e_os2.h" 3 4
7224 /* -------------------------------- VOS ----------------------------------- */
7225 # 218 "/usr/include/openssl/e_os2.h" 3 4
7226 /* ------------------------------ VxWorks --------------------------------- */
7227 
7228 
7229 
7230 
7231 /* -------------------------------- BeOS ---------------------------------- */
7232 # 234 "/usr/include/openssl/e_os2.h" 3 4
7233 /**
7234  * That's it for OS-specific stuff
7235  *****************************************************************************/
7236 
7237 /* Specials for I/O an exit */
7238 # 247 "/usr/include/openssl/e_os2.h" 3 4
7239 /*-
7240  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
7241  * certain global symbols that, with some compilers under VMS, have to be
7242  * defined and declared explicitely with globaldef and globalref.
7243  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
7244  * DLL exports and imports for compilers under Win32.  These are a little
7245  * more complicated to use.  Basically, for any library that exports some
7246  * global variables, the following code must be present in the header file
7247  * that declares them, before OPENSSL_EXTERN is used:
7248  *
7249  * #ifdef SOME_BUILD_FLAG_MACRO
7250  * # undef OPENSSL_EXTERN
7251  * # define OPENSSL_EXTERN OPENSSL_EXPORT
7252  * #endif
7253  *
7254  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
7255  * have some generally sensible values, and for OPENSSL_EXTERN to have the
7256  * value OPENSSL_IMPORT.
7257  */
7258 # 282 "/usr/include/openssl/e_os2.h" 3 4
7259 /*-
7260  * Macros to allow global variables to be reached through function calls when
7261  * required (if a shared library version requires it, for example.
7262  * The way it's done allows definitions like this:
7263  *
7264  *      // in foobar.c
7265  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
7266  *      // in foobar.h
7267  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
7268  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
7269  */
7270 # 63 "/usr/include/openssl/bio.h" 2 3 4
7271 
7272 
7273 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
7274 /*
7275  * CDDL HEADER START
7276  *
7277  * The contents of this file are subject to the terms of the
7278  * Common Development and Distribution License (the "License").
7279  * You may not use this file except in compliance with the License.
7280  *
7281  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7282  * or http://www.opensolaris.org/os/licensing.
7283  * See the License for the specific language governing permissions
7284  * and limitations under the License.
7285  *
7286  * When distributing Covered Code, include this CDDL HEADER in each
7287  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7288  * If applicable, add the following below this CDDL HEADER, with the
7289  * fields enclosed by brackets "[]" replaced with your own identifying
7290  * information: Portions Copyright [yyyy] [name of copyright owner]
7291  *
7292  * CDDL HEADER END
7293  */
7294 
7295 /*
7296  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7297  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7298  */
7299 
7300 /*	Copyright (c) 1988 AT&T	*/
7301 /*	  All Rights Reserved  	*/
7302 
7303 /*
7304  * User-visible pieces of the ANSI C standard I/O package.
7305  */
7306 # 66 "/usr/include/openssl/bio.h" 2 3 4
7307 
7308 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
7309 /*
7310  * CDDL HEADER START
7311  *
7312  * The contents of this file are subject to the terms of the
7313  * Common Development and Distribution License, Version 1.0 only
7314  * (the "License").  You may not use this file except in compliance
7315  * with the License.
7316  *
7317  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7318  * or http://www.opensolaris.org/os/licensing.
7319  * See the License for the specific language governing permissions
7320  * and limitations under the License.
7321  *
7322  * When distributing Covered Code, include this CDDL HEADER in each
7323  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7324  * If applicable, add the following below this CDDL HEADER, with the
7325  * fields enclosed by brackets "[]" replaced with your own identifying
7326  * information: Portions Copyright [yyyy] [name of copyright owner]
7327  *
7328  * CDDL HEADER END
7329  */
7330 /*	Copyright (c) 1988 AT&T	*/
7331 /*	  All Rights Reserved	*/
7332 
7333 /*
7334  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7335  *
7336  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7337  * Use is subject to license terms.
7338  */
7339 
7340 
7341 
7342 
7343 /*
7344  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
7345  * variable argument definitions.  For legacy support, it also defines
7346  * the pre-standard variable argument definitions.
7347  *
7348  * The varargs definitions within this header are defined in terms of
7349  * implementation definitions.  These implementation definitions reside
7350  * in <sys/va_list.h>.  This organization enables protected use of
7351  * the implementation by other standard headers without introducing
7352  * names into the users' namespace.
7353  */
7354 
7355 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
7356 /*
7357  * CDDL HEADER START
7358  *
7359  * The contents of this file are subject to the terms of the
7360  * Common Development and Distribution License, Version 1.0 only
7361  * (the "License").  You may not use this file except in compliance
7362  * with the License.
7363  *
7364  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7365  * or http://www.opensolaris.org/os/licensing.
7366  * See the License for the specific language governing permissions
7367  * and limitations under the License.
7368  *
7369  * When distributing Covered Code, include this CDDL HEADER in each
7370  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7371  * If applicable, add the following below this CDDL HEADER, with the
7372  * fields enclosed by brackets "[]" replaced with your own identifying
7373  * information: Portions Copyright [yyyy] [name of copyright owner]
7374  *
7375  * CDDL HEADER END
7376  */
7377 /*	Copyright (c) 1988 AT&T	*/
7378 /*	  All Rights Reserved  	*/
7379 
7380 
7381 /*
7382  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7383  * Use is subject to license terms.
7384  */
7385 
7386 /*
7387  * An application should not include this header directly.  Instead it
7388  * should be included only through the inclusion of other Sun headers.
7389  *
7390  * The contents of this header is limited to identifiers specified in the
7391  * C Standard.  Any new identifiers specified in future amendments to the
7392  * C Standard must be placed in this header.  If these new identifiers
7393  * are required to also be in the C++ Standard "std" namespace, then for
7394  * anything other than macro definitions, corresponding "using" directives
7395  * must also be added to <stdarg.h>.
7396  */
7397 
7398 
7399 
7400 
7401 #pragma ident "%Z%%M%	%I%	%E% SMI"
7402 
7403 /*
7404  * This header defines the ISO C 1989 and ISO C++ 1998 variable
7405  * argument definitions.
7406  *
7407  * The varargs definitions within this header are defined in terms of
7408  * implementation definitions.  These implementation definitions reside
7409  * in <sys/va_impl.h>.  This organization enables protected use of
7410  * the implementation by other standard headers without introducing
7411  * names into the users' namespace.
7412  */
7413 
7414 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
7415 /*
7416  * CDDL HEADER START
7417  *
7418  * The contents of this file are subject to the terms of the
7419  * Common Development and Distribution License, Version 1.0 only
7420  * (the "License").  You may not use this file except in compliance
7421  * with the License.
7422  *
7423  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7424  * or http://www.opensolaris.org/os/licensing.
7425  * See the License for the specific language governing permissions
7426  * and limitations under the License.
7427  *
7428  * When distributing Covered Code, include this CDDL HEADER in each
7429  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7430  * If applicable, add the following below this CDDL HEADER, with the
7431  * fields enclosed by brackets "[]" replaced with your own identifying
7432  * information: Portions Copyright [yyyy] [name of copyright owner]
7433  *
7434  * CDDL HEADER END
7435  */
7436 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7437 /*	  All Rights Reserved	*/
7438 
7439 
7440 /*
7441  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7442  *
7443  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7444  * Use is subject to license terms.
7445  */
7446 
7447 
7448 
7449 
7450 /*
7451  * An application should not include this header directly.  Instead it
7452  * should be included only through the inclusion of other Sun headers,
7453  * specifically <stdarg.h> and <varargs.h>.
7454  *
7455  * This header serves two purposes.
7456  *
7457  * First, it provides a common set of definitions that implementations
7458  * of the various standards for variable argument lists may use.  These
7459  * various standards are implemented in <varargs.h>, <stdarg.h>,
7460  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
7461  *
7462  * Second, it provides varying implementations of the common definitions,
7463  * depending upon the compiler.
7464  */
7465 
7466 /*
7467  * The common definitions exported by this header or compilers using
7468  * this header are:
7469  *
7470  * the macro __va_start(list, name) starting the list iteration
7471  * the macro __va_arg(list, type) getting the current arg and iterating
7472  * the macro __va_copy(to, from) to bookmark the list iteration
7473  * the macro __va_end(list) to end the iteration
7474  *
7475  * In addition, the following are exported via inclusion of <sys/va_list.h>:
7476  *
7477  * the identifier __builtin_va_alist for the variable list pseudo parameter
7478  * the type __va_alist_type for the variable list pseudo parameter
7479  * the type __va_list defining the type of the variable list iterator
7480  */
7481 
7482 /*
7483  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
7484  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
7485  * macros (e.g. __sparc) to determine the protocol appropriate to the
7486  * current compilation.  It is intended that the compilation system
7487  * define the feature, processor, and compiler macros, not the user of
7488  * the system.
7489  */
7490 
7491 /*
7492  * Many compilation systems depend upon the use of special functions
7493  * built into the the compilation system to handle variable argument
7494  * lists.  These built-in symbols may include one or more of the
7495  * following:
7496  *
7497  *      __builtin_va_alist
7498  *      __builtin_va_start
7499  *      __builtin_va_arg_incr
7500  *      __builtin_stdarg_start
7501  *      __builtin_va_end
7502  *      __builtin_va_arg
7503  *      __builtin_va_copy
7504  */
7505 
7506 /*
7507  * The following are defined in <sys/va_list.h>:
7508  *
7509  *      __va_alist_type
7510  *      __va_void()
7511  *      __va_ptr_base
7512  *      ISA definitions via inclusion of <sys/isa_defs.h>
7513  *
7514  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
7515  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
7516  * via inclusion of <iso/stdarg_iso.h>.
7517  */
7518 
7519 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
7520 /*
7521  * CDDL HEADER START
7522  *
7523  * The contents of this file are subject to the terms of the
7524  * Common Development and Distribution License, Version 1.0 only
7525  * (the "License").  You may not use this file except in compliance
7526  * with the License.
7527  *
7528  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7529  * or http://www.opensolaris.org/os/licensing.
7530  * See the License for the specific language governing permissions
7531  * and limitations under the License.
7532  *
7533  * When distributing Covered Code, include this CDDL HEADER in each
7534  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7535  * If applicable, add the following below this CDDL HEADER, with the
7536  * fields enclosed by brackets "[]" replaced with your own identifying
7537  * information: Portions Copyright [yyyy] [name of copyright owner]
7538  *
7539  * CDDL HEADER END
7540  */
7541 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
7542 /*	  All Rights Reserved	*/
7543 
7544 
7545 /*
7546  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7547  *
7548  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7549  * Use is subject to license terms.
7550  */
7551 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
7552 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
7553 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
7554 typedef __va_list va_list;
7555 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
7556 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
7557 /*
7558  * CDDL HEADER START
7559  *
7560  * The contents of this file are subject to the terms of the
7561  * Common Development and Distribution License, Version 1.0 only
7562  * (the "License").  You may not use this file except in compliance
7563  * with the License.
7564  *
7565  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7566  * or http://www.opensolaris.org/os/licensing.
7567  * See the License for the specific language governing permissions
7568  * and limitations under the License.
7569  *
7570  * When distributing Covered Code, include this CDDL HEADER in each
7571  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7572  * If applicable, add the following below this CDDL HEADER, with the
7573  * fields enclosed by brackets "[]" replaced with your own identifying
7574  * information: Portions Copyright [yyyy] [name of copyright owner]
7575  *
7576  * CDDL HEADER END
7577  */
7578 /*	Copyright (c) 1988 AT&T	*/
7579 /*	  All Rights Reserved	*/
7580 
7581 
7582 /*
7583  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
7584  * Use is subject to license terms.
7585  */
7586 
7587 
7588 
7589 
7590 #pragma ident "%Z%%M%	%I%	%E% SMI"
7591 
7592 /*
7593  * An application should not include this header directly.  Instead it
7594  * should be included only through the inclusion of other Sun headers.
7595  *
7596  * This header defines the va_copy variable argument macro, which is
7597  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
7598  * 1998.  Because this macro is a long-standing Solaris extension, it
7599  * is also permitted in other contexts.
7600  *
7601  * The varargs definitions within this header are defined in terms of
7602  * implementation definitions.  These implementation definitions reside
7603  * in <sys/va_list.h>.  This organization enables protected use of
7604  * the implementation by other standard headers without introducing
7605  * names into the users' namespace.
7606  */
7607 
7608 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
7609 /*
7610  * CDDL HEADER START
7611  *
7612  * The contents of this file are subject to the terms of the
7613  * Common Development and Distribution License (the "License").
7614  * You may not use this file except in compliance with the License.
7615  *
7616  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7617  * or http://www.opensolaris.org/os/licensing.
7618  * See the License for the specific language governing permissions
7619  * and limitations under the License.
7620  *
7621  * When distributing Covered Code, include this CDDL HEADER in each
7622  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7623  * If applicable, add the following below this CDDL HEADER, with the
7624  * fields enclosed by brackets "[]" replaced with your own identifying
7625  * information: Portions Copyright [yyyy] [name of copyright owner]
7626  *
7627  * CDDL HEADER END
7628  */
7629 
7630 /*
7631  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
7632  * Copyright 2016 Joyent, Inc.
7633  *
7634  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
7635  * Use is subject to license terms.
7636  */
7637 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
7638 
7639 
7640 
7641 
7642 
7643 /*
7644  * va_copy was initially a Solaris extension to provide a portable
7645  * way to perform a variable argument list ``bookmarking'' function.
7646  * It is now specified in the ISO/IEC 9899:1999 standard.
7647  */
7648 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
7649 
7650 /*
7651  * Allow global visibility for symbols defined in
7652  * C++ "std" namespace in <iso/stdarg_iso.h>.
7653  */
7654 # 68 "/usr/include/openssl/bio.h" 2 3 4
7655 
7656 # 1 "/usr/include/openssl/crypto.h" 1 3 4
7657 /* crypto/crypto.h */
7658 /* ====================================================================
7659  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
7660  *
7661  * Redistribution and use in source and binary forms, with or without
7662  * modification, are permitted provided that the following conditions
7663  * are met:
7664  *
7665  * 1. Redistributions of source code must retain the above copyright
7666  *    notice, this list of conditions and the following disclaimer.
7667  *
7668  * 2. Redistributions in binary form must reproduce the above copyright
7669  *    notice, this list of conditions and the following disclaimer in
7670  *    the documentation and/or other materials provided with the
7671  *    distribution.
7672  *
7673  * 3. All advertising materials mentioning features or use of this
7674  *    software must display the following acknowledgment:
7675  *    "This product includes software developed by the OpenSSL Project
7676  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7677  *
7678  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7679  *    endorse or promote products derived from this software without
7680  *    prior written permission. For written permission, please contact
7681  *    openssl-core@openssl.org.
7682  *
7683  * 5. Products derived from this software may not be called "OpenSSL"
7684  *    nor may "OpenSSL" appear in their names without prior written
7685  *    permission of the OpenSSL Project.
7686  *
7687  * 6. Redistributions of any form whatsoever must retain the following
7688  *    acknowledgment:
7689  *    "This product includes software developed by the OpenSSL Project
7690  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7691  *
7692  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7693  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7694  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7695  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7696  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7697  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7698  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7699  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7700  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7701  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7702  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7703  * OF THE POSSIBILITY OF SUCH DAMAGE.
7704  * ====================================================================
7705  *
7706  * This product includes cryptographic software written by Eric Young
7707  * (eay@cryptsoft.com).  This product includes software written by Tim
7708  * Hudson (tjh@cryptsoft.com).
7709  *
7710  */
7711 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7712  * All rights reserved.
7713  *
7714  * This package is an SSL implementation written
7715  * by Eric Young (eay@cryptsoft.com).
7716  * The implementation was written so as to conform with Netscapes SSL.
7717  *
7718  * This library is free for commercial and non-commercial use as long as
7719  * the following conditions are aheared to.  The following conditions
7720  * apply to all code found in this distribution, be it the RC4, RSA,
7721  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
7722  * included with this distribution is covered by the same copyright terms
7723  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
7724  *
7725  * Copyright remains Eric Young's, and as such any Copyright notices in
7726  * the code are not to be removed.
7727  * If this package is used in a product, Eric Young should be given attribution
7728  * as the author of the parts of the library used.
7729  * This can be in the form of a textual message at program startup or
7730  * in documentation (online or textual) provided with the package.
7731  *
7732  * Redistribution and use in source and binary forms, with or without
7733  * modification, are permitted provided that the following conditions
7734  * are met:
7735  * 1. Redistributions of source code must retain the copyright
7736  *    notice, this list of conditions and the following disclaimer.
7737  * 2. Redistributions in binary form must reproduce the above copyright
7738  *    notice, this list of conditions and the following disclaimer in the
7739  *    documentation and/or other materials provided with the distribution.
7740  * 3. All advertising materials mentioning features or use of this software
7741  *    must display the following acknowledgement:
7742  *    "This product includes cryptographic software written by
7743  *     Eric Young (eay@cryptsoft.com)"
7744  *    The word 'cryptographic' can be left out if the rouines from the library
7745  *    being used are not cryptographic related :-).
7746  * 4. If you include any Windows specific code (or a derivative thereof) from
7747  *    the apps directory (application code) you must include an acknowledgement:
7748  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
7749  *
7750  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
7751  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7752  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7753  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7754  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7755  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7756  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7757  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7758  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7759  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7760  * SUCH DAMAGE.
7761  *
7762  * The licence and distribution terms for any publically available version or
7763  * derivative of this code cannot be changed.  i.e. this code cannot simply be
7764  * copied and put under another distribution licence
7765  * [including the GNU Public Licence.]
7766  */
7767 /* ====================================================================
7768  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
7769  * ECDH support in OpenSSL originally developed by
7770  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
7771  */
7772 
7773 
7774 
7775 
7776 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
7777 /*
7778  * CDDL HEADER START
7779  *
7780  * The contents of this file are subject to the terms of the
7781  * Common Development and Distribution License (the "License").
7782  * You may not use this file except in compliance with the License.
7783  *
7784  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7785  * or http://www.opensolaris.org/os/licensing.
7786  * See the License for the specific language governing permissions
7787  * and limitations under the License.
7788  *
7789  * When distributing Covered Code, include this CDDL HEADER in each
7790  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7791  * If applicable, add the following below this CDDL HEADER, with the
7792  * fields enclosed by brackets "[]" replaced with your own identifying
7793  * information: Portions Copyright [yyyy] [name of copyright owner]
7794  *
7795  * CDDL HEADER END
7796  */
7797 
7798 /*
7799  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7800  * Copyright (c) 2013 Gary Mills
7801  *
7802  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7803  */
7804 
7805 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
7806 
7807 /*	Copyright (c) 1988 AT&T	*/
7808 /*	  All Rights Reserved  	*/
7809 # 121 "/usr/include/openssl/crypto.h" 2 3 4
7810 
7811 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
7812 /* e_os2.h */
7813 /* ====================================================================
7814  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
7815  *
7816  * Redistribution and use in source and binary forms, with or without
7817  * modification, are permitted provided that the following conditions
7818  * are met:
7819  *
7820  * 1. Redistributions of source code must retain the above copyright
7821  *    notice, this list of conditions and the following disclaimer.
7822  *
7823  * 2. Redistributions in binary form must reproduce the above copyright
7824  *    notice, this list of conditions and the following disclaimer in
7825  *    the documentation and/or other materials provided with the
7826  *    distribution.
7827  *
7828  * 3. All advertising materials mentioning features or use of this
7829  *    software must display the following acknowledgment:
7830  *    "This product includes software developed by the OpenSSL Project
7831  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7832  *
7833  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7834  *    endorse or promote products derived from this software without
7835  *    prior written permission. For written permission, please contact
7836  *    openssl-core@openssl.org.
7837  *
7838  * 5. Products derived from this software may not be called "OpenSSL"
7839  *    nor may "OpenSSL" appear in their names without prior written
7840  *    permission of the OpenSSL Project.
7841  *
7842  * 6. Redistributions of any form whatsoever must retain the following
7843  *    acknowledgment:
7844  *    "This product includes software developed by the OpenSSL Project
7845  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7846  *
7847  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7848  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7849  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7850  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7851  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7852  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7853  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7854  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7855  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7856  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7857  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7858  * OF THE POSSIBILITY OF SUCH DAMAGE.
7859  * ====================================================================
7860  *
7861  * This product includes cryptographic software written by Eric Young
7862  * (eay@cryptsoft.com).  This product includes software written by Tim
7863  * Hudson (tjh@cryptsoft.com).
7864  *
7865  */
7866 
7867 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
7868 /* opensslconf.h */
7869 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
7870 
7871 
7872 
7873 
7874 /* OpenSSL was configured with the following options: */
7875 # 108 "/usr/include/openssl/opensslconf.h" 3 4
7876 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
7877    asks for it.  This is a transient feature that is provided for those
7878    who haven't had the time to do the appropriate changes in their
7879    applications.  */
7880 # 204 "/usr/include/openssl/opensslconf.h" 3 4
7881 /* crypto/opensslconf.h.in */
7882 
7883 /* Generate 80386 code? */
7884 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
7885 # 123 "/usr/include/openssl/crypto.h" 2 3 4
7886 
7887 
7888 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
7889 /*
7890  * CDDL HEADER START
7891  *
7892  * The contents of this file are subject to the terms of the
7893  * Common Development and Distribution License (the "License").
7894  * You may not use this file except in compliance with the License.
7895  *
7896  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7897  * or http://www.opensolaris.org/os/licensing.
7898  * See the License for the specific language governing permissions
7899  * and limitations under the License.
7900  *
7901  * When distributing Covered Code, include this CDDL HEADER in each
7902  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7903  * If applicable, add the following below this CDDL HEADER, with the
7904  * fields enclosed by brackets "[]" replaced with your own identifying
7905  * information: Portions Copyright [yyyy] [name of copyright owner]
7906  *
7907  * CDDL HEADER END
7908  */
7909 
7910 /*
7911  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
7912  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
7913  */
7914 
7915 /*	Copyright (c) 1988 AT&T	*/
7916 /*	  All Rights Reserved  	*/
7917 
7918 /*
7919  * User-visible pieces of the ANSI C standard I/O package.
7920  */
7921 # 126 "/usr/include/openssl/crypto.h" 2 3 4
7922 
7923 
7924 # 1 "/usr/include/openssl/stack.h" 1 3 4
7925 /* crypto/stack/stack.h */
7926 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7927  * All rights reserved.
7928  *
7929  * This package is an SSL implementation written
7930  * by Eric Young (eay@cryptsoft.com).
7931  * The implementation was written so as to conform with Netscapes SSL.
7932  *
7933  * This library is free for commercial and non-commercial use as long as
7934  * the following conditions are aheared to.  The following conditions
7935  * apply to all code found in this distribution, be it the RC4, RSA,
7936  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
7937  * included with this distribution is covered by the same copyright terms
7938  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
7939  *
7940  * Copyright remains Eric Young's, and as such any Copyright notices in
7941  * the code are not to be removed.
7942  * If this package is used in a product, Eric Young should be given attribution
7943  * as the author of the parts of the library used.
7944  * This can be in the form of a textual message at program startup or
7945  * in documentation (online or textual) provided with the package.
7946  *
7947  * Redistribution and use in source and binary forms, with or without
7948  * modification, are permitted provided that the following conditions
7949  * are met:
7950  * 1. Redistributions of source code must retain the copyright
7951  *    notice, this list of conditions and the following disclaimer.
7952  * 2. Redistributions in binary form must reproduce the above copyright
7953  *    notice, this list of conditions and the following disclaimer in the
7954  *    documentation and/or other materials provided with the distribution.
7955  * 3. All advertising materials mentioning features or use of this software
7956  *    must display the following acknowledgement:
7957  *    "This product includes cryptographic software written by
7958  *     Eric Young (eay@cryptsoft.com)"
7959  *    The word 'cryptographic' can be left out if the rouines from the library
7960  *    being used are not cryptographic related :-).
7961  * 4. If you include any Windows specific code (or a derivative thereof) from
7962  *    the apps directory (application code) you must include an acknowledgement:
7963  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
7964  *
7965  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
7966  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7967  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7968  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7969  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7970  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7971  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7972  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7973  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7974  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7975  * SUCH DAMAGE.
7976  *
7977  * The licence and distribution terms for any publically available version or
7978  * derivative of this code cannot be changed.  i.e. this code cannot simply be
7979  * copied and put under another distribution licence
7980  * [including the GNU Public Licence.]
7981  */
7982 # 66 "/usr/include/openssl/stack.h" 3 4
7983 typedef struct stack_st {
7984     int num;
7985     char **data;
7986     int sorted;
7987     int num_alloc;
7988     int (*comp) (const void *, const void *);
7989 } _STACK; /* Use STACK_OF(...) instead */
7990 
7991 
7992 
7993 
7994 int sk_num(const _STACK *);
7995 void *sk_value(const _STACK *, int);
7996 
7997 void *sk_set(_STACK *, int, void *);
7998 
7999 _STACK *sk_new(int (*cmp) (const void *, const void *));
8000 _STACK *sk_new_null(void);
8001 void sk_free(_STACK *);
8002 void sk_pop_free(_STACK *st, void (*func) (void *));
8003 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
8004 int sk_insert(_STACK *sk, void *data, int where);
8005 void *sk_delete(_STACK *st, int loc);
8006 void *sk_delete_ptr(_STACK *st, void *p);
8007 int sk_find(_STACK *st, void *data);
8008 int sk_find_ex(_STACK *st, void *data);
8009 int sk_push(_STACK *st, void *data);
8010 int sk_unshift(_STACK *st, void *data);
8011 void *sk_shift(_STACK *st);
8012 void *sk_pop(_STACK *st);
8013 void sk_zero(_STACK *st);
8014 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
8015  (const void *, const void *);
8016 _STACK *sk_dup(_STACK *st);
8017 void sk_sort(_STACK *st);
8018 int sk_is_sorted(const _STACK *st);
8019 # 129 "/usr/include/openssl/crypto.h" 2 3 4
8020 # 1 "/usr/include/openssl/safestack.h" 1 3 4
8021 /* ====================================================================
8022  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8023  *
8024  * Redistribution and use in source and binary forms, with or without
8025  * modification, are permitted provided that the following conditions
8026  * are met:
8027  *
8028  * 1. Redistributions of source code must retain the above copyright
8029  *    notice, this list of conditions and the following disclaimer.
8030  *
8031  * 2. Redistributions in binary form must reproduce the above copyright
8032  *    notice, this list of conditions and the following disclaimer in
8033  *    the documentation and/or other materials provided with the
8034  *    distribution.
8035  *
8036  * 3. All advertising materials mentioning features or use of this
8037  *    software must display the following acknowledgment:
8038  *    "This product includes software developed by the OpenSSL Project
8039  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8040  *
8041  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8042  *    endorse or promote products derived from this software without
8043  *    prior written permission. For written permission, please contact
8044  *    openssl-core@openssl.org.
8045  *
8046  * 5. Products derived from this software may not be called "OpenSSL"
8047  *    nor may "OpenSSL" appear in their names without prior written
8048  *    permission of the OpenSSL Project.
8049  *
8050  * 6. Redistributions of any form whatsoever must retain the following
8051  *    acknowledgment:
8052  *    "This product includes software developed by the OpenSSL Project
8053  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8054  *
8055  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8056  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8057  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8058  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8059  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8060  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8061  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8062  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8063  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8064  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8065  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8066  * OF THE POSSIBILITY OF SUCH DAMAGE.
8067  * ====================================================================
8068  *
8069  * This product includes cryptographic software written by Eric Young
8070  * (eay@cryptsoft.com).  This product includes software written by Tim
8071  * Hudson (tjh@cryptsoft.com).
8072  *
8073  */
8074 
8075 
8076 
8077 
8078 # 1 "/usr/include/openssl/stack.h" 1 3 4
8079 /* crypto/stack/stack.h */
8080 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8081  * All rights reserved.
8082  *
8083  * This package is an SSL implementation written
8084  * by Eric Young (eay@cryptsoft.com).
8085  * The implementation was written so as to conform with Netscapes SSL.
8086  *
8087  * This library is free for commercial and non-commercial use as long as
8088  * the following conditions are aheared to.  The following conditions
8089  * apply to all code found in this distribution, be it the RC4, RSA,
8090  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8091  * included with this distribution is covered by the same copyright terms
8092  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8093  *
8094  * Copyright remains Eric Young's, and as such any Copyright notices in
8095  * the code are not to be removed.
8096  * If this package is used in a product, Eric Young should be given attribution
8097  * as the author of the parts of the library used.
8098  * This can be in the form of a textual message at program startup or
8099  * in documentation (online or textual) provided with the package.
8100  *
8101  * Redistribution and use in source and binary forms, with or without
8102  * modification, are permitted provided that the following conditions
8103  * are met:
8104  * 1. Redistributions of source code must retain the copyright
8105  *    notice, this list of conditions and the following disclaimer.
8106  * 2. Redistributions in binary form must reproduce the above copyright
8107  *    notice, this list of conditions and the following disclaimer in the
8108  *    documentation and/or other materials provided with the distribution.
8109  * 3. All advertising materials mentioning features or use of this software
8110  *    must display the following acknowledgement:
8111  *    "This product includes cryptographic software written by
8112  *     Eric Young (eay@cryptsoft.com)"
8113  *    The word 'cryptographic' can be left out if the rouines from the library
8114  *    being used are not cryptographic related :-).
8115  * 4. If you include any Windows specific code (or a derivative thereof) from
8116  *    the apps directory (application code) you must include an acknowledgement:
8117  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8118  *
8119  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8120  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8121  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8122  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8123  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8124  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8125  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8126  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8127  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8128  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8129  * SUCH DAMAGE.
8130  *
8131  * The licence and distribution terms for any publically available version or
8132  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8133  * copied and put under another distribution licence
8134  * [including the GNU Public Licence.]
8135  */
8136 # 59 "/usr/include/openssl/safestack.h" 2 3 4
8137 # 69 "/usr/include/openssl/safestack.h" 3 4
8138 /*
8139  * In C++ we get problems because an explicit cast is needed from (void *) we
8140  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
8141  * below.
8142  */
8143 # 102 "/usr/include/openssl/safestack.h" 3 4
8144 /* nada (obsolete in new safestack approach)*/
8145 
8146 
8147 /*-
8148  * Strings are special: normally an lhash entry will point to a single
8149  * (somewhat) mutable object. In the case of strings:
8150  *
8151  * a) Instead of a single char, there is an array of chars, NUL-terminated.
8152  * b) The string may have be immutable.
8153  *
8154  * So, they need their own declarations. Especially important for
8155  * type-checking tools, such as Deputy.
8156  *
8157  * In practice, however, it appears to be hard to have a const
8158  * string. For now, I'm settling for dealing with the fact it is a
8159  * string at all.
8160  */
8161 typedef char *OPENSSL_STRING;
8162 
8163 typedef const char *OPENSSL_CSTRING;
8164 
8165 /*
8166  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
8167  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
8168  * above, instead of a single char each entry is a NUL-terminated array of
8169  * chars. So, we have to implement STRING specially for STACK_OF. This is
8170  * dealt with in the autogenerated macros below.
8171  */
8172 
8173 struct stack_st_OPENSSL_STRING { _STACK stack; };
8174 
8175 /*
8176  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
8177  * These should also be distinguished from "normal" stacks.
8178  */
8179 typedef void *OPENSSL_BLOCK;
8180 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
8181 
8182 /*
8183  * SKM_sk_... stack macros are internal to safestack.h: never use them
8184  * directly, use sk_<type>_... instead
8185  */
8186 # 211 "/usr/include/openssl/safestack.h" 3 4
8187 /*
8188  * This block of defines is updated by util/mkstack.pl, please do not touch!
8189  */
8190 # 130 "/usr/include/openssl/crypto.h" 2 3 4
8191 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
8192 
8193 
8194 
8195 
8196 
8197 
8198 
8199 /*-
8200  * Numeric release version identifier:
8201  * MNNFFPPS: major minor fix patch status
8202  * The status nibble has one of the values 0 for development, 1 to e for betas
8203  * 1 to 14, and f for release.  The patch level is exactly that.
8204  * For example:
8205  * 0.9.3-dev      0x00903000
8206  * 0.9.3-beta1    0x00903001
8207  * 0.9.3-beta2-dev 0x00903002
8208  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
8209  * 0.9.3          0x0090300f
8210  * 0.9.3a         0x0090301f
8211  * 0.9.4          0x0090400f
8212  * 1.2.3z         0x102031af
8213  *
8214  * For continuity reasons (because 0.9.5 is already out, and is coded
8215  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
8216  * part is slightly different, by setting the highest bit.  This means
8217  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
8218  * with 0x0090600S...
8219  *
8220  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
8221  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
8222  *  major minor fix final patch/beta)
8223  */
8224 # 41 "/usr/include/openssl/opensslv.h" 3 4
8225 /*-
8226  * The macros below are to be used for shared library (.so, .dll, ...)
8227  * versioning.  That kind of versioning works a bit differently between
8228  * operating systems.  The most usual scheme is to set a major and a minor
8229  * number, and have the runtime loader check that the major number is equal
8230  * to what it was at application link time, while the minor number has to
8231  * be greater or equal to what it was at application link time.  With this
8232  * scheme, the version number is usually part of the file name, like this:
8233  *
8234  *      libcrypto.so.0.9
8235  *
8236  * Some unixen also make a softlink with the major verson number only:
8237  *
8238  *      libcrypto.so.0
8239  *
8240  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
8241  * shared library version is stored in the file, and is actually a series
8242  * of versions, separated by colons.  The rightmost version present in the
8243  * library when linking an application is stored in the application to be
8244  * matched at run time.  When the application is run, a check is done to
8245  * see if the library version stored in the application matches any of the
8246  * versions in the version string of the library itself.
8247  * This version string can be constructed in any way, depending on what
8248  * kind of matching is desired.  However, to implement the same scheme as
8249  * the one used in the other unixen, all compatible versions, from lowest
8250  * to highest, should be part of the string.  Consecutive builds would
8251  * give the following versions strings:
8252  *
8253  *      3.0
8254  *      3.0:3.1
8255  *      3.0:3.1:3.2
8256  *      4.0
8257  *      4.0:4.1
8258  *
8259  * Notice how version 4 is completely incompatible with version, and
8260  * therefore give the breach you can see.
8261  *
8262  * There may be other schemes as well that I haven't yet discovered.
8263  *
8264  * So, here's the way it works here: first of all, the library version
8265  * number doesn't need at all to match the overall OpenSSL version.
8266  * However, it's nice and more understandable if it actually does.
8267  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
8268  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
8269  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
8270  * we need to keep a history of version numbers, which is done in the
8271  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
8272  * should only keep the versions that are binary compatible with the current.
8273  */
8274 # 131 "/usr/include/openssl/crypto.h" 2 3 4
8275 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
8276 /* ====================================================================
8277  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
8278  *
8279  * Redistribution and use in source and binary forms, with or without
8280  * modification, are permitted provided that the following conditions
8281  * are met:
8282  *
8283  * 1. Redistributions of source code must retain the above copyright
8284  *    notice, this list of conditions and the following disclaimer.
8285  *
8286  * 2. Redistributions in binary form must reproduce the above copyright
8287  *    notice, this list of conditions and the following disclaimer in
8288  *    the documentation and/or other materials provided with the
8289  *    distribution.
8290  *
8291  * 3. All advertising materials mentioning features or use of this
8292  *    software must display the following acknowledgment:
8293  *    "This product includes software developed by the OpenSSL Project
8294  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8295  *
8296  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8297  *    endorse or promote products derived from this software without
8298  *    prior written permission. For written permission, please contact
8299  *    openssl-core@openssl.org.
8300  *
8301  * 5. Products derived from this software may not be called "OpenSSL"
8302  *    nor may "OpenSSL" appear in their names without prior written
8303  *    permission of the OpenSSL Project.
8304  *
8305  * 6. Redistributions of any form whatsoever must retain the following
8306  *    acknowledgment:
8307  *    "This product includes software developed by the OpenSSL Project
8308  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8309  *
8310  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8311  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8312  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8313  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8314  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8315  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8316  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8317  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8318  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8319  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8320  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8321  * OF THE POSSIBILITY OF SUCH DAMAGE.
8322  * ====================================================================
8323  *
8324  * This product includes cryptographic software written by Eric Young
8325  * (eay@cryptsoft.com).  This product includes software written by Tim
8326  * Hudson (tjh@cryptsoft.com).
8327  *
8328  */
8329 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
8330 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8331 /* e_os2.h */
8332 /* ====================================================================
8333  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8334  *
8335  * Redistribution and use in source and binary forms, with or without
8336  * modification, are permitted provided that the following conditions
8337  * are met:
8338  *
8339  * 1. Redistributions of source code must retain the above copyright
8340  *    notice, this list of conditions and the following disclaimer.
8341  *
8342  * 2. Redistributions in binary form must reproduce the above copyright
8343  *    notice, this list of conditions and the following disclaimer in
8344  *    the documentation and/or other materials provided with the
8345  *    distribution.
8346  *
8347  * 3. All advertising materials mentioning features or use of this
8348  *    software must display the following acknowledgment:
8349  *    "This product includes software developed by the OpenSSL Project
8350  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8351  *
8352  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8353  *    endorse or promote products derived from this software without
8354  *    prior written permission. For written permission, please contact
8355  *    openssl-core@openssl.org.
8356  *
8357  * 5. Products derived from this software may not be called "OpenSSL"
8358  *    nor may "OpenSSL" appear in their names without prior written
8359  *    permission of the OpenSSL Project.
8360  *
8361  * 6. Redistributions of any form whatsoever must retain the following
8362  *    acknowledgment:
8363  *    "This product includes software developed by the OpenSSL Project
8364  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8365  *
8366  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8367  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8368  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8369  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8370  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8371  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8372  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8373  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8374  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8375  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8376  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8377  * OF THE POSSIBILITY OF SUCH DAMAGE.
8378  * ====================================================================
8379  *
8380  * This product includes cryptographic software written by Eric Young
8381  * (eay@cryptsoft.com).  This product includes software written by Tim
8382  * Hudson (tjh@cryptsoft.com).
8383  *
8384  */
8385 
8386 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8387 /* opensslconf.h */
8388 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8389 
8390 
8391 
8392 
8393 /* OpenSSL was configured with the following options: */
8394 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8395 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8396    asks for it.  This is a transient feature that is provided for those
8397    who haven't had the time to do the appropriate changes in their
8398    applications.  */
8399 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8400 /* crypto/opensslconf.h.in */
8401 
8402 /* Generate 80386 code? */
8403 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8404 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
8405 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
8406 typedef struct asn1_string_st ASN1_INTEGER;
8407 typedef struct asn1_string_st ASN1_ENUMERATED;
8408 typedef struct asn1_string_st ASN1_BIT_STRING;
8409 typedef struct asn1_string_st ASN1_OCTET_STRING;
8410 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
8411 typedef struct asn1_string_st ASN1_T61STRING;
8412 typedef struct asn1_string_st ASN1_IA5STRING;
8413 typedef struct asn1_string_st ASN1_GENERALSTRING;
8414 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
8415 typedef struct asn1_string_st ASN1_BMPSTRING;
8416 typedef struct asn1_string_st ASN1_UTCTIME;
8417 typedef struct asn1_string_st ASN1_TIME;
8418 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
8419 typedef struct asn1_string_st ASN1_VISIBLESTRING;
8420 typedef struct asn1_string_st ASN1_UTF8STRING;
8421 typedef struct asn1_string_st ASN1_STRING;
8422 typedef int ASN1_BOOLEAN;
8423 typedef int ASN1_NULL;
8424 
8425 
8426 typedef struct asn1_object_st ASN1_OBJECT;
8427 
8428 typedef struct ASN1_ITEM_st ASN1_ITEM;
8429 typedef struct asn1_pctx_st ASN1_PCTX;
8430 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
8431 typedef struct bignum_st BIGNUM;
8432 typedef struct bignum_ctx BN_CTX;
8433 typedef struct bn_blinding_st BN_BLINDING;
8434 typedef struct bn_mont_ctx_st BN_MONT_CTX;
8435 typedef struct bn_recp_ctx_st BN_RECP_CTX;
8436 typedef struct bn_gencb_st BN_GENCB;
8437 
8438 typedef struct buf_mem_st BUF_MEM;
8439 
8440 typedef struct evp_cipher_st EVP_CIPHER;
8441 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
8442 typedef struct env_md_st EVP_MD;
8443 typedef struct env_md_ctx_st EVP_MD_CTX;
8444 typedef struct evp_pkey_st EVP_PKEY;
8445 
8446 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
8447 
8448 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
8449 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
8450 
8451 typedef struct dh_st DH;
8452 typedef struct dh_method DH_METHOD;
8453 
8454 typedef struct dsa_st DSA;
8455 typedef struct dsa_method DSA_METHOD;
8456 
8457 typedef struct rsa_st RSA;
8458 typedef struct rsa_meth_st RSA_METHOD;
8459 
8460 typedef struct rand_meth_st RAND_METHOD;
8461 
8462 typedef struct ecdh_method ECDH_METHOD;
8463 typedef struct ecdsa_method ECDSA_METHOD;
8464 
8465 typedef struct x509_st X509;
8466 typedef struct X509_algor_st X509_ALGOR;
8467 typedef struct X509_crl_st X509_CRL;
8468 typedef struct x509_crl_method_st X509_CRL_METHOD;
8469 typedef struct x509_revoked_st X509_REVOKED;
8470 typedef struct X509_name_st X509_NAME;
8471 typedef struct X509_pubkey_st X509_PUBKEY;
8472 typedef struct x509_store_st X509_STORE;
8473 typedef struct x509_store_ctx_st X509_STORE_CTX;
8474 
8475 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
8476 
8477 typedef struct v3_ext_ctx X509V3_CTX;
8478 typedef struct conf_st CONF;
8479 
8480 typedef struct store_st STORE;
8481 typedef struct store_method_st STORE_METHOD;
8482 
8483 typedef struct ui_st UI;
8484 typedef struct ui_method_st UI_METHOD;
8485 
8486 typedef struct st_ERR_FNS ERR_FNS;
8487 
8488 typedef struct engine_st ENGINE;
8489 typedef struct ssl_st SSL;
8490 typedef struct ssl_ctx_st SSL_CTX;
8491 
8492 typedef struct comp_method_st COMP_METHOD;
8493 
8494 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
8495 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
8496 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
8497 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
8498 
8499 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
8500 typedef struct DIST_POINT_st DIST_POINT;
8501 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
8502 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
8503 
8504   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
8505 
8506 
8507 
8508 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
8509 /* Callback types for crypto.h */
8510 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
8511                            int idx, long argl, void *argp);
8512 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
8513                              int idx, long argl, void *argp);
8514 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
8515                            void *from_d, int idx, long argl, void *argp);
8516 
8517 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
8518 typedef struct ocsp_response_st OCSP_RESPONSE;
8519 typedef struct ocsp_responder_id_st OCSP_RESPID;
8520 # 132 "/usr/include/openssl/crypto.h" 2 3 4
8521 
8522 
8523 
8524 
8525 
8526 /*
8527  * Resolve problems on some operating systems with symbol names that clash
8528  * one way or another
8529  */
8530 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
8531 /* ====================================================================
8532  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8533  *
8534  * Redistribution and use in source and binary forms, with or without
8535  * modification, are permitted provided that the following conditions
8536  * are met:
8537  *
8538  * 1. Redistributions of source code must retain the above copyright
8539  *    notice, this list of conditions and the following disclaimer.
8540  *
8541  * 2. Redistributions in binary form must reproduce the above copyright
8542  *    notice, this list of conditions and the following disclaimer in
8543  *    the documentation and/or other materials provided with the
8544  *    distribution.
8545  *
8546  * 3. All advertising materials mentioning features or use of this
8547  *    software must display the following acknowledgment:
8548  *    "This product includes software developed by the OpenSSL Project
8549  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8550  *
8551  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8552  *    endorse or promote products derived from this software without
8553  *    prior written permission. For written permission, please contact
8554  *    openssl-core@openssl.org.
8555  *
8556  * 5. Products derived from this software may not be called "OpenSSL"
8557  *    nor may "OpenSSL" appear in their names without prior written
8558  *    permission of the OpenSSL Project.
8559  *
8560  * 6. Redistributions of any form whatsoever must retain the following
8561  *    acknowledgment:
8562  *    "This product includes software developed by the OpenSSL Project
8563  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8564  *
8565  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8566  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8567  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8568  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8569  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8570  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8571  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8572  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8573  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8574  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8575  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8576  * OF THE POSSIBILITY OF SUCH DAMAGE.
8577  * ====================================================================
8578  *
8579  * This product includes cryptographic software written by Eric Young
8580  * (eay@cryptsoft.com).  This product includes software written by Tim
8581  * Hudson (tjh@cryptsoft.com).
8582  *
8583  */
8584 
8585 
8586 
8587 
8588 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8589 /* e_os2.h */
8590 /* ====================================================================
8591  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8592  *
8593  * Redistribution and use in source and binary forms, with or without
8594  * modification, are permitted provided that the following conditions
8595  * are met:
8596  *
8597  * 1. Redistributions of source code must retain the above copyright
8598  *    notice, this list of conditions and the following disclaimer.
8599  *
8600  * 2. Redistributions in binary form must reproduce the above copyright
8601  *    notice, this list of conditions and the following disclaimer in
8602  *    the documentation and/or other materials provided with the
8603  *    distribution.
8604  *
8605  * 3. All advertising materials mentioning features or use of this
8606  *    software must display the following acknowledgment:
8607  *    "This product includes software developed by the OpenSSL Project
8608  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8609  *
8610  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8611  *    endorse or promote products derived from this software without
8612  *    prior written permission. For written permission, please contact
8613  *    openssl-core@openssl.org.
8614  *
8615  * 5. Products derived from this software may not be called "OpenSSL"
8616  *    nor may "OpenSSL" appear in their names without prior written
8617  *    permission of the OpenSSL Project.
8618  *
8619  * 6. Redistributions of any form whatsoever must retain the following
8620  *    acknowledgment:
8621  *    "This product includes software developed by the OpenSSL Project
8622  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8623  *
8624  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8625  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8626  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8627  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8628  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8629  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8630  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8631  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8632  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8633  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8634  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8635  * OF THE POSSIBILITY OF SUCH DAMAGE.
8636  * ====================================================================
8637  *
8638  * This product includes cryptographic software written by Eric Young
8639  * (eay@cryptsoft.com).  This product includes software written by Tim
8640  * Hudson (tjh@cryptsoft.com).
8641  *
8642  */
8643 
8644 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8645 /* opensslconf.h */
8646 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8647 
8648 
8649 
8650 
8651 /* OpenSSL was configured with the following options: */
8652 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8653 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8654    asks for it.  This is a transient feature that is provided for those
8655    who haven't had the time to do the appropriate changes in their
8656    applications.  */
8657 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8658 /* crypto/opensslconf.h.in */
8659 
8660 /* Generate 80386 code? */
8661 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8662 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
8663 
8664 /*
8665  * Hacks to solve the problem with linkers incapable of handling very long
8666  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
8667  * VAX.
8668  */
8669 /*
8670  * Note that this affects util/libeay.num and util/ssleay.num...  you may
8671  * change those manually, but that's not recommended, as those files are
8672  * controlled centrally and updated on Unix, and the central definition may
8673  * disagree with yours, which in turn may come with shareable library
8674  * incompatibilities.
8675  */
8676 # 481 "/usr/include/openssl/symhacks.h" 3 4
8677 /* Case insensitive linking causes problems.... */
8678 # 142 "/usr/include/openssl/crypto.h" 2 3 4
8679 
8680 
8681 
8682 
8683 
8684 /* Backward compatibility to SSLeay */
8685 /*
8686  * This is more to be used to check the correct DLL is being used in the MS
8687  * world.
8688  */
8689 
8690 
8691 /* #define SSLEAY_OPTIONS       1 no longer supported */
8692 
8693 
8694 
8695 
8696 
8697 /* Already declared in ossl_typ.h */
8698 # 174 "/usr/include/openssl/crypto.h" 3 4
8699 /* A generic structure to pass assorted data in a expandable way */
8700 typedef struct openssl_item_st {
8701     int code;
8702     void *value; /* Not used for flag attributes */
8703     size_t value_size; /* Max size of value for output, length for
8704                                  * input */
8705     size_t *value_length; /* Returned length of value for output */
8706 } OPENSSL_ITEM;
8707 
8708 /*
8709  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
8710  * names in cryptlib.c
8711  */
8712 # 256 "/usr/include/openssl/crypto.h" 3 4
8713 /*
8714  * Some applications as well as some parts of OpenSSL need to allocate and
8715  * deallocate locks in a dynamic fashion.  The following typedef makes this
8716  * possible in a type-safe manner.
8717  */
8718 /* struct CRYPTO_dynlock_value has to be defined by the application. */
8719 typedef struct {
8720     int references;
8721     struct CRYPTO_dynlock_value *data;
8722 } CRYPTO_dynlock;
8723 
8724 /*
8725  * The following can be used to detect memory leaks in the SSLeay library. It
8726  * used, it turns on malloc checking
8727  */
8728 
8729 
8730 
8731 
8732 
8733 
8734 /*
8735  * The following are bit values to turn on or off options connected to the
8736  * malloc checking functionality
8737  */
8738 
8739 /* Adds time to the memory checking information */
8740 
8741 /* Adds thread number to the memory checking information */
8742 
8743 
8744 
8745 
8746 /* predec of the BIO type */
8747 typedef struct bio_st BIO_dummy;
8748 
8749 struct crypto_ex_data_st {
8750     struct stack_st_void *sk;
8751     /* gcc is screwing up this data structure :-( */
8752     int dummy;
8753 };
8754 struct stack_st_void { _STACK stack; };
8755 
8756 /*
8757  * This stuff is basically class callback functions The current classes are
8758  * SSL_CTX, SSL, SSL_SESSION, and a few more
8759  */
8760 
8761 typedef struct crypto_ex_data_func_st {
8762     long argl; /* Arbitary long */
8763     void *argp; /* Arbitary void * */
8764     CRYPTO_EX_new *new_func;
8765     CRYPTO_EX_free *free_func;
8766     CRYPTO_EX_dup *dup_func;
8767 } CRYPTO_EX_DATA_FUNCS;
8768 
8769 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
8770 
8771 /*
8772  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
8773  * entry.
8774  */
8775 # 336 "/usr/include/openssl/crypto.h" 3 4
8776 /*
8777  * Dynamically assigned indexes start from this value (don't use directly,
8778  * use via CRYPTO_ex_data_new_class).
8779  */
8780 
8781 
8782 /*
8783  * This is the default callbacks, but we can have others as well: this is
8784  * needed in Win32 where the application malloc and the library malloc may
8785  * not be the same.
8786  */
8787 # 356 "/usr/include/openssl/crypto.h" 3 4
8788 /*
8789  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
8790  * is defined)
8791  */
8792 # 369 "/usr/include/openssl/crypto.h" 3 4
8793 int CRYPTO_mem_ctrl(int mode);
8794 int CRYPTO_is_mem_check_on(void);
8795 
8796 /* for applications */
8797 
8798 
8799 
8800 /* for library-internal use */
8801 # 396 "/usr/include/openssl/crypto.h" 3 4
8802 const char *SSLeay_version(int type);
8803 unsigned long SSLeay(void);
8804 
8805 int OPENSSL_issetugid(void);
8806 
8807 /* An opaque type representing an implementation of "ex_data" support */
8808 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
8809 /* Return an opaque pointer to the current "ex_data" implementation */
8810 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
8811 /* Sets the "ex_data" implementation to be used (if it's not too late) */
8812 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
8813 /* Get a new "ex_data" class, and return the corresponding "class_index" */
8814 int CRYPTO_ex_data_new_class(void);
8815 /* Within a given class, get/register a new index */
8816 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
8817                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
8818                             CRYPTO_EX_free *free_func);
8819 /*
8820  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
8821  * given class (invokes whatever per-class callbacks are applicable)
8822  */
8823 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
8824 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
8825                        CRYPTO_EX_DATA *from);
8826 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
8827 /*
8828  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
8829  * index (relative to the class type involved)
8830  */
8831 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
8832 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
8833 /*
8834  * This function cleans up all "ex_data" state. It mustn't be called under
8835  * potential race-conditions.
8836  */
8837 void CRYPTO_cleanup_all_ex_data(void);
8838 
8839 int CRYPTO_get_new_lockid(char *name);
8840 
8841 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
8842 void CRYPTO_lock(int mode, int type, const char *file, int line);
8843 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
8844                                                const char *file, int line));
8845 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
8846                                            const char *file, int line);
8847 void CRYPTO_set_add_lock_callback(int (*func)
8848                                    (int *num, int mount, int type,
8849                                     const char *file, int line));
8850 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
8851                                            const char *file, int line);
8852 
8853 /* Don't use this structure directly. */
8854 typedef struct crypto_threadid_st {
8855     void *ptr;
8856     unsigned long val;
8857 } CRYPTO_THREADID;
8858 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
8859 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
8860 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
8861 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
8862 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
8863 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
8864 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
8865 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
8866 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
8867 
8868 void CRYPTO_set_id_callback(unsigned long (*func) (void));
8869 unsigned long (*CRYPTO_get_id_callback(void)) (void);
8870 unsigned long CRYPTO_thread_id(void);
8871 
8872 
8873 const char *CRYPTO_get_lock_name(int type);
8874 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
8875                     int line);
8876 
8877 int CRYPTO_get_new_dynlockid(void);
8878 void CRYPTO_destroy_dynlockid(int i);
8879 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
8880 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
8881                                         *(*dyn_create_function) (const char
8882                                                                  *file,
8883                                                                  int line));
8884 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
8885                                        (int mode,
8886                                         struct CRYPTO_dynlock_value *l,
8887                                         const char *file, int line));
8888 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
8889                                           (struct CRYPTO_dynlock_value *l,
8890                                            const char *file, int line));
8891 struct CRYPTO_dynlock_value
8892 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
8893 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
8894                                                 struct CRYPTO_dynlock_value
8895                                                 *l, const char *file,
8896                                                 int line);
8897 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
8898                                                    *l, const char *file,
8899                                                    int line);
8900 
8901 /*
8902  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
8903  * the latter last if you need different functions
8904  */
8905 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
8906                              void (*f) (void *));
8907 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
8908                                     void (*free_func) (void *));
8909 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
8910                                 void *(*r) (void *, size_t, const char *,
8911                                             int), void (*f) (void *));
8912 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
8913                                        void (*free_func) (void *));
8914 int CRYPTO_set_mem_debug_functions(void (*m)
8915                                     (void *, int, const char *, int, int),
8916                                    void (*r) (void *, void *, int,
8917                                               const char *, int, int),
8918                                    void (*f) (void *, int), void (*so) (long),
8919                                    long (*go) (void));
8920 void CRYPTO_get_mem_functions(void *(**m) (size_t),
8921                               void *(**r) (void *, size_t),
8922                               void (**f) (void *));
8923 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
8924                                      void (**f) (void *));
8925 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
8926                                  void *(**r) (void *, size_t, const char *,
8927                                               int), void (**f) (void *));
8928 void CRYPTO_get_locked_mem_ex_functions(void
8929                                         *(**m) (size_t, const char *, int),
8930                                         void (**f) (void *));
8931 void CRYPTO_get_mem_debug_functions(void (**m)
8932                                      (void *, int, const char *, int, int),
8933                                     void (**r) (void *, void *, int,
8934                                                 const char *, int, int),
8935                                     void (**f) (void *, int),
8936                                     void (**so) (long), long (**go) (void));
8937 
8938 void *CRYPTO_malloc_locked(int num, const char *file, int line);
8939 void CRYPTO_free_locked(void *ptr);
8940 void *CRYPTO_malloc(int num, const char *file, int line);
8941 char *CRYPTO_strdup(const char *str, const char *file, int line);
8942 void CRYPTO_free(void *ptr);
8943 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
8944 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
8945                            int line);
8946 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
8947 
8948 void OPENSSL_cleanse(void *ptr, size_t len);
8949 
8950 void CRYPTO_set_mem_debug_options(long bits);
8951 long CRYPTO_get_mem_debug_options(void);
8952 
8953 
8954 
8955 int CRYPTO_push_info_(const char *info, const char *file, int line);
8956 int CRYPTO_pop_info(void);
8957 int CRYPTO_remove_all_info(void);
8958 
8959 /*
8960  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
8961  * used as default in CRYPTO_MDEBUG compilations):
8962  */
8963 /*-
8964  * The last argument has the following significance:
8965  *
8966  * 0:   called before the actual memory allocation has taken place
8967  * 1:   called after the actual memory allocation has taken place
8968  */
8969 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
8970                        int before_p);
8971 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
8972                         int line, int before_p);
8973 void CRYPTO_dbg_free(void *addr, int before_p);
8974 /*-
8975  * Tell the debugging code about options.  By default, the following values
8976  * apply:
8977  *
8978  * 0:                           Clear all options.
8979  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
8980  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
8981  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
8982  */
8983 void CRYPTO_dbg_set_options(long bits);
8984 long CRYPTO_dbg_get_options(void);
8985 
8986 
8987 void CRYPTO_mem_leaks_fp(FILE *);
8988 
8989 void CRYPTO_mem_leaks(struct bio_st *bio);
8990 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
8991 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
8992                                   void *);
8993 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
8994 
8995 /* die if we have to */
8996 void OpenSSLDie(const char *file, int line, const char *assertion);
8997 
8998 
8999 unsigned long *OPENSSL_ia32cap_loc(void);
9000 
9001 int OPENSSL_isservice(void);
9002 
9003 int FIPS_mode(void);
9004 int FIPS_mode_set(int r);
9005 
9006 void OPENSSL_init(void);
9007 # 624 "/usr/include/openssl/crypto.h" 3 4
9008 /*
9009  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
9010  * It takes an amount of time dependent on |len|, but independent of the
9011  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
9012  * into a defined order as the return value when a != b is undefined, other
9013  * than to be non-zero.
9014  */
9015 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
9016 
9017 /* BEGIN ERROR CODES */
9018 /*
9019  * The following lines are auto generated by the script mkerr.pl. Any changes
9020  * made after this point may be overwritten when the script is next run.
9021  */
9022 void ERR_load_CRYPTO_strings(void);
9023 
9024 /* Error codes for the CRYPTO functions. */
9025 
9026 /* Function codes. */
9027 # 654 "/usr/include/openssl/crypto.h" 3 4
9028 /* Reason codes. */
9029 # 70 "/usr/include/openssl/bio.h" 2 3 4
9030 # 83 "/usr/include/openssl/bio.h" 3 4
9031 /* These are the 'types' of BIOs */
9032 # 116 "/usr/include/openssl/bio.h" 3 4
9033 /*
9034  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
9035  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
9036  */
9037 
9038 
9039 
9040 /*
9041  * These are used in the following macros and are passed to BIO_ctrl()
9042  */
9043 # 139 "/usr/include/openssl/bio.h" 3 4
9044 /* callback is int cb(BIO *bio,state,ret); */
9045 
9046 
9047 
9048 
9049 
9050 /* dgram BIO stuff */
9051 # 157 "/usr/include/openssl/bio.h" 3 4
9052 /* #ifdef IP_MTU_DISCOVER */
9053 
9054 /* #endif */
9055 # 196 "/usr/include/openssl/bio.h" 3 4
9056 /* modifiers */
9057 # 208 "/usr/include/openssl/bio.h" 3 4
9058 /*
9059  * "UPLINK" flag denotes file descriptors provided by application. It
9060  * defaults to 0, as most platforms don't require UPLINK interface.
9061  */
9062 
9063 
9064 
9065 /* Used in BIO_gethostbyname() */
9066 
9067 
9068 
9069 
9070 
9071 
9072 /* Mostly used in the SSL BIO */
9073 /*-
9074  * Not used anymore
9075  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
9076  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
9077  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
9078  */
9079 
9080 
9081 
9082 /*
9083  * This is used with memory BIOs: it means we shouldn't free up or change the
9084  * data in any way.
9085  */
9086 
9087 
9088 typedef struct bio_st BIO;
9089 
9090 void BIO_set_flags(BIO *b, int flags);
9091 int BIO_test_flags(const BIO *b, int flags);
9092 void BIO_clear_flags(BIO *b, int flags);
9093 # 252 "/usr/include/openssl/bio.h" 3 4
9094 /* These are normally used internally in BIOs */
9095 
9096 
9097 
9098 
9099 
9100 /* These should be used by the application to tell why we should retry */
9101 
9102 
9103 
9104 
9105 
9106 
9107 /*
9108  * The next three are used in conjunction with the BIO_should_io_special()
9109  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
9110  * *reason); will walk the BIO stack and return the 'reason' for the special
9111  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
9112  * the code.
9113  */
9114 /*
9115  * Returned from the SSL bio when the certificate retrieval code had an error
9116  */
9117 
9118 /* Returned from the connect BIO when a connect would have blocked */
9119 
9120 /* Returned from the accept BIO when an accept would have blocked */
9121 
9122 
9123 /* These are passed by the BIO callback */
9124 
9125 
9126 
9127 
9128 
9129 
9130 
9131 /*
9132  * The callback is called before and after the underling operation, The
9133  * BIO_CB_RETURN flag indicates if it is after the call
9134  */
9135 
9136 
9137 
9138 
9139 
9140 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
9141                                         int, long, long);
9142 void BIO_set_callback(BIO *b,
9143                       long (*callback) (struct bio_st *, int, const char *,
9144                                         int, long, long));
9145 char *BIO_get_callback_arg(const BIO *b);
9146 void BIO_set_callback_arg(BIO *b, char *arg);
9147 
9148 const char *BIO_method_name(const BIO *b);
9149 int BIO_method_type(const BIO *b);
9150 
9151 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
9152                           long);
9153 
9154 typedef struct bio_method_st {
9155     int type;
9156     const char *name;
9157     int (*bwrite) (BIO *, const char *, int);
9158     int (*bread) (BIO *, char *, int);
9159     int (*bputs) (BIO *, const char *);
9160     int (*bgets) (BIO *, char *, int);
9161     long (*ctrl) (BIO *, int, long, void *);
9162     int (*create) (BIO *);
9163     int (*destroy) (BIO *);
9164     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
9165 } BIO_METHOD;
9166 
9167 struct bio_st {
9168     BIO_METHOD *method;
9169     /* bio, mode, argp, argi, argl, ret */
9170     long (*callback) (struct bio_st *, int, const char *, int, long, long);
9171     char *cb_arg; /* first argument for the callback */
9172     int init;
9173     int shutdown;
9174     int flags; /* extra storage */
9175     int retry_reason;
9176     int num;
9177     void *ptr;
9178     struct bio_st *next_bio; /* used by filter BIOs */
9179     struct bio_st *prev_bio; /* used by filter BIOs */
9180     int references;
9181     unsigned long num_read;
9182     unsigned long num_write;
9183     CRYPTO_EX_DATA ex_data;
9184 };
9185 
9186 struct stack_st_BIO { _STACK stack; };
9187 
9188 typedef struct bio_f_buffer_ctx_struct {
9189     /*-
9190      * Buffers are setup like this:
9191      *
9192      * <---------------------- size ----------------------->
9193      * +---------------------------------------------------+
9194      * | consumed | remaining          | free space        |
9195      * +---------------------------------------------------+
9196      * <-- off --><------- len ------->
9197      */
9198     /*- BIO *bio; *//*
9199      * this is now in the BIO struct
9200      */
9201     int ibuf_size; /* how big is the input buffer */
9202     int obuf_size; /* how big is the output buffer */
9203     char *ibuf; /* the char array */
9204     int ibuf_len; /* how many bytes are in it */
9205     int ibuf_off; /* write/read offset */
9206     char *obuf; /* the char array */
9207     int obuf_len; /* how many bytes are in it */
9208     int obuf_off; /* write/read offset */
9209 } BIO_F_BUFFER_CTX;
9210 
9211 /* Prefix and suffix callback in ASN1 BIO */
9212 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
9213                           void *parg);
9214 # 398 "/usr/include/openssl/bio.h" 3 4
9215 /* connect BIO stuff */
9216 # 407 "/usr/include/openssl/bio.h" 3 4
9217 /*
9218  * #define BIO_CONN_get_param_hostname BIO_ctrl
9219  */
9220 # 474 "/usr/include/openssl/bio.h" 3 4
9221 /* BIO_s_connect() and BIO_s_socks4a_connect() */
9222 # 486 "/usr/include/openssl/bio.h" 3 4
9223 /* BIO_s_accept() */
9224 
9225 
9226 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
9227 # 499 "/usr/include/openssl/bio.h" 3 4
9228 /* BIO_s_accept() and BIO_s_connect() */
9229 
9230 
9231 
9232 
9233 /* BIO_s_proxy_client() */
9234 
9235 
9236 /* BIO_set_nbio(b,n) */
9237 
9238 /* BIO *BIO_get_filter_bio(BIO *bio); */
9239 # 519 "/usr/include/openssl/bio.h" 3 4
9240 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
9241 
9242 
9243 
9244 /* BIO_s_file() */
9245 
9246 
9247 
9248 /* BIO_s_fd() and BIO_s_file() */
9249 
9250 
9251 
9252 /*
9253  * name is cast to lose const, but might be better to route through a
9254  * function so we can do it safely
9255  */
9256 # 552 "/usr/include/openssl/bio.h" 3 4
9257 /*
9258  * WARNING WARNING, this ups the reference count on the read bio of the SSL
9259  * structure.  This is because the ssl read BIO is now pointed to by the
9260  * next_bio field in the bio.  So when you free the BIO, make sure you are
9261  * doing a BIO_free_all() to catch the underlying BIO.
9262  */
9263 # 568 "/usr/include/openssl/bio.h" 3 4
9264 /* defined in evp.h */
9265 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
9266 
9267 
9268 
9269 
9270 
9271 
9272 
9273 /* For the BIO_f_buffer() type */
9274 
9275 
9276 
9277 
9278 
9279 
9280 /* Don't use the next one unless you know what you are doing :-) */
9281 # 593 "/usr/include/openssl/bio.h" 3 4
9282 /* ...pending macros have inappropriate return type */
9283 size_t BIO_ctrl_pending(BIO *b);
9284 size_t BIO_ctrl_wpending(BIO *b);
9285 
9286 
9287 
9288 
9289 
9290 /* For the BIO_f_buffer() type */
9291 
9292 
9293 /* For BIO_s_bio() */
9294 
9295 
9296 
9297 
9298 
9299 /* macros with inappropriate type -- but ...pending macros use int too: */
9300 
9301 
9302 size_t BIO_ctrl_get_write_guarantee(BIO *b);
9303 size_t BIO_ctrl_get_read_request(BIO *b);
9304 int BIO_ctrl_reset_read_request(BIO *b);
9305 
9306 /* ctrl macros for dgram */
9307 # 633 "/usr/include/openssl/bio.h" 3 4
9308 /* These two aren't currently implemented */
9309 /* int BIO_get_ex_num(BIO *bio); */
9310 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
9311 int BIO_set_ex_data(BIO *bio, int idx, void *data);
9312 void *BIO_get_ex_data(BIO *bio, int idx);
9313 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
9314                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
9315 unsigned long BIO_number_read(BIO *bio);
9316 unsigned long BIO_number_written(BIO *bio);
9317 
9318 /* For BIO_f_asn1() */
9319 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
9320                         asn1_ps_func *prefix_free);
9321 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
9322                         asn1_ps_func **pprefix_free);
9323 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
9324                         asn1_ps_func *suffix_free);
9325 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
9326                         asn1_ps_func **psuffix_free);
9327 
9328 
9329 BIO_METHOD *BIO_s_file(void);
9330 BIO *BIO_new_file(const char *filename, const char *mode);
9331 BIO *BIO_new_fp(FILE *stream, int close_flag);
9332 
9333 
9334 BIO *BIO_new(BIO_METHOD *type);
9335 int BIO_set(BIO *a, BIO_METHOD *type);
9336 int BIO_free(BIO *a);
9337 void BIO_vfree(BIO *a);
9338 int BIO_read(BIO *b, void *data, int len);
9339 int BIO_gets(BIO *bp, char *buf, int size);
9340 int BIO_write(BIO *b, const void *data, int len);
9341 int BIO_puts(BIO *bp, const char *buf);
9342 int BIO_indent(BIO *b, int indent, int max);
9343 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
9344 long BIO_callback_ctrl(BIO *b, int cmd,
9345                        void (*fp) (struct bio_st *, int, const char *, int,
9346                                    long, long));
9347 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
9348 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
9349 BIO *BIO_push(BIO *b, BIO *append);
9350 BIO *BIO_pop(BIO *b);
9351 void BIO_free_all(BIO *a);
9352 BIO *BIO_find_type(BIO *b, int bio_type);
9353 BIO *BIO_next(BIO *b);
9354 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
9355 int BIO_get_retry_reason(BIO *bio);
9356 BIO *BIO_dup_chain(BIO *in);
9357 
9358 int BIO_nread0(BIO *bio, char **buf);
9359 int BIO_nread(BIO *bio, char **buf, int num);
9360 int BIO_nwrite0(BIO *bio, char **buf);
9361 int BIO_nwrite(BIO *bio, char **buf, int num);
9362 
9363 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
9364                         long argl, long ret);
9365 
9366 BIO_METHOD *BIO_s_mem(void);
9367 BIO *BIO_new_mem_buf(const void *buf, int len);
9368 BIO_METHOD *BIO_s_socket(void);
9369 BIO_METHOD *BIO_s_connect(void);
9370 BIO_METHOD *BIO_s_accept(void);
9371 BIO_METHOD *BIO_s_fd(void);
9372 
9373 BIO_METHOD *BIO_s_log(void);
9374 
9375 BIO_METHOD *BIO_s_bio(void);
9376 BIO_METHOD *BIO_s_null(void);
9377 BIO_METHOD *BIO_f_null(void);
9378 BIO_METHOD *BIO_f_buffer(void);
9379 
9380 
9381 
9382 BIO_METHOD *BIO_f_nbio_test(void);
9383 
9384 BIO_METHOD *BIO_s_datagram(void);
9385 
9386 
9387 
9388 
9389 
9390 /* BIO_METHOD *BIO_f_ber(void); */
9391 
9392 int BIO_sock_should_retry(int i);
9393 int BIO_sock_non_fatal_error(int error);
9394 int BIO_dgram_non_fatal_error(int error);
9395 
9396 int BIO_fd_should_retry(int i);
9397 int BIO_fd_non_fatal_error(int error);
9398 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
9399                 void *u, const char *s, int len);
9400 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
9401                        void *u, const char *s, int len, int indent);
9402 int BIO_dump(BIO *b, const char *bytes, int len);
9403 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
9404 
9405 int BIO_dump_fp(FILE *fp, const char *s, int len);
9406 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
9407 
9408 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
9409                    int datalen);
9410 
9411 struct hostent *BIO_gethostbyname(const char *name);
9412 /*-
9413  * We might want a thread-safe interface too:
9414  * struct hostent *BIO_gethostbyname_r(const char *name,
9415  *     struct hostent *result, void *buffer, size_t buflen);
9416  * or something similar (caller allocates a struct hostent,
9417  * pointed to by "result", and additional buffer space for the various
9418  * substructures; if the buffer does not suffice, NULL is returned
9419  * and an appropriate error code is set).
9420  */
9421 int BIO_sock_error(int sock);
9422 int BIO_socket_ioctl(int fd, long type, void *arg);
9423 int BIO_socket_nbio(int fd, int mode);
9424 int BIO_get_port(const char *str, unsigned short *port_ptr);
9425 int BIO_get_host_ip(const char *str, unsigned char *ip);
9426 int BIO_get_accept_socket(char *host_port, int mode);
9427 int BIO_accept(int sock, char **ip_port);
9428 int BIO_sock_init(void);
9429 void BIO_sock_cleanup(void);
9430 int BIO_set_tcp_ndelay(int sock, int turn_on);
9431 
9432 BIO *BIO_new_socket(int sock, int close_flag);
9433 BIO *BIO_new_dgram(int fd, int close_flag);
9434 # 771 "/usr/include/openssl/bio.h" 3 4
9435 BIO *BIO_new_fd(int fd, int close_flag);
9436 BIO *BIO_new_connect(const char *host_port);
9437 BIO *BIO_new_accept(const char *host_port);
9438 
9439 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
9440                      BIO **bio2, size_t writebuf2);
9441 /*
9442  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
9443  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
9444  * value.
9445  */
9446 
9447 void BIO_copy_next_retry(BIO *b);
9448 
9449 /*
9450  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
9451  */
9452 
9453 
9454 
9455 
9456 
9457 
9458 int BIO_printf(BIO *bio, const char *format, ...)
9459 __attribute__((__format__(__printf__, 2, 3)));
9460 int BIO_vprintf(BIO *bio, const char *format, va_list args)
9461 __attribute__((__format__(__printf__, 2, 0)));
9462 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
9463 __attribute__((__format__(__printf__, 3, 4)));
9464 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
9465 __attribute__((__format__(__printf__, 3, 0)));
9466 
9467 
9468 /* BEGIN ERROR CODES */
9469 /*
9470  * The following lines are auto generated by the script mkerr.pl. Any changes
9471  * made after this point may be overwritten when the script is next run.
9472  */
9473 void ERR_load_BIO_strings(void);
9474 
9475 /* Error codes for the BIO functions. */
9476 
9477 /* Function codes. */
9478 # 849 "/usr/include/openssl/bio.h" 3 4
9479 /* Reason codes. */
9480 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
9481 # 1 "/usr/include/openssl/x509.h" 1 3 4
9482 /* crypto/x509/x509.h */
9483 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9484  * All rights reserved.
9485  *
9486  * This package is an SSL implementation written
9487  * by Eric Young (eay@cryptsoft.com).
9488  * The implementation was written so as to conform with Netscapes SSL.
9489  *
9490  * This library is free for commercial and non-commercial use as long as
9491  * the following conditions are aheared to.  The following conditions
9492  * apply to all code found in this distribution, be it the RC4, RSA,
9493  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9494  * included with this distribution is covered by the same copyright terms
9495  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9496  *
9497  * Copyright remains Eric Young's, and as such any Copyright notices in
9498  * the code are not to be removed.
9499  * If this package is used in a product, Eric Young should be given attribution
9500  * as the author of the parts of the library used.
9501  * This can be in the form of a textual message at program startup or
9502  * in documentation (online or textual) provided with the package.
9503  *
9504  * Redistribution and use in source and binary forms, with or without
9505  * modification, are permitted provided that the following conditions
9506  * are met:
9507  * 1. Redistributions of source code must retain the copyright
9508  *    notice, this list of conditions and the following disclaimer.
9509  * 2. Redistributions in binary form must reproduce the above copyright
9510  *    notice, this list of conditions and the following disclaimer in the
9511  *    documentation and/or other materials provided with the distribution.
9512  * 3. All advertising materials mentioning features or use of this software
9513  *    must display the following acknowledgement:
9514  *    "This product includes cryptographic software written by
9515  *     Eric Young (eay@cryptsoft.com)"
9516  *    The word 'cryptographic' can be left out if the rouines from the library
9517  *    being used are not cryptographic related :-).
9518  * 4. If you include any Windows specific code (or a derivative thereof) from
9519  *    the apps directory (application code) you must include an acknowledgement:
9520  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9521  *
9522  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9523  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9524  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9525  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9526  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9527  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9528  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9529  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9530  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9531  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9532  * SUCH DAMAGE.
9533  *
9534  * The licence and distribution terms for any publically available version or
9535  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9536  * copied and put under another distribution licence
9537  * [including the GNU Public Licence.]
9538  */
9539 /* ====================================================================
9540  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
9541  * ECDH support in OpenSSL originally developed by
9542  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
9543  */
9544 
9545 
9546 
9547 
9548 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9549 /* e_os2.h */
9550 /* ====================================================================
9551  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9552  *
9553  * Redistribution and use in source and binary forms, with or without
9554  * modification, are permitted provided that the following conditions
9555  * are met:
9556  *
9557  * 1. Redistributions of source code must retain the above copyright
9558  *    notice, this list of conditions and the following disclaimer.
9559  *
9560  * 2. Redistributions in binary form must reproduce the above copyright
9561  *    notice, this list of conditions and the following disclaimer in
9562  *    the documentation and/or other materials provided with the
9563  *    distribution.
9564  *
9565  * 3. All advertising materials mentioning features or use of this
9566  *    software must display the following acknowledgment:
9567  *    "This product includes software developed by the OpenSSL Project
9568  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9569  *
9570  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9571  *    endorse or promote products derived from this software without
9572  *    prior written permission. For written permission, please contact
9573  *    openssl-core@openssl.org.
9574  *
9575  * 5. Products derived from this software may not be called "OpenSSL"
9576  *    nor may "OpenSSL" appear in their names without prior written
9577  *    permission of the OpenSSL Project.
9578  *
9579  * 6. Redistributions of any form whatsoever must retain the following
9580  *    acknowledgment:
9581  *    "This product includes software developed by the OpenSSL Project
9582  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9583  *
9584  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9585  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9586  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9587  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9588  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9589  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9590  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9591  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9592  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9593  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9594  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9595  * OF THE POSSIBILITY OF SUCH DAMAGE.
9596  * ====================================================================
9597  *
9598  * This product includes cryptographic software written by Eric Young
9599  * (eay@cryptsoft.com).  This product includes software written by Tim
9600  * Hudson (tjh@cryptsoft.com).
9601  *
9602  */
9603 
9604 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9605 /* opensslconf.h */
9606 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9607 
9608 
9609 
9610 
9611 /* OpenSSL was configured with the following options: */
9612 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9613 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9614    asks for it.  This is a transient feature that is provided for those
9615    who haven't had the time to do the appropriate changes in their
9616    applications.  */
9617 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9618 /* crypto/opensslconf.h.in */
9619 
9620 /* Generate 80386 code? */
9621 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9622 # 68 "/usr/include/openssl/x509.h" 2 3 4
9623 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
9624 /* ====================================================================
9625  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
9626  *
9627  * Redistribution and use in source and binary forms, with or without
9628  * modification, are permitted provided that the following conditions
9629  * are met:
9630  *
9631  * 1. Redistributions of source code must retain the above copyright
9632  *    notice, this list of conditions and the following disclaimer.
9633  *
9634  * 2. Redistributions in binary form must reproduce the above copyright
9635  *    notice, this list of conditions and the following disclaimer in
9636  *    the documentation and/or other materials provided with the
9637  *    distribution.
9638  *
9639  * 3. All advertising materials mentioning features or use of this
9640  *    software must display the following acknowledgment:
9641  *    "This product includes software developed by the OpenSSL Project
9642  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9643  *
9644  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9645  *    endorse or promote products derived from this software without
9646  *    prior written permission. For written permission, please contact
9647  *    openssl-core@openssl.org.
9648  *
9649  * 5. Products derived from this software may not be called "OpenSSL"
9650  *    nor may "OpenSSL" appear in their names without prior written
9651  *    permission of the OpenSSL Project.
9652  *
9653  * 6. Redistributions of any form whatsoever must retain the following
9654  *    acknowledgment:
9655  *    "This product includes software developed by the OpenSSL Project
9656  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9657  *
9658  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9659  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9660  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9661  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9662  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9663  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9664  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9665  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9666  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9667  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9668  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9669  * OF THE POSSIBILITY OF SUCH DAMAGE.
9670  * ====================================================================
9671  *
9672  * This product includes cryptographic software written by Eric Young
9673  * (eay@cryptsoft.com).  This product includes software written by Tim
9674  * Hudson (tjh@cryptsoft.com).
9675  *
9676  */
9677 # 69 "/usr/include/openssl/x509.h" 2 3 4
9678 
9679 # 1 "/usr/include/openssl/buffer.h" 1 3 4
9680 /* crypto/buffer/buffer.h */
9681 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9682  * All rights reserved.
9683  *
9684  * This package is an SSL implementation written
9685  * by Eric Young (eay@cryptsoft.com).
9686  * The implementation was written so as to conform with Netscapes SSL.
9687  *
9688  * This library is free for commercial and non-commercial use as long as
9689  * the following conditions are aheared to.  The following conditions
9690  * apply to all code found in this distribution, be it the RC4, RSA,
9691  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9692  * included with this distribution is covered by the same copyright terms
9693  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9694  *
9695  * Copyright remains Eric Young's, and as such any Copyright notices in
9696  * the code are not to be removed.
9697  * If this package is used in a product, Eric Young should be given attribution
9698  * as the author of the parts of the library used.
9699  * This can be in the form of a textual message at program startup or
9700  * in documentation (online or textual) provided with the package.
9701  *
9702  * Redistribution and use in source and binary forms, with or without
9703  * modification, are permitted provided that the following conditions
9704  * are met:
9705  * 1. Redistributions of source code must retain the copyright
9706  *    notice, this list of conditions and the following disclaimer.
9707  * 2. Redistributions in binary form must reproduce the above copyright
9708  *    notice, this list of conditions and the following disclaimer in the
9709  *    documentation and/or other materials provided with the distribution.
9710  * 3. All advertising materials mentioning features or use of this software
9711  *    must display the following acknowledgement:
9712  *    "This product includes cryptographic software written by
9713  *     Eric Young (eay@cryptsoft.com)"
9714  *    The word 'cryptographic' can be left out if the rouines from the library
9715  *    being used are not cryptographic related :-).
9716  * 4. If you include any Windows specific code (or a derivative thereof) from
9717  *    the apps directory (application code) you must include an acknowledgement:
9718  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9719  *
9720  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9721  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9722  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9723  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9724  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9725  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9726  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9727  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9728  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9729  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9730  * SUCH DAMAGE.
9731  *
9732  * The licence and distribution terms for any publically available version or
9733  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9734  * copied and put under another distribution licence
9735  * [including the GNU Public Licence.]
9736  */
9737 
9738 
9739 
9740 
9741 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
9742 /* ====================================================================
9743  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
9744  *
9745  * Redistribution and use in source and binary forms, with or without
9746  * modification, are permitted provided that the following conditions
9747  * are met:
9748  *
9749  * 1. Redistributions of source code must retain the above copyright
9750  *    notice, this list of conditions and the following disclaimer.
9751  *
9752  * 2. Redistributions in binary form must reproduce the above copyright
9753  *    notice, this list of conditions and the following disclaimer in
9754  *    the documentation and/or other materials provided with the
9755  *    distribution.
9756  *
9757  * 3. All advertising materials mentioning features or use of this
9758  *    software must display the following acknowledgment:
9759  *    "This product includes software developed by the OpenSSL Project
9760  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9761  *
9762  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9763  *    endorse or promote products derived from this software without
9764  *    prior written permission. For written permission, please contact
9765  *    openssl-core@openssl.org.
9766  *
9767  * 5. Products derived from this software may not be called "OpenSSL"
9768  *    nor may "OpenSSL" appear in their names without prior written
9769  *    permission of the OpenSSL Project.
9770  *
9771  * 6. Redistributions of any form whatsoever must retain the following
9772  *    acknowledgment:
9773  *    "This product includes software developed by the OpenSSL Project
9774  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9775  *
9776  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9777  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9778  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9779  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9780  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9781  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9782  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9783  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9784  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9785  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9786  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9787  * OF THE POSSIBILITY OF SUCH DAMAGE.
9788  * ====================================================================
9789  *
9790  * This product includes cryptographic software written by Eric Young
9791  * (eay@cryptsoft.com).  This product includes software written by Tim
9792  * Hudson (tjh@cryptsoft.com).
9793  *
9794  */
9795 # 63 "/usr/include/openssl/buffer.h" 2 3 4
9796 
9797 
9798 
9799 
9800 
9801 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
9802 /*
9803  * CDDL HEADER START
9804  *
9805  * The contents of this file are subject to the terms of the
9806  * Common Development and Distribution License, Version 1.0 only
9807  * (the "License").  You may not use this file except in compliance
9808  * with the License.
9809  *
9810  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9811  * or http://www.opensolaris.org/os/licensing.
9812  * See the License for the specific language governing permissions
9813  * and limitations under the License.
9814  *
9815  * When distributing Covered Code, include this CDDL HEADER in each
9816  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9817  * If applicable, add the following below this CDDL HEADER, with the
9818  * fields enclosed by brackets "[]" replaced with your own identifying
9819  * information: Portions Copyright [yyyy] [name of copyright owner]
9820  *
9821  * CDDL HEADER END
9822  */
9823 /*	Copyright (c) 1988 AT&T	*/
9824 /*	  All Rights Reserved  	*/
9825 
9826 
9827 /*
9828  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9829  * Use is subject to license terms.
9830  */
9831 
9832 
9833 
9834 
9835 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
9836 /*
9837  * CDDL HEADER START
9838  *
9839  * The contents of this file are subject to the terms of the
9840  * Common Development and Distribution License (the "License").
9841  * You may not use this file except in compliance with the License.
9842  *
9843  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9844  * or http://www.opensolaris.org/os/licensing.
9845  * See the License for the specific language governing permissions
9846  * and limitations under the License.
9847  *
9848  *
9849  * When distributing Covered Code, include this CDDL HEADER in each
9850  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9851  * If applicable, add the following below this CDDL HEADER, with the
9852  * fields enclosed by brackets "[]" replaced with your own identifying
9853  * information: Portions Copyright [yyyy] [name of copyright owner]
9854  *
9855  * CDDL HEADER END
9856  */
9857 
9858 /*
9859  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9860  * Use is subject to license terms.
9861  * Copyright 2016 Joyent, Inc.
9862  */
9863 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
9864 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
9865 /*
9866  * CDDL HEADER START
9867  *
9868  * The contents of this file are subject to the terms of the
9869  * Common Development and Distribution License, Version 1.0 only
9870  * (the "License").  You may not use this file except in compliance
9871  * with the License.
9872  *
9873  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9874  * or http://www.opensolaris.org/os/licensing.
9875  * See the License for the specific language governing permissions
9876  * and limitations under the License.
9877  *
9878  * When distributing Covered Code, include this CDDL HEADER in each
9879  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9880  * If applicable, add the following below this CDDL HEADER, with the
9881  * fields enclosed by brackets "[]" replaced with your own identifying
9882  * information: Portions Copyright [yyyy] [name of copyright owner]
9883  *
9884  * CDDL HEADER END
9885  */
9886 /*	Copyright (c) 1988 AT&T	*/
9887 /*	  All Rights Reserved  	*/
9888 
9889 
9890 /*
9891  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
9892  * Use is subject to license terms.
9893  */
9894 
9895 /*
9896  * Copyright 2014 PALO, Richard.
9897  * Copyright 2016 Joyent, Inc.
9898  */
9899 
9900 /*
9901  * An application should not include this header directly.  Instead it
9902  * should be included only through the inclusion of other Sun headers.
9903  *
9904  * The contents of this header is limited to identifiers specified in the
9905  * C Standard.  Any new identifiers specified in future amendments to the
9906  * C Standard must be placed in this header.  If these new identifiers
9907  * are required to also be in the C++ Standard "std" namespace, then for
9908  * anything other than macro definitions, corresponding "using" directives
9909  * must also be added to <stddef.h.h>.
9910  */
9911 
9912 
9913 
9914 
9915 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
9916 /*
9917  * CDDL HEADER START
9918  *
9919  * The contents of this file are subject to the terms of the
9920  * Common Development and Distribution License (the "License").
9921  * You may not use this file except in compliance with the License.
9922  *
9923  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9924  * or http://www.opensolaris.org/os/licensing.
9925  * See the License for the specific language governing permissions
9926  * and limitations under the License.
9927  *
9928  *
9929  * When distributing Covered Code, include this CDDL HEADER in each
9930  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9931  * If applicable, add the following below this CDDL HEADER, with the
9932  * fields enclosed by brackets "[]" replaced with your own identifying
9933  * information: Portions Copyright [yyyy] [name of copyright owner]
9934  *
9935  * CDDL HEADER END
9936  */
9937 
9938 /*
9939  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9940  * Use is subject to license terms.
9941  * Copyright 2016 Joyent, Inc.
9942  */
9943 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
9944 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
9945 /*
9946  * CDDL HEADER START
9947  *
9948  * The contents of this file are subject to the terms of the
9949  * Common Development and Distribution License (the "License").
9950  * You may not use this file except in compliance with the License.
9951  *
9952  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9953  * or http://www.opensolaris.org/os/licensing.
9954  * See the License for the specific language governing permissions
9955  * and limitations under the License.
9956  *
9957  * When distributing Covered Code, include this CDDL HEADER in each
9958  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9959  * If applicable, add the following below this CDDL HEADER, with the
9960  * fields enclosed by brackets "[]" replaced with your own identifying
9961  * information: Portions Copyright [yyyy] [name of copyright owner]
9962  *
9963  * CDDL HEADER END
9964  */
9965 
9966 /*
9967  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
9968  * Copyright 2016 Joyent, Inc.
9969  *
9970  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
9971  * Use is subject to license terms.
9972  */
9973 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
9974 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
9975 /*
9976  * This file and its contents are supplied under the terms of the
9977  * Common Development and Distribution License ("CDDL"), version 1.0.
9978  * You may only use this file in accordance with the terms of version
9979  * 1.0 of the CDDL.
9980  *
9981  * A full copy of the text of the CDDL should have accompanied this
9982  * source.  A copy of the CDDL is also available via the Internet at
9983  * http://www.illumos.org/license/CDDL.
9984  */
9985 
9986 /*
9987  * Copyright 2014-2016 PALO, Richard.
9988  */
9989 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
9990 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
9991 typedef long max_align_t;
9992 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
9993 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
9994 /*
9995  * This file and its contents are supplied under the terms of the
9996  * Common Development and Distribution License ("CDDL"), version 1.0.
9997  * You may only use this file in accordance with the terms of version
9998  * 1.0 of the CDDL.
9999  *
10000  * A full copy of the text of the CDDL should have accompanied this
10001  * source.  A copy of the CDDL is also available via the Internet at
10002  * http://www.illumos.org/license/CDDL.
10003  */
10004 
10005 /*
10006  * Copyright 2017 Toomas Soome <tsoome@me.com>
10007  */
10008 
10009 
10010 
10011 
10012 /*
10013  * Commonly used macros and definitions.
10014  */
10015 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
10016 /*
10017  * We must not expose container_of() to userland, but we want it
10018  * to be available for early boot and for the kernel.
10019  */
10020 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
10021 
10022 /*
10023  * Allow global visibility for symbols defined in
10024  * C++ "std" namespace in <iso/stddef_iso.h>.
10025  */
10026 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
10027 /*
10028  * wchar_t is a built-in type in standard C++ and as such is not
10029  * defined here when using standard C++. However, the GNU compiler
10030  * fixincludes utility nonetheless creates its own version of this
10031  * header for use by gcc and g++. In that version it adds a redundant
10032  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
10033  * header we need to include the following magic comment:
10034  *
10035  * we must use the C++ compiler's type
10036  *
10037  * The above comment should not be removed or changed until GNU
10038  * gcc/fixinc/inclhack.def is updated to bypass this header.
10039  */
10040 # 69 "/usr/include/openssl/buffer.h" 2 3 4
10041 
10042 
10043 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
10044 /*
10045  * CDDL HEADER START
10046  *
10047  * The contents of this file are subject to the terms of the
10048  * Common Development and Distribution License (the "License").
10049  * You may not use this file except in compliance with the License.
10050  *
10051  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10052  * or http://www.opensolaris.org/os/licensing.
10053  * See the License for the specific language governing permissions
10054  * and limitations under the License.
10055  *
10056  * When distributing Covered Code, include this CDDL HEADER in each
10057  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10058  * If applicable, add the following below this CDDL HEADER, with the
10059  * fields enclosed by brackets "[]" replaced with your own identifying
10060  * information: Portions Copyright [yyyy] [name of copyright owner]
10061  *
10062  * CDDL HEADER END
10063  */
10064 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
10065 /*	  All Rights Reserved  	*/
10066 
10067 
10068 /*
10069  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
10070  * Use is subject to license terms.
10071  *
10072  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
10073  * Copyright 2016 Joyent, Inc.
10074  */
10075 # 72 "/usr/include/openssl/buffer.h" 2 3 4
10076 
10077 
10078 /* Already declared in ossl_typ.h */
10079 /* typedef struct buf_mem_st BUF_MEM; */
10080 
10081 struct buf_mem_st {
10082     size_t length; /* current number of bytes */
10083     char *data;
10084     size_t max; /* size of buffer */
10085 };
10086 
10087 BUF_MEM *BUF_MEM_new(void);
10088 void BUF_MEM_free(BUF_MEM *a);
10089 int BUF_MEM_grow(BUF_MEM *str, size_t len);
10090 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
10091 size_t BUF_strnlen(const char *str, size_t maxlen);
10092 char *BUF_strdup(const char *str);
10093 
10094 /*
10095  * Like strndup, but in addition, explicitly guarantees to never read past the
10096  * first |siz| bytes of |str|.
10097  */
10098 char *BUF_strndup(const char *str, size_t siz);
10099 
10100 void *BUF_memdup(const void *data, size_t siz);
10101 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
10102 
10103 /* safe string functions */
10104 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
10105 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
10106 
10107 /* BEGIN ERROR CODES */
10108 /*
10109  * The following lines are auto generated by the script mkerr.pl. Any changes
10110  * made after this point may be overwritten when the script is next run.
10111  */
10112 void ERR_load_BUF_strings(void);
10113 
10114 /* Error codes for the BUF functions. */
10115 
10116 /* Function codes. */
10117 
10118 
10119 
10120 
10121 
10122 
10123 
10124 /* Reason codes. */
10125 # 71 "/usr/include/openssl/x509.h" 2 3 4
10126 
10127 
10128 # 1 "/usr/include/openssl/evp.h" 1 3 4
10129 /* crypto/evp/evp.h */
10130 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10131  * All rights reserved.
10132  *
10133  * This package is an SSL implementation written
10134  * by Eric Young (eay@cryptsoft.com).
10135  * The implementation was written so as to conform with Netscapes SSL.
10136  *
10137  * This library is free for commercial and non-commercial use as long as
10138  * the following conditions are aheared to.  The following conditions
10139  * apply to all code found in this distribution, be it the RC4, RSA,
10140  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10141  * included with this distribution is covered by the same copyright terms
10142  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10143  *
10144  * Copyright remains Eric Young's, and as such any Copyright notices in
10145  * the code are not to be removed.
10146  * If this package is used in a product, Eric Young should be given attribution
10147  * as the author of the parts of the library used.
10148  * This can be in the form of a textual message at program startup or
10149  * in documentation (online or textual) provided with the package.
10150  *
10151  * Redistribution and use in source and binary forms, with or without
10152  * modification, are permitted provided that the following conditions
10153  * are met:
10154  * 1. Redistributions of source code must retain the copyright
10155  *    notice, this list of conditions and the following disclaimer.
10156  * 2. Redistributions in binary form must reproduce the above copyright
10157  *    notice, this list of conditions and the following disclaimer in the
10158  *    documentation and/or other materials provided with the distribution.
10159  * 3. All advertising materials mentioning features or use of this software
10160  *    must display the following acknowledgement:
10161  *    "This product includes cryptographic software written by
10162  *     Eric Young (eay@cryptsoft.com)"
10163  *    The word 'cryptographic' can be left out if the rouines from the library
10164  *    being used are not cryptographic related :-).
10165  * 4. If you include any Windows specific code (or a derivative thereof) from
10166  *    the apps directory (application code) you must include an acknowledgement:
10167  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10168  *
10169  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10170  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10171  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10172  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10173  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10174  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10175  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10176  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10177  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10178  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10179  * SUCH DAMAGE.
10180  *
10181  * The licence and distribution terms for any publically available version or
10182  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10183  * copied and put under another distribution licence
10184  * [including the GNU Public Licence.]
10185  */
10186 # 66 "/usr/include/openssl/evp.h" 3 4
10187 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10188 /* opensslconf.h */
10189 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10190 
10191 
10192 
10193 
10194 /* OpenSSL was configured with the following options: */
10195 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10196 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10197    asks for it.  This is a transient feature that is provided for those
10198    who haven't had the time to do the appropriate changes in their
10199    applications.  */
10200 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10201 /* crypto/opensslconf.h.in */
10202 
10203 /* Generate 80386 code? */
10204 # 67 "/usr/include/openssl/evp.h" 2 3 4
10205 
10206 
10207 
10208 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10209 /* ====================================================================
10210  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10211  *
10212  * Redistribution and use in source and binary forms, with or without
10213  * modification, are permitted provided that the following conditions
10214  * are met:
10215  *
10216  * 1. Redistributions of source code must retain the above copyright
10217  *    notice, this list of conditions and the following disclaimer.
10218  *
10219  * 2. Redistributions in binary form must reproduce the above copyright
10220  *    notice, this list of conditions and the following disclaimer in
10221  *    the documentation and/or other materials provided with the
10222  *    distribution.
10223  *
10224  * 3. All advertising materials mentioning features or use of this
10225  *    software must display the following acknowledgment:
10226  *    "This product includes software developed by the OpenSSL Project
10227  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10228  *
10229  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10230  *    endorse or promote products derived from this software without
10231  *    prior written permission. For written permission, please contact
10232  *    openssl-core@openssl.org.
10233  *
10234  * 5. Products derived from this software may not be called "OpenSSL"
10235  *    nor may "OpenSSL" appear in their names without prior written
10236  *    permission of the OpenSSL Project.
10237  *
10238  * 6. Redistributions of any form whatsoever must retain the following
10239  *    acknowledgment:
10240  *    "This product includes software developed by the OpenSSL Project
10241  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10242  *
10243  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10244  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10245  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10246  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10247  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10248  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10249  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10250  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10251  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10252  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10253  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10254  * OF THE POSSIBILITY OF SUCH DAMAGE.
10255  * ====================================================================
10256  *
10257  * This product includes cryptographic software written by Eric Young
10258  * (eay@cryptsoft.com).  This product includes software written by Tim
10259  * Hudson (tjh@cryptsoft.com).
10260  *
10261  */
10262 # 71 "/usr/include/openssl/evp.h" 2 3 4
10263 
10264 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10265 /* ====================================================================
10266  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10267  *
10268  * Redistribution and use in source and binary forms, with or without
10269  * modification, are permitted provided that the following conditions
10270  * are met:
10271  *
10272  * 1. Redistributions of source code must retain the above copyright
10273  *    notice, this list of conditions and the following disclaimer.
10274  *
10275  * 2. Redistributions in binary form must reproduce the above copyright
10276  *    notice, this list of conditions and the following disclaimer in
10277  *    the documentation and/or other materials provided with the
10278  *    distribution.
10279  *
10280  * 3. All advertising materials mentioning features or use of this
10281  *    software must display the following acknowledgment:
10282  *    "This product includes software developed by the OpenSSL Project
10283  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10284  *
10285  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10286  *    endorse or promote products derived from this software without
10287  *    prior written permission. For written permission, please contact
10288  *    openssl-core@openssl.org.
10289  *
10290  * 5. Products derived from this software may not be called "OpenSSL"
10291  *    nor may "OpenSSL" appear in their names without prior written
10292  *    permission of the OpenSSL Project.
10293  *
10294  * 6. Redistributions of any form whatsoever must retain the following
10295  *    acknowledgment:
10296  *    "This product includes software developed by the OpenSSL Project
10297  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10298  *
10299  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10300  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10301  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10302  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10303  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10304  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10305  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10306  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10307  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10308  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10309  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10310  * OF THE POSSIBILITY OF SUCH DAMAGE.
10311  * ====================================================================
10312  *
10313  * This product includes cryptographic software written by Eric Young
10314  * (eay@cryptsoft.com).  This product includes software written by Tim
10315  * Hudson (tjh@cryptsoft.com).
10316  *
10317  */
10318 # 73 "/usr/include/openssl/evp.h" 2 3 4
10319 
10320 
10321 # 1 "/usr/include/openssl/bio.h" 1 3 4
10322 /* crypto/bio/bio.h */
10323 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10324  * All rights reserved.
10325  *
10326  * This package is an SSL implementation written
10327  * by Eric Young (eay@cryptsoft.com).
10328  * The implementation was written so as to conform with Netscapes SSL.
10329  *
10330  * This library is free for commercial and non-commercial use as long as
10331  * the following conditions are aheared to.  The following conditions
10332  * apply to all code found in this distribution, be it the RC4, RSA,
10333  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10334  * included with this distribution is covered by the same copyright terms
10335  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10336  *
10337  * Copyright remains Eric Young's, and as such any Copyright notices in
10338  * the code are not to be removed.
10339  * If this package is used in a product, Eric Young should be given attribution
10340  * as the author of the parts of the library used.
10341  * This can be in the form of a textual message at program startup or
10342  * in documentation (online or textual) provided with the package.
10343  *
10344  * Redistribution and use in source and binary forms, with or without
10345  * modification, are permitted provided that the following conditions
10346  * are met:
10347  * 1. Redistributions of source code must retain the copyright
10348  *    notice, this list of conditions and the following disclaimer.
10349  * 2. Redistributions in binary form must reproduce the above copyright
10350  *    notice, this list of conditions and the following disclaimer in the
10351  *    documentation and/or other materials provided with the distribution.
10352  * 3. All advertising materials mentioning features or use of this software
10353  *    must display the following acknowledgement:
10354  *    "This product includes cryptographic software written by
10355  *     Eric Young (eay@cryptsoft.com)"
10356  *    The word 'cryptographic' can be left out if the rouines from the library
10357  *    being used are not cryptographic related :-).
10358  * 4. If you include any Windows specific code (or a derivative thereof) from
10359  *    the apps directory (application code) you must include an acknowledgement:
10360  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10361  *
10362  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10363  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10364  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10365  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10366  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10367  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10368  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10369  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10370  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10371  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10372  * SUCH DAMAGE.
10373  *
10374  * The licence and distribution terms for any publically available version or
10375  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10376  * copied and put under another distribution licence
10377  * [including the GNU Public Licence.]
10378  */
10379 # 76 "/usr/include/openssl/evp.h" 2 3 4
10380 
10381 
10382 /*-
10383 #define EVP_RC2_KEY_SIZE                16
10384 #define EVP_RC4_KEY_SIZE                16
10385 #define EVP_BLOWFISH_KEY_SIZE           16
10386 #define EVP_CAST5_KEY_SIZE              16
10387 #define EVP_RC5_32_12_16_KEY_SIZE       16
10388 */
10389 
10390 
10391 
10392 
10393 
10394 
10395 /* Default PKCS#5 iteration count */
10396 
10397 
10398 # 1 "/usr/include/openssl/objects.h" 1 3 4
10399 /* crypto/objects/objects.h */
10400 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10401  * All rights reserved.
10402  *
10403  * This package is an SSL implementation written
10404  * by Eric Young (eay@cryptsoft.com).
10405  * The implementation was written so as to conform with Netscapes SSL.
10406  *
10407  * This library is free for commercial and non-commercial use as long as
10408  * the following conditions are aheared to.  The following conditions
10409  * apply to all code found in this distribution, be it the RC4, RSA,
10410  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10411  * included with this distribution is covered by the same copyright terms
10412  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10413  *
10414  * Copyright remains Eric Young's, and as such any Copyright notices in
10415  * the code are not to be removed.
10416  * If this package is used in a product, Eric Young should be given attribution
10417  * as the author of the parts of the library used.
10418  * This can be in the form of a textual message at program startup or
10419  * in documentation (online or textual) provided with the package.
10420  *
10421  * Redistribution and use in source and binary forms, with or without
10422  * modification, are permitted provided that the following conditions
10423  * are met:
10424  * 1. Redistributions of source code must retain the copyright
10425  *    notice, this list of conditions and the following disclaimer.
10426  * 2. Redistributions in binary form must reproduce the above copyright
10427  *    notice, this list of conditions and the following disclaimer in the
10428  *    documentation and/or other materials provided with the distribution.
10429  * 3. All advertising materials mentioning features or use of this software
10430  *    must display the following acknowledgement:
10431  *    "This product includes cryptographic software written by
10432  *     Eric Young (eay@cryptsoft.com)"
10433  *    The word 'cryptographic' can be left out if the rouines from the library
10434  *    being used are not cryptographic related :-).
10435  * 4. If you include any Windows specific code (or a derivative thereof) from
10436  *    the apps directory (application code) you must include an acknowledgement:
10437  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10438  *
10439  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10440  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10441  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10442  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10443  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10444  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10445  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10446  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10447  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10448  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10449  * SUCH DAMAGE.
10450  *
10451  * The licence and distribution terms for any publically available version or
10452  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10453  * copied and put under another distribution licence
10454  * [including the GNU Public Licence.]
10455  */
10456 
10457 
10458 
10459 
10460 
10461 
10462 
10463 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
10464 /* crypto/objects/obj_mac.h */
10465 
10466 /*
10467  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
10468  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
10469  */
10470 
10471 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
10472  * All rights reserved.
10473  *
10474  * This package is an SSL implementation written
10475  * by Eric Young (eay@cryptsoft.com).
10476  * The implementation was written so as to conform with Netscapes SSL.
10477  *
10478  * This library is free for commercial and non-commercial use as long as
10479  * the following conditions are aheared to.  The following conditions
10480  * apply to all code found in this distribution, be it the RC4, RSA,
10481  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10482  * included with this distribution is covered by the same copyright terms
10483  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10484  *
10485  * Copyright remains Eric Young's, and as such any Copyright notices in
10486  * the code are not to be removed.
10487  * If this package is used in a product, Eric Young should be given attribution
10488  * as the author of the parts of the library used.
10489  * This can be in the form of a textual message at program startup or
10490  * in documentation (online or textual) provided with the package.
10491  *
10492  * Redistribution and use in source and binary forms, with or without
10493  * modification, are permitted provided that the following conditions
10494  * are met:
10495  * 1. Redistributions of source code must retain the copyright
10496  *    notice, this list of conditions and the following disclaimer.
10497  * 2. Redistributions in binary form must reproduce the above copyright
10498  *    notice, this list of conditions and the following disclaimer in the
10499  *    documentation and/or other materials provided with the distribution.
10500  * 3. All advertising materials mentioning features or use of this software
10501  *    must display the following acknowledgement:
10502  *    "This product includes cryptographic software written by
10503  *     Eric Young (eay@cryptsoft.com)"
10504  *    The word 'cryptographic' can be left out if the rouines from the library
10505  *    being used are not cryptographic related :-).
10506  * 4. If you include any Windows specific code (or a derivative thereof) from
10507  *    the apps directory (application code) you must include an acknowledgement:
10508  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10509  *
10510  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10511  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10512  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10513  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10514  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10515  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10516  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10517  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10518  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10519  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10520  * SUCH DAMAGE.
10521  *
10522  * The licence and distribution terms for any publically available version or
10523  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10524  * copied and put under another distribution licence
10525  * [including the GNU Public Licence.]
10526  */
10527 # 66 "/usr/include/openssl/objects.h" 2 3 4
10528 # 964 "/usr/include/openssl/objects.h" 3 4
10529 # 1 "/usr/include/openssl/bio.h" 1 3 4
10530 /* crypto/bio/bio.h */
10531 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10532  * All rights reserved.
10533  *
10534  * This package is an SSL implementation written
10535  * by Eric Young (eay@cryptsoft.com).
10536  * The implementation was written so as to conform with Netscapes SSL.
10537  *
10538  * This library is free for commercial and non-commercial use as long as
10539  * the following conditions are aheared to.  The following conditions
10540  * apply to all code found in this distribution, be it the RC4, RSA,
10541  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10542  * included with this distribution is covered by the same copyright terms
10543  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10544  *
10545  * Copyright remains Eric Young's, and as such any Copyright notices in
10546  * the code are not to be removed.
10547  * If this package is used in a product, Eric Young should be given attribution
10548  * as the author of the parts of the library used.
10549  * This can be in the form of a textual message at program startup or
10550  * in documentation (online or textual) provided with the package.
10551  *
10552  * Redistribution and use in source and binary forms, with or without
10553  * modification, are permitted provided that the following conditions
10554  * are met:
10555  * 1. Redistributions of source code must retain the copyright
10556  *    notice, this list of conditions and the following disclaimer.
10557  * 2. Redistributions in binary form must reproduce the above copyright
10558  *    notice, this list of conditions and the following disclaimer in the
10559  *    documentation and/or other materials provided with the distribution.
10560  * 3. All advertising materials mentioning features or use of this software
10561  *    must display the following acknowledgement:
10562  *    "This product includes cryptographic software written by
10563  *     Eric Young (eay@cryptsoft.com)"
10564  *    The word 'cryptographic' can be left out if the rouines from the library
10565  *    being used are not cryptographic related :-).
10566  * 4. If you include any Windows specific code (or a derivative thereof) from
10567  *    the apps directory (application code) you must include an acknowledgement:
10568  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10569  *
10570  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10571  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10572  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10573  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10574  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10575  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10576  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10577  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10578  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10579  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10580  * SUCH DAMAGE.
10581  *
10582  * The licence and distribution terms for any publically available version or
10583  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10584  * copied and put under another distribution licence
10585  * [including the GNU Public Licence.]
10586  */
10587 # 965 "/usr/include/openssl/objects.h" 2 3 4
10588 # 1 "/usr/include/openssl/asn1.h" 1 3 4
10589 /* crypto/asn1/asn1.h */
10590 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10591  * All rights reserved.
10592  *
10593  * This package is an SSL implementation written
10594  * by Eric Young (eay@cryptsoft.com).
10595  * The implementation was written so as to conform with Netscapes SSL.
10596  *
10597  * This library is free for commercial and non-commercial use as long as
10598  * the following conditions are aheared to.  The following conditions
10599  * apply to all code found in this distribution, be it the RC4, RSA,
10600  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10601  * included with this distribution is covered by the same copyright terms
10602  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10603  *
10604  * Copyright remains Eric Young's, and as such any Copyright notices in
10605  * the code are not to be removed.
10606  * If this package is used in a product, Eric Young should be given attribution
10607  * as the author of the parts of the library used.
10608  * This can be in the form of a textual message at program startup or
10609  * in documentation (online or textual) provided with the package.
10610  *
10611  * Redistribution and use in source and binary forms, with or without
10612  * modification, are permitted provided that the following conditions
10613  * are met:
10614  * 1. Redistributions of source code must retain the copyright
10615  *    notice, this list of conditions and the following disclaimer.
10616  * 2. Redistributions in binary form must reproduce the above copyright
10617  *    notice, this list of conditions and the following disclaimer in the
10618  *    documentation and/or other materials provided with the distribution.
10619  * 3. All advertising materials mentioning features or use of this software
10620  *    must display the following acknowledgement:
10621  *    "This product includes cryptographic software written by
10622  *     Eric Young (eay@cryptsoft.com)"
10623  *    The word 'cryptographic' can be left out if the rouines from the library
10624  *    being used are not cryptographic related :-).
10625  * 4. If you include any Windows specific code (or a derivative thereof) from
10626  *    the apps directory (application code) you must include an acknowledgement:
10627  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10628  *
10629  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10630  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10631  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10632  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10633  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10634  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10635  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10636  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10637  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10638  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10639  * SUCH DAMAGE.
10640  *
10641  * The licence and distribution terms for any publically available version or
10642  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10643  * copied and put under another distribution licence
10644  * [including the GNU Public Licence.]
10645  */
10646 
10647 
10648 
10649 
10650 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
10651 /*
10652  * CDDL HEADER START
10653  *
10654  * The contents of this file are subject to the terms of the
10655  * Common Development and Distribution License (the "License").
10656  * You may not use this file except in compliance with the License.
10657  *
10658  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10659  * or http://www.opensolaris.org/os/licensing.
10660  * See the License for the specific language governing permissions
10661  * and limitations under the License.
10662  *
10663  * When distributing Covered Code, include this CDDL HEADER in each
10664  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10665  * If applicable, add the following below this CDDL HEADER, with the
10666  * fields enclosed by brackets "[]" replaced with your own identifying
10667  * information: Portions Copyright [yyyy] [name of copyright owner]
10668  *
10669  * CDDL HEADER END
10670  */
10671 /*	Copyright (c) 1988 AT&T	*/
10672 /*	  All Rights Reserved  	*/
10673 
10674 
10675 /*
10676  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
10677  *
10678  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
10679  * Use is subject to license terms.
10680  */
10681 /*
10682  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
10683  * Copyright 2016 Joyent, Inc.
10684  */
10685 # 63 "/usr/include/openssl/asn1.h" 2 3 4
10686 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
10687 /* e_os2.h */
10688 /* ====================================================================
10689  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
10690  *
10691  * Redistribution and use in source and binary forms, with or without
10692  * modification, are permitted provided that the following conditions
10693  * are met:
10694  *
10695  * 1. Redistributions of source code must retain the above copyright
10696  *    notice, this list of conditions and the following disclaimer.
10697  *
10698  * 2. Redistributions in binary form must reproduce the above copyright
10699  *    notice, this list of conditions and the following disclaimer in
10700  *    the documentation and/or other materials provided with the
10701  *    distribution.
10702  *
10703  * 3. All advertising materials mentioning features or use of this
10704  *    software must display the following acknowledgment:
10705  *    "This product includes software developed by the OpenSSL Project
10706  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10707  *
10708  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10709  *    endorse or promote products derived from this software without
10710  *    prior written permission. For written permission, please contact
10711  *    openssl-core@openssl.org.
10712  *
10713  * 5. Products derived from this software may not be called "OpenSSL"
10714  *    nor may "OpenSSL" appear in their names without prior written
10715  *    permission of the OpenSSL Project.
10716  *
10717  * 6. Redistributions of any form whatsoever must retain the following
10718  *    acknowledgment:
10719  *    "This product includes software developed by the OpenSSL Project
10720  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10721  *
10722  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10723  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10724  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10725  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10726  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10727  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10728  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10729  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10730  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10731  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10732  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10733  * OF THE POSSIBILITY OF SUCH DAMAGE.
10734  * ====================================================================
10735  *
10736  * This product includes cryptographic software written by Eric Young
10737  * (eay@cryptsoft.com).  This product includes software written by Tim
10738  * Hudson (tjh@cryptsoft.com).
10739  *
10740  */
10741 
10742 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
10743 /* opensslconf.h */
10744 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
10745 
10746 
10747 
10748 
10749 /* OpenSSL was configured with the following options: */
10750 # 108 "/usr/include/openssl/opensslconf.h" 3 4
10751 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
10752    asks for it.  This is a transient feature that is provided for those
10753    who haven't had the time to do the appropriate changes in their
10754    applications.  */
10755 # 204 "/usr/include/openssl/opensslconf.h" 3 4
10756 /* crypto/opensslconf.h.in */
10757 
10758 /* Generate 80386 code? */
10759 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
10760 # 64 "/usr/include/openssl/asn1.h" 2 3 4
10761 
10762 # 1 "/usr/include/openssl/bio.h" 1 3 4
10763 /* crypto/bio/bio.h */
10764 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10765  * All rights reserved.
10766  *
10767  * This package is an SSL implementation written
10768  * by Eric Young (eay@cryptsoft.com).
10769  * The implementation was written so as to conform with Netscapes SSL.
10770  *
10771  * This library is free for commercial and non-commercial use as long as
10772  * the following conditions are aheared to.  The following conditions
10773  * apply to all code found in this distribution, be it the RC4, RSA,
10774  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10775  * included with this distribution is covered by the same copyright terms
10776  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10777  *
10778  * Copyright remains Eric Young's, and as such any Copyright notices in
10779  * the code are not to be removed.
10780  * If this package is used in a product, Eric Young should be given attribution
10781  * as the author of the parts of the library used.
10782  * This can be in the form of a textual message at program startup or
10783  * in documentation (online or textual) provided with the package.
10784  *
10785  * Redistribution and use in source and binary forms, with or without
10786  * modification, are permitted provided that the following conditions
10787  * are met:
10788  * 1. Redistributions of source code must retain the copyright
10789  *    notice, this list of conditions and the following disclaimer.
10790  * 2. Redistributions in binary form must reproduce the above copyright
10791  *    notice, this list of conditions and the following disclaimer in the
10792  *    documentation and/or other materials provided with the distribution.
10793  * 3. All advertising materials mentioning features or use of this software
10794  *    must display the following acknowledgement:
10795  *    "This product includes cryptographic software written by
10796  *     Eric Young (eay@cryptsoft.com)"
10797  *    The word 'cryptographic' can be left out if the rouines from the library
10798  *    being used are not cryptographic related :-).
10799  * 4. If you include any Windows specific code (or a derivative thereof) from
10800  *    the apps directory (application code) you must include an acknowledgement:
10801  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10802  *
10803  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10804  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10805  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10806  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10807  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10808  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10809  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10810  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10811  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10812  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10813  * SUCH DAMAGE.
10814  *
10815  * The licence and distribution terms for any publically available version or
10816  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10817  * copied and put under another distribution licence
10818  * [including the GNU Public Licence.]
10819  */
10820 # 66 "/usr/include/openssl/asn1.h" 2 3 4
10821 
10822 # 1 "/usr/include/openssl/stack.h" 1 3 4
10823 /* crypto/stack/stack.h */
10824 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
10825  * All rights reserved.
10826  *
10827  * This package is an SSL implementation written
10828  * by Eric Young (eay@cryptsoft.com).
10829  * The implementation was written so as to conform with Netscapes SSL.
10830  *
10831  * This library is free for commercial and non-commercial use as long as
10832  * the following conditions are aheared to.  The following conditions
10833  * apply to all code found in this distribution, be it the RC4, RSA,
10834  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
10835  * included with this distribution is covered by the same copyright terms
10836  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
10837  *
10838  * Copyright remains Eric Young's, and as such any Copyright notices in
10839  * the code are not to be removed.
10840  * If this package is used in a product, Eric Young should be given attribution
10841  * as the author of the parts of the library used.
10842  * This can be in the form of a textual message at program startup or
10843  * in documentation (online or textual) provided with the package.
10844  *
10845  * Redistribution and use in source and binary forms, with or without
10846  * modification, are permitted provided that the following conditions
10847  * are met:
10848  * 1. Redistributions of source code must retain the copyright
10849  *    notice, this list of conditions and the following disclaimer.
10850  * 2. Redistributions in binary form must reproduce the above copyright
10851  *    notice, this list of conditions and the following disclaimer in the
10852  *    documentation and/or other materials provided with the distribution.
10853  * 3. All advertising materials mentioning features or use of this software
10854  *    must display the following acknowledgement:
10855  *    "This product includes cryptographic software written by
10856  *     Eric Young (eay@cryptsoft.com)"
10857  *    The word 'cryptographic' can be left out if the rouines from the library
10858  *    being used are not cryptographic related :-).
10859  * 4. If you include any Windows specific code (or a derivative thereof) from
10860  *    the apps directory (application code) you must include an acknowledgement:
10861  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
10862  *
10863  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
10864  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10865  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10866  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10867  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10868  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10869  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10870  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10871  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10872  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10873  * SUCH DAMAGE.
10874  *
10875  * The licence and distribution terms for any publically available version or
10876  * derivative of this code cannot be changed.  i.e. this code cannot simply be
10877  * copied and put under another distribution licence
10878  * [including the GNU Public Licence.]
10879  */
10880 # 68 "/usr/include/openssl/asn1.h" 2 3 4
10881 # 1 "/usr/include/openssl/safestack.h" 1 3 4
10882 /* ====================================================================
10883  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10884  *
10885  * Redistribution and use in source and binary forms, with or without
10886  * modification, are permitted provided that the following conditions
10887  * are met:
10888  *
10889  * 1. Redistributions of source code must retain the above copyright
10890  *    notice, this list of conditions and the following disclaimer.
10891  *
10892  * 2. Redistributions in binary form must reproduce the above copyright
10893  *    notice, this list of conditions and the following disclaimer in
10894  *    the documentation and/or other materials provided with the
10895  *    distribution.
10896  *
10897  * 3. All advertising materials mentioning features or use of this
10898  *    software must display the following acknowledgment:
10899  *    "This product includes software developed by the OpenSSL Project
10900  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10901  *
10902  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10903  *    endorse or promote products derived from this software without
10904  *    prior written permission. For written permission, please contact
10905  *    openssl-core@openssl.org.
10906  *
10907  * 5. Products derived from this software may not be called "OpenSSL"
10908  *    nor may "OpenSSL" appear in their names without prior written
10909  *    permission of the OpenSSL Project.
10910  *
10911  * 6. Redistributions of any form whatsoever must retain the following
10912  *    acknowledgment:
10913  *    "This product includes software developed by the OpenSSL Project
10914  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10915  *
10916  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10917  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10918  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10919  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10920  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10921  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10922  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10923  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10924  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10925  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10926  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10927  * OF THE POSSIBILITY OF SUCH DAMAGE.
10928  * ====================================================================
10929  *
10930  * This product includes cryptographic software written by Eric Young
10931  * (eay@cryptsoft.com).  This product includes software written by Tim
10932  * Hudson (tjh@cryptsoft.com).
10933  *
10934  */
10935 # 69 "/usr/include/openssl/asn1.h" 2 3 4
10936 
10937 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
10938 /* ====================================================================
10939  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
10940  *
10941  * Redistribution and use in source and binary forms, with or without
10942  * modification, are permitted provided that the following conditions
10943  * are met:
10944  *
10945  * 1. Redistributions of source code must retain the above copyright
10946  *    notice, this list of conditions and the following disclaimer.
10947  *
10948  * 2. Redistributions in binary form must reproduce the above copyright
10949  *    notice, this list of conditions and the following disclaimer in
10950  *    the documentation and/or other materials provided with the
10951  *    distribution.
10952  *
10953  * 3. All advertising materials mentioning features or use of this
10954  *    software must display the following acknowledgment:
10955  *    "This product includes software developed by the OpenSSL Project
10956  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
10957  *
10958  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
10959  *    endorse or promote products derived from this software without
10960  *    prior written permission. For written permission, please contact
10961  *    openssl-core@openssl.org.
10962  *
10963  * 5. Products derived from this software may not be called "OpenSSL"
10964  *    nor may "OpenSSL" appear in their names without prior written
10965  *    permission of the OpenSSL Project.
10966  *
10967  * 6. Redistributions of any form whatsoever must retain the following
10968  *    acknowledgment:
10969  *    "This product includes software developed by the OpenSSL Project
10970  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
10971  *
10972  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
10973  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10974  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10975  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
10976  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10977  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
10978  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
10979  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10980  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
10981  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10982  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
10983  * OF THE POSSIBILITY OF SUCH DAMAGE.
10984  * ====================================================================
10985  *
10986  * This product includes cryptographic software written by Eric Young
10987  * (eay@cryptsoft.com).  This product includes software written by Tim
10988  * Hudson (tjh@cryptsoft.com).
10989  *
10990  */
10991 # 71 "/usr/include/openssl/asn1.h" 2 3 4
10992 
10993 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
10994 /* ====================================================================
10995  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
10996  *
10997  * Redistribution and use in source and binary forms, with or without
10998  * modification, are permitted provided that the following conditions
10999  * are met:
11000  *
11001  * 1. Redistributions of source code must retain the above copyright
11002  *    notice, this list of conditions and the following disclaimer.
11003  *
11004  * 2. Redistributions in binary form must reproduce the above copyright
11005  *    notice, this list of conditions and the following disclaimer in
11006  *    the documentation and/or other materials provided with the
11007  *    distribution.
11008  *
11009  * 3. All advertising materials mentioning features or use of this
11010  *    software must display the following acknowledgment:
11011  *    "This product includes software developed by the OpenSSL Project
11012  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11013  *
11014  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11015  *    endorse or promote products derived from this software without
11016  *    prior written permission. For written permission, please contact
11017  *    openssl-core@openssl.org.
11018  *
11019  * 5. Products derived from this software may not be called "OpenSSL"
11020  *    nor may "OpenSSL" appear in their names without prior written
11021  *    permission of the OpenSSL Project.
11022  *
11023  * 6. Redistributions of any form whatsoever must retain the following
11024  *    acknowledgment:
11025  *    "This product includes software developed by the OpenSSL Project
11026  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11027  *
11028  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11029  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11030  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11031  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11032  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11033  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11034  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11035  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11036  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11037  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11038  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11039  * OF THE POSSIBILITY OF SUCH DAMAGE.
11040  * ====================================================================
11041  *
11042  * This product includes cryptographic software written by Eric Young
11043  * (eay@cryptsoft.com).  This product includes software written by Tim
11044  * Hudson (tjh@cryptsoft.com).
11045  *
11046  */
11047 # 73 "/usr/include/openssl/asn1.h" 2 3 4
11048 
11049 # 1 "/usr/include/openssl/bn.h" 1 3 4
11050 /* crypto/bn/bn.h */
11051 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
11052  * All rights reserved.
11053  *
11054  * This package is an SSL implementation written
11055  * by Eric Young (eay@cryptsoft.com).
11056  * The implementation was written so as to conform with Netscapes SSL.
11057  *
11058  * This library is free for commercial and non-commercial use as long as
11059  * the following conditions are aheared to.  The following conditions
11060  * apply to all code found in this distribution, be it the RC4, RSA,
11061  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11062  * included with this distribution is covered by the same copyright terms
11063  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11064  *
11065  * Copyright remains Eric Young's, and as such any Copyright notices in
11066  * the code are not to be removed.
11067  * If this package is used in a product, Eric Young should be given attribution
11068  * as the author of the parts of the library used.
11069  * This can be in the form of a textual message at program startup or
11070  * in documentation (online or textual) provided with the package.
11071  *
11072  * Redistribution and use in source and binary forms, with or without
11073  * modification, are permitted provided that the following conditions
11074  * are met:
11075  * 1. Redistributions of source code must retain the copyright
11076  *    notice, this list of conditions and the following disclaimer.
11077  * 2. Redistributions in binary form must reproduce the above copyright
11078  *    notice, this list of conditions and the following disclaimer in the
11079  *    documentation and/or other materials provided with the distribution.
11080  * 3. All advertising materials mentioning features or use of this software
11081  *    must display the following acknowledgement:
11082  *    "This product includes cryptographic software written by
11083  *     Eric Young (eay@cryptsoft.com)"
11084  *    The word 'cryptographic' can be left out if the rouines from the library
11085  *    being used are not cryptographic related :-).
11086  * 4. If you include any Windows specific code (or a derivative thereof) from
11087  *    the apps directory (application code) you must include an acknowledgement:
11088  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11089  *
11090  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11091  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11092  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11093  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11094  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11095  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11096  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11097  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11098  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11099  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11100  * SUCH DAMAGE.
11101  *
11102  * The licence and distribution terms for any publically available version or
11103  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11104  * copied and put under another distribution licence
11105  * [including the GNU Public Licence.]
11106  */
11107 /* ====================================================================
11108  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
11109  *
11110  * Redistribution and use in source and binary forms, with or without
11111  * modification, are permitted provided that the following conditions
11112  * are met:
11113  *
11114  * 1. Redistributions of source code must retain the above copyright
11115  *    notice, this list of conditions and the following disclaimer.
11116  *
11117  * 2. Redistributions in binary form must reproduce the above copyright
11118  *    notice, this list of conditions and the following disclaimer in
11119  *    the documentation and/or other materials provided with the
11120  *    distribution.
11121  *
11122  * 3. All advertising materials mentioning features or use of this
11123  *    software must display the following acknowledgment:
11124  *    "This product includes software developed by the OpenSSL Project
11125  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11126  *
11127  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11128  *    endorse or promote products derived from this software without
11129  *    prior written permission. For written permission, please contact
11130  *    openssl-core@openssl.org.
11131  *
11132  * 5. Products derived from this software may not be called "OpenSSL"
11133  *    nor may "OpenSSL" appear in their names without prior written
11134  *    permission of the OpenSSL Project.
11135  *
11136  * 6. Redistributions of any form whatsoever must retain the following
11137  *    acknowledgment:
11138  *    "This product includes software developed by the OpenSSL Project
11139  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11140  *
11141  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11142  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11143  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11144  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11145  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11146  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11147  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11148  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11149  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11150  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11151  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11152  * OF THE POSSIBILITY OF SUCH DAMAGE.
11153  * ====================================================================
11154  *
11155  * This product includes cryptographic software written by Eric Young
11156  * (eay@cryptsoft.com).  This product includes software written by Tim
11157  * Hudson (tjh@cryptsoft.com).
11158  *
11159  */
11160 /* ====================================================================
11161  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11162  *
11163  * Portions of the attached software ("Contribution") are developed by
11164  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
11165  *
11166  * The Contribution is licensed pursuant to the Eric Young open source
11167  * license provided above.
11168  *
11169  * The binary polynomial arithmetic software is originally written by
11170  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
11171  *
11172  */
11173 
11174 
11175 
11176 
11177 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
11178 /*
11179  * CDDL HEADER START
11180  *
11181  * The contents of this file are subject to the terms of the
11182  * Common Development and Distribution License (the "License").
11183  * You may not use this file except in compliance with the License.
11184  *
11185  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11186  * or http://www.opensolaris.org/os/licensing.
11187  * See the License for the specific language governing permissions
11188  * and limitations under the License.
11189  *
11190  * When distributing Covered Code, include this CDDL HEADER in each
11191  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11192  * If applicable, add the following below this CDDL HEADER, with the
11193  * fields enclosed by brackets "[]" replaced with your own identifying
11194  * information: Portions Copyright [yyyy] [name of copyright owner]
11195  *
11196  * CDDL HEADER END
11197  */
11198 
11199 /*
11200  * Copyright (c) 2013 Gary Mills
11201  *
11202  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
11203  * Use is subject to license terms.
11204  */
11205 
11206 /*	Copyright (c) 1988 AT&T	*/
11207 /*	  All Rights Reserved  	*/
11208 # 129 "/usr/include/openssl/bn.h" 2 3 4
11209 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
11210 /* e_os2.h */
11211 /* ====================================================================
11212  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
11213  *
11214  * Redistribution and use in source and binary forms, with or without
11215  * modification, are permitted provided that the following conditions
11216  * are met:
11217  *
11218  * 1. Redistributions of source code must retain the above copyright
11219  *    notice, this list of conditions and the following disclaimer.
11220  *
11221  * 2. Redistributions in binary form must reproduce the above copyright
11222  *    notice, this list of conditions and the following disclaimer in
11223  *    the documentation and/or other materials provided with the
11224  *    distribution.
11225  *
11226  * 3. All advertising materials mentioning features or use of this
11227  *    software must display the following acknowledgment:
11228  *    "This product includes software developed by the OpenSSL Project
11229  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11230  *
11231  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11232  *    endorse or promote products derived from this software without
11233  *    prior written permission. For written permission, please contact
11234  *    openssl-core@openssl.org.
11235  *
11236  * 5. Products derived from this software may not be called "OpenSSL"
11237  *    nor may "OpenSSL" appear in their names without prior written
11238  *    permission of the OpenSSL Project.
11239  *
11240  * 6. Redistributions of any form whatsoever must retain the following
11241  *    acknowledgment:
11242  *    "This product includes software developed by the OpenSSL Project
11243  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11244  *
11245  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11246  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11247  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11248  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11249  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11250  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11251  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11252  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11253  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11254  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11255  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11256  * OF THE POSSIBILITY OF SUCH DAMAGE.
11257  * ====================================================================
11258  *
11259  * This product includes cryptographic software written by Eric Young
11260  * (eay@cryptsoft.com).  This product includes software written by Tim
11261  * Hudson (tjh@cryptsoft.com).
11262  *
11263  */
11264 
11265 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
11266 /* opensslconf.h */
11267 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
11268 
11269 
11270 
11271 
11272 /* OpenSSL was configured with the following options: */
11273 # 108 "/usr/include/openssl/opensslconf.h" 3 4
11274 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
11275    asks for it.  This is a transient feature that is provided for those
11276    who haven't had the time to do the appropriate changes in their
11277    applications.  */
11278 # 204 "/usr/include/openssl/opensslconf.h" 3 4
11279 /* crypto/opensslconf.h.in */
11280 
11281 /* Generate 80386 code? */
11282 # 272 "/usr/include/openssl/opensslconf.h" 3 4
11283 /*
11284  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
11285  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
11286  */
11287 
11288 
11289 
11290 
11291 
11292 
11293 /* Should we define BN_DIV2W here? */
11294 
11295 /* Only one for the following should be defined */
11296 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
11297 # 130 "/usr/include/openssl/bn.h" 2 3 4
11298 
11299 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
11300 /*
11301  * CDDL HEADER START
11302  *
11303  * The contents of this file are subject to the terms of the
11304  * Common Development and Distribution License (the "License").
11305  * You may not use this file except in compliance with the License.
11306  *
11307  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11308  * or http://www.opensolaris.org/os/licensing.
11309  * See the License for the specific language governing permissions
11310  * and limitations under the License.
11311  *
11312  * When distributing Covered Code, include this CDDL HEADER in each
11313  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11314  * If applicable, add the following below this CDDL HEADER, with the
11315  * fields enclosed by brackets "[]" replaced with your own identifying
11316  * information: Portions Copyright [yyyy] [name of copyright owner]
11317  *
11318  * CDDL HEADER END
11319  */
11320 
11321 /*
11322  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
11323  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
11324  */
11325 
11326 /*	Copyright (c) 1988 AT&T	*/
11327 /*	  All Rights Reserved  	*/
11328 
11329 /*
11330  * User-visible pieces of the ANSI C standard I/O package.
11331  */
11332 # 132 "/usr/include/openssl/bn.h" 2 3 4
11333 
11334 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
11335 /* ====================================================================
11336  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
11337  *
11338  * Redistribution and use in source and binary forms, with or without
11339  * modification, are permitted provided that the following conditions
11340  * are met:
11341  *
11342  * 1. Redistributions of source code must retain the above copyright
11343  *    notice, this list of conditions and the following disclaimer.
11344  *
11345  * 2. Redistributions in binary form must reproduce the above copyright
11346  *    notice, this list of conditions and the following disclaimer in
11347  *    the documentation and/or other materials provided with the
11348  *    distribution.
11349  *
11350  * 3. All advertising materials mentioning features or use of this
11351  *    software must display the following acknowledgment:
11352  *    "This product includes software developed by the OpenSSL Project
11353  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11354  *
11355  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11356  *    endorse or promote products derived from this software without
11357  *    prior written permission. For written permission, please contact
11358  *    openssl-core@openssl.org.
11359  *
11360  * 5. Products derived from this software may not be called "OpenSSL"
11361  *    nor may "OpenSSL" appear in their names without prior written
11362  *    permission of the OpenSSL Project.
11363  *
11364  * 6. Redistributions of any form whatsoever must retain the following
11365  *    acknowledgment:
11366  *    "This product includes software developed by the OpenSSL Project
11367  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11368  *
11369  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11370  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11371  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11372  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11373  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11374  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11375  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11376  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11377  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11378  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11379  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11380  * OF THE POSSIBILITY OF SUCH DAMAGE.
11381  * ====================================================================
11382  *
11383  * This product includes cryptographic software written by Eric Young
11384  * (eay@cryptsoft.com).  This product includes software written by Tim
11385  * Hudson (tjh@cryptsoft.com).
11386  *
11387  */
11388 # 134 "/usr/include/openssl/bn.h" 2 3 4
11389 # 1 "/usr/include/openssl/crypto.h" 1 3 4
11390 /* crypto/crypto.h */
11391 /* ====================================================================
11392  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
11393  *
11394  * Redistribution and use in source and binary forms, with or without
11395  * modification, are permitted provided that the following conditions
11396  * are met:
11397  *
11398  * 1. Redistributions of source code must retain the above copyright
11399  *    notice, this list of conditions and the following disclaimer.
11400  *
11401  * 2. Redistributions in binary form must reproduce the above copyright
11402  *    notice, this list of conditions and the following disclaimer in
11403  *    the documentation and/or other materials provided with the
11404  *    distribution.
11405  *
11406  * 3. All advertising materials mentioning features or use of this
11407  *    software must display the following acknowledgment:
11408  *    "This product includes software developed by the OpenSSL Project
11409  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
11410  *
11411  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
11412  *    endorse or promote products derived from this software without
11413  *    prior written permission. For written permission, please contact
11414  *    openssl-core@openssl.org.
11415  *
11416  * 5. Products derived from this software may not be called "OpenSSL"
11417  *    nor may "OpenSSL" appear in their names without prior written
11418  *    permission of the OpenSSL Project.
11419  *
11420  * 6. Redistributions of any form whatsoever must retain the following
11421  *    acknowledgment:
11422  *    "This product includes software developed by the OpenSSL Project
11423  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
11424  *
11425  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
11426  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11427  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
11428  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
11429  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11430  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
11431  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11432  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11433  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
11434  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
11435  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
11436  * OF THE POSSIBILITY OF SUCH DAMAGE.
11437  * ====================================================================
11438  *
11439  * This product includes cryptographic software written by Eric Young
11440  * (eay@cryptsoft.com).  This product includes software written by Tim
11441  * Hudson (tjh@cryptsoft.com).
11442  *
11443  */
11444 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
11445  * All rights reserved.
11446  *
11447  * This package is an SSL implementation written
11448  * by Eric Young (eay@cryptsoft.com).
11449  * The implementation was written so as to conform with Netscapes SSL.
11450  *
11451  * This library is free for commercial and non-commercial use as long as
11452  * the following conditions are aheared to.  The following conditions
11453  * apply to all code found in this distribution, be it the RC4, RSA,
11454  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
11455  * included with this distribution is covered by the same copyright terms
11456  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
11457  *
11458  * Copyright remains Eric Young's, and as such any Copyright notices in
11459  * the code are not to be removed.
11460  * If this package is used in a product, Eric Young should be given attribution
11461  * as the author of the parts of the library used.
11462  * This can be in the form of a textual message at program startup or
11463  * in documentation (online or textual) provided with the package.
11464  *
11465  * Redistribution and use in source and binary forms, with or without
11466  * modification, are permitted provided that the following conditions
11467  * are met:
11468  * 1. Redistributions of source code must retain the copyright
11469  *    notice, this list of conditions and the following disclaimer.
11470  * 2. Redistributions in binary form must reproduce the above copyright
11471  *    notice, this list of conditions and the following disclaimer in the
11472  *    documentation and/or other materials provided with the distribution.
11473  * 3. All advertising materials mentioning features or use of this software
11474  *    must display the following acknowledgement:
11475  *    "This product includes cryptographic software written by
11476  *     Eric Young (eay@cryptsoft.com)"
11477  *    The word 'cryptographic' can be left out if the rouines from the library
11478  *    being used are not cryptographic related :-).
11479  * 4. If you include any Windows specific code (or a derivative thereof) from
11480  *    the apps directory (application code) you must include an acknowledgement:
11481  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
11482  *
11483  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
11484  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11485  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11486  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11487  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11488  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11489  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11490  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11491  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11492  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11493  * SUCH DAMAGE.
11494  *
11495  * The licence and distribution terms for any publically available version or
11496  * derivative of this code cannot be changed.  i.e. this code cannot simply be
11497  * copied and put under another distribution licence
11498  * [including the GNU Public Licence.]
11499  */
11500 /* ====================================================================
11501  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
11502  * ECDH support in OpenSSL originally developed by
11503  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
11504  */
11505 # 135 "/usr/include/openssl/bn.h" 2 3 4
11506 
11507 
11508 
11509 
11510 
11511 /*
11512  * These preprocessor symbols control various aspects of the bignum headers
11513  * and library code. They're not defined by any "normal" configuration, as
11514  * they are intended for development and testing purposes. NB: defining all
11515  * three can be useful for debugging application code as well as openssl
11516  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
11517  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
11518  * mismanagement of bignum internals. You must also define BN_DEBUG.
11519  */
11520 /* #define BN_DEBUG */
11521 /* #define BN_DEBUG_RAND */
11522 
11523 
11524 
11525 
11526 
11527 
11528 
11529 /*
11530  * This next option uses the C libraries (2 word)/(1 word) function. If it is
11531  * not defined, I use my C version (which is slower). The reason for this
11532  * flag is that when the particular C compiler library routine is used, and
11533  * the library is linked with a different compiler, the library is missing.
11534  * This mostly happens when the library is built with gcc and then linked
11535  * using normal cc.  This would be a common occurrence because gcc normally
11536  * produces code that is 2 times faster than system compilers for the big
11537  * number stuff. For machines with only one compiler (or shared libraries),
11538  * this should be on.  Again this in only really a problem on machines using
11539  * "long long's", are 32bit, and are not using my assembler code.
11540  */
11541 
11542 
11543 
11544 
11545 
11546 
11547 
11548 /*
11549  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
11550  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
11551  */
11552 # 203 "/usr/include/openssl/bn.h" 3 4
11553 /*
11554  * This is where the long long data type is 64 bits, but long is 32. For
11555  * machines where there are 64bit registers, this is the mode to use. IRIX,
11556  * on R4000 and above should use this mode, along with the relevant assembler
11557  * code :-).  Do NOT define BN_LLONG.
11558  */
11559 # 265 "/usr/include/openssl/bn.h" 3 4
11560 /*
11561  * avoid leaking exponent information through timing,
11562  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
11563  * BN_div() will call BN_div_no_branch,
11564  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
11565  */
11566 # 284 "/usr/include/openssl/bn.h" 3 4
11567                                        /* used for debuging */
11568 
11569 
11570 
11571 
11572 /*
11573  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
11574  * two BIGNUMs cannot not be used in parallel!)
11575  */
11576 # 302 "/usr/include/openssl/bn.h" 3 4
11577 /* Already declared in ossl_typ.h */
11578 # 313 "/usr/include/openssl/bn.h" 3 4
11579 struct bignum_st {
11580     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
11581                                  * chunks. */
11582     int top; /* Index of last used d +1. */
11583     /* The next are internal book keeping for bn_expand. */
11584     int dmax; /* Size of the d array. */
11585     int neg; /* one if the number is negative */
11586     int flags;
11587 };
11588 
11589 /* Used for montgomery multiplication */
11590 struct bn_mont_ctx_st {
11591     int ri; /* number of bits in R */
11592     BIGNUM RR; /* used to convert to montgomery form */
11593     BIGNUM N; /* The modulus */
11594     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
11595                                  * stored for bignum algorithm) */
11596     unsigned int n0[2]; /* least significant word(s) of Ni; (type
11597                                  * changed with 0.9.9, was "BN_ULONG n0;"
11598                                  * before) */
11599     int flags;
11600 };
11601 
11602 /*
11603  * Used for reciprocal division/mod functions It cannot be shared between
11604  * threads
11605  */
11606 struct bn_recp_ctx_st {
11607     BIGNUM N; /* the divisor */
11608     BIGNUM Nr; /* the reciprocal */
11609     int num_bits;
11610     int shift;
11611     int flags;
11612 };
11613 
11614 /* Used for slow "generation" functions. */
11615 struct bn_gencb_st {
11616     unsigned int ver; /* To handle binary (in)compatibility */
11617     void *arg; /* callback-specific data */
11618     union {
11619         /* if(ver==1) - handles old style callbacks */
11620         void (*cb_1) (int, int, void *);
11621         /* if(ver==2) - new callback style */
11622         int (*cb_2) (int, int, BN_GENCB *);
11623     } cb;
11624 };
11625 /* Wrapper function to make using BN_GENCB easier,  */
11626 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
11627 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
11628 
11629 
11630 
11631 
11632 
11633 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
11634 # 377 "/usr/include/openssl/bn.h" 3 4
11635 /*
11636  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
11637  * that will be done for checking that a random number is probably prime. The
11638  * error rate for accepting a composite number as prime depends on the size of
11639  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
11640  * and so the level is what you would expect for a key of double the size of the
11641  * prime.
11642  *
11643  * This table is generated using the algorithm of FIPS PUB 186-4
11644  * Digital Signature Standard (DSS), section F.1, page 117.
11645  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
11646  *
11647  * The following magma script was used to generate the output:
11648  * securitybits:=125;
11649  * k:=1024;
11650  * for t:=1 to 65 do
11651  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
11652  *     S:=0;
11653  *     // Sum over m
11654  *     for m:=3 to M do
11655  *       s:=0;
11656  *       // Sum over j
11657  *       for j:=2 to m do
11658  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
11659  *       end for;
11660  *       S+:=2^(m-(m-1)*t)*s;
11661  *     end for;
11662  *     A:=2^(k-2-M*t);
11663  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
11664  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
11665  *     seclevel:=Floor(-Log(2,pkt));
11666  *     if seclevel ge securitybits then
11667  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
11668  *       break;
11669  *     end if;
11670  *   end for;
11671  *   if seclevel ge securitybits then break; end if;
11672  * end for;
11673  *
11674  * It can be run online at:
11675  * http://magma.maths.usyd.edu.au/calc
11676  *
11677  * And will output:
11678  * k:  1024, security: 129 bits  (t: 6, M: 23)
11679  *
11680  * k is the number of bits of the prime, securitybits is the level we want to
11681  * reach.
11682  *
11683  * prime length | RSA key size | # MR tests | security level
11684  * -------------+--------------|------------+---------------
11685  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
11686  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
11687  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
11688  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
11689  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
11690  *  (b) >=  476 |     >=   952 |          5 |         80 bit
11691  *  (b) >=  400 |     >=   800 |          6 |         80 bit
11692  *  (b) >=  347 |     >=   694 |          7 |         80 bit
11693  *  (b) >=  308 |     >=   616 |          8 |         80 bit
11694  *  (b) >=   55 |     >=   110 |         27 |         64 bit
11695  *  (b) >=    6 |     >=    12 |         34 |         64 bit
11696  */
11697 # 451 "/usr/include/openssl/bn.h" 3 4
11698 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
11699 # 472 "/usr/include/openssl/bn.h" 3 4
11700 const BIGNUM *BN_value_one(void);
11701 char *BN_options(void);
11702 BN_CTX *BN_CTX_new(void);
11703 
11704 void BN_CTX_init(BN_CTX *c);
11705 
11706 void BN_CTX_free(BN_CTX *c);
11707 void BN_CTX_start(BN_CTX *ctx);
11708 BIGNUM *BN_CTX_get(BN_CTX *ctx);
11709 void BN_CTX_end(BN_CTX *ctx);
11710 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
11711 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
11712 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
11713 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
11714 int BN_num_bits(const BIGNUM *a);
11715 int BN_num_bits_word(unsigned int);
11716 BIGNUM *BN_new(void);
11717 void BN_init(BIGNUM *);
11718 void BN_clear_free(BIGNUM *a);
11719 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
11720 void BN_swap(BIGNUM *a, BIGNUM *b);
11721 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
11722 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
11723 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
11724 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
11725 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
11726 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
11727 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
11728 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
11729 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
11730 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
11731 /** BN_set_negative sets sign of a BIGNUM
11732  * \param  b  pointer to the BIGNUM object
11733  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
11734  */
11735 void BN_set_negative(BIGNUM *b, int n);
11736 /** BN_is_negative returns 1 if the BIGNUM is negative
11737  * \param  a  pointer to the BIGNUM object
11738  * \return 1 if a < 0 and 0 otherwise
11739  */
11740 
11741 
11742 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
11743            BN_CTX *ctx);
11744 
11745 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
11746 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
11747                BN_CTX *ctx);
11748 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11749                      const BIGNUM *m);
11750 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
11751                BN_CTX *ctx);
11752 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11753                      const BIGNUM *m);
11754 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
11755                BN_CTX *ctx);
11756 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
11757 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
11758 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
11759 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
11760                   BN_CTX *ctx);
11761 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
11762 
11763 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
11764 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
11765 int BN_mul_word(BIGNUM *a, unsigned int w);
11766 int BN_add_word(BIGNUM *a, unsigned int w);
11767 int BN_sub_word(BIGNUM *a, unsigned int w);
11768 int BN_set_word(BIGNUM *a, unsigned int w);
11769 unsigned int BN_get_word(const BIGNUM *a);
11770 
11771 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
11772 void BN_free(BIGNUM *a);
11773 int BN_is_bit_set(const BIGNUM *a, int n);
11774 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
11775 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
11776 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11777 
11778 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
11779                const BIGNUM *m, BN_CTX *ctx);
11780 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
11781                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
11782 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
11783                               const BIGNUM *m, BN_CTX *ctx,
11784                               BN_MONT_CTX *in_mont);
11785 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
11786                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
11787 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
11788                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
11789                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
11790 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
11791                       const BIGNUM *m, BN_CTX *ctx);
11792 
11793 int BN_mask_bits(BIGNUM *a, int n);
11794 
11795 int BN_print_fp(FILE *fp, const BIGNUM *a);
11796 
11797 
11798 int BN_print(BIO *fp, const BIGNUM *a);
11799 
11800 
11801 
11802 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
11803 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
11804 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
11805 void BN_clear(BIGNUM *a);
11806 BIGNUM *BN_dup(const BIGNUM *a);
11807 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
11808 int BN_set_bit(BIGNUM *a, int n);
11809 int BN_clear_bit(BIGNUM *a, int n);
11810 char *BN_bn2hex(const BIGNUM *a);
11811 char *BN_bn2dec(const BIGNUM *a);
11812 int BN_hex2bn(BIGNUM **a, const char *str);
11813 int BN_dec2bn(BIGNUM **a, const char *str);
11814 int BN_asc2bn(BIGNUM **a, const char *str);
11815 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
11816 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
11817                                                                   * -2 for
11818                                                                   * error */
11819 BIGNUM *BN_mod_inverse(BIGNUM *ret,
11820                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
11821 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
11822                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
11823 
11824 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
11825 
11826 /* Deprecated versions */
11827 
11828 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
11829                           const BIGNUM *add, const BIGNUM *rem,
11830                           void (*callback) (int, int, void *), void *cb_arg);
11831 int BN_is_prime(const BIGNUM *p, int nchecks,
11832                 void (*callback) (int, int, void *),
11833                 BN_CTX *ctx, void *cb_arg);
11834 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
11835                          void (*callback) (int, int, void *), BN_CTX *ctx,
11836                          void *cb_arg, int do_trial_division);
11837 
11838 
11839 /* Newer versions */
11840 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
11841                          const BIGNUM *rem, BN_GENCB *cb);
11842 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
11843 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
11844                             int do_trial_division, BN_GENCB *cb);
11845 
11846 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
11847 
11848 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
11849                             const BIGNUM *Xp, const BIGNUM *Xp1,
11850                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
11851                             BN_GENCB *cb);
11852 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
11853                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
11854                               BN_CTX *ctx, BN_GENCB *cb);
11855 
11856 BN_MONT_CTX *BN_MONT_CTX_new(void);
11857 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
11858 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11859                           BN_MONT_CTX *mont, BN_CTX *ctx);
11860 
11861 
11862 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
11863                        BN_MONT_CTX *mont, BN_CTX *ctx);
11864 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
11865 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
11866 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
11867 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
11868                                     const BIGNUM *mod, BN_CTX *ctx);
11869 
11870 /* BN_BLINDING flags */
11871 
11872 
11873 
11874 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
11875 void BN_BLINDING_free(BN_BLINDING *b);
11876 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
11877 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
11878 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
11879 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
11880 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
11881                           BN_CTX *);
11882 
11883 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
11884 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
11885 
11886 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
11887 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
11888 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
11889 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
11890                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
11891                                       int (*bn_mod_exp) (BIGNUM *r,
11892                                                          const BIGNUM *a,
11893                                                          const BIGNUM *p,
11894                                                          const BIGNUM *m,
11895                                                          BN_CTX *ctx,
11896                                                          BN_MONT_CTX *m_ctx),
11897                                       BN_MONT_CTX *m_ctx);
11898 
11899 
11900 void BN_set_params(int mul, int high, int low, int mont);
11901 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
11902 
11903 
11904 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
11905 BN_RECP_CTX *BN_RECP_CTX_new(void);
11906 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
11907 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
11908 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
11909                           BN_RECP_CTX *recp, BN_CTX *ctx);
11910 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
11911                     const BIGNUM *m, BN_CTX *ctx);
11912 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
11913                 BN_RECP_CTX *recp, BN_CTX *ctx);
11914 
11915 
11916 
11917 /*
11918  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
11919  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
11920  * ignored. Note that input arguments are not const so that their bit arrays
11921  * can be expanded to the appropriate size if needed.
11922  */
11923 
11924 /*
11925  * r = a + b
11926  */
11927 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
11928 
11929 /*
11930  * r=a mod p
11931  */
11932 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
11933 /* r = (a * b) mod p */
11934 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11935                     const BIGNUM *p, BN_CTX *ctx);
11936 /* r = (a * a) mod p */
11937 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11938 /* r = (1 / b) mod p */
11939 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
11940 /* r = (a / b) mod p */
11941 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11942                     const BIGNUM *p, BN_CTX *ctx);
11943 /* r = (a ^ b) mod p */
11944 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11945                     const BIGNUM *p, BN_CTX *ctx);
11946 /* r = sqrt(a) mod p */
11947 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
11948                      BN_CTX *ctx);
11949 /* r^2 + r = a mod p */
11950 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
11951                            BN_CTX *ctx);
11952 
11953 /*-
11954  * Some functions allow for representation of the irreducible polynomials
11955  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
11956  *     t^p[0] + t^p[1] + ... + t^p[k]
11957  * where m = p[0] > p[1] > ... > p[k] = 0.
11958  */
11959 /* r = a mod p */
11960 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
11961 /* r = (a * b) mod p */
11962 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11963                         const int p[], BN_CTX *ctx);
11964 /* r = (a * a) mod p */
11965 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
11966                         BN_CTX *ctx);
11967 /* r = (1 / b) mod p */
11968 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
11969                         BN_CTX *ctx);
11970 /* r = (a / b) mod p */
11971 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11972                         const int p[], BN_CTX *ctx);
11973 /* r = (a ^ b) mod p */
11974 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
11975                         const int p[], BN_CTX *ctx);
11976 /* r = sqrt(a) mod p */
11977 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
11978                          const int p[], BN_CTX *ctx);
11979 /* r^2 + r = a mod p */
11980 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
11981                                const int p[], BN_CTX *ctx);
11982 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
11983 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
11984 
11985 
11986 
11987 /*
11988  * faster mod functions for the 'NIST primes' 0 <= a < p^2
11989  */
11990 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11991 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11992 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11993 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11994 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
11995 
11996 const BIGNUM *BN_get0_nist_prime_192(void);
11997 const BIGNUM *BN_get0_nist_prime_224(void);
11998 const BIGNUM *BN_get0_nist_prime_256(void);
11999 const BIGNUM *BN_get0_nist_prime_384(void);
12000 const BIGNUM *BN_get0_nist_prime_521(void);
12001 
12002 /* library internal functions */
12003 # 788 "/usr/include/openssl/bn.h" 3 4
12004 BIGNUM *bn_expand2(BIGNUM *a, int words);
12005 
12006 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
12007 
12008 
12009 /*-
12010  * Bignum consistency macros
12011  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
12012  * bignum data after direct manipulations on the data. There is also an
12013  * "internal" macro, bn_check_top(), for verifying that there are no leading
12014  * zeroes. Unfortunately, some auditing is required due to the fact that
12015  * bn_fix_top() has become an overabused duct-tape because bignum data is
12016  * occasionally passed around in an inconsistent state. So the following
12017  * changes have been made to sort this out;
12018  * - bn_fix_top()s implementation has been moved to bn_correct_top()
12019  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
12020  *   bn_check_top() is as before.
12021  * - if BN_DEBUG *is* defined;
12022  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
12023  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
12024  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
12025  * The idea is to have debug builds flag up inconsistent bignums when they
12026  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
12027  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
12028  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
12029  * was not appropriate, we convert it permanently to bn_check_top() and track
12030  * down the cause of the bug. Eventually, no internal code should be using the
12031  * bn_fix_top() macro. External applications and libraries should try this with
12032  * their own code too, both in terms of building against the openssl headers
12033  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
12034  * defined. This not only improves external code, it provides more test
12035  * coverage for openssl's own code.
12036  */
12037 # 914 "/usr/include/openssl/bn.h" 3 4
12038 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
12039                           unsigned int w);
12040 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
12041 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
12042 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
12043 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
12044                       int num);
12045 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
12046                       int num);
12047 
12048 /* Primes from RFC 2409 */
12049 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
12050 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
12051 
12052 /* Primes from RFC 3526 */
12053 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
12054 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
12055 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
12056 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
12057 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
12058 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
12059 
12060 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
12061 
12062 /* BEGIN ERROR CODES */
12063 /*
12064  * The following lines are auto generated by the script mkerr.pl. Any changes
12065  * made after this point may be overwritten when the script is next run.
12066  */
12067 void ERR_load_BN_strings(void);
12068 
12069 /* Error codes for the BN functions. */
12070 
12071 /* Function codes. */
12072 # 991 "/usr/include/openssl/bn.h" 3 4
12073 /* Reason codes. */
12074 # 75 "/usr/include/openssl/asn1.h" 2 3 4
12075 # 132 "/usr/include/openssl/asn1.h" 3 4
12076 /* For use with d2i_ASN1_type_bytes() */
12077 # 152 "/usr/include/openssl/asn1.h" 3 4
12078 /* For use with ASN1_mbstring_copy() */
12079 # 161 "/usr/include/openssl/asn1.h" 3 4
12080     struct X509_algor_st;
12081 struct stack_st_X509_ALGOR { _STACK stack; };
12082 
12083 
12084 
12085 
12086 /*
12087  * We MUST make sure that, except for constness, asn1_ctx_st and
12088  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
12089  * parsing macros are gone, we can throw this away as well...
12090  */
12091 typedef struct asn1_ctx_st {
12092     unsigned char *p; /* work char pointer */
12093     int eos; /* end of sequence read for indefinite
12094                                  * encoding */
12095     int error; /* error code to use when returning an error */
12096     int inf; /* constructed if 0x20, indefinite is 0x21 */
12097     int tag; /* tag from last 'get object' */
12098     int xclass; /* class from last 'get object' */
12099     long slen; /* length of last 'get object' */
12100     unsigned char *max; /* largest value of p allowed */
12101     unsigned char *q; /* temporary variable */
12102     unsigned char **pp; /* variable */
12103     int line; /* used in error processing */
12104 } ASN1_CTX;
12105 
12106 typedef struct asn1_const_ctx_st {
12107     const unsigned char *p; /* work char pointer */
12108     int eos; /* end of sequence read for indefinite
12109                                  * encoding */
12110     int error; /* error code to use when returning an error */
12111     int inf; /* constructed if 0x20, indefinite is 0x21 */
12112     int tag; /* tag from last 'get object' */
12113     int xclass; /* class from last 'get object' */
12114     long slen; /* length of last 'get object' */
12115     const unsigned char *max; /* largest value of p allowed */
12116     const unsigned char *q; /* temporary variable */
12117     const unsigned char **pp; /* variable */
12118     int line; /* used in error processing */
12119 } ASN1_const_CTX;
12120 
12121 /*
12122  * These are used internally in the ASN1_OBJECT to keep track of whether the
12123  * names and data need to be free()ed
12124  */
12125 
12126 
12127 
12128 
12129 struct asn1_object_st {
12130     const char *sn, *ln;
12131     int nid;
12132     int length;
12133     const unsigned char *data; /* data remains const after init */
12134     int flags; /* Should we free this one */
12135 };
12136 
12137 
12138 /*
12139  * This indicates that the ASN1_STRING is not a real value but just a place
12140  * holder for the location where indefinite length constructed data should be
12141  * inserted in the memory buffer
12142  */
12143 
12144 
12145 /*
12146  * This flag is used by the CMS code to indicate that a string is not
12147  * complete and is a place holder for content when it had all been accessed.
12148  * The flag will be reset when content has been written to it.
12149  */
12150 
12151 
12152 /*
12153  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
12154  * type.
12155  */
12156 
12157 /* This is the base type that holds just about everything :-) */
12158 struct asn1_string_st {
12159     int length;
12160     int type;
12161     unsigned char *data;
12162     /*
12163      * The value of the following field depends on the type being held.  It
12164      * is mostly being used for BIT_STRING so if the input data has a
12165      * non-zero 'unused bits' value, it will be handled correctly
12166      */
12167     long flags;
12168 };
12169 
12170 /*
12171  * ASN1_ENCODING structure: this is used to save the received encoding of an
12172  * ASN1 type. This is useful to get round problems with invalid encodings
12173  * which can break signatures.
12174  */
12175 
12176 typedef struct ASN1_ENCODING_st {
12177     unsigned char *enc; /* DER encoding */
12178     long len; /* Length of encoding */
12179     int modified; /* set to 1 if 'enc' is invalid */
12180 } ASN1_ENCODING;
12181 
12182 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
12183 # 272 "/usr/include/openssl/asn1.h" 3 4
12184 typedef struct asn1_string_table_st {
12185     int nid;
12186     long minsize;
12187     long maxsize;
12188     unsigned long mask;
12189     unsigned long flags;
12190 } ASN1_STRING_TABLE;
12191 
12192 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
12193 
12194 /* size limits: this stuff is taken straight from RFC2459 */
12195 # 293 "/usr/include/openssl/asn1.h" 3 4
12196 /*
12197  * Declarations for template structures: for full definitions see asn1t.h
12198  */
12199 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
12200 typedef struct ASN1_TLC_st ASN1_TLC;
12201 /* This is just an opaque pointer */
12202 typedef struct ASN1_VALUE_st ASN1_VALUE;
12203 
12204 /* Declare ASN1 functions: the implement macro in in asn1t.h */
12205 # 363 "/usr/include/openssl/asn1.h" 3 4
12206 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
12207 
12208 /*-
12209  * The following macros and typedefs allow an ASN1_ITEM
12210  * to be embedded in a structure and referenced. Since
12211  * the ASN1_ITEM pointers need to be globally accessible
12212  * (possibly from shared libraries) they may exist in
12213  * different forms. On platforms that support it the
12214  * ASN1_ITEM structure itself will be globally exported.
12215  * Other platforms will export a function that returns
12216  * an ASN1_ITEM pointer.
12217  *
12218  * To handle both cases transparently the macros below
12219  * should be used instead of hard coding an ASN1_ITEM
12220  * pointer in a structure.
12221  *
12222  * The structure will look like this:
12223  *
12224  * typedef struct SOMETHING_st {
12225  *      ...
12226  *      ASN1_ITEM_EXP *iptr;
12227  *      ...
12228  * } SOMETHING;
12229  *
12230  * It would be initialised as e.g.:
12231  *
12232  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
12233  *
12234  * and the actual pointer extracted with:
12235  *
12236  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
12237  *
12238  * Finally an ASN1_ITEM pointer can be extracted from an
12239  * appropriate reference with: ASN1_ITEM_rptr(X509). This
12240  * would be used when a function takes an ASN1_ITEM * argument.
12241  *
12242  */
12243 
12244 
12245 
12246 /* ASN1_ITEM pointer exported type */
12247 typedef const ASN1_ITEM ASN1_ITEM_EXP;
12248 
12249 /* Macro to obtain ASN1_ITEM pointer from exported type */
12250 
12251 
12252 /* Macro to include ASN1_ITEM pointer from base type */
12253 # 440 "/usr/include/openssl/asn1.h" 3 4
12254 /* Parameters used by ASN1_STRING_print_ex() */
12255 
12256 /*
12257  * These determine which characters to escape: RFC2253 special characters,
12258  * control characters and MSB set characters
12259  */
12260 
12261 
12262 
12263 
12264 
12265 /*
12266  * This flag determines how we do escaping: normally RC2253 backslash only,
12267  * set this to use backslash and quote.
12268  */
12269 
12270 
12271 
12272 /* These three flags are internal use only. */
12273 
12274 /* Character is a valid PrintableString character */
12275 
12276 /* Character needs escaping if it is the first character */
12277 
12278 /* Character needs escaping if it is the last character */
12279 
12280 
12281 /*
12282  * NB the internal flags are safely reused below by flags handled at the top
12283  * level.
12284  */
12285 
12286 /*
12287  * If this is set we convert all character strings to UTF8 first
12288  */
12289 
12290 
12291 
12292 /*
12293  * If this is set we don't attempt to interpret content: just assume all
12294  * strings are 1 byte per character. This will produce some pretty odd
12295  * looking output!
12296  */
12297 
12298 
12299 
12300 /* If this is set we include the string type in the output */
12301 
12302 
12303 /*
12304  * This determines which strings to display and which to 'dump' (hex dump of
12305  * content octets or DER encoding). We can only dump non character strings or
12306  * everything. If we don't dump 'unknown' they are interpreted as character
12307  * strings with 1 octet per character and are subject to the usual escaping
12308  * options.
12309  */
12310 
12311 
12312 
12313 
12314 /*
12315  * These determine what 'dumping' does, we can dump the content octets or the
12316  * DER encoding: both use the RFC2253 #XXXXX notation.
12317  */
12318 
12319 
12320 
12321 /*
12322  * All the string flags consistent with RFC2253, escaping control characters
12323  * isn't essential in RFC2253 but it is advisable anyway.
12324  */
12325 # 519 "/usr/include/openssl/asn1.h" 3 4
12326 struct stack_st_ASN1_INTEGER { _STACK stack; };
12327 
12328 
12329 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
12330 
12331 typedef struct asn1_type_st {
12332     int type;
12333     union {
12334         char *ptr;
12335         ASN1_BOOLEAN boolean;
12336         ASN1_STRING *asn1_string;
12337         ASN1_OBJECT *object;
12338         ASN1_INTEGER *integer;
12339         ASN1_ENUMERATED *enumerated;
12340         ASN1_BIT_STRING *bit_string;
12341         ASN1_OCTET_STRING *octet_string;
12342         ASN1_PRINTABLESTRING *printablestring;
12343         ASN1_T61STRING *t61string;
12344         ASN1_IA5STRING *ia5string;
12345         ASN1_GENERALSTRING *generalstring;
12346         ASN1_BMPSTRING *bmpstring;
12347         ASN1_UNIVERSALSTRING *universalstring;
12348         ASN1_UTCTIME *utctime;
12349         ASN1_GENERALIZEDTIME *generalizedtime;
12350         ASN1_VISIBLESTRING *visiblestring;
12351         ASN1_UTF8STRING *utf8string;
12352         /*
12353          * set and sequence are left complete and still contain the set or
12354          * sequence bytes
12355          */
12356         ASN1_STRING *set;
12357         ASN1_STRING *sequence;
12358         ASN1_VALUE *asn1_value;
12359     } value;
12360 } ASN1_TYPE;
12361 
12362 struct stack_st_ASN1_TYPE { _STACK stack; };
12363 
12364 
12365 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
12366 
12367 ASN1_SEQUENCE_ANY *d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); int i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM ASN1_SEQUENCE_ANY_it;
12368 ASN1_SEQUENCE_ANY *d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **a, const unsigned char **in, long len); int i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out); extern const ASN1_ITEM ASN1_SET_ANY_it;
12369 
12370 typedef struct NETSCAPE_X509_st {
12371     ASN1_OCTET_STRING *header;
12372     X509 *cert;
12373 } NETSCAPE_X509;
12374 
12375 /* This is used to contain a list of bit names */
12376 typedef struct BIT_STRING_BITNAME_st {
12377     int bitnum;
12378     const char *lname;
12379     const char *sname;
12380 } BIT_STRING_BITNAME;
12381 
12382 
12383 
12384 
12385 
12386 
12387 /* Macros for string operations */
12388 # 772 "/usr/include/openssl/asn1.h" 3 4
12389   /* for the is_set parameter to i2d_ASN1_SET */
12390 
12391 
12392 
12393 ASN1_TYPE *ASN1_TYPE_new(void); void ASN1_TYPE_free(ASN1_TYPE *a); ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, const unsigned char **in, long len); int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **out); extern const ASN1_ITEM ASN1_ANY_it;
12394 
12395 int ASN1_TYPE_get(ASN1_TYPE *a);
12396 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
12397 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
12398 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
12399 
12400 ASN1_OBJECT *ASN1_OBJECT_new(void);
12401 void ASN1_OBJECT_free(ASN1_OBJECT *a);
12402 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
12403 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
12404                              long length);
12405 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
12406                              long length);
12407 
12408 extern const ASN1_ITEM ASN1_OBJECT_it;
12409 
12410 struct stack_st_ASN1_OBJECT { _STACK stack; };
12411 
12412 
12413 ASN1_STRING *ASN1_STRING_new(void);
12414 void ASN1_STRING_free(ASN1_STRING *a);
12415 void ASN1_STRING_clear_free(ASN1_STRING *a);
12416 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
12417 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
12418 ASN1_STRING *ASN1_STRING_type_new(int type);
12419 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
12420   /*
12421    * Since this is used to store all sorts of things, via macros, for now,
12422    * make its data void *
12423    */
12424 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
12425 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
12426 int ASN1_STRING_length(const ASN1_STRING *x);
12427 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
12428 int ASN1_STRING_type(ASN1_STRING *x);
12429 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
12430 
12431 ASN1_BIT_STRING *ASN1_BIT_STRING_new(void); void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **in, long len); int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_BIT_STRING_it;
12432 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
12433 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
12434                                      const unsigned char **pp, long length);
12435 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
12436 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
12437 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
12438 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
12439                           unsigned char *flags, int flags_len);
12440 
12441 
12442 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
12443                                BIT_STRING_BITNAME *tbl, int indent);
12444 
12445 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
12446 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
12447                             BIT_STRING_BITNAME *tbl);
12448 
12449 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
12450 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
12451 
12452 ASN1_INTEGER *ASN1_INTEGER_new(void); void ASN1_INTEGER_free(ASN1_INTEGER *a); ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **in, long len); int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **out); extern const ASN1_ITEM ASN1_INTEGER_it;
12453 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
12454 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
12455                                long length);
12456 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
12457                                 long length);
12458 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
12459 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
12460 
12461 ASN1_ENUMERATED *ASN1_ENUMERATED_new(void); void ASN1_ENUMERATED_free(ASN1_ENUMERATED *a); ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, const unsigned char **in, long len); int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **out); extern const ASN1_ITEM ASN1_ENUMERATED_it;
12462 
12463 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
12464 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
12465 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
12466                                int offset_day, long offset_sec);
12467 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
12468 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
12469 
12470 
12471 
12472 
12473 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
12474 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
12475                                                time_t t);
12476 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
12477                                                time_t t, int offset_day,
12478                                                long offset_sec);
12479 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
12480 int ASN1_TIME_diff(int *pday, int *psec,
12481                    const ASN1_TIME *from, const ASN1_TIME *to);
12482 
12483 ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void); void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *a); ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a, const unsigned char **in, long len); int i2d_ASN1_OCTET_STRING(ASN1_OCTET_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_OCTET_STRING_it;
12484 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
12485 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
12486                           const ASN1_OCTET_STRING *b);
12487 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
12488                           int len);
12489 
12490 ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void); void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *a); ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, const unsigned char **in, long len); int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_VISIBLESTRING_it;
12491 ASN1_UNIVERSALSTRING *ASN1_UNIVERSALSTRING_new(void); void ASN1_UNIVERSALSTRING_free(ASN1_UNIVERSALSTRING *a); ASN1_UNIVERSALSTRING *d2i_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING **a, const unsigned char **in, long len); int i2d_ASN1_UNIVERSALSTRING(ASN1_UNIVERSALSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_UNIVERSALSTRING_it;
12492 ASN1_UTF8STRING *ASN1_UTF8STRING_new(void); void ASN1_UTF8STRING_free(ASN1_UTF8STRING *a); ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, const unsigned char **in, long len); int i2d_ASN1_UTF8STRING(ASN1_UTF8STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_UTF8STRING_it;
12493 ASN1_NULL *ASN1_NULL_new(void); void ASN1_NULL_free(ASN1_NULL *a); ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, const unsigned char **in, long len); int i2d_ASN1_NULL(ASN1_NULL *a, unsigned char **out); extern const ASN1_ITEM ASN1_NULL_it;
12494 ASN1_BMPSTRING *ASN1_BMPSTRING_new(void); void ASN1_BMPSTRING_free(ASN1_BMPSTRING *a); ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, const unsigned char **in, long len); int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_BMPSTRING_it;
12495 
12496 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
12497 int UTF8_putc(unsigned char *str, int len, unsigned long value);
12498 
12499 ASN1_STRING *ASN1_PRINTABLE_new(void); void ASN1_PRINTABLE_free(ASN1_STRING *a); ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in, long len); int i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_PRINTABLE_it;
12500 
12501 ASN1_STRING *DIRECTORYSTRING_new(void); void DIRECTORYSTRING_free(ASN1_STRING *a); ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, const unsigned char **in, long len); int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM DIRECTORYSTRING_it;
12502 ASN1_STRING *DISPLAYTEXT_new(void); void DISPLAYTEXT_free(ASN1_STRING *a); ASN1_STRING *d2i_DISPLAYTEXT(ASN1_STRING **a, const unsigned char **in, long len); int i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **out); extern const ASN1_ITEM DISPLAYTEXT_it;
12503 ASN1_PRINTABLESTRING *ASN1_PRINTABLESTRING_new(void); void ASN1_PRINTABLESTRING_free(ASN1_PRINTABLESTRING *a); ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a, const unsigned char **in, long len); int i2d_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_PRINTABLESTRING_it;
12504 ASN1_T61STRING *ASN1_T61STRING_new(void); void ASN1_T61STRING_free(ASN1_T61STRING *a); ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, const unsigned char **in, long len); int i2d_ASN1_T61STRING(ASN1_T61STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_T61STRING_it;
12505 ASN1_IA5STRING *ASN1_IA5STRING_new(void); void ASN1_IA5STRING_free(ASN1_IA5STRING *a); ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, const unsigned char **in, long len); int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_IA5STRING_it;
12506 ASN1_GENERALSTRING *ASN1_GENERALSTRING_new(void); void ASN1_GENERALSTRING_free(ASN1_GENERALSTRING *a); ASN1_GENERALSTRING *d2i_ASN1_GENERALSTRING(ASN1_GENERALSTRING **a, const unsigned char **in, long len); int i2d_ASN1_GENERALSTRING(ASN1_GENERALSTRING *a, unsigned char **out); extern const ASN1_ITEM ASN1_GENERALSTRING_it;
12507 ASN1_UTCTIME *ASN1_UTCTIME_new(void); void ASN1_UTCTIME_free(ASN1_UTCTIME *a); ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, const unsigned char **in, long len); int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_UTCTIME_it;
12508 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void); void ASN1_GENERALIZEDTIME_free(ASN1_GENERALIZEDTIME *a); ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, const unsigned char **in, long len); int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_GENERALIZEDTIME_it;
12509 ASN1_TIME *ASN1_TIME_new(void); void ASN1_TIME_free(ASN1_TIME *a); ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len); int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out); extern const ASN1_ITEM ASN1_TIME_it;
12510 
12511 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
12512 
12513 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
12514 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
12515                          int offset_day, long offset_sec);
12516 int ASN1_TIME_check(ASN1_TIME *t);
12517 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
12518                                                    **out);
12519 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
12520 
12521 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
12522                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
12523 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
12524                                       const unsigned char **pp,
12525                                       long length, d2i_of_void *d2i,
12526                                       void (*free_func) (OPENSSL_BLOCK),
12527                                       int ex_tag, int ex_class);
12528 
12529 
12530 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
12531 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
12532 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
12533 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
12534 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
12535 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
12536 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
12537 
12538 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
12539 
12540 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
12541 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
12542                                 const char *sn, const char *ln);
12543 
12544 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
12545 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
12546 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
12547 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
12548 
12549 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
12550 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
12551 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
12552 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
12553 
12554 /* General */
12555 /* given a string, return the correct type, max is the maximum length */
12556 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
12557 
12558 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
12559 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
12560                             long length, int Ptag, int Pclass);
12561 unsigned long ASN1_tag2bit(int tag);
12562 /* type is one or more of the B_ASN1_ values. */
12563 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
12564                                  long length, int type);
12565 
12566 /* PARSING */
12567 int asn1_Finish(ASN1_CTX *c);
12568 int asn1_const_Finish(ASN1_const_CTX *c);
12569 
12570 /* SPECIALS */
12571 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
12572                     int *pclass, long omax);
12573 int ASN1_check_infinite_end(unsigned char **p, long len);
12574 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
12575 void ASN1_put_object(unsigned char **pp, int constructed, int length,
12576                      int tag, int xclass);
12577 int ASN1_put_eoc(unsigned char **pp);
12578 int ASN1_object_size(int constructed, int length, int tag);
12579 
12580 /* Used to implement other functions */
12581 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
12582 # 976 "/usr/include/openssl/asn1.h" 3 4
12583 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
12584 
12585 /* ASN1 alloc/free macros for when a type is only used internally */
12586 
12587 
12588 
12589 
12590 
12591 
12592 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
12593 
12594 
12595 
12596 
12597 
12598 
12599 
12600 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
12601 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
12602 # 1006 "/usr/include/openssl/asn1.h" 3 4
12603 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
12604 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
12605 
12606 
12607 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
12608 
12609 
12610 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
12611 
12612 
12613 
12614 
12615 
12616 
12617 
12618 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
12619 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
12620 # 1034 "/usr/include/openssl/asn1.h" 3 4
12621 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
12622 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
12623 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
12624 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
12625 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
12626 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
12627 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
12628                   unsigned char *buf, int off);
12629 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
12630 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
12631                     int dump);
12632 
12633 const char *ASN1_tag2str(int tag);
12634 
12635 /* Used to load and write netscape format cert */
12636 
12637 NETSCAPE_X509 *NETSCAPE_X509_new(void); void NETSCAPE_X509_free(NETSCAPE_X509 *a); NETSCAPE_X509 *d2i_NETSCAPE_X509(NETSCAPE_X509 **a, const unsigned char **in, long len); int i2d_NETSCAPE_X509(NETSCAPE_X509 *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_X509_it;
12638 
12639 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
12640 
12641 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
12642 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
12643 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
12644                                   unsigned char *data, int len);
12645 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
12646                                   unsigned char *data, int max_len);
12647 
12648 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
12649                                          d2i_of_void *d2i,
12650                                          void (*free_func) (OPENSSL_BLOCK));
12651 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
12652                              unsigned char **buf, int *len);
12653 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
12654 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
12655 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
12656                               ASN1_OCTET_STRING **oct);
12657 
12658 
12659 
12660 
12661 
12662 
12663 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
12664                             ASN1_OCTET_STRING **oct);
12665 
12666 void ASN1_STRING_set_default_mask(unsigned long mask);
12667 int ASN1_STRING_set_default_mask_asc(const char *p);
12668 unsigned long ASN1_STRING_get_default_mask(void);
12669 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
12670                        int inform, unsigned long mask);
12671 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
12672                         int inform, unsigned long mask,
12673                         long minsize, long maxsize);
12674 
12675 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
12676                                     const unsigned char *in, int inlen,
12677                                     int inform, int nid);
12678 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
12679 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
12680 void ASN1_STRING_TABLE_cleanup(void);
12681 
12682 /* ASN1 template functions */
12683 
12684 /* Old API compatible functions */
12685 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
12686 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
12687 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
12688                           long len, const ASN1_ITEM *it);
12689 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
12690 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
12691                        const ASN1_ITEM *it);
12692 
12693 void ASN1_add_oid_module(void);
12694 
12695 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
12696 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
12697 
12698 /* ASN1 Print flags */
12699 
12700 /* Indicate missing OPTIONAL fields */
12701 
12702 /* Mark start and end of SEQUENCE */
12703 
12704 /* Mark start and end of SEQUENCE/SET OF */
12705 
12706 /* Show the ASN1 type of primitives */
12707 
12708 /* Don't show ASN1 type of ANY */
12709 
12710 /* Don't show ASN1 type of MSTRINGs */
12711 
12712 /* Don't show field names in SEQUENCE */
12713 
12714 /* Show structure names of each SEQUENCE field */
12715 
12716 /* Don't show structure name even at top level */
12717 
12718 
12719 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
12720                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
12721 ASN1_PCTX *ASN1_PCTX_new(void);
12722 void ASN1_PCTX_free(ASN1_PCTX *p);
12723 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
12724 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
12725 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
12726 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
12727 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
12728 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
12729 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
12730 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
12731 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
12732 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
12733 
12734 BIO_METHOD *BIO_f_asn1(void);
12735 
12736 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
12737 
12738 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
12739                         const ASN1_ITEM *it);
12740 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
12741                               const char *hdr, const ASN1_ITEM *it);
12742 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
12743                      int ctype_nid, int econt_nid,
12744                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
12745 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
12746 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
12747 int SMIME_text(BIO *in, BIO *out);
12748 
12749 /* BEGIN ERROR CODES */
12750 /*
12751  * The following lines are auto generated by the script mkerr.pl. Any changes
12752  * made after this point may be overwritten when the script is next run.
12753  */
12754 
12755 void ERR_load_ASN1_strings(void);
12756 
12757 /* Error codes for the ASN1 functions. */
12758 
12759 /* Function codes. */
12760 # 1298 "/usr/include/openssl/asn1.h" 3 4
12761 /* Reason codes. */
12762 # 966 "/usr/include/openssl/objects.h" 2 3 4
12763 # 984 "/usr/include/openssl/objects.h" 3 4
12764 typedef struct obj_name_st {
12765     int type;
12766     int alias;
12767     const char *name;
12768     const char *data;
12769 } OBJ_NAME;
12770 
12771 
12772 
12773 int OBJ_NAME_init(void);
12774 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
12775                        int (*cmp_func) (const char *, const char *),
12776                        void (*free_func) (const char *, int, const char *));
12777 const char *OBJ_NAME_get(const char *name, int type);
12778 int OBJ_NAME_add(const char *name, int type, const char *data);
12779 int OBJ_NAME_remove(const char *name, int type);
12780 void OBJ_NAME_cleanup(int type); /* -1 for everything */
12781 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
12782                      void *arg);
12783 void OBJ_NAME_do_all_sorted(int type,
12784                             void (*fn) (const OBJ_NAME *, void *arg),
12785                             void *arg);
12786 
12787 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
12788 ASN1_OBJECT *OBJ_nid2obj(int n);
12789 const char *OBJ_nid2ln(int n);
12790 const char *OBJ_nid2sn(int n);
12791 int OBJ_obj2nid(const ASN1_OBJECT *o);
12792 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
12793 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
12794 int OBJ_txt2nid(const char *s);
12795 int OBJ_ln2nid(const char *s);
12796 int OBJ_sn2nid(const char *s);
12797 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
12798 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
12799                          int (*cmp) (const void *, const void *));
12800 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
12801                             int size,
12802                             int (*cmp) (const void *, const void *),
12803                             int flags);
12804 # 1035 "/usr/include/openssl/objects.h" 3 4
12805 /*-
12806  * Unsolved problem: if a type is actually a pointer type, like
12807  * nid_triple is, then its impossible to get a const where you need
12808  * it. Consider:
12809  *
12810  * typedef int nid_triple[3];
12811  * const void *a_;
12812  * const nid_triple const *a = a_;
12813  *
12814  * The assignement discards a const because what you really want is:
12815  *
12816  * const int const * const *a = a_;
12817  *
12818  * But if you do that, you lose the fact that a is an array of 3 ints,
12819  * which breaks comparison functions.
12820  *
12821  * Thus we end up having to cast, sadly, or unpack the
12822  * declarations. Or, as I finally did in this case, delcare nid_triple
12823  * to be a struct, which it should have been in the first place.
12824  *
12825  * Ben, August 2008.
12826  *
12827  * Also, strictly speaking not all types need be const, but handling
12828  * the non-constness means a lot of complication, and in practice
12829  * comparison routines do always not touch their arguments.
12830  */
12831 # 1104 "/usr/include/openssl/objects.h" 3 4
12832 int OBJ_new_nid(int num);
12833 int OBJ_add_object(const ASN1_OBJECT *obj);
12834 int OBJ_create(const char *oid, const char *sn, const char *ln);
12835 void OBJ_cleanup(void);
12836 int OBJ_create_objects(BIO *in);
12837 
12838 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
12839 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
12840 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
12841 void OBJ_sigid_free(void);
12842 
12843 extern int obj_cleanup_defer;
12844 void check_defer(int nid);
12845 
12846 /* BEGIN ERROR CODES */
12847 /*
12848  * The following lines are auto generated by the script mkerr.pl. Any changes
12849  * made after this point may be overwritten when the script is next run.
12850  */
12851 void ERR_load_OBJ_strings(void);
12852 
12853 /* Error codes for the OBJ functions. */
12854 
12855 /* Function codes. */
12856 # 1136 "/usr/include/openssl/objects.h" 3 4
12857 /* Reason codes. */
12858 # 95 "/usr/include/openssl/evp.h" 2 3 4
12859 # 125 "/usr/include/openssl/evp.h" 3 4
12860 /*
12861  * Type needs to be a bit field Sub-type needs to be for variations on the
12862  * method, as in, can it do arbitrary encryption....
12863  */
12864 struct evp_pkey_st {
12865     int type;
12866     int save_type;
12867     int references;
12868     const EVP_PKEY_ASN1_METHOD *ameth;
12869     ENGINE *engine;
12870     union {
12871         char *ptr;
12872 
12873         struct rsa_st *rsa; /* RSA */
12874 
12875 
12876         struct dsa_st *dsa; /* DSA */
12877 
12878 
12879         struct dh_st *dh; /* DH */
12880 
12881 
12882         struct ec_key_st *ec; /* ECC */
12883 
12884     } pkey;
12885     int save_parameters;
12886     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
12887 } /* EVP_PKEY */ ;
12888 
12889 
12890 
12891 
12892 
12893 
12894 
12895 struct env_md_st {
12896     int type;
12897     int pkey_type;
12898     int md_size;
12899     unsigned long flags;
12900     int (*init) (EVP_MD_CTX *ctx);
12901     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
12902     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
12903     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
12904     int (*cleanup) (EVP_MD_CTX *ctx);
12905     /* FIXME: prototype these some day */
12906     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
12907                  unsigned char *sigret, unsigned int *siglen, void *key);
12908     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
12909                    const unsigned char *sigbuf, unsigned int siglen,
12910                    void *key);
12911     int required_pkey_type[5]; /* EVP_PKEY_xxx */
12912     int block_size;
12913     int ctx_size; /* how big does the ctx->md_data need to be */
12914     /* control function */
12915     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
12916 } /* EVP_MD */ ;
12917 
12918 typedef int evp_sign_method(int type, const unsigned char *m,
12919                             unsigned int m_length, unsigned char *sigret,
12920                             unsigned int *siglen, void *key);
12921 typedef int evp_verify_method(int type, const unsigned char *m,
12922                               unsigned int m_length,
12923                               const unsigned char *sigbuf,
12924                               unsigned int siglen, void *key);
12925 
12926 /* digest can only handle a single block */
12927 
12928 
12929 /*
12930  * digest is a "clone" digest used
12931  * which is a copy of an existing
12932  * one for a specific public key type.
12933  * EVP_dss1() etc
12934  */
12935 
12936 
12937 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
12938 
12939 
12940 
12941 /* DigestAlgorithmIdentifier flags... */
12942 
12943 
12944 
12945 /* NULL or absent parameter accepted. Use NULL */
12946 
12947 
12948 
12949 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
12950 
12951 
12952 
12953 /* Custom handling via ctrl */
12954 
12955 
12956 
12957 /* Note if suitable for use in FIPS mode */
12958 
12959 
12960 /* Digest ctrls */
12961 
12962 
12963 
12964 
12965 /* Minimum Algorithm specific ctrl value */
12966 # 268 "/usr/include/openssl/evp.h" 3 4
12967 struct env_md_ctx_st {
12968     const EVP_MD *digest;
12969     ENGINE *engine; /* functional reference if 'digest' is
12970                                  * ENGINE-provided */
12971     unsigned long flags;
12972     void *md_data;
12973     /* Public key context for sign/verify */
12974     EVP_PKEY_CTX *pctx;
12975     /* Update function: usually copied from EVP_MD */
12976     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
12977 } /* EVP_MD_CTX */ ;
12978 
12979 /* values for EVP_MD_CTX flags */
12980 
12981 
12982 
12983 
12984 
12985 
12986 
12987 /*
12988  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
12989  * don't accidentally reuse the values for other purposes.
12990  */
12991 
12992 
12993 
12994 
12995 /*
12996  * The following PAD options are also currently ignored in 1.0.0, digest
12997  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
12998  * instead.
12999  */
13000 
13001 
13002 
13003 
13004 
13005 
13006 
13007 struct evp_cipher_st {
13008     int nid;
13009     int block_size;
13010     /* Default value for variable length ciphers */
13011     int key_len;
13012     int iv_len;
13013     /* Various flags */
13014     unsigned long flags;
13015     /* init key */
13016     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
13017                  const unsigned char *iv, int enc);
13018     /* encrypt/decrypt data */
13019     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
13020                       const unsigned char *in, size_t inl);
13021     /* cleanup ctx */
13022     int (*cleanup) (EVP_CIPHER_CTX *);
13023     /* how big ctx->cipher_data needs to be */
13024     int ctx_size;
13025     /* Populate a ASN1_TYPE with parameters */
13026     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
13027     /* Get parameters from a ASN1_TYPE */
13028     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
13029     /* Miscellaneous operations */
13030     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
13031     /* Application data */
13032     void *app_data;
13033 } /* EVP_CIPHER */ ;
13034 
13035 /* Values for cipher flags */
13036 
13037 /* Modes for ciphers */
13038 # 351 "/usr/include/openssl/evp.h" 3 4
13039 /* Set if variable length cipher */
13040 
13041 /* Set if the iv handling should be done by the cipher itself */
13042 
13043 /* Set if the cipher's init() function should be called if key is NULL */
13044 
13045 /* Call ctrl() to init cipher parameters */
13046 
13047 /* Don't use standard key length function */
13048 
13049 /* Don't use standard block padding */
13050 
13051 /* cipher handles random key generation */
13052 
13053 /* cipher has its own additional copying logic */
13054 
13055 /* Allow use default ASN1 get/set iv */
13056 
13057 /* Buffer length in bits not bytes: CFB1 mode only */
13058 
13059 /* Note if suitable for use in FIPS mode */
13060 
13061 /* Allow non FIPS cipher in FIPS mode */
13062 
13063 /*
13064  * Cipher handles any and all padding logic as well as finalisation.
13065  */
13066 
13067 
13068 
13069 
13070 /*
13071  * Cipher context flag to indicate we can handle wrap mode: if allowed in
13072  * older applications it could overflow buffers.
13073  */
13074 
13075 
13076 
13077 /* ctrl() values */
13078 # 410 "/usr/include/openssl/evp.h" 3 4
13079 /*
13080  * AEAD cipher deduces payload length and returns number of bytes required to
13081  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
13082  * appends/verifies MAC.
13083  */
13084 
13085 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
13086 
13087 /* Set the GCM invocation field, decrypt only */
13088 
13089 
13090 
13091 
13092 
13093 
13094 
13095 /* RFC 5246 defines additional data to be 13 bytes in length */
13096 
13097 
13098 typedef struct {
13099     unsigned char *out;
13100     const unsigned char *inp;
13101     size_t len;
13102     unsigned int interleave;
13103 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
13104 
13105 /* GCM TLS constants */
13106 /* Length of fixed part of IV derived from PRF */
13107 
13108 /* Length of explicit part of IV part of TLS records */
13109 
13110 /* Length of tag for TLS */
13111 
13112 
13113 typedef struct evp_cipher_info_st {
13114     const EVP_CIPHER *cipher;
13115     unsigned char iv[16];
13116 } EVP_CIPHER_INFO;
13117 
13118 struct evp_cipher_ctx_st {
13119     const EVP_CIPHER *cipher;
13120     ENGINE *engine; /* functional reference if 'cipher' is
13121                                  * ENGINE-provided */
13122     int encrypt; /* encrypt or decrypt */
13123     int buf_len; /* number we have left */
13124     unsigned char oiv[16]; /* original iv */
13125     unsigned char iv[16]; /* working iv */
13126     unsigned char buf[32]; /* saved partial block */
13127     int num; /* used by cfb/ofb/ctr mode */
13128     void *app_data; /* application stuff */
13129     int key_len; /* May change for variable length cipher */
13130     unsigned long flags; /* Various flags */
13131     void *cipher_data; /* per EVP data */
13132     int final_used;
13133     int block_mask;
13134     unsigned char final[32]; /* possible final block */
13135 } /* EVP_CIPHER_CTX */ ;
13136 
13137 typedef struct evp_Encode_Ctx_st {
13138     /* number saved in a partial encode/decode */
13139     int num;
13140     /*
13141      * The length is either the output line length (in input bytes) or the
13142      * shortest input line length that is ok.  Once decoding begins, the
13143      * length is adjusted up each time a longer line is decoded
13144      */
13145     int length;
13146     /* data to encode */
13147     unsigned char enc_data[80];
13148     /* number read on current line */
13149     int line_num;
13150     int expect_nl;
13151 } EVP_ENCODE_CTX;
13152 
13153 /* Password based encryption function */
13154 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
13155                               int passlen, ASN1_TYPE *param,
13156                               const EVP_CIPHER *cipher, const EVP_MD *md,
13157                               int en_de);
13158 # 510 "/usr/include/openssl/evp.h" 3 4
13159 /* Add some extra combinations */
13160 
13161 
13162 
13163 
13164 
13165 int EVP_MD_type(const EVP_MD *md);
13166 
13167 
13168 int EVP_MD_pkey_type(const EVP_MD *md);
13169 int EVP_MD_size(const EVP_MD *md);
13170 int EVP_MD_block_size(const EVP_MD *md);
13171 unsigned long EVP_MD_flags(const EVP_MD *md);
13172 
13173 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
13174 
13175 
13176 
13177 
13178 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
13179 
13180 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
13181 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
13182 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
13183 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
13184 
13185 
13186 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
13187 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
13188 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
13189 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
13190 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
13191 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
13192 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
13193 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
13194 
13195 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
13196 # 574 "/usr/include/openssl/evp.h" 3 4
13197 int EVP_Cipher(EVP_CIPHER_CTX *c,
13198                unsigned char *out, const unsigned char *in, unsigned int inl);
13199 # 586 "/usr/include/openssl/evp.h" 3 4
13200 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
13201 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
13202 EVP_MD_CTX *EVP_MD_CTX_create(void);
13203 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
13204 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
13205 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
13206 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
13207 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
13208 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
13209 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
13210 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
13211 int EVP_Digest(const void *data, size_t count,
13212                unsigned char *md, unsigned int *size, const EVP_MD *type,
13213                ENGINE *impl);
13214 
13215 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
13216 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
13217 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
13218 
13219 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
13220 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
13221                            const char *prompt, int verify);
13222 void EVP_set_pw_prompt(const char *prompt);
13223 char *EVP_get_pw_prompt(void);
13224 
13225 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
13226                    const unsigned char *salt, const unsigned char *data,
13227                    int datal, int count, unsigned char *key,
13228                    unsigned char *iv);
13229 
13230 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
13231 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
13232 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
13233 
13234 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13235                     const unsigned char *key, const unsigned char *iv);
13236 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13237                        ENGINE *impl, const unsigned char *key,
13238                        const unsigned char *iv);
13239 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13240                       const unsigned char *in, int inl);
13241 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13242 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13243 
13244 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13245                     const unsigned char *key, const unsigned char *iv);
13246 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13247                        ENGINE *impl, const unsigned char *key,
13248                        const unsigned char *iv);
13249 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13250                       const unsigned char *in, int inl);
13251 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13252 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13253 
13254 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13255                    const unsigned char *key, const unsigned char *iv,
13256                    int enc);
13257 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
13258                       ENGINE *impl, const unsigned char *key,
13259                       const unsigned char *iv, int enc);
13260 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
13261                      const unsigned char *in, int inl);
13262 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13263 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
13264 
13265 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
13266                   EVP_PKEY *pkey);
13267 
13268 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
13269                     unsigned int siglen, EVP_PKEY *pkey);
13270 
13271 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
13272                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
13273 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
13274                         unsigned char *sigret, size_t *siglen);
13275 
13276 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
13277                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
13278 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
13279                           const unsigned char *sig, size_t siglen);
13280 
13281 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
13282                  const unsigned char *ek, int ekl, const unsigned char *iv,
13283                  EVP_PKEY *priv);
13284 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13285 
13286 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
13287                  unsigned char **ek, int *ekl, unsigned char *iv,
13288                  EVP_PKEY **pubk, int npubk);
13289 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
13290 
13291 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
13292 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
13293                       const unsigned char *in, int inl);
13294 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
13295 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
13296 
13297 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
13298 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
13299                      const unsigned char *in, int inl);
13300 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
13301                     char *out, int *outl);
13302 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
13303 
13304 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
13305 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
13306 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
13307 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
13308 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
13309 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
13310 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
13311 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
13312 
13313 
13314 BIO_METHOD *BIO_f_md(void);
13315 BIO_METHOD *BIO_f_base64(void);
13316 BIO_METHOD *BIO_f_cipher(void);
13317 BIO_METHOD *BIO_f_reliable(void);
13318 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
13319                     const unsigned char *i, int enc);
13320 
13321 
13322 const EVP_MD *EVP_md_null(void);
13323 
13324 const EVP_MD *EVP_md2(void);
13325 
13326 
13327 const EVP_MD *EVP_md4(void);
13328 
13329 
13330 const EVP_MD *EVP_md5(void);
13331 
13332 
13333 const EVP_MD *EVP_sha(void);
13334 const EVP_MD *EVP_sha1(void);
13335 const EVP_MD *EVP_dss(void);
13336 const EVP_MD *EVP_dss1(void);
13337 const EVP_MD *EVP_ecdsa(void);
13338 
13339 
13340 const EVP_MD *EVP_sha224(void);
13341 const EVP_MD *EVP_sha256(void);
13342 
13343 
13344 const EVP_MD *EVP_sha384(void);
13345 const EVP_MD *EVP_sha512(void);
13346 
13347 
13348 
13349 
13350 
13351 const EVP_MD *EVP_ripemd160(void);
13352 
13353 
13354 
13355 
13356 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
13357 
13358 const EVP_CIPHER *EVP_des_ecb(void);
13359 const EVP_CIPHER *EVP_des_ede(void);
13360 const EVP_CIPHER *EVP_des_ede3(void);
13361 const EVP_CIPHER *EVP_des_ede_ecb(void);
13362 const EVP_CIPHER *EVP_des_ede3_ecb(void);
13363 const EVP_CIPHER *EVP_des_cfb64(void);
13364 
13365 const EVP_CIPHER *EVP_des_cfb1(void);
13366 const EVP_CIPHER *EVP_des_cfb8(void);
13367 const EVP_CIPHER *EVP_des_ede_cfb64(void);
13368 
13369 
13370 
13371 
13372 
13373 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
13374 
13375 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
13376 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
13377 const EVP_CIPHER *EVP_des_ofb(void);
13378 const EVP_CIPHER *EVP_des_ede_ofb(void);
13379 const EVP_CIPHER *EVP_des_ede3_ofb(void);
13380 const EVP_CIPHER *EVP_des_cbc(void);
13381 const EVP_CIPHER *EVP_des_ede_cbc(void);
13382 const EVP_CIPHER *EVP_des_ede3_cbc(void);
13383 const EVP_CIPHER *EVP_desx_cbc(void);
13384 const EVP_CIPHER *EVP_des_ede3_wrap(void);
13385 /*
13386  * This should now be supported through the dev_crypto ENGINE. But also, why
13387  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
13388  * branch?
13389  */
13390 # 785 "/usr/include/openssl/evp.h" 3 4
13391 const EVP_CIPHER *EVP_rc4(void);
13392 const EVP_CIPHER *EVP_rc4_40(void);
13393 
13394 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
13395 # 799 "/usr/include/openssl/evp.h" 3 4
13396 const EVP_CIPHER *EVP_rc2_ecb(void);
13397 const EVP_CIPHER *EVP_rc2_cbc(void);
13398 const EVP_CIPHER *EVP_rc2_40_cbc(void);
13399 const EVP_CIPHER *EVP_rc2_64_cbc(void);
13400 const EVP_CIPHER *EVP_rc2_cfb64(void);
13401 
13402 const EVP_CIPHER *EVP_rc2_ofb(void);
13403 
13404 
13405 const EVP_CIPHER *EVP_bf_ecb(void);
13406 const EVP_CIPHER *EVP_bf_cbc(void);
13407 const EVP_CIPHER *EVP_bf_cfb64(void);
13408 
13409 const EVP_CIPHER *EVP_bf_ofb(void);
13410 
13411 
13412 const EVP_CIPHER *EVP_cast5_ecb(void);
13413 const EVP_CIPHER *EVP_cast5_cbc(void);
13414 const EVP_CIPHER *EVP_cast5_cfb64(void);
13415 
13416 const EVP_CIPHER *EVP_cast5_ofb(void);
13417 # 829 "/usr/include/openssl/evp.h" 3 4
13418 const EVP_CIPHER *EVP_aes_128_ecb(void);
13419 const EVP_CIPHER *EVP_aes_128_cbc(void);
13420 const EVP_CIPHER *EVP_aes_128_cfb1(void);
13421 const EVP_CIPHER *EVP_aes_128_cfb8(void);
13422 const EVP_CIPHER *EVP_aes_128_cfb128(void);
13423 
13424 const EVP_CIPHER *EVP_aes_128_ofb(void);
13425 const EVP_CIPHER *EVP_aes_128_ctr(void);
13426 const EVP_CIPHER *EVP_aes_128_ccm(void);
13427 const EVP_CIPHER *EVP_aes_128_gcm(void);
13428 const EVP_CIPHER *EVP_aes_128_xts(void);
13429 const EVP_CIPHER *EVP_aes_128_wrap(void);
13430 const EVP_CIPHER *EVP_aes_192_ecb(void);
13431 const EVP_CIPHER *EVP_aes_192_cbc(void);
13432 const EVP_CIPHER *EVP_aes_192_cfb1(void);
13433 const EVP_CIPHER *EVP_aes_192_cfb8(void);
13434 const EVP_CIPHER *EVP_aes_192_cfb128(void);
13435 
13436 const EVP_CIPHER *EVP_aes_192_ofb(void);
13437 const EVP_CIPHER *EVP_aes_192_ctr(void);
13438 const EVP_CIPHER *EVP_aes_192_ccm(void);
13439 const EVP_CIPHER *EVP_aes_192_gcm(void);
13440 const EVP_CIPHER *EVP_aes_192_wrap(void);
13441 const EVP_CIPHER *EVP_aes_256_ecb(void);
13442 const EVP_CIPHER *EVP_aes_256_cbc(void);
13443 const EVP_CIPHER *EVP_aes_256_cfb1(void);
13444 const EVP_CIPHER *EVP_aes_256_cfb8(void);
13445 const EVP_CIPHER *EVP_aes_256_cfb128(void);
13446 
13447 const EVP_CIPHER *EVP_aes_256_ofb(void);
13448 const EVP_CIPHER *EVP_aes_256_ctr(void);
13449 const EVP_CIPHER *EVP_aes_256_ccm(void);
13450 const EVP_CIPHER *EVP_aes_256_gcm(void);
13451 const EVP_CIPHER *EVP_aes_256_xts(void);
13452 const EVP_CIPHER *EVP_aes_256_wrap(void);
13453 
13454 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
13455 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
13456 
13457 
13458 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
13459 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
13460 
13461 
13462 
13463 const EVP_CIPHER *EVP_camellia_128_ecb(void);
13464 const EVP_CIPHER *EVP_camellia_128_cbc(void);
13465 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
13466 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
13467 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
13468 
13469 const EVP_CIPHER *EVP_camellia_128_ofb(void);
13470 const EVP_CIPHER *EVP_camellia_192_ecb(void);
13471 const EVP_CIPHER *EVP_camellia_192_cbc(void);
13472 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
13473 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
13474 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
13475 
13476 const EVP_CIPHER *EVP_camellia_192_ofb(void);
13477 const EVP_CIPHER *EVP_camellia_256_ecb(void);
13478 const EVP_CIPHER *EVP_camellia_256_cbc(void);
13479 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
13480 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
13481 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
13482 
13483 const EVP_CIPHER *EVP_camellia_256_ofb(void);
13484 # 905 "/usr/include/openssl/evp.h" 3 4
13485 void OPENSSL_add_all_algorithms_noconf(void);
13486 void OPENSSL_add_all_algorithms_conf(void);
13487 # 916 "/usr/include/openssl/evp.h" 3 4
13488 void OpenSSL_add_all_ciphers(void);
13489 void OpenSSL_add_all_digests(void);
13490 
13491 
13492 
13493 
13494 int EVP_add_cipher(const EVP_CIPHER *cipher);
13495 int EVP_add_digest(const EVP_MD *digest);
13496 
13497 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
13498 const EVP_MD *EVP_get_digestbyname(const char *name);
13499 void EVP_cleanup(void);
13500 
13501 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
13502                                    const char *from, const char *to, void *x),
13503                        void *arg);
13504 void EVP_CIPHER_do_all_sorted(void (*fn)
13505                                (const EVP_CIPHER *ciph, const char *from,
13506                                 const char *to, void *x), void *arg);
13507 
13508 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
13509                                const char *from, const char *to, void *x),
13510                    void *arg);
13511 void EVP_MD_do_all_sorted(void (*fn)
13512                            (const EVP_MD *ciph, const char *from,
13513                             const char *to, void *x), void *arg);
13514 
13515 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
13516                          const unsigned char *enc_key, int enc_key_len,
13517                          EVP_PKEY *private_key);
13518 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
13519                          const unsigned char *key, int key_len,
13520                          EVP_PKEY *pub_key);
13521 int EVP_PKEY_type(int type);
13522 int EVP_PKEY_id(const EVP_PKEY *pkey);
13523 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
13524 int EVP_PKEY_bits(EVP_PKEY *pkey);
13525 int EVP_PKEY_size(EVP_PKEY *pkey);
13526 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
13527 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
13528 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
13529 void *EVP_PKEY_get0(EVP_PKEY *pkey);
13530 
13531 
13532 struct rsa_st;
13533 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
13534 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
13535 
13536 
13537 struct dsa_st;
13538 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
13539 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
13540 
13541 
13542 struct dh_st;
13543 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
13544 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
13545 
13546 
13547 struct ec_key_st;
13548 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
13549 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
13550 
13551 
13552 EVP_PKEY *EVP_PKEY_new(void);
13553 void EVP_PKEY_free(EVP_PKEY *pkey);
13554 
13555 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
13556                         long length);
13557 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
13558 
13559 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
13560                          long length);
13561 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
13562                              long length);
13563 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
13564 
13565 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
13566 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
13567 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
13568 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
13569 
13570 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
13571 
13572 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
13573                           int indent, ASN1_PCTX *pctx);
13574 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
13575                            int indent, ASN1_PCTX *pctx);
13576 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
13577                           int indent, ASN1_PCTX *pctx);
13578 
13579 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
13580 
13581 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
13582 
13583 /* calls methods */
13584 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
13585 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
13586 
13587 /* These are used by EVP_CIPHER methods */
13588 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
13589 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
13590 
13591 /* PKCS5 password based encryption */
13592 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
13593                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
13594                        const EVP_MD *md, int en_de);
13595 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
13596                            const unsigned char *salt, int saltlen, int iter,
13597                            int keylen, unsigned char *out);
13598 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
13599                       const unsigned char *salt, int saltlen, int iter,
13600                       const EVP_MD *digest, int keylen, unsigned char *out);
13601 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
13602                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
13603                           const EVP_MD *md, int en_de);
13604 
13605 void PKCS5_PBE_add(void);
13606 
13607 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
13608                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
13609 
13610 /* PBE type */
13611 
13612 /* Can appear as the outermost AlgorithmIdentifier */
13613 
13614 /* Is an PRF type OID */
13615 
13616 
13617 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
13618                          int md_nid, EVP_PBE_KEYGEN *keygen);
13619 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
13620                     EVP_PBE_KEYGEN *keygen);
13621 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
13622                  EVP_PBE_KEYGEN **pkeygen);
13623 void EVP_PBE_cleanup(void);
13624 # 1064 "/usr/include/openssl/evp.h" 3 4
13625 int EVP_PKEY_asn1_get_count(void);
13626 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
13627 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
13628 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
13629                                                    const char *str, int len);
13630 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
13631 int EVP_PKEY_asn1_add_alias(int to, int from);
13632 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
13633                             int *ppkey_flags, const char **pinfo,
13634                             const char **ppem_str,
13635                             const EVP_PKEY_ASN1_METHOD *ameth);
13636 
13637 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
13638 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
13639                                         const char *pem_str,
13640                                         const char *info);
13641 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
13642                         const EVP_PKEY_ASN1_METHOD *src);
13643 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
13644 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
13645                               int (*pub_decode) (EVP_PKEY *pk,
13646                                                  X509_PUBKEY *pub),
13647                               int (*pub_encode) (X509_PUBKEY *pub,
13648                                                  const EVP_PKEY *pk),
13649                               int (*pub_cmp) (const EVP_PKEY *a,
13650                                               const EVP_PKEY *b),
13651                               int (*pub_print) (BIO *out,
13652                                                 const EVP_PKEY *pkey,
13653                                                 int indent, ASN1_PCTX *pctx),
13654                               int (*pkey_size) (const EVP_PKEY *pk),
13655                               int (*pkey_bits) (const EVP_PKEY *pk));
13656 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
13657                                int (*priv_decode) (EVP_PKEY *pk,
13658                                                    PKCS8_PRIV_KEY_INFO
13659                                                    *p8inf),
13660                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
13661                                                    const EVP_PKEY *pk),
13662                                int (*priv_print) (BIO *out,
13663                                                   const EVP_PKEY *pkey,
13664                                                   int indent,
13665                                                   ASN1_PCTX *pctx));
13666 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
13667                              int (*param_decode) (EVP_PKEY *pkey,
13668                                                   const unsigned char **pder,
13669                                                   int derlen),
13670                              int (*param_encode) (const EVP_PKEY *pkey,
13671                                                   unsigned char **pder),
13672                              int (*param_missing) (const EVP_PKEY *pk),
13673                              int (*param_copy) (EVP_PKEY *to,
13674                                                 const EVP_PKEY *from),
13675                              int (*param_cmp) (const EVP_PKEY *a,
13676                                                const EVP_PKEY *b),
13677                              int (*param_print) (BIO *out,
13678                                                  const EVP_PKEY *pkey,
13679                                                  int indent,
13680                                                  ASN1_PCTX *pctx));
13681 
13682 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
13683                             void (*pkey_free) (EVP_PKEY *pkey));
13684 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
13685                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
13686                                               long arg1, void *arg2));
13687 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
13688                             int (*item_verify) (EVP_MD_CTX *ctx,
13689                                                 const ASN1_ITEM *it,
13690                                                 void *asn,
13691                                                 X509_ALGOR *a,
13692                                                 ASN1_BIT_STRING *sig,
13693                                                 EVP_PKEY *pkey),
13694                             int (*item_sign) (EVP_MD_CTX *ctx,
13695                                               const ASN1_ITEM *it,
13696                                               void *asn,
13697                                               X509_ALGOR *alg1,
13698                                               X509_ALGOR *alg2,
13699                                               ASN1_BIT_STRING *sig));
13700 # 1185 "/usr/include/openssl/evp.h" 3 4
13701 /* Used by GOST key encryption in TLS */
13702 # 1199 "/usr/include/openssl/evp.h" 3 4
13703 /*
13704  * Method handles all operations: don't assume any digest related defaults.
13705  */
13706 
13707 
13708 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
13709 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
13710 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
13711                              const EVP_PKEY_METHOD *meth);
13712 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
13713 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
13714 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
13715 
13716 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
13717 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
13718 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
13719 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
13720 
13721 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
13722                       int cmd, int p1, void *p2);
13723 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
13724                           const char *value);
13725 
13726 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
13727 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
13728 
13729 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
13730                                const unsigned char *key, int keylen);
13731 
13732 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
13733 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
13734 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
13735 
13736 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
13737 
13738 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
13739 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
13740 
13741 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
13742 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
13743                   unsigned char *sig, size_t *siglen,
13744                   const unsigned char *tbs, size_t tbslen);
13745 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
13746 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
13747                     const unsigned char *sig, size_t siglen,
13748                     const unsigned char *tbs, size_t tbslen);
13749 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
13750 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
13751                             unsigned char *rout, size_t *routlen,
13752                             const unsigned char *sig, size_t siglen);
13753 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
13754 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
13755                      unsigned char *out, size_t *outlen,
13756                      const unsigned char *in, size_t inlen);
13757 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
13758 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
13759                      unsigned char *out, size_t *outlen,
13760                      const unsigned char *in, size_t inlen);
13761 
13762 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
13763 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
13764 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
13765 
13766 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
13767 
13768 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
13769 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
13770 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
13771 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
13772 
13773 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
13774 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
13775 
13776 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
13777 
13778 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
13779                             int (*init) (EVP_PKEY_CTX *ctx));
13780 
13781 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
13782                             int (*copy) (EVP_PKEY_CTX *dst,
13783                                          EVP_PKEY_CTX *src));
13784 
13785 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
13786                                void (*cleanup) (EVP_PKEY_CTX *ctx));
13787 
13788 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
13789                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
13790                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
13791                                                  EVP_PKEY *pkey));
13792 
13793 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
13794                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
13795                               int (*keygen) (EVP_PKEY_CTX *ctx,
13796                                              EVP_PKEY *pkey));
13797 
13798 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
13799                             int (*sign_init) (EVP_PKEY_CTX *ctx),
13800                             int (*sign) (EVP_PKEY_CTX *ctx,
13801                                          unsigned char *sig, size_t *siglen,
13802                                          const unsigned char *tbs,
13803                                          size_t tbslen));
13804 
13805 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
13806                               int (*verify_init) (EVP_PKEY_CTX *ctx),
13807                               int (*verify) (EVP_PKEY_CTX *ctx,
13808                                              const unsigned char *sig,
13809                                              size_t siglen,
13810                                              const unsigned char *tbs,
13811                                              size_t tbslen));
13812 
13813 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
13814                                       int (*verify_recover_init) (EVP_PKEY_CTX
13815                                                                   *ctx),
13816                                       int (*verify_recover) (EVP_PKEY_CTX
13817                                                              *ctx,
13818                                                              unsigned char
13819                                                              *sig,
13820                                                              size_t *siglen,
13821                                                              const unsigned
13822                                                              char *tbs,
13823                                                              size_t tbslen));
13824 
13825 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
13826                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
13827                                                     EVP_MD_CTX *mctx),
13828                                int (*signctx) (EVP_PKEY_CTX *ctx,
13829                                                unsigned char *sig,
13830                                                size_t *siglen,
13831                                                EVP_MD_CTX *mctx));
13832 
13833 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
13834                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
13835                                                         EVP_MD_CTX *mctx),
13836                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
13837                                                    const unsigned char *sig,
13838                                                    int siglen,
13839                                                    EVP_MD_CTX *mctx));
13840 
13841 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
13842                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
13843                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
13844                                                  unsigned char *out,
13845                                                  size_t *outlen,
13846                                                  const unsigned char *in,
13847                                                  size_t inlen));
13848 
13849 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
13850                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
13851                                int (*decrypt) (EVP_PKEY_CTX *ctx,
13852                                                unsigned char *out,
13853                                                size_t *outlen,
13854                                                const unsigned char *in,
13855                                                size_t inlen));
13856 
13857 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
13858                               int (*derive_init) (EVP_PKEY_CTX *ctx),
13859                               int (*derive) (EVP_PKEY_CTX *ctx,
13860                                              unsigned char *key,
13861                                              size_t *keylen));
13862 
13863 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
13864                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
13865                                          void *p2),
13866                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
13867                                              const char *type,
13868                                              const char *value));
13869 
13870 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
13871                             int (**pinit) (EVP_PKEY_CTX *ctx));
13872 
13873 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
13874                             int (**pcopy) (EVP_PKEY_CTX *dst,
13875                                            EVP_PKEY_CTX *src));
13876 
13877 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
13878                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
13879 
13880 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
13881                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
13882                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
13883                                                    EVP_PKEY *pkey));
13884 
13885 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
13886                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
13887                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
13888                                                EVP_PKEY *pkey));
13889 
13890 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
13891                             int (**psign_init) (EVP_PKEY_CTX *ctx),
13892                             int (**psign) (EVP_PKEY_CTX *ctx,
13893                                            unsigned char *sig, size_t *siglen,
13894                                            const unsigned char *tbs,
13895                                            size_t tbslen));
13896 
13897 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
13898                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
13899                               int (**pverify) (EVP_PKEY_CTX *ctx,
13900                                                const unsigned char *sig,
13901                                                size_t siglen,
13902                                                const unsigned char *tbs,
13903                                                size_t tbslen));
13904 
13905 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
13906                                       int (**pverify_recover_init) (EVP_PKEY_CTX
13907                                                                     *ctx),
13908                                       int (**pverify_recover) (EVP_PKEY_CTX
13909                                                                *ctx,
13910                                                                unsigned char
13911                                                                *sig,
13912                                                                size_t *siglen,
13913                                                                const unsigned
13914                                                                char *tbs,
13915                                                                size_t tbslen));
13916 
13917 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
13918                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
13919                                                       EVP_MD_CTX *mctx),
13920                                int (**psignctx) (EVP_PKEY_CTX *ctx,
13921                                                  unsigned char *sig,
13922                                                  size_t *siglen,
13923                                                  EVP_MD_CTX *mctx));
13924 
13925 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
13926                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
13927                                                           EVP_MD_CTX *mctx),
13928                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
13929                                                      const unsigned char *sig,
13930                                                      int siglen,
13931                                                      EVP_MD_CTX *mctx));
13932 
13933 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
13934                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
13935                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
13936                                                    unsigned char *out,
13937                                                    size_t *outlen,
13938                                                    const unsigned char *in,
13939                                                    size_t inlen));
13940 
13941 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
13942                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
13943                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
13944                                                  unsigned char *out,
13945                                                  size_t *outlen,
13946                                                  const unsigned char *in,
13947                                                  size_t inlen));
13948 
13949 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
13950                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
13951                               int (**pderive) (EVP_PKEY_CTX *ctx,
13952                                                unsigned char *key,
13953                                                size_t *keylen));
13954 
13955 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
13956                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
13957                                            void *p2),
13958                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
13959                                                const char *type,
13960                                                const char *value));
13961 
13962 void EVP_add_alg_module(void);
13963 
13964 /* BEGIN ERROR CODES */
13965 /*
13966  * The following lines are auto generated by the script mkerr.pl. Any changes
13967  * made after this point may be overwritten when the script is next run.
13968  */
13969 
13970 void ERR_load_EVP_strings(void);
13971 
13972 /* Error codes for the EVP functions. */
13973 
13974 /* Function codes. */
13975 # 1554 "/usr/include/openssl/evp.h" 3 4
13976 /* Reason codes. */
13977 # 74 "/usr/include/openssl/x509.h" 2 3 4
13978 
13979 
13980 # 1 "/usr/include/openssl/bio.h" 1 3 4
13981 /* crypto/bio/bio.h */
13982 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
13983  * All rights reserved.
13984  *
13985  * This package is an SSL implementation written
13986  * by Eric Young (eay@cryptsoft.com).
13987  * The implementation was written so as to conform with Netscapes SSL.
13988  *
13989  * This library is free for commercial and non-commercial use as long as
13990  * the following conditions are aheared to.  The following conditions
13991  * apply to all code found in this distribution, be it the RC4, RSA,
13992  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13993  * included with this distribution is covered by the same copyright terms
13994  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
13995  *
13996  * Copyright remains Eric Young's, and as such any Copyright notices in
13997  * the code are not to be removed.
13998  * If this package is used in a product, Eric Young should be given attribution
13999  * as the author of the parts of the library used.
14000  * This can be in the form of a textual message at program startup or
14001  * in documentation (online or textual) provided with the package.
14002  *
14003  * Redistribution and use in source and binary forms, with or without
14004  * modification, are permitted provided that the following conditions
14005  * are met:
14006  * 1. Redistributions of source code must retain the copyright
14007  *    notice, this list of conditions and the following disclaimer.
14008  * 2. Redistributions in binary form must reproduce the above copyright
14009  *    notice, this list of conditions and the following disclaimer in the
14010  *    documentation and/or other materials provided with the distribution.
14011  * 3. All advertising materials mentioning features or use of this software
14012  *    must display the following acknowledgement:
14013  *    "This product includes cryptographic software written by
14014  *     Eric Young (eay@cryptsoft.com)"
14015  *    The word 'cryptographic' can be left out if the rouines from the library
14016  *    being used are not cryptographic related :-).
14017  * 4. If you include any Windows specific code (or a derivative thereof) from
14018  *    the apps directory (application code) you must include an acknowledgement:
14019  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14020  *
14021  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14031  * SUCH DAMAGE.
14032  *
14033  * The licence and distribution terms for any publically available version or
14034  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14035  * copied and put under another distribution licence
14036  * [including the GNU Public Licence.]
14037  */
14038 # 77 "/usr/include/openssl/x509.h" 2 3 4
14039 
14040 # 1 "/usr/include/openssl/stack.h" 1 3 4
14041 /* crypto/stack/stack.h */
14042 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14043  * All rights reserved.
14044  *
14045  * This package is an SSL implementation written
14046  * by Eric Young (eay@cryptsoft.com).
14047  * The implementation was written so as to conform with Netscapes SSL.
14048  *
14049  * This library is free for commercial and non-commercial use as long as
14050  * the following conditions are aheared to.  The following conditions
14051  * apply to all code found in this distribution, be it the RC4, RSA,
14052  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14053  * included with this distribution is covered by the same copyright terms
14054  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14055  *
14056  * Copyright remains Eric Young's, and as such any Copyright notices in
14057  * the code are not to be removed.
14058  * If this package is used in a product, Eric Young should be given attribution
14059  * as the author of the parts of the library used.
14060  * This can be in the form of a textual message at program startup or
14061  * in documentation (online or textual) provided with the package.
14062  *
14063  * Redistribution and use in source and binary forms, with or without
14064  * modification, are permitted provided that the following conditions
14065  * are met:
14066  * 1. Redistributions of source code must retain the copyright
14067  *    notice, this list of conditions and the following disclaimer.
14068  * 2. Redistributions in binary form must reproduce the above copyright
14069  *    notice, this list of conditions and the following disclaimer in the
14070  *    documentation and/or other materials provided with the distribution.
14071  * 3. All advertising materials mentioning features or use of this software
14072  *    must display the following acknowledgement:
14073  *    "This product includes cryptographic software written by
14074  *     Eric Young (eay@cryptsoft.com)"
14075  *    The word 'cryptographic' can be left out if the rouines from the library
14076  *    being used are not cryptographic related :-).
14077  * 4. If you include any Windows specific code (or a derivative thereof) from
14078  *    the apps directory (application code) you must include an acknowledgement:
14079  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14080  *
14081  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14082  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14083  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14084  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14085  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14086  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14087  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14088  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14089  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14090  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14091  * SUCH DAMAGE.
14092  *
14093  * The licence and distribution terms for any publically available version or
14094  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14095  * copied and put under another distribution licence
14096  * [including the GNU Public Licence.]
14097  */
14098 # 79 "/usr/include/openssl/x509.h" 2 3 4
14099 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14100 /* crypto/asn1/asn1.h */
14101 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14102  * All rights reserved.
14103  *
14104  * This package is an SSL implementation written
14105  * by Eric Young (eay@cryptsoft.com).
14106  * The implementation was written so as to conform with Netscapes SSL.
14107  *
14108  * This library is free for commercial and non-commercial use as long as
14109  * the following conditions are aheared to.  The following conditions
14110  * apply to all code found in this distribution, be it the RC4, RSA,
14111  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14112  * included with this distribution is covered by the same copyright terms
14113  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14114  *
14115  * Copyright remains Eric Young's, and as such any Copyright notices in
14116  * the code are not to be removed.
14117  * If this package is used in a product, Eric Young should be given attribution
14118  * as the author of the parts of the library used.
14119  * This can be in the form of a textual message at program startup or
14120  * in documentation (online or textual) provided with the package.
14121  *
14122  * Redistribution and use in source and binary forms, with or without
14123  * modification, are permitted provided that the following conditions
14124  * are met:
14125  * 1. Redistributions of source code must retain the copyright
14126  *    notice, this list of conditions and the following disclaimer.
14127  * 2. Redistributions in binary form must reproduce the above copyright
14128  *    notice, this list of conditions and the following disclaimer in the
14129  *    documentation and/or other materials provided with the distribution.
14130  * 3. All advertising materials mentioning features or use of this software
14131  *    must display the following acknowledgement:
14132  *    "This product includes cryptographic software written by
14133  *     Eric Young (eay@cryptsoft.com)"
14134  *    The word 'cryptographic' can be left out if the rouines from the library
14135  *    being used are not cryptographic related :-).
14136  * 4. If you include any Windows specific code (or a derivative thereof) from
14137  *    the apps directory (application code) you must include an acknowledgement:
14138  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14139  *
14140  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14141  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14142  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14143  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14144  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14145  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14146  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14147  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14148  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14149  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14150  * SUCH DAMAGE.
14151  *
14152  * The licence and distribution terms for any publically available version or
14153  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14154  * copied and put under another distribution licence
14155  * [including the GNU Public Licence.]
14156  */
14157 # 80 "/usr/include/openssl/x509.h" 2 3 4
14158 # 1 "/usr/include/openssl/safestack.h" 1 3 4
14159 /* ====================================================================
14160  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14161  *
14162  * Redistribution and use in source and binary forms, with or without
14163  * modification, are permitted provided that the following conditions
14164  * are met:
14165  *
14166  * 1. Redistributions of source code must retain the above copyright
14167  *    notice, this list of conditions and the following disclaimer.
14168  *
14169  * 2. Redistributions in binary form must reproduce the above copyright
14170  *    notice, this list of conditions and the following disclaimer in
14171  *    the documentation and/or other materials provided with the
14172  *    distribution.
14173  *
14174  * 3. All advertising materials mentioning features or use of this
14175  *    software must display the following acknowledgment:
14176  *    "This product includes software developed by the OpenSSL Project
14177  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14178  *
14179  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14180  *    endorse or promote products derived from this software without
14181  *    prior written permission. For written permission, please contact
14182  *    openssl-core@openssl.org.
14183  *
14184  * 5. Products derived from this software may not be called "OpenSSL"
14185  *    nor may "OpenSSL" appear in their names without prior written
14186  *    permission of the OpenSSL Project.
14187  *
14188  * 6. Redistributions of any form whatsoever must retain the following
14189  *    acknowledgment:
14190  *    "This product includes software developed by the OpenSSL Project
14191  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14192  *
14193  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14194  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14195  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14196  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14197  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14198  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14199  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14200  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14201  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14202  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14203  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14204  * OF THE POSSIBILITY OF SUCH DAMAGE.
14205  * ====================================================================
14206  *
14207  * This product includes cryptographic software written by Eric Young
14208  * (eay@cryptsoft.com).  This product includes software written by Tim
14209  * Hudson (tjh@cryptsoft.com).
14210  *
14211  */
14212 # 81 "/usr/include/openssl/x509.h" 2 3 4
14213 
14214 
14215 # 1 "/usr/include/openssl/ec.h" 1 3 4
14216 /* crypto/ec/ec.h */
14217 /*
14218  * Originally written by Bodo Moeller for the OpenSSL project.
14219  */
14220 /**
14221  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
14222  * \author Originally written by Bodo Moeller for the OpenSSL project
14223  */
14224 /* ====================================================================
14225  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
14226  *
14227  * Redistribution and use in source and binary forms, with or without
14228  * modification, are permitted provided that the following conditions
14229  * are met:
14230  *
14231  * 1. Redistributions of source code must retain the above copyright
14232  *    notice, this list of conditions and the following disclaimer.
14233  *
14234  * 2. Redistributions in binary form must reproduce the above copyright
14235  *    notice, this list of conditions and the following disclaimer in
14236  *    the documentation and/or other materials provided with the
14237  *    distribution.
14238  *
14239  * 3. All advertising materials mentioning features or use of this
14240  *    software must display the following acknowledgment:
14241  *    "This product includes software developed by the OpenSSL Project
14242  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14243  *
14244  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14245  *    endorse or promote products derived from this software without
14246  *    prior written permission. For written permission, please contact
14247  *    openssl-core@openssl.org.
14248  *
14249  * 5. Products derived from this software may not be called "OpenSSL"
14250  *    nor may "OpenSSL" appear in their names without prior written
14251  *    permission of the OpenSSL Project.
14252  *
14253  * 6. Redistributions of any form whatsoever must retain the following
14254  *    acknowledgment:
14255  *    "This product includes software developed by the OpenSSL Project
14256  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14257  *
14258  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14259  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14260  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14261  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14262  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14263  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14264  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14265  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14266  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14267  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14268  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14269  * OF THE POSSIBILITY OF SUCH DAMAGE.
14270  * ====================================================================
14271  *
14272  * This product includes cryptographic software written by Eric Young
14273  * (eay@cryptsoft.com).  This product includes software written by Tim
14274  * Hudson (tjh@cryptsoft.com).
14275  *
14276  */
14277 /* ====================================================================
14278  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14279  *
14280  * Portions of the attached software ("Contribution") are developed by
14281  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14282  *
14283  * The Contribution is licensed pursuant to the OpenSSL open source
14284  * license provided above.
14285  *
14286  * The elliptic curve binary polynomial software is originally written by
14287  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14288  *
14289  */
14290 
14291 
14292 
14293 
14294 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14295 /* opensslconf.h */
14296 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14297 
14298 
14299 
14300 
14301 /* OpenSSL was configured with the following options: */
14302 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14303 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14304    asks for it.  This is a transient feature that is provided for those
14305    who haven't had the time to do the appropriate changes in their
14306    applications.  */
14307 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14308 /* crypto/opensslconf.h.in */
14309 
14310 /* Generate 80386 code? */
14311 # 80 "/usr/include/openssl/ec.h" 2 3 4
14312 
14313 
14314 
14315 
14316 
14317 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14318 /* crypto/asn1/asn1.h */
14319 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14320  * All rights reserved.
14321  *
14322  * This package is an SSL implementation written
14323  * by Eric Young (eay@cryptsoft.com).
14324  * The implementation was written so as to conform with Netscapes SSL.
14325  *
14326  * This library is free for commercial and non-commercial use as long as
14327  * the following conditions are aheared to.  The following conditions
14328  * apply to all code found in this distribution, be it the RC4, RSA,
14329  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14330  * included with this distribution is covered by the same copyright terms
14331  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14332  *
14333  * Copyright remains Eric Young's, and as such any Copyright notices in
14334  * the code are not to be removed.
14335  * If this package is used in a product, Eric Young should be given attribution
14336  * as the author of the parts of the library used.
14337  * This can be in the form of a textual message at program startup or
14338  * in documentation (online or textual) provided with the package.
14339  *
14340  * Redistribution and use in source and binary forms, with or without
14341  * modification, are permitted provided that the following conditions
14342  * are met:
14343  * 1. Redistributions of source code must retain the copyright
14344  *    notice, this list of conditions and the following disclaimer.
14345  * 2. Redistributions in binary form must reproduce the above copyright
14346  *    notice, this list of conditions and the following disclaimer in the
14347  *    documentation and/or other materials provided with the distribution.
14348  * 3. All advertising materials mentioning features or use of this software
14349  *    must display the following acknowledgement:
14350  *    "This product includes cryptographic software written by
14351  *     Eric Young (eay@cryptsoft.com)"
14352  *    The word 'cryptographic' can be left out if the rouines from the library
14353  *    being used are not cryptographic related :-).
14354  * 4. If you include any Windows specific code (or a derivative thereof) from
14355  *    the apps directory (application code) you must include an acknowledgement:
14356  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14357  *
14358  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14359  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14360  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14361  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14362  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14363  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14364  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14365  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14366  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14367  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14368  * SUCH DAMAGE.
14369  *
14370  * The licence and distribution terms for any publically available version or
14371  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14372  * copied and put under another distribution licence
14373  * [including the GNU Public Licence.]
14374  */
14375 # 86 "/usr/include/openssl/ec.h" 2 3 4
14376 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
14377 /* ====================================================================
14378  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
14379  *
14380  * Redistribution and use in source and binary forms, with or without
14381  * modification, are permitted provided that the following conditions
14382  * are met:
14383  *
14384  * 1. Redistributions of source code must retain the above copyright
14385  *    notice, this list of conditions and the following disclaimer.
14386  *
14387  * 2. Redistributions in binary form must reproduce the above copyright
14388  *    notice, this list of conditions and the following disclaimer in
14389  *    the documentation and/or other materials provided with the
14390  *    distribution.
14391  *
14392  * 3. All advertising materials mentioning features or use of this
14393  *    software must display the following acknowledgment:
14394  *    "This product includes software developed by the OpenSSL Project
14395  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14396  *
14397  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14398  *    endorse or promote products derived from this software without
14399  *    prior written permission. For written permission, please contact
14400  *    openssl-core@openssl.org.
14401  *
14402  * 5. Products derived from this software may not be called "OpenSSL"
14403  *    nor may "OpenSSL" appear in their names without prior written
14404  *    permission of the OpenSSL Project.
14405  *
14406  * 6. Redistributions of any form whatsoever must retain the following
14407  *    acknowledgment:
14408  *    "This product includes software developed by the OpenSSL Project
14409  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14410  *
14411  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14412  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14413  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14414  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14415  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14416  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14417  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14418  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14419  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14420  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14421  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14422  * OF THE POSSIBILITY OF SUCH DAMAGE.
14423  * ====================================================================
14424  *
14425  * This product includes cryptographic software written by Eric Young
14426  * (eay@cryptsoft.com).  This product includes software written by Tim
14427  * Hudson (tjh@cryptsoft.com).
14428  *
14429  */
14430 # 87 "/usr/include/openssl/ec.h" 2 3 4
14431 
14432 # 1 "/usr/include/openssl/bn.h" 1 3 4
14433 /* crypto/bn/bn.h */
14434 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14435  * All rights reserved.
14436  *
14437  * This package is an SSL implementation written
14438  * by Eric Young (eay@cryptsoft.com).
14439  * The implementation was written so as to conform with Netscapes SSL.
14440  *
14441  * This library is free for commercial and non-commercial use as long as
14442  * the following conditions are aheared to.  The following conditions
14443  * apply to all code found in this distribution, be it the RC4, RSA,
14444  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14445  * included with this distribution is covered by the same copyright terms
14446  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14447  *
14448  * Copyright remains Eric Young's, and as such any Copyright notices in
14449  * the code are not to be removed.
14450  * If this package is used in a product, Eric Young should be given attribution
14451  * as the author of the parts of the library used.
14452  * This can be in the form of a textual message at program startup or
14453  * in documentation (online or textual) provided with the package.
14454  *
14455  * Redistribution and use in source and binary forms, with or without
14456  * modification, are permitted provided that the following conditions
14457  * are met:
14458  * 1. Redistributions of source code must retain the copyright
14459  *    notice, this list of conditions and the following disclaimer.
14460  * 2. Redistributions in binary form must reproduce the above copyright
14461  *    notice, this list of conditions and the following disclaimer in the
14462  *    documentation and/or other materials provided with the distribution.
14463  * 3. All advertising materials mentioning features or use of this software
14464  *    must display the following acknowledgement:
14465  *    "This product includes cryptographic software written by
14466  *     Eric Young (eay@cryptsoft.com)"
14467  *    The word 'cryptographic' can be left out if the rouines from the library
14468  *    being used are not cryptographic related :-).
14469  * 4. If you include any Windows specific code (or a derivative thereof) from
14470  *    the apps directory (application code) you must include an acknowledgement:
14471  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14472  *
14473  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14474  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14475  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14476  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14477  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14478  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14479  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14480  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14481  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14482  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14483  * SUCH DAMAGE.
14484  *
14485  * The licence and distribution terms for any publically available version or
14486  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14487  * copied and put under another distribution licence
14488  * [including the GNU Public Licence.]
14489  */
14490 /* ====================================================================
14491  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
14492  *
14493  * Redistribution and use in source and binary forms, with or without
14494  * modification, are permitted provided that the following conditions
14495  * are met:
14496  *
14497  * 1. Redistributions of source code must retain the above copyright
14498  *    notice, this list of conditions and the following disclaimer.
14499  *
14500  * 2. Redistributions in binary form must reproduce the above copyright
14501  *    notice, this list of conditions and the following disclaimer in
14502  *    the documentation and/or other materials provided with the
14503  *    distribution.
14504  *
14505  * 3. All advertising materials mentioning features or use of this
14506  *    software must display the following acknowledgment:
14507  *    "This product includes software developed by the OpenSSL Project
14508  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14509  *
14510  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14511  *    endorse or promote products derived from this software without
14512  *    prior written permission. For written permission, please contact
14513  *    openssl-core@openssl.org.
14514  *
14515  * 5. Products derived from this software may not be called "OpenSSL"
14516  *    nor may "OpenSSL" appear in their names without prior written
14517  *    permission of the OpenSSL Project.
14518  *
14519  * 6. Redistributions of any form whatsoever must retain the following
14520  *    acknowledgment:
14521  *    "This product includes software developed by the OpenSSL Project
14522  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14523  *
14524  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14525  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14526  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14527  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14528  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14529  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14530  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14531  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14532  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14533  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14534  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14535  * OF THE POSSIBILITY OF SUCH DAMAGE.
14536  * ====================================================================
14537  *
14538  * This product includes cryptographic software written by Eric Young
14539  * (eay@cryptsoft.com).  This product includes software written by Tim
14540  * Hudson (tjh@cryptsoft.com).
14541  *
14542  */
14543 /* ====================================================================
14544  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14545  *
14546  * Portions of the attached software ("Contribution") are developed by
14547  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14548  *
14549  * The Contribution is licensed pursuant to the Eric Young open source
14550  * license provided above.
14551  *
14552  * The binary polynomial arithmetic software is originally written by
14553  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14554  *
14555  */
14556 # 89 "/usr/include/openssl/ec.h" 2 3 4
14557 # 103 "/usr/include/openssl/ec.h" 3 4
14558 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
14559  *  for the encoding of a elliptic curve point (x,y) */
14560 typedef enum {
14561         /** the point is encoded as z||x, where the octet z specifies
14562          *  which solution of the quadratic equation y is  */
14563     POINT_CONVERSION_COMPRESSED = 2,
14564         /** the point is encoded as z||x||y, where z is the octet 0x04  */
14565     POINT_CONVERSION_UNCOMPRESSED = 4,
14566         /** the point is encoded as z||x||y, where the octet z specifies
14567          *  which solution of the quadratic equation y is  */
14568     POINT_CONVERSION_HYBRID = 6
14569 } point_conversion_form_t;
14570 
14571 typedef struct ec_method_st EC_METHOD;
14572 
14573 typedef struct ec_group_st
14574     /*-
14575      EC_METHOD *meth;
14576      -- field definition
14577      -- curve coefficients
14578      -- optional generator with associated information (order, cofactor)
14579      -- optional extra data (precomputed table for fast computation of multiples of generator)
14580      -- ASN1 stuff
14581     */
14582     EC_GROUP;
14583 
14584 typedef struct ec_point_st EC_POINT;
14585 
14586 /********************************************************************/
14587 /*               EC_METHODs for curves over GF(p)                   */
14588 /********************************************************************/
14589 
14590 /** Returns the basic GFp ec methods which provides the basis for the
14591  *  optimized methods.
14592  *  \return  EC_METHOD object
14593  */
14594 const EC_METHOD *EC_GFp_simple_method(void);
14595 
14596 /** Returns GFp methods using montgomery multiplication.
14597  *  \return  EC_METHOD object
14598  */
14599 const EC_METHOD *EC_GFp_mont_method(void);
14600 
14601 /** Returns GFp methods using optimized methods for NIST recommended curves
14602  *  \return  EC_METHOD object
14603  */
14604 const EC_METHOD *EC_GFp_nist_method(void);
14605 # 169 "/usr/include/openssl/ec.h" 3 4
14606 /********************************************************************/
14607 /*           EC_METHOD for curves over GF(2^m)                      */
14608 /********************************************************************/
14609 
14610 /** Returns the basic GF2m ec method
14611  *  \return  EC_METHOD object
14612  */
14613 const EC_METHOD *EC_GF2m_simple_method(void);
14614 
14615 
14616 
14617 /********************************************************************/
14618 /*                   EC_GROUP functions                             */
14619 /********************************************************************/
14620 
14621 /** Creates a new EC_GROUP object
14622  *  \param   meth  EC_METHOD to use
14623  *  \return  newly created EC_GROUP object or NULL in case of an error.
14624  */
14625 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
14626 
14627 /** Frees a EC_GROUP object
14628  *  \param  group  EC_GROUP object to be freed.
14629  */
14630 void EC_GROUP_free(EC_GROUP *group);
14631 
14632 /** Clears and frees a EC_GROUP object
14633  *  \param  group  EC_GROUP object to be cleared and freed.
14634  */
14635 void EC_GROUP_clear_free(EC_GROUP *group);
14636 
14637 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
14638  *  \param  dst  destination EC_GROUP object
14639  *  \param  src  source EC_GROUP object
14640  *  \return 1 on success and 0 if an error occurred.
14641  */
14642 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
14643 
14644 /** Creates a new EC_GROUP object and copies the copies the content
14645  *  form src to the newly created EC_KEY object
14646  *  \param  src  source EC_GROUP object
14647  *  \return newly created EC_GROUP object or NULL in case of an error.
14648  */
14649 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
14650 
14651 /** Returns the EC_METHOD of the EC_GROUP object.
14652  *  \param  group  EC_GROUP object
14653  *  \return EC_METHOD used in this EC_GROUP object.
14654  */
14655 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
14656 
14657 /** Returns the field type of the EC_METHOD.
14658  *  \param  meth  EC_METHOD object
14659  *  \return NID of the underlying field type OID.
14660  */
14661 int EC_METHOD_get_field_type(const EC_METHOD *meth);
14662 
14663 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
14664  *  \param  group      EC_GROUP object
14665  *  \param  generator  EC_POINT object with the generator.
14666  *  \param  order      the order of the group generated by the generator.
14667  *  \param  cofactor   the index of the sub-group generated by the generator
14668  *                     in the group of all points on the elliptic curve.
14669  *  \return 1 on success and 0 if an error occured
14670  */
14671 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
14672                            const BIGNUM *order, const BIGNUM *cofactor);
14673 
14674 /** Returns the generator of a EC_GROUP object.
14675  *  \param  group  EC_GROUP object
14676  *  \return the currently used generator (possibly NULL).
14677  */
14678 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
14679 
14680 /** Returns the montgomery data for order(Generator)
14681  *  \param  group  EC_GROUP object
14682  *  \return the currently used generator (possibly NULL).
14683 */
14684 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
14685 
14686 /** Gets the order of a EC_GROUP
14687  *  \param  group  EC_GROUP object
14688  *  \param  order  BIGNUM to which the order is copied
14689  *  \param  ctx    BN_CTX object (optional)
14690  *  \return 1 on success and 0 if an error occured
14691  */
14692 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
14693 
14694 /** Gets the cofactor of a EC_GROUP
14695  *  \param  group     EC_GROUP object
14696  *  \param  cofactor  BIGNUM to which the cofactor is copied
14697  *  \param  ctx       BN_CTX object (optional)
14698  *  \return 1 on success and 0 if an error occured
14699  */
14700 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
14701                           BN_CTX *ctx);
14702 
14703 /** Sets the name of a EC_GROUP object
14704  *  \param  group  EC_GROUP object
14705  *  \param  nid    NID of the curve name OID
14706  */
14707 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
14708 
14709 /** Returns the curve name of a EC_GROUP object
14710  *  \param  group  EC_GROUP object
14711  *  \return NID of the curve name OID or 0 if not set.
14712  */
14713 int EC_GROUP_get_curve_name(const EC_GROUP *group);
14714 
14715 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
14716 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
14717 
14718 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
14719                                         point_conversion_form_t form);
14720 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
14721 
14722 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
14723 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
14724 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
14725 
14726 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
14727  *  \param  group  EC_GROUP object
14728  *  \param  p      BIGNUM with the prime number
14729  *  \param  a      BIGNUM with parameter a of the equation
14730  *  \param  b      BIGNUM with parameter b of the equation
14731  *  \param  ctx    BN_CTX object (optional)
14732  *  \return 1 on success and 0 if an error occured
14733  */
14734 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
14735                            const BIGNUM *b, BN_CTX *ctx);
14736 
14737 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
14738  *  \param  group  EC_GROUP object
14739  *  \param  p      BIGNUM for the prime number
14740  *  \param  a      BIGNUM for parameter a of the equation
14741  *  \param  b      BIGNUM for parameter b of the equation
14742  *  \param  ctx    BN_CTX object (optional)
14743  *  \return 1 on success and 0 if an error occured
14744  */
14745 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
14746                            BIGNUM *b, BN_CTX *ctx);
14747 
14748 
14749 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
14750  *  \param  group  EC_GROUP object
14751  *  \param  p      BIGNUM with the polynomial defining the underlying field
14752  *  \param  a      BIGNUM with parameter a of the equation
14753  *  \param  b      BIGNUM with parameter b of the equation
14754  *  \param  ctx    BN_CTX object (optional)
14755  *  \return 1 on success and 0 if an error occured
14756  */
14757 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
14758                             const BIGNUM *b, BN_CTX *ctx);
14759 
14760 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
14761  *  \param  group  EC_GROUP object
14762  *  \param  p      BIGNUM for the polynomial defining the underlying field
14763  *  \param  a      BIGNUM for parameter a of the equation
14764  *  \param  b      BIGNUM for parameter b of the equation
14765  *  \param  ctx    BN_CTX object (optional)
14766  *  \return 1 on success and 0 if an error occured
14767  */
14768 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
14769                             BIGNUM *b, BN_CTX *ctx);
14770 
14771 /** Returns the number of bits needed to represent a field element
14772  *  \param  group  EC_GROUP object
14773  *  \return number of bits needed to represent a field element
14774  */
14775 int EC_GROUP_get_degree(const EC_GROUP *group);
14776 
14777 /** Checks whether the parameter in the EC_GROUP define a valid ec group
14778  *  \param  group  EC_GROUP object
14779  *  \param  ctx    BN_CTX object (optional)
14780  *  \return 1 if group is a valid ec group and 0 otherwise
14781  */
14782 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
14783 
14784 /** Checks whether the discriminant of the elliptic curve is zero or not
14785  *  \param  group  EC_GROUP object
14786  *  \param  ctx    BN_CTX object (optional)
14787  *  \return 1 if the discriminant is not zero and 0 otherwise
14788  */
14789 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
14790 
14791 /** Compares two EC_GROUP objects
14792  *  \param  a    first EC_GROUP object
14793  *  \param  b    second EC_GROUP object
14794  *  \param  ctx  BN_CTX object (optional)
14795  *  \return 0 if both groups are equal and 1 otherwise
14796  */
14797 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
14798 
14799 /*
14800  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
14801  * choosing an appropriate EC_METHOD
14802  */
14803 
14804 /** Creates a new EC_GROUP object with the specified parameters defined
14805  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
14806  *  \param  p    BIGNUM with the prime number
14807  *  \param  a    BIGNUM with the parameter a of the equation
14808  *  \param  b    BIGNUM with the parameter b of the equation
14809  *  \param  ctx  BN_CTX object (optional)
14810  *  \return newly created EC_GROUP object with the specified parameters
14811  */
14812 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
14813                                  const BIGNUM *b, BN_CTX *ctx);
14814 
14815 /** Creates a new EC_GROUP object with the specified parameters defined
14816  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
14817  *  \param  p    BIGNUM with the polynomial defining the underlying field
14818  *  \param  a    BIGNUM with the parameter a of the equation
14819  *  \param  b    BIGNUM with the parameter b of the equation
14820  *  \param  ctx  BN_CTX object (optional)
14821  *  \return newly created EC_GROUP object with the specified parameters
14822  */
14823 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
14824                                   const BIGNUM *b, BN_CTX *ctx);
14825 
14826 /** Creates a EC_GROUP object with a curve specified by a NID
14827  *  \param  nid  NID of the OID of the curve name
14828  *  \return newly created EC_GROUP object with specified curve or NULL
14829  *          if an error occurred
14830  */
14831 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
14832 
14833 /********************************************************************/
14834 /*               handling of internal curves                        */
14835 /********************************************************************/
14836 
14837 typedef struct {
14838     int nid;
14839     const char *comment;
14840 } EC_builtin_curve;
14841 
14842 /*
14843  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
14844  * available curves or zero if a error occurred. In case r ist not zero
14845  * nitems EC_builtin_curve structures are filled with the data of the first
14846  * nitems internal groups
14847  */
14848 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
14849 
14850 const char *EC_curve_nid2nist(int nid);
14851 int EC_curve_nist2nid(const char *name);
14852 
14853 /********************************************************************/
14854 /*                    EC_POINT functions                            */
14855 /********************************************************************/
14856 
14857 /** Creates a new EC_POINT object for the specified EC_GROUP
14858  *  \param  group  EC_GROUP the underlying EC_GROUP object
14859  *  \return newly created EC_POINT object or NULL if an error occurred
14860  */
14861 EC_POINT *EC_POINT_new(const EC_GROUP *group);
14862 
14863 /** Frees a EC_POINT object
14864  *  \param  point  EC_POINT object to be freed
14865  */
14866 void EC_POINT_free(EC_POINT *point);
14867 
14868 /** Clears and frees a EC_POINT object
14869  *  \param  point  EC_POINT object to be cleared and freed
14870  */
14871 void EC_POINT_clear_free(EC_POINT *point);
14872 
14873 /** Copies EC_POINT object
14874  *  \param  dst  destination EC_POINT object
14875  *  \param  src  source EC_POINT object
14876  *  \return 1 on success and 0 if an error occured
14877  */
14878 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
14879 
14880 /** Creates a new EC_POINT object and copies the content of the supplied
14881  *  EC_POINT
14882  *  \param  src    source EC_POINT object
14883  *  \param  group  underlying the EC_GROUP object
14884  *  \return newly created EC_POINT object or NULL if an error occurred
14885  */
14886 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
14887 
14888 /** Returns the EC_METHOD used in EC_POINT object
14889  *  \param  point  EC_POINT object
14890  *  \return the EC_METHOD used
14891  */
14892 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
14893 
14894 /** Sets a point to infinity (neutral element)
14895  *  \param  group  underlying EC_GROUP object
14896  *  \param  point  EC_POINT to set to infinity
14897  *  \return 1 on success and 0 if an error occured
14898  */
14899 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
14900 
14901 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
14902  *  \param  group  underlying EC_GROUP object
14903  *  \param  p      EC_POINT object
14904  *  \param  x      BIGNUM with the x-coordinate
14905  *  \param  y      BIGNUM with the y-coordinate
14906  *  \param  z      BIGNUM with the z-coordinate
14907  *  \param  ctx    BN_CTX object (optional)
14908  *  \return 1 on success and 0 if an error occured
14909  */
14910 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
14911                                              EC_POINT *p, const BIGNUM *x,
14912                                              const BIGNUM *y, const BIGNUM *z,
14913                                              BN_CTX *ctx);
14914 
14915 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
14916  *  \param  group  underlying EC_GROUP object
14917  *  \param  p      EC_POINT object
14918  *  \param  x      BIGNUM for the x-coordinate
14919  *  \param  y      BIGNUM for the y-coordinate
14920  *  \param  z      BIGNUM for the z-coordinate
14921  *  \param  ctx    BN_CTX object (optional)
14922  *  \return 1 on success and 0 if an error occured
14923  */
14924 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
14925                                              const EC_POINT *p, BIGNUM *x,
14926                                              BIGNUM *y, BIGNUM *z,
14927                                              BN_CTX *ctx);
14928 
14929 /** Sets the affine coordinates of a EC_POINT over GFp
14930  *  \param  group  underlying EC_GROUP object
14931  *  \param  p      EC_POINT object
14932  *  \param  x      BIGNUM with the x-coordinate
14933  *  \param  y      BIGNUM with the y-coordinate
14934  *  \param  ctx    BN_CTX object (optional)
14935  *  \return 1 on success and 0 if an error occured
14936  */
14937 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
14938                                         const BIGNUM *x, const BIGNUM *y,
14939                                         BN_CTX *ctx);
14940 
14941 /** Gets the affine coordinates of a EC_POINT over GFp
14942  *  \param  group  underlying EC_GROUP object
14943  *  \param  p      EC_POINT object
14944  *  \param  x      BIGNUM for the x-coordinate
14945  *  \param  y      BIGNUM for the y-coordinate
14946  *  \param  ctx    BN_CTX object (optional)
14947  *  \return 1 on success and 0 if an error occured
14948  */
14949 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
14950                                         const EC_POINT *p, BIGNUM *x,
14951                                         BIGNUM *y, BN_CTX *ctx);
14952 
14953 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
14954  *  \param  group  underlying EC_GROUP object
14955  *  \param  p      EC_POINT object
14956  *  \param  x      BIGNUM with x-coordinate
14957  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
14958  *  \param  ctx    BN_CTX object (optional)
14959  *  \return 1 on success and 0 if an error occured
14960  */
14961 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
14962                                             EC_POINT *p, const BIGNUM *x,
14963                                             int y_bit, BN_CTX *ctx);
14964 
14965 /** Sets the affine coordinates of a EC_POINT over GF2m
14966  *  \param  group  underlying EC_GROUP object
14967  *  \param  p      EC_POINT object
14968  *  \param  x      BIGNUM with the x-coordinate
14969  *  \param  y      BIGNUM with the y-coordinate
14970  *  \param  ctx    BN_CTX object (optional)
14971  *  \return 1 on success and 0 if an error occured
14972  */
14973 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
14974                                          const BIGNUM *x, const BIGNUM *y,
14975                                          BN_CTX *ctx);
14976 
14977 /** Gets the affine coordinates of a EC_POINT over GF2m
14978  *  \param  group  underlying EC_GROUP object
14979  *  \param  p      EC_POINT object
14980  *  \param  x      BIGNUM for the x-coordinate
14981  *  \param  y      BIGNUM for the y-coordinate
14982  *  \param  ctx    BN_CTX object (optional)
14983  *  \return 1 on success and 0 if an error occured
14984  */
14985 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
14986                                          const EC_POINT *p, BIGNUM *x,
14987                                          BIGNUM *y, BN_CTX *ctx);
14988 
14989 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
14990  *  \param  group  underlying EC_GROUP object
14991  *  \param  p      EC_POINT object
14992  *  \param  x      BIGNUM with x-coordinate
14993  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
14994  *  \param  ctx    BN_CTX object (optional)
14995  *  \return 1 on success and 0 if an error occured
14996  */
14997 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
14998                                              EC_POINT *p, const BIGNUM *x,
14999                                              int y_bit, BN_CTX *ctx);
15000 
15001 /** Encodes a EC_POINT object to a octet string
15002  *  \param  group  underlying EC_GROUP object
15003  *  \param  p      EC_POINT object
15004  *  \param  form   point conversion form
15005  *  \param  buf    memory buffer for the result. If NULL the function returns
15006  *                 required buffer size.
15007  *  \param  len    length of the memory buffer
15008  *  \param  ctx    BN_CTX object (optional)
15009  *  \return the length of the encoded octet string or 0 if an error occurred
15010  */
15011 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
15012                           point_conversion_form_t form,
15013                           unsigned char *buf, size_t len, BN_CTX *ctx);
15014 
15015 /** Decodes a EC_POINT from a octet string
15016  *  \param  group  underlying EC_GROUP object
15017  *  \param  p      EC_POINT object
15018  *  \param  buf    memory buffer with the encoded ec point
15019  *  \param  len    length of the encoded ec point
15020  *  \param  ctx    BN_CTX object (optional)
15021  *  \return 1 on success and 0 if an error occured
15022  */
15023 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
15024                        const unsigned char *buf, size_t len, BN_CTX *ctx);
15025 
15026 /* other interfaces to point2oct/oct2point: */
15027 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
15028                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
15029 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
15030                             EC_POINT *, BN_CTX *);
15031 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
15032                          point_conversion_form_t form, BN_CTX *);
15033 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
15034                              EC_POINT *, BN_CTX *);
15035 
15036 /********************************************************************/
15037 /*         functions for doing EC_POINT arithmetic                  */
15038 /********************************************************************/
15039 
15040 /** Computes the sum of two EC_POINT
15041  *  \param  group  underlying EC_GROUP object
15042  *  \param  r      EC_POINT object for the result (r = a + b)
15043  *  \param  a      EC_POINT object with the first summand
15044  *  \param  b      EC_POINT object with the second summand
15045  *  \param  ctx    BN_CTX object (optional)
15046  *  \return 1 on success and 0 if an error occured
15047  */
15048 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
15049                  const EC_POINT *b, BN_CTX *ctx);
15050 
15051 /** Computes the double of a EC_POINT
15052  *  \param  group  underlying EC_GROUP object
15053  *  \param  r      EC_POINT object for the result (r = 2 * a)
15054  *  \param  a      EC_POINT object
15055  *  \param  ctx    BN_CTX object (optional)
15056  *  \return 1 on success and 0 if an error occured
15057  */
15058 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
15059                  BN_CTX *ctx);
15060 
15061 /** Computes the inverse of a EC_POINT
15062  *  \param  group  underlying EC_GROUP object
15063  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
15064  *  \param  ctx    BN_CTX object (optional)
15065  *  \return 1 on success and 0 if an error occured
15066  */
15067 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
15068 
15069 /** Checks whether the point is the neutral element of the group
15070  *  \param  group  the underlying EC_GROUP object
15071  *  \param  p      EC_POINT object
15072  *  \return 1 if the point is the neutral element and 0 otherwise
15073  */
15074 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
15075 
15076 /** Checks whether the point is on the curve
15077  *  \param  group  underlying EC_GROUP object
15078  *  \param  point  EC_POINT object to check
15079  *  \param  ctx    BN_CTX object (optional)
15080  *  \return 1 if point if on the curve and 0 otherwise
15081  */
15082 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
15083                          BN_CTX *ctx);
15084 
15085 /** Compares two EC_POINTs
15086  *  \param  group  underlying EC_GROUP object
15087  *  \param  a      first EC_POINT object
15088  *  \param  b      second EC_POINT object
15089  *  \param  ctx    BN_CTX object (optional)
15090  *  \return 0 if both points are equal and a value != 0 otherwise
15091  */
15092 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
15093                  BN_CTX *ctx);
15094 
15095 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
15096 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
15097                           EC_POINT *points[], BN_CTX *ctx);
15098 
15099 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
15100  *  \param  group  underlying EC_GROUP object
15101  *  \param  r      EC_POINT object for the result
15102  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
15103  *  \param  num    number futher summands
15104  *  \param  p      array of size num of EC_POINT objects
15105  *  \param  m      array of size num of BIGNUM objects
15106  *  \param  ctx    BN_CTX object (optional)
15107  *  \return 1 on success and 0 if an error occured
15108  */
15109 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
15110                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
15111                   BN_CTX *ctx);
15112 
15113 /** Computes r = generator * n + q * m
15114  *  \param  group  underlying EC_GROUP object
15115  *  \param  r      EC_POINT object for the result
15116  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
15117  *  \param  q      EC_POINT object with the first factor of the second summand
15118  *  \param  m      BIGNUM with the second factor of the second summand
15119  *  \param  ctx    BN_CTX object (optional)
15120  *  \return 1 on success and 0 if an error occured
15121  */
15122 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
15123                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
15124 
15125 /** Stores multiples of generator for faster point multiplication
15126  *  \param  group  EC_GROUP object
15127  *  \param  ctx    BN_CTX object (optional)
15128  *  \return 1 on success and 0 if an error occured
15129  */
15130 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
15131 
15132 /** Reports whether a precomputation has been done
15133  *  \param  group  EC_GROUP object
15134  *  \return 1 if a pre-computation has been done and 0 otherwise
15135  */
15136 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
15137 
15138 /********************************************************************/
15139 /*                       ASN1 stuff                                 */
15140 /********************************************************************/
15141 
15142 /*
15143  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
15144  * represent the field elements
15145  */
15146 int EC_GROUP_get_basis_type(const EC_GROUP *);
15147 
15148 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
15149 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
15150                                    unsigned int *k2, unsigned int *k3);
15151 
15152 
15153 
15154 
15155 typedef struct ecpk_parameters_st ECPKPARAMETERS;
15156 
15157 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
15158 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
15159 # 731 "/usr/include/openssl/ec.h" 3 4
15160 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
15161 
15162 
15163 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
15164 
15165 
15166 /********************************************************************/
15167 /*                      EC_KEY functions                            */
15168 /********************************************************************/
15169 
15170 typedef struct ec_key_st EC_KEY;
15171 
15172 /* some values for the encoding_flag */
15173 
15174 
15175 
15176 /* some values for the flags field */
15177 
15178 
15179 
15180 /** Creates a new EC_KEY object.
15181  *  \return EC_KEY object or NULL if an error occurred.
15182  */
15183 EC_KEY *EC_KEY_new(void);
15184 
15185 int EC_KEY_get_flags(const EC_KEY *key);
15186 
15187 void EC_KEY_set_flags(EC_KEY *key, int flags);
15188 
15189 void EC_KEY_clear_flags(EC_KEY *key, int flags);
15190 
15191 /** Creates a new EC_KEY object using a named curve as underlying
15192  *  EC_GROUP object.
15193  *  \param  nid  NID of the named curve.
15194  *  \return EC_KEY object or NULL if an error occurred.
15195  */
15196 EC_KEY *EC_KEY_new_by_curve_name(int nid);
15197 
15198 /** Frees a EC_KEY object.
15199  *  \param  key  EC_KEY object to be freed.
15200  */
15201 void EC_KEY_free(EC_KEY *key);
15202 
15203 /** Copies a EC_KEY object.
15204  *  \param  dst  destination EC_KEY object
15205  *  \param  src  src EC_KEY object
15206  *  \return dst or NULL if an error occurred.
15207  */
15208 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
15209 
15210 /** Creates a new EC_KEY object and copies the content from src to it.
15211  *  \param  src  the source EC_KEY object
15212  *  \return newly created EC_KEY object or NULL if an error occurred.
15213  */
15214 EC_KEY *EC_KEY_dup(const EC_KEY *src);
15215 
15216 /** Increases the internal reference count of a EC_KEY object.
15217  *  \param  key  EC_KEY object
15218  *  \return 1 on success and 0 if an error occurred.
15219  */
15220 int EC_KEY_up_ref(EC_KEY *key);
15221 
15222 /** Returns the EC_GROUP object of a EC_KEY object
15223  *  \param  key  EC_KEY object
15224  *  \return the EC_GROUP object (possibly NULL).
15225  */
15226 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
15227 
15228 /** Sets the EC_GROUP of a EC_KEY object.
15229  *  \param  key    EC_KEY object
15230  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
15231  *                 object will use an own copy of the EC_GROUP).
15232  *  \return 1 on success and 0 if an error occurred.
15233  */
15234 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
15235 
15236 /** Returns the private key of a EC_KEY object.
15237  *  \param  key  EC_KEY object
15238  *  \return a BIGNUM with the private key (possibly NULL).
15239  */
15240 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
15241 
15242 /** Sets the private key of a EC_KEY object.
15243  *  \param  key  EC_KEY object
15244  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
15245  *               will use an own copy of the BIGNUM).
15246  *  \return 1 on success and 0 if an error occurred.
15247  */
15248 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
15249 
15250 /** Returns the public key of a EC_KEY object.
15251  *  \param  key  the EC_KEY object
15252  *  \return a EC_POINT object with the public key (possibly NULL)
15253  */
15254 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
15255 
15256 /** Sets the public key of a EC_KEY object.
15257  *  \param  key  EC_KEY object
15258  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
15259  *               will use an own copy of the EC_POINT object).
15260  *  \return 1 on success and 0 if an error occurred.
15261  */
15262 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
15263 
15264 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
15265 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
15266 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
15267 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
15268 /* functions to set/get method specific data  */
15269 void *EC_KEY_get_key_method_data(EC_KEY *key,
15270                                  void *(*dup_func) (void *),
15271                                  void (*free_func) (void *),
15272                                  void (*clear_free_func) (void *));
15273 /** Sets the key method data of an EC_KEY object, if none has yet been set.
15274  *  \param  key              EC_KEY object
15275  *  \param  data             opaque data to install.
15276  *  \param  dup_func         a function that duplicates |data|.
15277  *  \param  free_func        a function that frees |data|.
15278  *  \param  clear_free_func  a function that wipes and frees |data|.
15279  *  \return the previously set data pointer, or NULL if |data| was inserted.
15280  */
15281 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
15282                                     void *(*dup_func) (void *),
15283                                     void (*free_func) (void *),
15284                                     void (*clear_free_func) (void *));
15285 /* wrapper functions for the underlying EC_GROUP object */
15286 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
15287 
15288 /** Creates a table of pre-computed multiples of the generator to
15289  *  accelerate further EC_KEY operations.
15290  *  \param  key  EC_KEY object
15291  *  \param  ctx  BN_CTX object (optional)
15292  *  \return 1 on success and 0 if an error occurred.
15293  */
15294 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
15295 
15296 /** Creates a new ec private (and optional a new public) key.
15297  *  \param  key  EC_KEY object
15298  *  \return 1 on success and 0 if an error occurred.
15299  */
15300 int EC_KEY_generate_key(EC_KEY *key);
15301 
15302 /** Verifies that a private and/or public key is valid.
15303  *  \param  key  the EC_KEY object
15304  *  \return 1 on success and 0 otherwise.
15305  */
15306 int EC_KEY_check_key(const EC_KEY *key);
15307 
15308 /** Sets a public key from affine coordindates performing
15309  *  neccessary NIST PKV tests.
15310  *  \param  key  the EC_KEY object
15311  *  \param  x    public key x coordinate
15312  *  \param  y    public key y coordinate
15313  *  \return 1 on success and 0 otherwise.
15314  */
15315 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
15316                                              BIGNUM *y);
15317 
15318 /********************************************************************/
15319 /*        de- and encoding functions for SEC1 ECPrivateKey          */
15320 /********************************************************************/
15321 
15322 /** Decodes a private key from a memory buffer.
15323  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
15324  *  \param  in   pointer to memory with the DER encoded private key
15325  *  \param  len  length of the DER encoded private key
15326  *  \return the decoded private key or NULL if an error occurred.
15327  */
15328 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
15329 
15330 /** Encodes a private key object and stores the result in a buffer.
15331  *  \param  key  the EC_KEY object to encode
15332  *  \param  out  the buffer for the result (if NULL the function returns number
15333  *               of bytes needed).
15334  *  \return 1 on success and 0 if an error occurred.
15335  */
15336 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
15337 
15338 /********************************************************************/
15339 /*        de- and encoding functions for EC parameters              */
15340 /********************************************************************/
15341 
15342 /** Decodes ec parameter from a memory buffer.
15343  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
15344  *  \param  in   pointer to memory with the DER encoded ec parameters
15345  *  \param  len  length of the DER encoded ec parameters
15346  *  \return a EC_KEY object with the decoded parameters or NULL if an error
15347  *          occurred.
15348  */
15349 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
15350 
15351 /** Encodes ec parameter and stores the result in a buffer.
15352  *  \param  key  the EC_KEY object with ec paramters to encode
15353  *  \param  out  the buffer for the result (if NULL the function returns number
15354  *               of bytes needed).
15355  *  \return 1 on success and 0 if an error occurred.
15356  */
15357 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
15358 
15359 /********************************************************************/
15360 /*         de- and encoding functions for EC public key             */
15361 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
15362 /********************************************************************/
15363 
15364 /** Decodes a ec public key from a octet string.
15365  *  \param  key  a pointer to a EC_KEY object which should be used
15366  *  \param  in   memory buffer with the encoded public key
15367  *  \param  len  length of the encoded public key
15368  *  \return EC_KEY object with decoded public key or NULL if an error
15369  *          occurred.
15370  */
15371 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
15372 
15373 /** Encodes a ec public key in an octet string.
15374  *  \param  key  the EC_KEY object with the public key
15375  *  \param  out  the buffer for the result (if NULL the function returns number
15376  *               of bytes needed).
15377  *  \return 1 on success and 0 if an error occurred
15378  */
15379 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
15380 
15381 
15382 /** Prints out the ec parameters on human readable form.
15383  *  \param  bp   BIO object to which the information is printed
15384  *  \param  key  EC_KEY object
15385  *  \return 1 on success and 0 if an error occurred
15386  */
15387 int ECParameters_print(BIO *bp, const EC_KEY *key);
15388 
15389 /** Prints out the contents of a EC_KEY object
15390  *  \param  bp   BIO object to which the information is printed
15391  *  \param  key  EC_KEY object
15392  *  \param  off  line offset
15393  *  \return 1 on success and 0 if an error occurred
15394  */
15395 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
15396 
15397 
15398 
15399 /** Prints out the ec parameters on human readable form.
15400  *  \param  fp   file descriptor to which the information is printed
15401  *  \param  key  EC_KEY object
15402  *  \return 1 on success and 0 if an error occurred
15403  */
15404 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
15405 
15406 /** Prints out the contents of a EC_KEY object
15407  *  \param  fp   file descriptor to which the information is printed
15408  *  \param  key  EC_KEY object
15409  *  \param  off  line offset
15410  *  \return 1 on success and 0 if an error occurred
15411  */
15412 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
15413 # 1067 "/usr/include/openssl/ec.h" 3 4
15414 /* KDF types */
15415 
15416 
15417 
15418 /* BEGIN ERROR CODES */
15419 /*
15420  * The following lines are auto generated by the script mkerr.pl. Any changes
15421  * made after this point may be overwritten when the script is next run.
15422  */
15423 
15424 void ERR_load_EC_strings(void);
15425 
15426 /* Error codes for the EC functions. */
15427 
15428 /* Function codes. */
15429 # 1227 "/usr/include/openssl/ec.h" 3 4
15430 /* Reason codes. */
15431 # 84 "/usr/include/openssl/x509.h" 2 3 4
15432 
15433 
15434 
15435 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
15436 /* crypto/ecdsa/ecdsa.h */
15437 /**
15438  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
15439  * \author Written by Nils Larsch for the OpenSSL project
15440  */
15441 /* ====================================================================
15442  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
15443  *
15444  * Redistribution and use in source and binary forms, with or without
15445  * modification, are permitted provided that the following conditions
15446  * are met:
15447  *
15448  * 1. Redistributions of source code must retain the above copyright
15449  *    notice, this list of conditions and the following disclaimer.
15450  *
15451  * 2. Redistributions in binary form must reproduce the above copyright
15452  *    notice, this list of conditions and the following disclaimer in
15453  *    the documentation and/or other materials provided with the
15454  *    distribution.
15455  *
15456  * 3. All advertising materials mentioning features or use of this
15457  *    software must display the following acknowledgment:
15458  *    "This product includes software developed by the OpenSSL Project
15459  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
15460  *
15461  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15462  *    endorse or promote products derived from this software without
15463  *    prior written permission. For written permission, please contact
15464  *    licensing@OpenSSL.org.
15465  *
15466  * 5. Products derived from this software may not be called "OpenSSL"
15467  *    nor may "OpenSSL" appear in their names without prior written
15468  *    permission of the OpenSSL Project.
15469  *
15470  * 6. Redistributions of any form whatsoever must retain the following
15471  *    acknowledgment:
15472  *    "This product includes software developed by the OpenSSL Project
15473  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
15474  *
15475  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15476  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15477  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15478  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15479  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15480  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15481  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15482  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15483  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15484  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15485  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15486  * OF THE POSSIBILITY OF SUCH DAMAGE.
15487  * ====================================================================
15488  *
15489  * This product includes cryptographic software written by Eric Young
15490  * (eay@cryptsoft.com).  This product includes software written by Tim
15491  * Hudson (tjh@cryptsoft.com).
15492  *
15493  */
15494 
15495 
15496 
15497 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
15498 /* opensslconf.h */
15499 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
15500 
15501 
15502 
15503 
15504 /* OpenSSL was configured with the following options: */
15505 # 108 "/usr/include/openssl/opensslconf.h" 3 4
15506 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
15507    asks for it.  This is a transient feature that is provided for those
15508    who haven't had the time to do the appropriate changes in their
15509    applications.  */
15510 # 204 "/usr/include/openssl/opensslconf.h" 3 4
15511 /* crypto/opensslconf.h.in */
15512 
15513 /* Generate 80386 code? */
15514 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
15515 
15516 
15517 
15518 
15519 
15520 # 1 "/usr/include/openssl/ec.h" 1 3 4
15521 /* crypto/ec/ec.h */
15522 /*
15523  * Originally written by Bodo Moeller for the OpenSSL project.
15524  */
15525 /**
15526  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
15527  * \author Originally written by Bodo Moeller for the OpenSSL project
15528  */
15529 /* ====================================================================
15530  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
15531  *
15532  * Redistribution and use in source and binary forms, with or without
15533  * modification, are permitted provided that the following conditions
15534  * are met:
15535  *
15536  * 1. Redistributions of source code must retain the above copyright
15537  *    notice, this list of conditions and the following disclaimer.
15538  *
15539  * 2. Redistributions in binary form must reproduce the above copyright
15540  *    notice, this list of conditions and the following disclaimer in
15541  *    the documentation and/or other materials provided with the
15542  *    distribution.
15543  *
15544  * 3. All advertising materials mentioning features or use of this
15545  *    software must display the following acknowledgment:
15546  *    "This product includes software developed by the OpenSSL Project
15547  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15548  *
15549  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15550  *    endorse or promote products derived from this software without
15551  *    prior written permission. For written permission, please contact
15552  *    openssl-core@openssl.org.
15553  *
15554  * 5. Products derived from this software may not be called "OpenSSL"
15555  *    nor may "OpenSSL" appear in their names without prior written
15556  *    permission of the OpenSSL Project.
15557  *
15558  * 6. Redistributions of any form whatsoever must retain the following
15559  *    acknowledgment:
15560  *    "This product includes software developed by the OpenSSL Project
15561  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15562  *
15563  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15564  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15565  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15566  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15567  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15568  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15569  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15570  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15571  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15572  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15573  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15574  * OF THE POSSIBILITY OF SUCH DAMAGE.
15575  * ====================================================================
15576  *
15577  * This product includes cryptographic software written by Eric Young
15578  * (eay@cryptsoft.com).  This product includes software written by Tim
15579  * Hudson (tjh@cryptsoft.com).
15580  *
15581  */
15582 /* ====================================================================
15583  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15584  *
15585  * Portions of the attached software ("Contribution") are developed by
15586  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15587  *
15588  * The Contribution is licensed pursuant to the OpenSSL open source
15589  * license provided above.
15590  *
15591  * The elliptic curve binary polynomial software is originally written by
15592  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15593  *
15594  */
15595 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
15596 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
15597 /* ====================================================================
15598  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
15599  *
15600  * Redistribution and use in source and binary forms, with or without
15601  * modification, are permitted provided that the following conditions
15602  * are met:
15603  *
15604  * 1. Redistributions of source code must retain the above copyright
15605  *    notice, this list of conditions and the following disclaimer.
15606  *
15607  * 2. Redistributions in binary form must reproduce the above copyright
15608  *    notice, this list of conditions and the following disclaimer in
15609  *    the documentation and/or other materials provided with the
15610  *    distribution.
15611  *
15612  * 3. All advertising materials mentioning features or use of this
15613  *    software must display the following acknowledgment:
15614  *    "This product includes software developed by the OpenSSL Project
15615  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15616  *
15617  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15618  *    endorse or promote products derived from this software without
15619  *    prior written permission. For written permission, please contact
15620  *    openssl-core@openssl.org.
15621  *
15622  * 5. Products derived from this software may not be called "OpenSSL"
15623  *    nor may "OpenSSL" appear in their names without prior written
15624  *    permission of the OpenSSL Project.
15625  *
15626  * 6. Redistributions of any form whatsoever must retain the following
15627  *    acknowledgment:
15628  *    "This product includes software developed by the OpenSSL Project
15629  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15630  *
15631  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15632  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15633  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15634  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15635  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15636  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15637  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15638  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15639  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15640  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15641  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15642  * OF THE POSSIBILITY OF SUCH DAMAGE.
15643  * ====================================================================
15644  *
15645  * This product includes cryptographic software written by Eric Young
15646  * (eay@cryptsoft.com).  This product includes software written by Tim
15647  * Hudson (tjh@cryptsoft.com).
15648  *
15649  */
15650 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
15651 
15652 # 1 "/usr/include/openssl/bn.h" 1 3 4
15653 /* crypto/bn/bn.h */
15654 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
15655  * All rights reserved.
15656  *
15657  * This package is an SSL implementation written
15658  * by Eric Young (eay@cryptsoft.com).
15659  * The implementation was written so as to conform with Netscapes SSL.
15660  *
15661  * This library is free for commercial and non-commercial use as long as
15662  * the following conditions are aheared to.  The following conditions
15663  * apply to all code found in this distribution, be it the RC4, RSA,
15664  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15665  * included with this distribution is covered by the same copyright terms
15666  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15667  *
15668  * Copyright remains Eric Young's, and as such any Copyright notices in
15669  * the code are not to be removed.
15670  * If this package is used in a product, Eric Young should be given attribution
15671  * as the author of the parts of the library used.
15672  * This can be in the form of a textual message at program startup or
15673  * in documentation (online or textual) provided with the package.
15674  *
15675  * Redistribution and use in source and binary forms, with or without
15676  * modification, are permitted provided that the following conditions
15677  * are met:
15678  * 1. Redistributions of source code must retain the copyright
15679  *    notice, this list of conditions and the following disclaimer.
15680  * 2. Redistributions in binary form must reproduce the above copyright
15681  *    notice, this list of conditions and the following disclaimer in the
15682  *    documentation and/or other materials provided with the distribution.
15683  * 3. All advertising materials mentioning features or use of this software
15684  *    must display the following acknowledgement:
15685  *    "This product includes cryptographic software written by
15686  *     Eric Young (eay@cryptsoft.com)"
15687  *    The word 'cryptographic' can be left out if the rouines from the library
15688  *    being used are not cryptographic related :-).
15689  * 4. If you include any Windows specific code (or a derivative thereof) from
15690  *    the apps directory (application code) you must include an acknowledgement:
15691  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15692  *
15693  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15694  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15695  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15696  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15697  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15698  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15699  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15700  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15701  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15702  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15703  * SUCH DAMAGE.
15704  *
15705  * The licence and distribution terms for any publically available version or
15706  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15707  * copied and put under another distribution licence
15708  * [including the GNU Public Licence.]
15709  */
15710 /* ====================================================================
15711  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
15712  *
15713  * Redistribution and use in source and binary forms, with or without
15714  * modification, are permitted provided that the following conditions
15715  * are met:
15716  *
15717  * 1. Redistributions of source code must retain the above copyright
15718  *    notice, this list of conditions and the following disclaimer.
15719  *
15720  * 2. Redistributions in binary form must reproduce the above copyright
15721  *    notice, this list of conditions and the following disclaimer in
15722  *    the documentation and/or other materials provided with the
15723  *    distribution.
15724  *
15725  * 3. All advertising materials mentioning features or use of this
15726  *    software must display the following acknowledgment:
15727  *    "This product includes software developed by the OpenSSL Project
15728  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15729  *
15730  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15731  *    endorse or promote products derived from this software without
15732  *    prior written permission. For written permission, please contact
15733  *    openssl-core@openssl.org.
15734  *
15735  * 5. Products derived from this software may not be called "OpenSSL"
15736  *    nor may "OpenSSL" appear in their names without prior written
15737  *    permission of the OpenSSL Project.
15738  *
15739  * 6. Redistributions of any form whatsoever must retain the following
15740  *    acknowledgment:
15741  *    "This product includes software developed by the OpenSSL Project
15742  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15743  *
15744  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15745  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15746  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15747  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15748  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15749  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15750  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15751  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15752  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15753  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15754  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15755  * OF THE POSSIBILITY OF SUCH DAMAGE.
15756  * ====================================================================
15757  *
15758  * This product includes cryptographic software written by Eric Young
15759  * (eay@cryptsoft.com).  This product includes software written by Tim
15760  * Hudson (tjh@cryptsoft.com).
15761  *
15762  */
15763 /* ====================================================================
15764  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15765  *
15766  * Portions of the attached software ("Contribution") are developed by
15767  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15768  *
15769  * The Contribution is licensed pursuant to the Eric Young open source
15770  * license provided above.
15771  *
15772  * The binary polynomial arithmetic software is originally written by
15773  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15774  *
15775  */
15776 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
15777 
15778 
15779 
15780 
15781 
15782 
15783 typedef struct ECDSA_SIG_st {
15784     BIGNUM *r;
15785     BIGNUM *s;
15786 } ECDSA_SIG;
15787 
15788 /** Allocates and initialize a ECDSA_SIG structure
15789  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
15790  */
15791 ECDSA_SIG *ECDSA_SIG_new(void);
15792 
15793 /** frees a ECDSA_SIG structure
15794  *  \param  sig  pointer to the ECDSA_SIG structure
15795  */
15796 void ECDSA_SIG_free(ECDSA_SIG *sig);
15797 
15798 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
15799  *  (*pp += length of the DER encoded signature)).
15800  *  \param  sig  pointer to the ECDSA_SIG object
15801  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
15802  *  \return the length of the DER encoded ECDSA_SIG object or 0
15803  */
15804 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
15805 
15806 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
15807  *  (*pp += len)).
15808  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
15809  *  \param  pp   memory buffer with the DER encoded signature
15810  *  \param  len  length of the buffer
15811  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
15812  */
15813 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
15814 
15815 /** Computes the ECDSA signature of the given hash value using
15816  *  the supplied private key and returns the created signature.
15817  *  \param  dgst      pointer to the hash value
15818  *  \param  dgst_len  length of the hash value
15819  *  \param  eckey     EC_KEY object containing a private EC key
15820  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
15821  */
15822 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
15823                          EC_KEY *eckey);
15824 
15825 /** Computes ECDSA signature of a given hash value using the supplied
15826  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
15827  *  \param  dgst     pointer to the hash value to sign
15828  *  \param  dgstlen  length of the hash value
15829  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
15830  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
15831  *                   see ECDSA_sign_setup
15832  *  \param  eckey    EC_KEY object containing a private EC key
15833  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
15834  */
15835 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
15836                             const BIGNUM *kinv, const BIGNUM *rp,
15837                             EC_KEY *eckey);
15838 
15839 /** Verifies that the supplied signature is a valid ECDSA
15840  *  signature of the supplied hash value using the supplied public key.
15841  *  \param  dgst      pointer to the hash value
15842  *  \param  dgst_len  length of the hash value
15843  *  \param  sig       ECDSA_SIG structure
15844  *  \param  eckey     EC_KEY object containing a public EC key
15845  *  \return 1 if the signature is valid, 0 if the signature is invalid
15846  *          and -1 on error
15847  */
15848 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
15849                     const ECDSA_SIG *sig, EC_KEY *eckey);
15850 
15851 const ECDSA_METHOD *ECDSA_OpenSSL(void);
15852 
15853 /** Sets the default ECDSA method
15854  *  \param  meth  new default ECDSA_METHOD
15855  */
15856 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
15857 
15858 /** Returns the default ECDSA method
15859  *  \return pointer to ECDSA_METHOD structure containing the default method
15860  */
15861 const ECDSA_METHOD *ECDSA_get_default_method(void);
15862 
15863 /** Sets method to be used for the ECDSA operations
15864  *  \param  eckey  EC_KEY object
15865  *  \param  meth   new method
15866  *  \return 1 on success and 0 otherwise
15867  */
15868 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
15869 
15870 /** Returns the maximum length of the DER encoded signature
15871  *  \param  eckey  EC_KEY object
15872  *  \return numbers of bytes required for the DER encoded signature
15873  */
15874 int ECDSA_size(const EC_KEY *eckey);
15875 
15876 /** Precompute parts of the signing operation
15877  *  \param  eckey  EC_KEY object containing a private EC key
15878  *  \param  ctx    BN_CTX object (optional)
15879  *  \param  kinv   BIGNUM pointer for the inverse of k
15880  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
15881  *  \return 1 on success and 0 otherwise
15882  */
15883 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
15884 
15885 /** Computes ECDSA signature of a given hash value using the supplied
15886  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
15887  *  \param  type     this parameter is ignored
15888  *  \param  dgst     pointer to the hash value to sign
15889  *  \param  dgstlen  length of the hash value
15890  *  \param  sig      memory for the DER encoded created signature
15891  *  \param  siglen   pointer to the length of the returned signature
15892  *  \param  eckey    EC_KEY object containing a private EC key
15893  *  \return 1 on success and 0 otherwise
15894  */
15895 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
15896                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
15897 
15898 /** Computes ECDSA signature of a given hash value using the supplied
15899  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
15900  *  \param  type     this parameter is ignored
15901  *  \param  dgst     pointer to the hash value to sign
15902  *  \param  dgstlen  length of the hash value
15903  *  \param  sig      buffer to hold the DER encoded signature
15904  *  \param  siglen   pointer to the length of the returned signature
15905  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
15906  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
15907  *                   see ECDSA_sign_setup
15908  *  \param  eckey    EC_KEY object containing a private EC key
15909  *  \return 1 on success and 0 otherwise
15910  */
15911 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
15912                   unsigned char *sig, unsigned int *siglen,
15913                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
15914 
15915 /** Verifies that the given signature is valid ECDSA signature
15916  *  of the supplied hash value using the specified public key.
15917  *  \param  type     this parameter is ignored
15918  *  \param  dgst     pointer to the hash value
15919  *  \param  dgstlen  length of the hash value
15920  *  \param  sig      pointer to the DER encoded signature
15921  *  \param  siglen   length of the DER encoded signature
15922  *  \param  eckey    EC_KEY object containing a public EC key
15923  *  \return 1 if the signature is valid, 0 if the signature is invalid
15924  *          and -1 on error
15925  */
15926 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
15927                  const unsigned char *sig, int siglen, EC_KEY *eckey);
15928 
15929 /* the standard ex_data functions */
15930 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
15931                            *new_func, CRYPTO_EX_dup *dup_func,
15932                            CRYPTO_EX_free *free_func);
15933 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
15934 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
15935 
15936 /** Allocates and initialize a ECDSA_METHOD structure
15937  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
15938  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
15939  */
15940 
15941 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
15942 
15943 /** frees a ECDSA_METHOD structure
15944  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
15945  */
15946 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
15947 
15948 /**  Sets application specific data in the ECDSA_METHOD
15949  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
15950  *   \param  app application specific data to set
15951  */
15952 
15953 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
15954 
15955 /** Returns application specific data from a ECDSA_METHOD structure
15956  *  \param ecdsa_method pointer to ECDSA_METHOD structure
15957  *  \return pointer to application specific data.
15958  */
15959 
15960 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
15961 
15962 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
15963  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
15964  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
15965  */
15966 
15967 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
15968                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
15969                                                         *dgst, int dgst_len,
15970                                                         const BIGNUM *inv,
15971                                                         const BIGNUM *rp,
15972                                                         EC_KEY *eckey));
15973 
15974 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
15975  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
15976  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
15977  */
15978 
15979 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
15980                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
15981                                                           BN_CTX *ctx,
15982                                                           BIGNUM **kinv,
15983                                                           BIGNUM **r));
15984 
15985 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
15986  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
15987  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
15988  */
15989 
15990 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
15991                              int (*ecdsa_do_verify) (const unsigned char
15992                                                      *dgst, int dgst_len,
15993                                                      const ECDSA_SIG *sig,
15994                                                      EC_KEY *eckey));
15995 
15996 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
15997 
15998 /**  Set the flags field in the ECDSA_METHOD
15999  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16000  *   \param  flags flags value to set
16001  */
16002 
16003 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
16004 
16005 /**  Set the name field in the ECDSA_METHOD
16006  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
16007  *   \param  name name to set
16008  */
16009 
16010 /* BEGIN ERROR CODES */
16011 /*
16012  * The following lines are auto generated by the script mkerr.pl. Any changes
16013  * made after this point may be overwritten when the script is next run.
16014  */
16015 void ERR_load_ECDSA_strings(void);
16016 
16017 /* Error codes for the ECDSA functions. */
16018 
16019 /* Function codes. */
16020 
16021 
16022 
16023 
16024 
16025 
16026 
16027 /* Reason codes. */
16028 # 88 "/usr/include/openssl/x509.h" 2 3 4
16029 
16030 
16031 
16032 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
16033 /* crypto/ecdh/ecdh.h */
16034 /* ====================================================================
16035  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16036  *
16037  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
16038  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
16039  * to the OpenSSL project.
16040  *
16041  * The ECC Code is licensed pursuant to the OpenSSL open source
16042  * license provided below.
16043  *
16044  * The ECDH software is originally written by Douglas Stebila of
16045  * Sun Microsystems Laboratories.
16046  *
16047  */
16048 /* ====================================================================
16049  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
16050  *
16051  * Redistribution and use in source and binary forms, with or without
16052  * modification, are permitted provided that the following conditions
16053  * are met:
16054  *
16055  * 1. Redistributions of source code must retain the above copyright
16056  *    notice, this list of conditions and the following disclaimer.
16057  *
16058  * 2. Redistributions in binary form must reproduce the above copyright
16059  *    notice, this list of conditions and the following disclaimer in
16060  *    the documentation and/or other materials provided with the
16061  *    distribution.
16062  *
16063  * 3. All advertising materials mentioning features or use of this
16064  *    software must display the following acknowledgment:
16065  *    "This product includes software developed by the OpenSSL Project
16066  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
16067  *
16068  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16069  *    endorse or promote products derived from this software without
16070  *    prior written permission. For written permission, please contact
16071  *    licensing@OpenSSL.org.
16072  *
16073  * 5. Products derived from this software may not be called "OpenSSL"
16074  *    nor may "OpenSSL" appear in their names without prior written
16075  *    permission of the OpenSSL Project.
16076  *
16077  * 6. Redistributions of any form whatsoever must retain the following
16078  *    acknowledgment:
16079  *    "This product includes software developed by the OpenSSL Project
16080  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
16081  *
16082  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16083  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16084  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16085  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16086  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16087  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16088  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16089  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16090  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16091  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16092  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16093  * OF THE POSSIBILITY OF SUCH DAMAGE.
16094  * ====================================================================
16095  *
16096  * This product includes cryptographic software written by Eric Young
16097  * (eay@cryptsoft.com).  This product includes software written by Tim
16098  * Hudson (tjh@cryptsoft.com).
16099  *
16100  */
16101 
16102 
16103 
16104 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
16105 /* opensslconf.h */
16106 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
16107 
16108 
16109 
16110 
16111 /* OpenSSL was configured with the following options: */
16112 # 108 "/usr/include/openssl/opensslconf.h" 3 4
16113 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
16114    asks for it.  This is a transient feature that is provided for those
16115    who haven't had the time to do the appropriate changes in their
16116    applications.  */
16117 # 204 "/usr/include/openssl/opensslconf.h" 3 4
16118 /* crypto/opensslconf.h.in */
16119 
16120 /* Generate 80386 code? */
16121 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
16122 
16123 
16124 
16125 
16126 
16127 # 1 "/usr/include/openssl/ec.h" 1 3 4
16128 /* crypto/ec/ec.h */
16129 /*
16130  * Originally written by Bodo Moeller for the OpenSSL project.
16131  */
16132 /**
16133  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
16134  * \author Originally written by Bodo Moeller for the OpenSSL project
16135  */
16136 /* ====================================================================
16137  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
16138  *
16139  * Redistribution and use in source and binary forms, with or without
16140  * modification, are permitted provided that the following conditions
16141  * are met:
16142  *
16143  * 1. Redistributions of source code must retain the above copyright
16144  *    notice, this list of conditions and the following disclaimer.
16145  *
16146  * 2. Redistributions in binary form must reproduce the above copyright
16147  *    notice, this list of conditions and the following disclaimer in
16148  *    the documentation and/or other materials provided with the
16149  *    distribution.
16150  *
16151  * 3. All advertising materials mentioning features or use of this
16152  *    software must display the following acknowledgment:
16153  *    "This product includes software developed by the OpenSSL Project
16154  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16155  *
16156  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16157  *    endorse or promote products derived from this software without
16158  *    prior written permission. For written permission, please contact
16159  *    openssl-core@openssl.org.
16160  *
16161  * 5. Products derived from this software may not be called "OpenSSL"
16162  *    nor may "OpenSSL" appear in their names without prior written
16163  *    permission of the OpenSSL Project.
16164  *
16165  * 6. Redistributions of any form whatsoever must retain the following
16166  *    acknowledgment:
16167  *    "This product includes software developed by the OpenSSL Project
16168  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16169  *
16170  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16171  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16172  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16173  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16174  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16175  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16176  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16177  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16178  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16179  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16180  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16181  * OF THE POSSIBILITY OF SUCH DAMAGE.
16182  * ====================================================================
16183  *
16184  * This product includes cryptographic software written by Eric Young
16185  * (eay@cryptsoft.com).  This product includes software written by Tim
16186  * Hudson (tjh@cryptsoft.com).
16187  *
16188  */
16189 /* ====================================================================
16190  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16191  *
16192  * Portions of the attached software ("Contribution") are developed by
16193  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16194  *
16195  * The Contribution is licensed pursuant to the OpenSSL open source
16196  * license provided above.
16197  *
16198  * The elliptic curve binary polynomial software is originally written by
16199  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16200  *
16201  */
16202 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
16203 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16204 /* ====================================================================
16205  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16206  *
16207  * Redistribution and use in source and binary forms, with or without
16208  * modification, are permitted provided that the following conditions
16209  * are met:
16210  *
16211  * 1. Redistributions of source code must retain the above copyright
16212  *    notice, this list of conditions and the following disclaimer.
16213  *
16214  * 2. Redistributions in binary form must reproduce the above copyright
16215  *    notice, this list of conditions and the following disclaimer in
16216  *    the documentation and/or other materials provided with the
16217  *    distribution.
16218  *
16219  * 3. All advertising materials mentioning features or use of this
16220  *    software must display the following acknowledgment:
16221  *    "This product includes software developed by the OpenSSL Project
16222  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16223  *
16224  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16225  *    endorse or promote products derived from this software without
16226  *    prior written permission. For written permission, please contact
16227  *    openssl-core@openssl.org.
16228  *
16229  * 5. Products derived from this software may not be called "OpenSSL"
16230  *    nor may "OpenSSL" appear in their names without prior written
16231  *    permission of the OpenSSL Project.
16232  *
16233  * 6. Redistributions of any form whatsoever must retain the following
16234  *    acknowledgment:
16235  *    "This product includes software developed by the OpenSSL Project
16236  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16237  *
16238  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16239  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16240  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16241  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16242  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16243  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16244  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16245  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16246  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16247  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16248  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16249  * OF THE POSSIBILITY OF SUCH DAMAGE.
16250  * ====================================================================
16251  *
16252  * This product includes cryptographic software written by Eric Young
16253  * (eay@cryptsoft.com).  This product includes software written by Tim
16254  * Hudson (tjh@cryptsoft.com).
16255  *
16256  */
16257 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
16258 
16259 # 1 "/usr/include/openssl/bn.h" 1 3 4
16260 /* crypto/bn/bn.h */
16261 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16262  * All rights reserved.
16263  *
16264  * This package is an SSL implementation written
16265  * by Eric Young (eay@cryptsoft.com).
16266  * The implementation was written so as to conform with Netscapes SSL.
16267  *
16268  * This library is free for commercial and non-commercial use as long as
16269  * the following conditions are aheared to.  The following conditions
16270  * apply to all code found in this distribution, be it the RC4, RSA,
16271  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16272  * included with this distribution is covered by the same copyright terms
16273  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16274  *
16275  * Copyright remains Eric Young's, and as such any Copyright notices in
16276  * the code are not to be removed.
16277  * If this package is used in a product, Eric Young should be given attribution
16278  * as the author of the parts of the library used.
16279  * This can be in the form of a textual message at program startup or
16280  * in documentation (online or textual) provided with the package.
16281  *
16282  * Redistribution and use in source and binary forms, with or without
16283  * modification, are permitted provided that the following conditions
16284  * are met:
16285  * 1. Redistributions of source code must retain the copyright
16286  *    notice, this list of conditions and the following disclaimer.
16287  * 2. Redistributions in binary form must reproduce the above copyright
16288  *    notice, this list of conditions and the following disclaimer in the
16289  *    documentation and/or other materials provided with the distribution.
16290  * 3. All advertising materials mentioning features or use of this software
16291  *    must display the following acknowledgement:
16292  *    "This product includes cryptographic software written by
16293  *     Eric Young (eay@cryptsoft.com)"
16294  *    The word 'cryptographic' can be left out if the rouines from the library
16295  *    being used are not cryptographic related :-).
16296  * 4. If you include any Windows specific code (or a derivative thereof) from
16297  *    the apps directory (application code) you must include an acknowledgement:
16298  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16299  *
16300  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16301  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16302  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16303  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16304  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16305  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16306  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16307  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16308  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16309  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16310  * SUCH DAMAGE.
16311  *
16312  * The licence and distribution terms for any publically available version or
16313  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16314  * copied and put under another distribution licence
16315  * [including the GNU Public Licence.]
16316  */
16317 /* ====================================================================
16318  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16319  *
16320  * Redistribution and use in source and binary forms, with or without
16321  * modification, are permitted provided that the following conditions
16322  * are met:
16323  *
16324  * 1. Redistributions of source code must retain the above copyright
16325  *    notice, this list of conditions and the following disclaimer.
16326  *
16327  * 2. Redistributions in binary form must reproduce the above copyright
16328  *    notice, this list of conditions and the following disclaimer in
16329  *    the documentation and/or other materials provided with the
16330  *    distribution.
16331  *
16332  * 3. All advertising materials mentioning features or use of this
16333  *    software must display the following acknowledgment:
16334  *    "This product includes software developed by the OpenSSL Project
16335  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16336  *
16337  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16338  *    endorse or promote products derived from this software without
16339  *    prior written permission. For written permission, please contact
16340  *    openssl-core@openssl.org.
16341  *
16342  * 5. Products derived from this software may not be called "OpenSSL"
16343  *    nor may "OpenSSL" appear in their names without prior written
16344  *    permission of the OpenSSL Project.
16345  *
16346  * 6. Redistributions of any form whatsoever must retain the following
16347  *    acknowledgment:
16348  *    "This product includes software developed by the OpenSSL Project
16349  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16350  *
16351  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16352  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16353  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16354  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16355  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16356  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16357  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16358  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16359  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16360  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16361  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16362  * OF THE POSSIBILITY OF SUCH DAMAGE.
16363  * ====================================================================
16364  *
16365  * This product includes cryptographic software written by Eric Young
16366  * (eay@cryptsoft.com).  This product includes software written by Tim
16367  * Hudson (tjh@cryptsoft.com).
16368  *
16369  */
16370 /* ====================================================================
16371  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16372  *
16373  * Portions of the attached software ("Contribution") are developed by
16374  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16375  *
16376  * The Contribution is licensed pursuant to the Eric Young open source
16377  * license provided above.
16378  *
16379  * The binary polynomial arithmetic software is originally written by
16380  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16381  *
16382  */
16383 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
16384 # 90 "/usr/include/openssl/ecdh.h" 3 4
16385 const ECDH_METHOD *ECDH_OpenSSL(void);
16386 
16387 void ECDH_set_default_method(const ECDH_METHOD *);
16388 const ECDH_METHOD *ECDH_get_default_method(void);
16389 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
16390 
16391 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
16392                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
16393                                                  void *out, size_t *outlen));
16394 
16395 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
16396                           *new_func, CRYPTO_EX_dup *dup_func,
16397                           CRYPTO_EX_free *free_func);
16398 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
16399 void *ECDH_get_ex_data(EC_KEY *d, int idx);
16400 
16401 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
16402                    const unsigned char *Z, size_t Zlen,
16403                    const unsigned char *sinfo, size_t sinfolen,
16404                    const EVP_MD *md);
16405 
16406 /* BEGIN ERROR CODES */
16407 /*
16408  * The following lines are auto generated by the script mkerr.pl. Any changes
16409  * made after this point may be overwritten when the script is next run.
16410  */
16411 void ERR_load_ECDH_strings(void);
16412 
16413 /* Error codes for the ECDH functions. */
16414 
16415 /* Function codes. */
16416 
16417 
16418 
16419 
16420 /* Reason codes. */
16421 # 92 "/usr/include/openssl/x509.h" 2 3 4
16422 
16423 
16424 
16425 
16426 # 1 "/usr/include/openssl/rsa.h" 1 3 4
16427 /* crypto/rsa/rsa.h */
16428 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16429  * All rights reserved.
16430  *
16431  * This package is an SSL implementation written
16432  * by Eric Young (eay@cryptsoft.com).
16433  * The implementation was written so as to conform with Netscapes SSL.
16434  *
16435  * This library is free for commercial and non-commercial use as long as
16436  * the following conditions are aheared to.  The following conditions
16437  * apply to all code found in this distribution, be it the RC4, RSA,
16438  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16439  * included with this distribution is covered by the same copyright terms
16440  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16441  *
16442  * Copyright remains Eric Young's, and as such any Copyright notices in
16443  * the code are not to be removed.
16444  * If this package is used in a product, Eric Young should be given attribution
16445  * as the author of the parts of the library used.
16446  * This can be in the form of a textual message at program startup or
16447  * in documentation (online or textual) provided with the package.
16448  *
16449  * Redistribution and use in source and binary forms, with or without
16450  * modification, are permitted provided that the following conditions
16451  * are met:
16452  * 1. Redistributions of source code must retain the copyright
16453  *    notice, this list of conditions and the following disclaimer.
16454  * 2. Redistributions in binary form must reproduce the above copyright
16455  *    notice, this list of conditions and the following disclaimer in the
16456  *    documentation and/or other materials provided with the distribution.
16457  * 3. All advertising materials mentioning features or use of this software
16458  *    must display the following acknowledgement:
16459  *    "This product includes cryptographic software written by
16460  *     Eric Young (eay@cryptsoft.com)"
16461  *    The word 'cryptographic' can be left out if the rouines from the library
16462  *    being used are not cryptographic related :-).
16463  * 4. If you include any Windows specific code (or a derivative thereof) from
16464  *    the apps directory (application code) you must include an acknowledgement:
16465  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16466  *
16467  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16468  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16469  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16470  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16471  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16472  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16473  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16474  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16475  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16476  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16477  * SUCH DAMAGE.
16478  *
16479  * The licence and distribution terms for any publically available version or
16480  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16481  * copied and put under another distribution licence
16482  * [including the GNU Public Licence.]
16483  */
16484 
16485 
16486 
16487 
16488 # 1 "/usr/include/openssl/asn1.h" 1 3 4
16489 /* crypto/asn1/asn1.h */
16490 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16491  * All rights reserved.
16492  *
16493  * This package is an SSL implementation written
16494  * by Eric Young (eay@cryptsoft.com).
16495  * The implementation was written so as to conform with Netscapes SSL.
16496  *
16497  * This library is free for commercial and non-commercial use as long as
16498  * the following conditions are aheared to.  The following conditions
16499  * apply to all code found in this distribution, be it the RC4, RSA,
16500  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16501  * included with this distribution is covered by the same copyright terms
16502  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16503  *
16504  * Copyright remains Eric Young's, and as such any Copyright notices in
16505  * the code are not to be removed.
16506  * If this package is used in a product, Eric Young should be given attribution
16507  * as the author of the parts of the library used.
16508  * This can be in the form of a textual message at program startup or
16509  * in documentation (online or textual) provided with the package.
16510  *
16511  * Redistribution and use in source and binary forms, with or without
16512  * modification, are permitted provided that the following conditions
16513  * are met:
16514  * 1. Redistributions of source code must retain the copyright
16515  *    notice, this list of conditions and the following disclaimer.
16516  * 2. Redistributions in binary form must reproduce the above copyright
16517  *    notice, this list of conditions and the following disclaimer in the
16518  *    documentation and/or other materials provided with the distribution.
16519  * 3. All advertising materials mentioning features or use of this software
16520  *    must display the following acknowledgement:
16521  *    "This product includes cryptographic software written by
16522  *     Eric Young (eay@cryptsoft.com)"
16523  *    The word 'cryptographic' can be left out if the rouines from the library
16524  *    being used are not cryptographic related :-).
16525  * 4. If you include any Windows specific code (or a derivative thereof) from
16526  *    the apps directory (application code) you must include an acknowledgement:
16527  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16528  *
16529  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16530  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16531  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16532  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16533  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16534  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16535  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16536  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16537  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16538  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16539  * SUCH DAMAGE.
16540  *
16541  * The licence and distribution terms for any publically available version or
16542  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16543  * copied and put under another distribution licence
16544  * [including the GNU Public Licence.]
16545  */
16546 # 63 "/usr/include/openssl/rsa.h" 2 3 4
16547 
16548 
16549 # 1 "/usr/include/openssl/bio.h" 1 3 4
16550 /* crypto/bio/bio.h */
16551 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16552  * All rights reserved.
16553  *
16554  * This package is an SSL implementation written
16555  * by Eric Young (eay@cryptsoft.com).
16556  * The implementation was written so as to conform with Netscapes SSL.
16557  *
16558  * This library is free for commercial and non-commercial use as long as
16559  * the following conditions are aheared to.  The following conditions
16560  * apply to all code found in this distribution, be it the RC4, RSA,
16561  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16562  * included with this distribution is covered by the same copyright terms
16563  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16564  *
16565  * Copyright remains Eric Young's, and as such any Copyright notices in
16566  * the code are not to be removed.
16567  * If this package is used in a product, Eric Young should be given attribution
16568  * as the author of the parts of the library used.
16569  * This can be in the form of a textual message at program startup or
16570  * in documentation (online or textual) provided with the package.
16571  *
16572  * Redistribution and use in source and binary forms, with or without
16573  * modification, are permitted provided that the following conditions
16574  * are met:
16575  * 1. Redistributions of source code must retain the copyright
16576  *    notice, this list of conditions and the following disclaimer.
16577  * 2. Redistributions in binary form must reproduce the above copyright
16578  *    notice, this list of conditions and the following disclaimer in the
16579  *    documentation and/or other materials provided with the distribution.
16580  * 3. All advertising materials mentioning features or use of this software
16581  *    must display the following acknowledgement:
16582  *    "This product includes cryptographic software written by
16583  *     Eric Young (eay@cryptsoft.com)"
16584  *    The word 'cryptographic' can be left out if the rouines from the library
16585  *    being used are not cryptographic related :-).
16586  * 4. If you include any Windows specific code (or a derivative thereof) from
16587  *    the apps directory (application code) you must include an acknowledgement:
16588  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16589  *
16590  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16591  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16592  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16593  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16594  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16595  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16596  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16597  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16598  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16599  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16600  * SUCH DAMAGE.
16601  *
16602  * The licence and distribution terms for any publically available version or
16603  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16604  * copied and put under another distribution licence
16605  * [including the GNU Public Licence.]
16606  */
16607 # 66 "/usr/include/openssl/rsa.h" 2 3 4
16608 
16609 # 1 "/usr/include/openssl/crypto.h" 1 3 4
16610 /* crypto/crypto.h */
16611 /* ====================================================================
16612  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
16613  *
16614  * Redistribution and use in source and binary forms, with or without
16615  * modification, are permitted provided that the following conditions
16616  * are met:
16617  *
16618  * 1. Redistributions of source code must retain the above copyright
16619  *    notice, this list of conditions and the following disclaimer.
16620  *
16621  * 2. Redistributions in binary form must reproduce the above copyright
16622  *    notice, this list of conditions and the following disclaimer in
16623  *    the documentation and/or other materials provided with the
16624  *    distribution.
16625  *
16626  * 3. All advertising materials mentioning features or use of this
16627  *    software must display the following acknowledgment:
16628  *    "This product includes software developed by the OpenSSL Project
16629  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16630  *
16631  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16632  *    endorse or promote products derived from this software without
16633  *    prior written permission. For written permission, please contact
16634  *    openssl-core@openssl.org.
16635  *
16636  * 5. Products derived from this software may not be called "OpenSSL"
16637  *    nor may "OpenSSL" appear in their names without prior written
16638  *    permission of the OpenSSL Project.
16639  *
16640  * 6. Redistributions of any form whatsoever must retain the following
16641  *    acknowledgment:
16642  *    "This product includes software developed by the OpenSSL Project
16643  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16644  *
16645  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16646  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16647  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16648  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16649  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16650  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16651  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16652  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16653  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16654  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16655  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16656  * OF THE POSSIBILITY OF SUCH DAMAGE.
16657  * ====================================================================
16658  *
16659  * This product includes cryptographic software written by Eric Young
16660  * (eay@cryptsoft.com).  This product includes software written by Tim
16661  * Hudson (tjh@cryptsoft.com).
16662  *
16663  */
16664 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16665  * All rights reserved.
16666  *
16667  * This package is an SSL implementation written
16668  * by Eric Young (eay@cryptsoft.com).
16669  * The implementation was written so as to conform with Netscapes SSL.
16670  *
16671  * This library is free for commercial and non-commercial use as long as
16672  * the following conditions are aheared to.  The following conditions
16673  * apply to all code found in this distribution, be it the RC4, RSA,
16674  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16675  * included with this distribution is covered by the same copyright terms
16676  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16677  *
16678  * Copyright remains Eric Young's, and as such any Copyright notices in
16679  * the code are not to be removed.
16680  * If this package is used in a product, Eric Young should be given attribution
16681  * as the author of the parts of the library used.
16682  * This can be in the form of a textual message at program startup or
16683  * in documentation (online or textual) provided with the package.
16684  *
16685  * Redistribution and use in source and binary forms, with or without
16686  * modification, are permitted provided that the following conditions
16687  * are met:
16688  * 1. Redistributions of source code must retain the copyright
16689  *    notice, this list of conditions and the following disclaimer.
16690  * 2. Redistributions in binary form must reproduce the above copyright
16691  *    notice, this list of conditions and the following disclaimer in the
16692  *    documentation and/or other materials provided with the distribution.
16693  * 3. All advertising materials mentioning features or use of this software
16694  *    must display the following acknowledgement:
16695  *    "This product includes cryptographic software written by
16696  *     Eric Young (eay@cryptsoft.com)"
16697  *    The word 'cryptographic' can be left out if the rouines from the library
16698  *    being used are not cryptographic related :-).
16699  * 4. If you include any Windows specific code (or a derivative thereof) from
16700  *    the apps directory (application code) you must include an acknowledgement:
16701  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16702  *
16703  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16704  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16705  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16706  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16707  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16708  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16709  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16710  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16711  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16712  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16713  * SUCH DAMAGE.
16714  *
16715  * The licence and distribution terms for any publically available version or
16716  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16717  * copied and put under another distribution licence
16718  * [including the GNU Public Licence.]
16719  */
16720 /* ====================================================================
16721  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16722  * ECDH support in OpenSSL originally developed by
16723  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
16724  */
16725 # 68 "/usr/include/openssl/rsa.h" 2 3 4
16726 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16727 /* ====================================================================
16728  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16729  *
16730  * Redistribution and use in source and binary forms, with or without
16731  * modification, are permitted provided that the following conditions
16732  * are met:
16733  *
16734  * 1. Redistributions of source code must retain the above copyright
16735  *    notice, this list of conditions and the following disclaimer.
16736  *
16737  * 2. Redistributions in binary form must reproduce the above copyright
16738  *    notice, this list of conditions and the following disclaimer in
16739  *    the documentation and/or other materials provided with the
16740  *    distribution.
16741  *
16742  * 3. All advertising materials mentioning features or use of this
16743  *    software must display the following acknowledgment:
16744  *    "This product includes software developed by the OpenSSL Project
16745  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16746  *
16747  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16748  *    endorse or promote products derived from this software without
16749  *    prior written permission. For written permission, please contact
16750  *    openssl-core@openssl.org.
16751  *
16752  * 5. Products derived from this software may not be called "OpenSSL"
16753  *    nor may "OpenSSL" appear in their names without prior written
16754  *    permission of the OpenSSL Project.
16755  *
16756  * 6. Redistributions of any form whatsoever must retain the following
16757  *    acknowledgment:
16758  *    "This product includes software developed by the OpenSSL Project
16759  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16760  *
16761  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16762  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16763  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16764  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16765  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16766  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16767  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16768  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16769  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16770  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16771  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16772  * OF THE POSSIBILITY OF SUCH DAMAGE.
16773  * ====================================================================
16774  *
16775  * This product includes cryptographic software written by Eric Young
16776  * (eay@cryptsoft.com).  This product includes software written by Tim
16777  * Hudson (tjh@cryptsoft.com).
16778  *
16779  */
16780 # 69 "/usr/include/openssl/rsa.h" 2 3 4
16781 
16782 # 1 "/usr/include/openssl/bn.h" 1 3 4
16783 /* crypto/bn/bn.h */
16784 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16785  * All rights reserved.
16786  *
16787  * This package is an SSL implementation written
16788  * by Eric Young (eay@cryptsoft.com).
16789  * The implementation was written so as to conform with Netscapes SSL.
16790  *
16791  * This library is free for commercial and non-commercial use as long as
16792  * the following conditions are aheared to.  The following conditions
16793  * apply to all code found in this distribution, be it the RC4, RSA,
16794  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16795  * included with this distribution is covered by the same copyright terms
16796  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16797  *
16798  * Copyright remains Eric Young's, and as such any Copyright notices in
16799  * the code are not to be removed.
16800  * If this package is used in a product, Eric Young should be given attribution
16801  * as the author of the parts of the library used.
16802  * This can be in the form of a textual message at program startup or
16803  * in documentation (online or textual) provided with the package.
16804  *
16805  * Redistribution and use in source and binary forms, with or without
16806  * modification, are permitted provided that the following conditions
16807  * are met:
16808  * 1. Redistributions of source code must retain the copyright
16809  *    notice, this list of conditions and the following disclaimer.
16810  * 2. Redistributions in binary form must reproduce the above copyright
16811  *    notice, this list of conditions and the following disclaimer in the
16812  *    documentation and/or other materials provided with the distribution.
16813  * 3. All advertising materials mentioning features or use of this software
16814  *    must display the following acknowledgement:
16815  *    "This product includes cryptographic software written by
16816  *     Eric Young (eay@cryptsoft.com)"
16817  *    The word 'cryptographic' can be left out if the rouines from the library
16818  *    being used are not cryptographic related :-).
16819  * 4. If you include any Windows specific code (or a derivative thereof) from
16820  *    the apps directory (application code) you must include an acknowledgement:
16821  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16822  *
16823  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16824  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16825  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16826  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16827  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16828  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16829  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16830  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16831  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16832  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16833  * SUCH DAMAGE.
16834  *
16835  * The licence and distribution terms for any publically available version or
16836  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16837  * copied and put under another distribution licence
16838  * [including the GNU Public Licence.]
16839  */
16840 /* ====================================================================
16841  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16842  *
16843  * Redistribution and use in source and binary forms, with or without
16844  * modification, are permitted provided that the following conditions
16845  * are met:
16846  *
16847  * 1. Redistributions of source code must retain the above copyright
16848  *    notice, this list of conditions and the following disclaimer.
16849  *
16850  * 2. Redistributions in binary form must reproduce the above copyright
16851  *    notice, this list of conditions and the following disclaimer in
16852  *    the documentation and/or other materials provided with the
16853  *    distribution.
16854  *
16855  * 3. All advertising materials mentioning features or use of this
16856  *    software must display the following acknowledgment:
16857  *    "This product includes software developed by the OpenSSL Project
16858  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16859  *
16860  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16861  *    endorse or promote products derived from this software without
16862  *    prior written permission. For written permission, please contact
16863  *    openssl-core@openssl.org.
16864  *
16865  * 5. Products derived from this software may not be called "OpenSSL"
16866  *    nor may "OpenSSL" appear in their names without prior written
16867  *    permission of the OpenSSL Project.
16868  *
16869  * 6. Redistributions of any form whatsoever must retain the following
16870  *    acknowledgment:
16871  *    "This product includes software developed by the OpenSSL Project
16872  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16873  *
16874  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16875  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16876  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16877  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16878  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16879  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16880  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16881  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16882  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16883  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16884  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16885  * OF THE POSSIBILITY OF SUCH DAMAGE.
16886  * ====================================================================
16887  *
16888  * This product includes cryptographic software written by Eric Young
16889  * (eay@cryptsoft.com).  This product includes software written by Tim
16890  * Hudson (tjh@cryptsoft.com).
16891  *
16892  */
16893 /* ====================================================================
16894  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16895  *
16896  * Portions of the attached software ("Contribution") are developed by
16897  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16898  *
16899  * The Contribution is licensed pursuant to the Eric Young open source
16900  * license provided above.
16901  *
16902  * The binary polynomial arithmetic software is originally written by
16903  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16904  *
16905  */
16906 # 71 "/usr/include/openssl/rsa.h" 2 3 4
16907 # 81 "/usr/include/openssl/rsa.h" 3 4
16908 /* Declared already in ossl_typ.h */
16909 /* typedef struct rsa_st RSA; */
16910 /* typedef struct rsa_meth_st RSA_METHOD; */
16911 
16912 struct rsa_meth_st {
16913     const char *name;
16914     int (*rsa_pub_enc) (int flen, const unsigned char *from,
16915                         unsigned char *to, RSA *rsa, int padding);
16916     int (*rsa_pub_dec) (int flen, const unsigned char *from,
16917                         unsigned char *to, RSA *rsa, int padding);
16918     int (*rsa_priv_enc) (int flen, const unsigned char *from,
16919                          unsigned char *to, RSA *rsa, int padding);
16920     int (*rsa_priv_dec) (int flen, const unsigned char *from,
16921                          unsigned char *to, RSA *rsa, int padding);
16922     /* Can be null */
16923     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
16924     /* Can be null */
16925     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
16926                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
16927     /* called at new */
16928     int (*init) (RSA *rsa);
16929     /* called at free */
16930     int (*finish) (RSA *rsa);
16931     /* RSA_METHOD_FLAG_* things */
16932     int flags;
16933     /* may be needed! */
16934     char *app_data;
16935     /*
16936      * New sign and verify functions: some libraries don't allow arbitrary
16937      * data to be signed/verified: this allows them to be used. Note: for
16938      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
16939      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
16940      * for backwards compatibility this functionality is only enabled if the
16941      * RSA_FLAG_SIGN_VER option is set in 'flags'.
16942      */
16943     int (*rsa_sign) (int type,
16944                      const unsigned char *m, unsigned int m_length,
16945                      unsigned char *sigret, unsigned int *siglen,
16946                      const RSA *rsa);
16947     int (*rsa_verify) (int dtype, const unsigned char *m,
16948                        unsigned int m_length, const unsigned char *sigbuf,
16949                        unsigned int siglen, const RSA *rsa);
16950     /*
16951      * If this callback is NULL, the builtin software RSA key-gen will be
16952      * used. This is for behavioural compatibility whilst the code gets
16953      * rewired, but one day it would be nice to assume there are no such
16954      * things as "builtin software" implementations.
16955      */
16956     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
16957 };
16958 
16959 struct rsa_st {
16960     /*
16961      * The first parameter is used to pickup errors where this is passed
16962      * instead of aEVP_PKEY, it is set to 0
16963      */
16964     int pad;
16965     long version;
16966     const RSA_METHOD *meth;
16967     /* functional reference if 'meth' is ENGINE-provided */
16968     ENGINE *engine;
16969     BIGNUM *n;
16970     BIGNUM *e;
16971     BIGNUM *d;
16972     BIGNUM *p;
16973     BIGNUM *q;
16974     BIGNUM *dmp1;
16975     BIGNUM *dmq1;
16976     BIGNUM *iqmp;
16977     /* be careful using this if the RSA structure is shared */
16978     CRYPTO_EX_DATA ex_data;
16979     int references;
16980     int flags;
16981     /* Used to cache montgomery values */
16982     BN_MONT_CTX *_method_mod_n;
16983     BN_MONT_CTX *_method_mod_p;
16984     BN_MONT_CTX *_method_mod_q;
16985     /*
16986      * all BIGNUM values are actually in the following data, if it is not
16987      * NULL
16988      */
16989     char *bignum_data;
16990     BN_BLINDING *blinding;
16991     BN_BLINDING *mt_blinding;
16992 };
16993 # 176 "/usr/include/openssl/rsa.h" 3 4
16994 /* exponent limit enforced for "large" modulus only */
16995 # 190 "/usr/include/openssl/rsa.h" 3 4
16996 /*
16997  * This flag means the private key operations will be handled by rsa_mod_exp
16998  * and that they do not depend on the private key components being present:
16999  * for example a key stored in external hardware. Without this flag
17000  * bn_mod_exp gets called when private key components are absent.
17001  */
17002 
17003 
17004 /*
17005  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
17006  * functions.
17007  */
17008 
17009 
17010 /*
17011  * new with 0.9.6j and 0.9.7b; the built-in
17012  * RSA implementation now uses blinding by
17013  * default (ignoring RSA_FLAG_BLINDING),
17014  * but other engines might not need it
17015  */
17016 
17017 /*
17018  * new with 0.9.8f; the built-in RSA
17019  * implementation now uses constant time
17020  * operations by default in private key operations,
17021  * e.g., constant time modular exponentiation,
17022  * modular inverse without leaking branches,
17023  * division without leaking branches. This
17024  * flag disables these constant time
17025  * operations and results in faster RSA
17026  * private key operations.
17027  */
17028 # 312 "/usr/include/openssl/rsa.h" 3 4
17029 /* EVP_PKEY_ only */
17030 
17031 
17032 
17033 
17034 
17035 
17036 
17037 RSA *RSA_new(void);
17038 RSA *RSA_new_method(ENGINE *engine);
17039 int RSA_size(const RSA *rsa);
17040 
17041 /* Deprecated version */
17042 
17043 RSA *RSA_generate_key(int bits, unsigned long e, void
17044                        (*callback) (int, int, void *), void *cb_arg);
17045 
17046 
17047 /* New version */
17048 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
17049 
17050 int RSA_check_key(const RSA *);
17051         /* next 4 return -1 on error */
17052 int RSA_public_encrypt(int flen, const unsigned char *from,
17053                        unsigned char *to, RSA *rsa, int padding);
17054 int RSA_private_encrypt(int flen, const unsigned char *from,
17055                         unsigned char *to, RSA *rsa, int padding);
17056 int RSA_public_decrypt(int flen, const unsigned char *from,
17057                        unsigned char *to, RSA *rsa, int padding);
17058 int RSA_private_decrypt(int flen, const unsigned char *from,
17059                         unsigned char *to, RSA *rsa, int padding);
17060 void RSA_free(RSA *r);
17061 /* "up" the RSA object's reference count */
17062 int RSA_up_ref(RSA *r);
17063 
17064 int RSA_flags(const RSA *r);
17065 
17066 void RSA_set_default_method(const RSA_METHOD *meth);
17067 const RSA_METHOD *RSA_get_default_method(void);
17068 const RSA_METHOD *RSA_get_method(const RSA *rsa);
17069 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
17070 
17071 /* This function needs the memory locking malloc callbacks to be installed */
17072 int RSA_memory_lock(RSA *r);
17073 
17074 /* these are the actual SSLeay RSA functions */
17075 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
17076 
17077 const RSA_METHOD *RSA_null_method(void);
17078 
17079 RSA *d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len); int i2d_RSAPublicKey(const RSA *a, unsigned char **out); extern const ASN1_ITEM RSAPublicKey_it;
17080 RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len); int i2d_RSAPrivateKey(const RSA *a, unsigned char **out); extern const ASN1_ITEM RSAPrivateKey_it;
17081 
17082 typedef struct rsa_pss_params_st {
17083     X509_ALGOR *hashAlgorithm;
17084     X509_ALGOR *maskGenAlgorithm;
17085     ASN1_INTEGER *saltLength;
17086     ASN1_INTEGER *trailerField;
17087 } RSA_PSS_PARAMS;
17088 
17089 RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void); void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a); RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len); int i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out); extern const ASN1_ITEM RSA_PSS_PARAMS_it;
17090 
17091 typedef struct rsa_oaep_params_st {
17092     X509_ALGOR *hashFunc;
17093     X509_ALGOR *maskGenFunc;
17094     X509_ALGOR *pSourceFunc;
17095 } RSA_OAEP_PARAMS;
17096 
17097 RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void); void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a); RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len); int i2d_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS *a, unsigned char **out); extern const ASN1_ITEM RSA_OAEP_PARAMS_it;
17098 
17099 
17100 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
17101 
17102 
17103 
17104 int RSA_print(BIO *bp, const RSA *r, int offset);
17105 
17106 
17107 
17108 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
17109                 int (*cb) (char *buf, int len, const char *prompt,
17110                            int verify), int sgckey);
17111 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
17112                  int (*cb) (char *buf, int len, const char *prompt,
17113                             int verify), int sgckey);
17114 
17115 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
17116                      int (*cb) (char *buf, int len, const char *prompt,
17117                                 int verify));
17118 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
17119                       int (*cb) (char *buf, int len, const char *prompt,
17120                                  int verify));
17121 
17122 
17123 /*
17124  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
17125  * PKCS#1 padded RSA encryption
17126  */
17127 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
17128              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
17129 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
17130                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
17131 
17132 /*
17133  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
17134  * PKCS#1 padded RSA encryption
17135  */
17136 int RSA_sign_ASN1_OCTET_STRING(int type,
17137                                const unsigned char *m, unsigned int m_length,
17138                                unsigned char *sigret, unsigned int *siglen,
17139                                RSA *rsa);
17140 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
17141                                  unsigned int m_length, unsigned char *sigbuf,
17142                                  unsigned int siglen, RSA *rsa);
17143 
17144 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
17145 void RSA_blinding_off(RSA *rsa);
17146 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
17147 
17148 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
17149                                  const unsigned char *f, int fl);
17150 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
17151                                    const unsigned char *f, int fl,
17152                                    int rsa_len);
17153 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
17154                                  const unsigned char *f, int fl);
17155 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
17156                                    const unsigned char *f, int fl,
17157                                    int rsa_len);
17158 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
17159                long seedlen, const EVP_MD *dgst);
17160 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
17161                                const unsigned char *f, int fl,
17162                                const unsigned char *p, int pl);
17163 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
17164                                  const unsigned char *f, int fl, int rsa_len,
17165                                  const unsigned char *p, int pl);
17166 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
17167                                     const unsigned char *from, int flen,
17168                                     const unsigned char *param, int plen,
17169                                     const EVP_MD *md, const EVP_MD *mgf1md);
17170 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
17171                                       const unsigned char *from, int flen,
17172                                       int num, const unsigned char *param,
17173                                       int plen, const EVP_MD *md,
17174                                       const EVP_MD *mgf1md);
17175 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
17176                            const unsigned char *f, int fl);
17177 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
17178                              const unsigned char *f, int fl, int rsa_len);
17179 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
17180                          int fl);
17181 int RSA_padding_check_none(unsigned char *to, int tlen,
17182                            const unsigned char *f, int fl, int rsa_len);
17183 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
17184                          int fl);
17185 int RSA_padding_check_X931(unsigned char *to, int tlen,
17186                            const unsigned char *f, int fl, int rsa_len);
17187 int RSA_X931_hash_id(int nid);
17188 
17189 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
17190                          const EVP_MD *Hash, const unsigned char *EM,
17191                          int sLen);
17192 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
17193                               const unsigned char *mHash, const EVP_MD *Hash,
17194                               int sLen);
17195 
17196 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
17197                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
17198                               const unsigned char *EM, int sLen);
17199 
17200 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
17201                                    const unsigned char *mHash,
17202                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
17203                                    int sLen);
17204 
17205 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
17206                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
17207 int RSA_set_ex_data(RSA *r, int idx, void *arg);
17208 void *RSA_get_ex_data(const RSA *r, int idx);
17209 
17210 RSA *RSAPublicKey_dup(RSA *rsa);
17211 RSA *RSAPrivateKey_dup(RSA *rsa);
17212 
17213 /*
17214  * If this flag is set the RSA method is FIPS compliant and can be used in
17215  * FIPS mode. This is set in the validated module method. If an application
17216  * sets this flag in its own methods it is its responsibility to ensure the
17217  * result is compliant.
17218  */
17219 
17220 
17221 
17222 /*
17223  * If this flag is set the operations normally disabled in FIPS mode are
17224  * permitted it is then the applications responsibility to ensure that the
17225  * usage is compliant.
17226  */
17227 
17228 
17229 /*
17230  * Application has decided PRNG is good enough to generate a key: don't
17231  * check.
17232  */
17233 
17234 
17235 /* BEGIN ERROR CODES */
17236 /*
17237  * The following lines are auto generated by the script mkerr.pl. Any changes
17238  * made after this point may be overwritten when the script is next run.
17239  */
17240 void ERR_load_RSA_strings(void);
17241 
17242 /* Error codes for the RSA functions. */
17243 
17244 /* Function codes. */
17245 # 592 "/usr/include/openssl/rsa.h" 3 4
17246 /* Reason codes. */
17247 # 97 "/usr/include/openssl/x509.h" 2 3 4
17248 
17249 
17250 # 1 "/usr/include/openssl/dsa.h" 1 3 4
17251 /* crypto/dsa/dsa.h */
17252 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17253  * All rights reserved.
17254  *
17255  * This package is an SSL implementation written
17256  * by Eric Young (eay@cryptsoft.com).
17257  * The implementation was written so as to conform with Netscapes SSL.
17258  *
17259  * This library is free for commercial and non-commercial use as long as
17260  * the following conditions are aheared to.  The following conditions
17261  * apply to all code found in this distribution, be it the RC4, RSA,
17262  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17263  * included with this distribution is covered by the same copyright terms
17264  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17265  *
17266  * Copyright remains Eric Young's, and as such any Copyright notices in
17267  * the code are not to be removed.
17268  * If this package is used in a product, Eric Young should be given attribution
17269  * as the author of the parts of the library used.
17270  * This can be in the form of a textual message at program startup or
17271  * in documentation (online or textual) provided with the package.
17272  *
17273  * Redistribution and use in source and binary forms, with or without
17274  * modification, are permitted provided that the following conditions
17275  * are met:
17276  * 1. Redistributions of source code must retain the copyright
17277  *    notice, this list of conditions and the following disclaimer.
17278  * 2. Redistributions in binary form must reproduce the above copyright
17279  *    notice, this list of conditions and the following disclaimer in the
17280  *    documentation and/or other materials provided with the distribution.
17281  * 3. All advertising materials mentioning features or use of this software
17282  *    must display the following acknowledgement:
17283  *    "This product includes cryptographic software written by
17284  *     Eric Young (eay@cryptsoft.com)"
17285  *    The word 'cryptographic' can be left out if the rouines from the library
17286  *    being used are not cryptographic related :-).
17287  * 4. If you include any Windows specific code (or a derivative thereof) from
17288  *    the apps directory (application code) you must include an acknowledgement:
17289  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17290  *
17291  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17292  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17293  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17294  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17295  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17296  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17297  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17298  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17299  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17300  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17301  * SUCH DAMAGE.
17302  *
17303  * The licence and distribution terms for any publically available version or
17304  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17305  * copied and put under another distribution licence
17306  * [including the GNU Public Licence.]
17307  */
17308 
17309 /*
17310  * The DSS routines are based on patches supplied by
17311  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
17312  * work and I have just tweaked them a little to fit into my
17313  * stylistic vision for SSLeay :-) */
17314 
17315 
17316 
17317 
17318 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
17319 /* e_os2.h */
17320 /* ====================================================================
17321  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
17322  *
17323  * Redistribution and use in source and binary forms, with or without
17324  * modification, are permitted provided that the following conditions
17325  * are met:
17326  *
17327  * 1. Redistributions of source code must retain the above copyright
17328  *    notice, this list of conditions and the following disclaimer.
17329  *
17330  * 2. Redistributions in binary form must reproduce the above copyright
17331  *    notice, this list of conditions and the following disclaimer in
17332  *    the documentation and/or other materials provided with the
17333  *    distribution.
17334  *
17335  * 3. All advertising materials mentioning features or use of this
17336  *    software must display the following acknowledgment:
17337  *    "This product includes software developed by the OpenSSL Project
17338  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17339  *
17340  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17341  *    endorse or promote products derived from this software without
17342  *    prior written permission. For written permission, please contact
17343  *    openssl-core@openssl.org.
17344  *
17345  * 5. Products derived from this software may not be called "OpenSSL"
17346  *    nor may "OpenSSL" appear in their names without prior written
17347  *    permission of the OpenSSL Project.
17348  *
17349  * 6. Redistributions of any form whatsoever must retain the following
17350  *    acknowledgment:
17351  *    "This product includes software developed by the OpenSSL Project
17352  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17353  *
17354  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17355  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17356  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17357  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17358  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17359  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17360  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17361  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17362  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17363  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17364  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17365  * OF THE POSSIBILITY OF SUCH DAMAGE.
17366  * ====================================================================
17367  *
17368  * This product includes cryptographic software written by Eric Young
17369  * (eay@cryptsoft.com).  This product includes software written by Tim
17370  * Hudson (tjh@cryptsoft.com).
17371  *
17372  */
17373 
17374 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17375 /* opensslconf.h */
17376 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17377 
17378 
17379 
17380 
17381 /* OpenSSL was configured with the following options: */
17382 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17383 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17384    asks for it.  This is a transient feature that is provided for those
17385    who haven't had the time to do the appropriate changes in their
17386    applications.  */
17387 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17388 /* crypto/opensslconf.h.in */
17389 
17390 /* Generate 80386 code? */
17391 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
17392 # 69 "/usr/include/openssl/dsa.h" 2 3 4
17393 
17394 
17395 
17396 
17397 
17398 
17399 # 1 "/usr/include/openssl/bio.h" 1 3 4
17400 /* crypto/bio/bio.h */
17401 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17402  * All rights reserved.
17403  *
17404  * This package is an SSL implementation written
17405  * by Eric Young (eay@cryptsoft.com).
17406  * The implementation was written so as to conform with Netscapes SSL.
17407  *
17408  * This library is free for commercial and non-commercial use as long as
17409  * the following conditions are aheared to.  The following conditions
17410  * apply to all code found in this distribution, be it the RC4, RSA,
17411  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17412  * included with this distribution is covered by the same copyright terms
17413  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17414  *
17415  * Copyright remains Eric Young's, and as such any Copyright notices in
17416  * the code are not to be removed.
17417  * If this package is used in a product, Eric Young should be given attribution
17418  * as the author of the parts of the library used.
17419  * This can be in the form of a textual message at program startup or
17420  * in documentation (online or textual) provided with the package.
17421  *
17422  * Redistribution and use in source and binary forms, with or without
17423  * modification, are permitted provided that the following conditions
17424  * are met:
17425  * 1. Redistributions of source code must retain the copyright
17426  *    notice, this list of conditions and the following disclaimer.
17427  * 2. Redistributions in binary form must reproduce the above copyright
17428  *    notice, this list of conditions and the following disclaimer in the
17429  *    documentation and/or other materials provided with the distribution.
17430  * 3. All advertising materials mentioning features or use of this software
17431  *    must display the following acknowledgement:
17432  *    "This product includes cryptographic software written by
17433  *     Eric Young (eay@cryptsoft.com)"
17434  *    The word 'cryptographic' can be left out if the rouines from the library
17435  *    being used are not cryptographic related :-).
17436  * 4. If you include any Windows specific code (or a derivative thereof) from
17437  *    the apps directory (application code) you must include an acknowledgement:
17438  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17439  *
17440  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17441  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17442  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17443  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17444  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17445  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17446  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17447  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17448  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17449  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17450  * SUCH DAMAGE.
17451  *
17452  * The licence and distribution terms for any publically available version or
17453  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17454  * copied and put under another distribution licence
17455  * [including the GNU Public Licence.]
17456  */
17457 # 76 "/usr/include/openssl/dsa.h" 2 3 4
17458 
17459 # 1 "/usr/include/openssl/crypto.h" 1 3 4
17460 /* crypto/crypto.h */
17461 /* ====================================================================
17462  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
17463  *
17464  * Redistribution and use in source and binary forms, with or without
17465  * modification, are permitted provided that the following conditions
17466  * are met:
17467  *
17468  * 1. Redistributions of source code must retain the above copyright
17469  *    notice, this list of conditions and the following disclaimer.
17470  *
17471  * 2. Redistributions in binary form must reproduce the above copyright
17472  *    notice, this list of conditions and the following disclaimer in
17473  *    the documentation and/or other materials provided with the
17474  *    distribution.
17475  *
17476  * 3. All advertising materials mentioning features or use of this
17477  *    software must display the following acknowledgment:
17478  *    "This product includes software developed by the OpenSSL Project
17479  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17480  *
17481  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17482  *    endorse or promote products derived from this software without
17483  *    prior written permission. For written permission, please contact
17484  *    openssl-core@openssl.org.
17485  *
17486  * 5. Products derived from this software may not be called "OpenSSL"
17487  *    nor may "OpenSSL" appear in their names without prior written
17488  *    permission of the OpenSSL Project.
17489  *
17490  * 6. Redistributions of any form whatsoever must retain the following
17491  *    acknowledgment:
17492  *    "This product includes software developed by the OpenSSL Project
17493  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17494  *
17495  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17496  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17497  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17498  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17499  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17500  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17501  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17502  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17503  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17504  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17505  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17506  * OF THE POSSIBILITY OF SUCH DAMAGE.
17507  * ====================================================================
17508  *
17509  * This product includes cryptographic software written by Eric Young
17510  * (eay@cryptsoft.com).  This product includes software written by Tim
17511  * Hudson (tjh@cryptsoft.com).
17512  *
17513  */
17514 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17515  * All rights reserved.
17516  *
17517  * This package is an SSL implementation written
17518  * by Eric Young (eay@cryptsoft.com).
17519  * The implementation was written so as to conform with Netscapes SSL.
17520  *
17521  * This library is free for commercial and non-commercial use as long as
17522  * the following conditions are aheared to.  The following conditions
17523  * apply to all code found in this distribution, be it the RC4, RSA,
17524  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17525  * included with this distribution is covered by the same copyright terms
17526  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17527  *
17528  * Copyright remains Eric Young's, and as such any Copyright notices in
17529  * the code are not to be removed.
17530  * If this package is used in a product, Eric Young should be given attribution
17531  * as the author of the parts of the library used.
17532  * This can be in the form of a textual message at program startup or
17533  * in documentation (online or textual) provided with the package.
17534  *
17535  * Redistribution and use in source and binary forms, with or without
17536  * modification, are permitted provided that the following conditions
17537  * are met:
17538  * 1. Redistributions of source code must retain the copyright
17539  *    notice, this list of conditions and the following disclaimer.
17540  * 2. Redistributions in binary form must reproduce the above copyright
17541  *    notice, this list of conditions and the following disclaimer in the
17542  *    documentation and/or other materials provided with the distribution.
17543  * 3. All advertising materials mentioning features or use of this software
17544  *    must display the following acknowledgement:
17545  *    "This product includes cryptographic software written by
17546  *     Eric Young (eay@cryptsoft.com)"
17547  *    The word 'cryptographic' can be left out if the rouines from the library
17548  *    being used are not cryptographic related :-).
17549  * 4. If you include any Windows specific code (or a derivative thereof) from
17550  *    the apps directory (application code) you must include an acknowledgement:
17551  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17552  *
17553  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17554  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17555  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17556  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17557  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17558  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17559  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17560  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17561  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17562  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17563  * SUCH DAMAGE.
17564  *
17565  * The licence and distribution terms for any publically available version or
17566  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17567  * copied and put under another distribution licence
17568  * [including the GNU Public Licence.]
17569  */
17570 /* ====================================================================
17571  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17572  * ECDH support in OpenSSL originally developed by
17573  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
17574  */
17575 # 78 "/usr/include/openssl/dsa.h" 2 3 4
17576 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17577 /* ====================================================================
17578  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17579  *
17580  * Redistribution and use in source and binary forms, with or without
17581  * modification, are permitted provided that the following conditions
17582  * are met:
17583  *
17584  * 1. Redistributions of source code must retain the above copyright
17585  *    notice, this list of conditions and the following disclaimer.
17586  *
17587  * 2. Redistributions in binary form must reproduce the above copyright
17588  *    notice, this list of conditions and the following disclaimer in
17589  *    the documentation and/or other materials provided with the
17590  *    distribution.
17591  *
17592  * 3. All advertising materials mentioning features or use of this
17593  *    software must display the following acknowledgment:
17594  *    "This product includes software developed by the OpenSSL Project
17595  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17596  *
17597  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17598  *    endorse or promote products derived from this software without
17599  *    prior written permission. For written permission, please contact
17600  *    openssl-core@openssl.org.
17601  *
17602  * 5. Products derived from this software may not be called "OpenSSL"
17603  *    nor may "OpenSSL" appear in their names without prior written
17604  *    permission of the OpenSSL Project.
17605  *
17606  * 6. Redistributions of any form whatsoever must retain the following
17607  *    acknowledgment:
17608  *    "This product includes software developed by the OpenSSL Project
17609  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17610  *
17611  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17612  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17613  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17614  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17615  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17616  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17617  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17618  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17619  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17620  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17621  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17622  * OF THE POSSIBILITY OF SUCH DAMAGE.
17623  * ====================================================================
17624  *
17625  * This product includes cryptographic software written by Eric Young
17626  * (eay@cryptsoft.com).  This product includes software written by Tim
17627  * Hudson (tjh@cryptsoft.com).
17628  *
17629  */
17630 # 79 "/usr/include/openssl/dsa.h" 2 3 4
17631 
17632 
17633 # 1 "/usr/include/openssl/bn.h" 1 3 4
17634 /* crypto/bn/bn.h */
17635 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
17636  * All rights reserved.
17637  *
17638  * This package is an SSL implementation written
17639  * by Eric Young (eay@cryptsoft.com).
17640  * The implementation was written so as to conform with Netscapes SSL.
17641  *
17642  * This library is free for commercial and non-commercial use as long as
17643  * the following conditions are aheared to.  The following conditions
17644  * apply to all code found in this distribution, be it the RC4, RSA,
17645  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17646  * included with this distribution is covered by the same copyright terms
17647  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17648  *
17649  * Copyright remains Eric Young's, and as such any Copyright notices in
17650  * the code are not to be removed.
17651  * If this package is used in a product, Eric Young should be given attribution
17652  * as the author of the parts of the library used.
17653  * This can be in the form of a textual message at program startup or
17654  * in documentation (online or textual) provided with the package.
17655  *
17656  * Redistribution and use in source and binary forms, with or without
17657  * modification, are permitted provided that the following conditions
17658  * are met:
17659  * 1. Redistributions of source code must retain the copyright
17660  *    notice, this list of conditions and the following disclaimer.
17661  * 2. Redistributions in binary form must reproduce the above copyright
17662  *    notice, this list of conditions and the following disclaimer in the
17663  *    documentation and/or other materials provided with the distribution.
17664  * 3. All advertising materials mentioning features or use of this software
17665  *    must display the following acknowledgement:
17666  *    "This product includes cryptographic software written by
17667  *     Eric Young (eay@cryptsoft.com)"
17668  *    The word 'cryptographic' can be left out if the rouines from the library
17669  *    being used are not cryptographic related :-).
17670  * 4. If you include any Windows specific code (or a derivative thereof) from
17671  *    the apps directory (application code) you must include an acknowledgement:
17672  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17673  *
17674  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17675  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17676  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17677  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17678  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17679  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17680  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17681  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17682  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17683  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17684  * SUCH DAMAGE.
17685  *
17686  * The licence and distribution terms for any publically available version or
17687  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17688  * copied and put under another distribution licence
17689  * [including the GNU Public Licence.]
17690  */
17691 /* ====================================================================
17692  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
17693  *
17694  * Redistribution and use in source and binary forms, with or without
17695  * modification, are permitted provided that the following conditions
17696  * are met:
17697  *
17698  * 1. Redistributions of source code must retain the above copyright
17699  *    notice, this list of conditions and the following disclaimer.
17700  *
17701  * 2. Redistributions in binary form must reproduce the above copyright
17702  *    notice, this list of conditions and the following disclaimer in
17703  *    the documentation and/or other materials provided with the
17704  *    distribution.
17705  *
17706  * 3. All advertising materials mentioning features or use of this
17707  *    software must display the following acknowledgment:
17708  *    "This product includes software developed by the OpenSSL Project
17709  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17710  *
17711  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17712  *    endorse or promote products derived from this software without
17713  *    prior written permission. For written permission, please contact
17714  *    openssl-core@openssl.org.
17715  *
17716  * 5. Products derived from this software may not be called "OpenSSL"
17717  *    nor may "OpenSSL" appear in their names without prior written
17718  *    permission of the OpenSSL Project.
17719  *
17720  * 6. Redistributions of any form whatsoever must retain the following
17721  *    acknowledgment:
17722  *    "This product includes software developed by the OpenSSL Project
17723  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17724  *
17725  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17726  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17727  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17728  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17729  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17730  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17731  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17732  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17733  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17734  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17735  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17736  * OF THE POSSIBILITY OF SUCH DAMAGE.
17737  * ====================================================================
17738  *
17739  * This product includes cryptographic software written by Eric Young
17740  * (eay@cryptsoft.com).  This product includes software written by Tim
17741  * Hudson (tjh@cryptsoft.com).
17742  *
17743  */
17744 /* ====================================================================
17745  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
17746  *
17747  * Portions of the attached software ("Contribution") are developed by
17748  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
17749  *
17750  * The Contribution is licensed pursuant to the Eric Young open source
17751  * license provided above.
17752  *
17753  * The binary polynomial arithmetic software is originally written by
17754  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
17755  *
17756  */
17757 # 82 "/usr/include/openssl/dsa.h" 2 3 4
17758 
17759 # 1 "/usr/include/openssl/dh.h" 1 3 4
17760 /* crypto/dh/dh.h */
17761 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17762  * All rights reserved.
17763  *
17764  * This package is an SSL implementation written
17765  * by Eric Young (eay@cryptsoft.com).
17766  * The implementation was written so as to conform with Netscapes SSL.
17767  *
17768  * This library is free for commercial and non-commercial use as long as
17769  * the following conditions are aheared to.  The following conditions
17770  * apply to all code found in this distribution, be it the RC4, RSA,
17771  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17772  * included with this distribution is covered by the same copyright terms
17773  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17774  *
17775  * Copyright remains Eric Young's, and as such any Copyright notices in
17776  * the code are not to be removed.
17777  * If this package is used in a product, Eric Young should be given attribution
17778  * as the author of the parts of the library used.
17779  * This can be in the form of a textual message at program startup or
17780  * in documentation (online or textual) provided with the package.
17781  *
17782  * Redistribution and use in source and binary forms, with or without
17783  * modification, are permitted provided that the following conditions
17784  * are met:
17785  * 1. Redistributions of source code must retain the copyright
17786  *    notice, this list of conditions and the following disclaimer.
17787  * 2. Redistributions in binary form must reproduce the above copyright
17788  *    notice, this list of conditions and the following disclaimer in the
17789  *    documentation and/or other materials provided with the distribution.
17790  * 3. All advertising materials mentioning features or use of this software
17791  *    must display the following acknowledgement:
17792  *    "This product includes cryptographic software written by
17793  *     Eric Young (eay@cryptsoft.com)"
17794  *    The word 'cryptographic' can be left out if the rouines from the library
17795  *    being used are not cryptographic related :-).
17796  * 4. If you include any Windows specific code (or a derivative thereof) from
17797  *    the apps directory (application code) you must include an acknowledgement:
17798  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17799  *
17800  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17801  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17802  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17803  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17804  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17805  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17806  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17807  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17808  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17809  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17810  * SUCH DAMAGE.
17811  *
17812  * The licence and distribution terms for any publically available version or
17813  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17814  * copied and put under another distribution licence
17815  * [including the GNU Public Licence.]
17816  */
17817 
17818 
17819 
17820 
17821 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
17822 /* e_os2.h */
17823 /* ====================================================================
17824  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
17825  *
17826  * Redistribution and use in source and binary forms, with or without
17827  * modification, are permitted provided that the following conditions
17828  * are met:
17829  *
17830  * 1. Redistributions of source code must retain the above copyright
17831  *    notice, this list of conditions and the following disclaimer.
17832  *
17833  * 2. Redistributions in binary form must reproduce the above copyright
17834  *    notice, this list of conditions and the following disclaimer in
17835  *    the documentation and/or other materials provided with the
17836  *    distribution.
17837  *
17838  * 3. All advertising materials mentioning features or use of this
17839  *    software must display the following acknowledgment:
17840  *    "This product includes software developed by the OpenSSL Project
17841  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17842  *
17843  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17844  *    endorse or promote products derived from this software without
17845  *    prior written permission. For written permission, please contact
17846  *    openssl-core@openssl.org.
17847  *
17848  * 5. Products derived from this software may not be called "OpenSSL"
17849  *    nor may "OpenSSL" appear in their names without prior written
17850  *    permission of the OpenSSL Project.
17851  *
17852  * 6. Redistributions of any form whatsoever must retain the following
17853  *    acknowledgment:
17854  *    "This product includes software developed by the OpenSSL Project
17855  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17856  *
17857  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17858  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17859  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17860  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17861  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17862  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17863  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17864  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17865  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17866  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17867  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17868  * OF THE POSSIBILITY OF SUCH DAMAGE.
17869  * ====================================================================
17870  *
17871  * This product includes cryptographic software written by Eric Young
17872  * (eay@cryptsoft.com).  This product includes software written by Tim
17873  * Hudson (tjh@cryptsoft.com).
17874  *
17875  */
17876 
17877 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17878 /* opensslconf.h */
17879 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17880 
17881 
17882 
17883 
17884 /* OpenSSL was configured with the following options: */
17885 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17886 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17887    asks for it.  This is a transient feature that is provided for those
17888    who haven't had the time to do the appropriate changes in their
17889    applications.  */
17890 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17891 /* crypto/opensslconf.h.in */
17892 
17893 /* Generate 80386 code? */
17894 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
17895 # 63 "/usr/include/openssl/dh.h" 2 3 4
17896 
17897 
17898 
17899 
17900 
17901 
17902 # 1 "/usr/include/openssl/bio.h" 1 3 4
17903 /* crypto/bio/bio.h */
17904 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17905  * All rights reserved.
17906  *
17907  * This package is an SSL implementation written
17908  * by Eric Young (eay@cryptsoft.com).
17909  * The implementation was written so as to conform with Netscapes SSL.
17910  *
17911  * This library is free for commercial and non-commercial use as long as
17912  * the following conditions are aheared to.  The following conditions
17913  * apply to all code found in this distribution, be it the RC4, RSA,
17914  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17915  * included with this distribution is covered by the same copyright terms
17916  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17917  *
17918  * Copyright remains Eric Young's, and as such any Copyright notices in
17919  * the code are not to be removed.
17920  * If this package is used in a product, Eric Young should be given attribution
17921  * as the author of the parts of the library used.
17922  * This can be in the form of a textual message at program startup or
17923  * in documentation (online or textual) provided with the package.
17924  *
17925  * Redistribution and use in source and binary forms, with or without
17926  * modification, are permitted provided that the following conditions
17927  * are met:
17928  * 1. Redistributions of source code must retain the copyright
17929  *    notice, this list of conditions and the following disclaimer.
17930  * 2. Redistributions in binary form must reproduce the above copyright
17931  *    notice, this list of conditions and the following disclaimer in the
17932  *    documentation and/or other materials provided with the distribution.
17933  * 3. All advertising materials mentioning features or use of this software
17934  *    must display the following acknowledgement:
17935  *    "This product includes cryptographic software written by
17936  *     Eric Young (eay@cryptsoft.com)"
17937  *    The word 'cryptographic' can be left out if the rouines from the library
17938  *    being used are not cryptographic related :-).
17939  * 4. If you include any Windows specific code (or a derivative thereof) from
17940  *    the apps directory (application code) you must include an acknowledgement:
17941  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17942  *
17943  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17944  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17945  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17946  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17947  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17948  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17949  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17950  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17951  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17952  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17953  * SUCH DAMAGE.
17954  *
17955  * The licence and distribution terms for any publically available version or
17956  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17957  * copied and put under another distribution licence
17958  * [including the GNU Public Licence.]
17959  */
17960 # 70 "/usr/include/openssl/dh.h" 2 3 4
17961 
17962 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17963 /* ====================================================================
17964  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17965  *
17966  * Redistribution and use in source and binary forms, with or without
17967  * modification, are permitted provided that the following conditions
17968  * are met:
17969  *
17970  * 1. Redistributions of source code must retain the above copyright
17971  *    notice, this list of conditions and the following disclaimer.
17972  *
17973  * 2. Redistributions in binary form must reproduce the above copyright
17974  *    notice, this list of conditions and the following disclaimer in
17975  *    the documentation and/or other materials provided with the
17976  *    distribution.
17977  *
17978  * 3. All advertising materials mentioning features or use of this
17979  *    software must display the following acknowledgment:
17980  *    "This product includes software developed by the OpenSSL Project
17981  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17982  *
17983  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17984  *    endorse or promote products derived from this software without
17985  *    prior written permission. For written permission, please contact
17986  *    openssl-core@openssl.org.
17987  *
17988  * 5. Products derived from this software may not be called "OpenSSL"
17989  *    nor may "OpenSSL" appear in their names without prior written
17990  *    permission of the OpenSSL Project.
17991  *
17992  * 6. Redistributions of any form whatsoever must retain the following
17993  *    acknowledgment:
17994  *    "This product includes software developed by the OpenSSL Project
17995  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17996  *
17997  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17998  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17999  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18000  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18001  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18002  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18003  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18004  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18005  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18006  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18007  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18008  * OF THE POSSIBILITY OF SUCH DAMAGE.
18009  * ====================================================================
18010  *
18011  * This product includes cryptographic software written by Eric Young
18012  * (eay@cryptsoft.com).  This product includes software written by Tim
18013  * Hudson (tjh@cryptsoft.com).
18014  *
18015  */
18016 # 72 "/usr/include/openssl/dh.h" 2 3 4
18017 
18018 # 1 "/usr/include/openssl/bn.h" 1 3 4
18019 /* crypto/bn/bn.h */
18020 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
18021  * All rights reserved.
18022  *
18023  * This package is an SSL implementation written
18024  * by Eric Young (eay@cryptsoft.com).
18025  * The implementation was written so as to conform with Netscapes SSL.
18026  *
18027  * This library is free for commercial and non-commercial use as long as
18028  * the following conditions are aheared to.  The following conditions
18029  * apply to all code found in this distribution, be it the RC4, RSA,
18030  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18031  * included with this distribution is covered by the same copyright terms
18032  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18033  *
18034  * Copyright remains Eric Young's, and as such any Copyright notices in
18035  * the code are not to be removed.
18036  * If this package is used in a product, Eric Young should be given attribution
18037  * as the author of the parts of the library used.
18038  * This can be in the form of a textual message at program startup or
18039  * in documentation (online or textual) provided with the package.
18040  *
18041  * Redistribution and use in source and binary forms, with or without
18042  * modification, are permitted provided that the following conditions
18043  * are met:
18044  * 1. Redistributions of source code must retain the copyright
18045  *    notice, this list of conditions and the following disclaimer.
18046  * 2. Redistributions in binary form must reproduce the above copyright
18047  *    notice, this list of conditions and the following disclaimer in the
18048  *    documentation and/or other materials provided with the distribution.
18049  * 3. All advertising materials mentioning features or use of this software
18050  *    must display the following acknowledgement:
18051  *    "This product includes cryptographic software written by
18052  *     Eric Young (eay@cryptsoft.com)"
18053  *    The word 'cryptographic' can be left out if the rouines from the library
18054  *    being used are not cryptographic related :-).
18055  * 4. If you include any Windows specific code (or a derivative thereof) from
18056  *    the apps directory (application code) you must include an acknowledgement:
18057  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18058  *
18059  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18060  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18061  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18062  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18063  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18064  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18065  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18066  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18067  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18068  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18069  * SUCH DAMAGE.
18070  *
18071  * The licence and distribution terms for any publically available version or
18072  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18073  * copied and put under another distribution licence
18074  * [including the GNU Public Licence.]
18075  */
18076 /* ====================================================================
18077  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
18078  *
18079  * Redistribution and use in source and binary forms, with or without
18080  * modification, are permitted provided that the following conditions
18081  * are met:
18082  *
18083  * 1. Redistributions of source code must retain the above copyright
18084  *    notice, this list of conditions and the following disclaimer.
18085  *
18086  * 2. Redistributions in binary form must reproduce the above copyright
18087  *    notice, this list of conditions and the following disclaimer in
18088  *    the documentation and/or other materials provided with the
18089  *    distribution.
18090  *
18091  * 3. All advertising materials mentioning features or use of this
18092  *    software must display the following acknowledgment:
18093  *    "This product includes software developed by the OpenSSL Project
18094  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18095  *
18096  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18097  *    endorse or promote products derived from this software without
18098  *    prior written permission. For written permission, please contact
18099  *    openssl-core@openssl.org.
18100  *
18101  * 5. Products derived from this software may not be called "OpenSSL"
18102  *    nor may "OpenSSL" appear in their names without prior written
18103  *    permission of the OpenSSL Project.
18104  *
18105  * 6. Redistributions of any form whatsoever must retain the following
18106  *    acknowledgment:
18107  *    "This product includes software developed by the OpenSSL Project
18108  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18109  *
18110  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18111  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18112  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18113  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18114  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18115  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18116  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18117  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18118  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18119  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18120  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18121  * OF THE POSSIBILITY OF SUCH DAMAGE.
18122  * ====================================================================
18123  *
18124  * This product includes cryptographic software written by Eric Young
18125  * (eay@cryptsoft.com).  This product includes software written by Tim
18126  * Hudson (tjh@cryptsoft.com).
18127  *
18128  */
18129 /* ====================================================================
18130  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18131  *
18132  * Portions of the attached software ("Contribution") are developed by
18133  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
18134  *
18135  * The Contribution is licensed pursuant to the Eric Young open source
18136  * license provided above.
18137  *
18138  * The binary polynomial arithmetic software is originally written by
18139  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
18140  *
18141  */
18142 # 74 "/usr/include/openssl/dh.h" 2 3 4
18143 # 82 "/usr/include/openssl/dh.h" 3 4
18144 /*
18145  * new with 0.9.7h; the built-in DH
18146  * implementation now uses constant time
18147  * modular exponentiation for secret exponents
18148  * by default. This flag causes the
18149  * faster variable sliding window method to
18150  * be used for all exponents.
18151  */
18152 
18153 
18154 /*
18155  * If this flag is set the DH method is FIPS compliant and can be used in
18156  * FIPS mode. This is set in the validated module method. If an application
18157  * sets this flag in its own methods it is its reposibility to ensure the
18158  * result is compliant.
18159  */
18160 
18161 
18162 
18163 /*
18164  * If this flag is set the operations normally disabled in FIPS mode are
18165  * permitted it is then the applications responsibility to ensure that the
18166  * usage is compliant.
18167  */
18168 
18169 
18170 
18171 
18172 
18173 
18174 
18175 /* Already defined in ossl_typ.h */
18176 /* typedef struct dh_st DH; */
18177 /* typedef struct dh_method DH_METHOD; */
18178 
18179 struct dh_method {
18180     const char *name;
18181     /* Methods here */
18182     int (*generate_key) (DH *dh);
18183     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
18184     /* Can be null */
18185     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
18186                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
18187                        BN_MONT_CTX *m_ctx);
18188     int (*init) (DH *dh);
18189     int (*finish) (DH *dh);
18190     int flags;
18191     char *app_data;
18192     /* If this is non-NULL, it will be used to generate parameters */
18193     int (*generate_params) (DH *dh, int prime_len, int generator,
18194                             BN_GENCB *cb);
18195 };
18196 
18197 struct dh_st {
18198     /*
18199      * This first argument is used to pick up errors when a DH is passed
18200      * instead of a EVP_PKEY
18201      */
18202     int pad;
18203     int version;
18204     BIGNUM *p;
18205     BIGNUM *g;
18206     long length; /* optional */
18207     BIGNUM *pub_key; /* g^x % p */
18208     BIGNUM *priv_key; /* x */
18209     int flags;
18210     BN_MONT_CTX *method_mont_p;
18211     /* Place holders if we want to do X9.42 DH */
18212     BIGNUM *q;
18213     BIGNUM *j;
18214     unsigned char *seed;
18215     int seedlen;
18216     BIGNUM *counter;
18217     int references;
18218     CRYPTO_EX_DATA ex_data;
18219     const DH_METHOD *meth;
18220     ENGINE *engine;
18221 };
18222 
18223 
18224 /* #define DH_GENERATOR_3       3 */
18225 
18226 
18227 /* DH_check error codes */
18228 # 174 "/usr/include/openssl/dh.h" 3 4
18229 /* DH_check_pub_key error codes */
18230 
18231 
18232 
18233 
18234 /*
18235  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
18236  * backward compatibility:
18237  */
18238 # 209 "/usr/include/openssl/dh.h" 3 4
18239 DH *DHparams_dup(DH *);
18240 
18241 const DH_METHOD *DH_OpenSSL(void);
18242 
18243 void DH_set_default_method(const DH_METHOD *meth);
18244 const DH_METHOD *DH_get_default_method(void);
18245 int DH_set_method(DH *dh, const DH_METHOD *meth);
18246 DH *DH_new_method(ENGINE *engine);
18247 
18248 DH *DH_new(void);
18249 void DH_free(DH *dh);
18250 int DH_up_ref(DH *dh);
18251 int DH_size(const DH *dh);
18252 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
18253                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
18254 int DH_set_ex_data(DH *d, int idx, void *arg);
18255 void *DH_get_ex_data(DH *d, int idx);
18256 
18257 /* Deprecated version */
18258 
18259 DH *DH_generate_parameters(int prime_len, int generator,
18260                            void (*callback) (int, int, void *), void *cb_arg);
18261 
18262 
18263 /* New version */
18264 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
18265                               BN_GENCB *cb);
18266 
18267 int DH_check(const DH *dh, int *codes);
18268 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
18269 int DH_generate_key(DH *dh);
18270 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
18271 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
18272 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
18273 int i2d_DHparams(const DH *a, unsigned char **pp);
18274 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
18275 int i2d_DHxparams(const DH *a, unsigned char **pp);
18276 
18277 int DHparams_print_fp(FILE *fp, const DH *x);
18278 
18279 
18280 int DHparams_print(BIO *bp, const DH *x);
18281 
18282 
18283 
18284 
18285 /* RFC 5114 parameters */
18286 DH *DH_get_1024_160(void);
18287 DH *DH_get_2048_224(void);
18288 DH *DH_get_2048_256(void);
18289 
18290 
18291 /* RFC2631 KDF */
18292 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
18293                  const unsigned char *Z, size_t Zlen,
18294                  ASN1_OBJECT *key_oid,
18295                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
18296 # 357 "/usr/include/openssl/dh.h" 3 4
18297 /* KDF types */
18298 
18299 
18300 
18301 /* BEGIN ERROR CODES */
18302 /*
18303  * The following lines are auto generated by the script mkerr.pl. Any changes
18304  * made after this point may be overwritten when the script is next run.
18305  */
18306 void ERR_load_DH_strings(void);
18307 
18308 /* Error codes for the DH functions. */
18309 
18310 /* Function codes. */
18311 # 392 "/usr/include/openssl/dh.h" 3 4
18312 /* Reason codes. */
18313 # 84 "/usr/include/openssl/dsa.h" 2 3 4
18314 # 92 "/usr/include/openssl/dsa.h" 3 4
18315 /*
18316  * new with 0.9.7h; the built-in DSA implementation now uses constant time
18317  * modular exponentiation for secret exponents by default. This flag causes
18318  * the faster variable sliding window method to be used for all exponents.
18319  */
18320 
18321 
18322 /*
18323  * If this flag is set the DSA method is FIPS compliant and can be used in
18324  * FIPS mode. This is set in the validated module method. If an application
18325  * sets this flag in its own methods it is its reposibility to ensure the
18326  * result is compliant.
18327  */
18328 
18329 
18330 
18331 /*
18332  * If this flag is set the operations normally disabled in FIPS mode are
18333  * permitted it is then the applications responsibility to ensure that the
18334  * usage is compliant.
18335  */
18336 
18337 
18338 
18339 
18340 
18341 
18342 
18343 /* Already defined in ossl_typ.h */
18344 /* typedef struct dsa_st DSA; */
18345 /* typedef struct dsa_method DSA_METHOD; */
18346 
18347 typedef struct DSA_SIG_st {
18348     BIGNUM *r;
18349     BIGNUM *s;
18350 } DSA_SIG;
18351 
18352 struct dsa_method {
18353     const char *name;
18354     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
18355     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
18356                            BIGNUM **rp);
18357     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
18358                           DSA_SIG *sig, DSA *dsa);
18359     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
18360                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
18361                         BN_MONT_CTX *in_mont);
18362     /* Can be null */
18363     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
18364                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
18365     int (*init) (DSA *dsa);
18366     int (*finish) (DSA *dsa);
18367     int flags;
18368     char *app_data;
18369     /* If this is non-NULL, it is used to generate DSA parameters */
18370     int (*dsa_paramgen) (DSA *dsa, int bits,
18371                          const unsigned char *seed, int seed_len,
18372                          int *counter_ret, unsigned long *h_ret,
18373                          BN_GENCB *cb);
18374     /* If this is non-NULL, it is used to generate DSA keys */
18375     int (*dsa_keygen) (DSA *dsa);
18376 };
18377 
18378 struct dsa_st {
18379     /*
18380      * This first variable is used to pick up errors where a DSA is passed
18381      * instead of of a EVP_PKEY
18382      */
18383     int pad;
18384     long version;
18385     int write_params;
18386     BIGNUM *p;
18387     BIGNUM *q; /* == 20 */
18388     BIGNUM *g;
18389     BIGNUM *pub_key; /* y public key */
18390     BIGNUM *priv_key; /* x private key */
18391     BIGNUM *kinv; /* Signing pre-calc */
18392     BIGNUM *r; /* Signing pre-calc */
18393     int flags;
18394     /* Normally used to cache montgomery values */
18395     BN_MONT_CTX *method_mont_p;
18396     int references;
18397     CRYPTO_EX_DATA ex_data;
18398     const DSA_METHOD *meth;
18399     /* functional reference if 'meth' is ENGINE-provided */
18400     ENGINE *engine;
18401 };
18402 # 187 "/usr/include/openssl/dsa.h" 3 4
18403 DSA *DSAparams_dup(DSA *x);
18404 DSA_SIG *DSA_SIG_new(void);
18405 void DSA_SIG_free(DSA_SIG *a);
18406 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
18407 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
18408 
18409 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
18410 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
18411                   DSA_SIG *sig, DSA *dsa);
18412 
18413 const DSA_METHOD *DSA_OpenSSL(void);
18414 
18415 void DSA_set_default_method(const DSA_METHOD *);
18416 const DSA_METHOD *DSA_get_default_method(void);
18417 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
18418 
18419 DSA *DSA_new(void);
18420 DSA *DSA_new_method(ENGINE *engine);
18421 void DSA_free(DSA *r);
18422 /* "up" the DSA object's reference count */
18423 int DSA_up_ref(DSA *r);
18424 int DSA_size(const DSA *);
18425         /* next 4 return -1 on error */
18426 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
18427 int DSA_sign(int type, const unsigned char *dgst, int dlen,
18428              unsigned char *sig, unsigned int *siglen, DSA *dsa);
18429 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
18430                const unsigned char *sigbuf, int siglen, DSA *dsa);
18431 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
18432                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
18433 int DSA_set_ex_data(DSA *d, int idx, void *arg);
18434 void *DSA_get_ex_data(DSA *d, int idx);
18435 
18436 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
18437 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
18438 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
18439 
18440 /* Deprecated version */
18441 
18442 DSA *DSA_generate_parameters(int bits,
18443                              unsigned char *seed, int seed_len,
18444                              int *counter_ret, unsigned long *h_ret, void
18445                               (*callback) (int, int, void *), void *cb_arg);
18446 
18447 
18448 /* New version */
18449 int DSA_generate_parameters_ex(DSA *dsa, int bits,
18450                                const unsigned char *seed, int seed_len,
18451                                int *counter_ret, unsigned long *h_ret,
18452                                BN_GENCB *cb);
18453 
18454 int DSA_generate_key(DSA *a);
18455 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
18456 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
18457 int i2d_DSAparams(const DSA *a, unsigned char **pp);
18458 
18459 
18460 int DSAparams_print(BIO *bp, const DSA *x);
18461 int DSA_print(BIO *bp, const DSA *x, int off);
18462 
18463 
18464 int DSAparams_print_fp(FILE *fp, const DSA *x);
18465 int DSA_print_fp(FILE *bp, const DSA *x, int off);
18466 
18467 
18468 
18469 /*
18470  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
18471  * have one value here we set the number of checks to 64 which is the 128 bit
18472  * security level that is the highest level and valid for creating a 3072 bit
18473  * DSA key.
18474  */
18475 
18476 
18477 
18478 
18479 /*
18480  * Convert DSA structure (key or just parameters) into DH structure (be
18481  * careful to avoid small subgroup attacks when using this!)
18482  */
18483 DH *DSA_dup_DH(const DSA *r);
18484 # 278 "/usr/include/openssl/dsa.h" 3 4
18485 /* BEGIN ERROR CODES */
18486 /*
18487  * The following lines are auto generated by the script mkerr.pl. Any changes
18488  * made after this point may be overwritten when the script is next run.
18489  */
18490 void ERR_load_DSA_strings(void);
18491 
18492 /* Error codes for the DSA functions. */
18493 
18494 /* Function codes. */
18495 # 316 "/usr/include/openssl/dsa.h" 3 4
18496 /* Reason codes. */
18497 # 100 "/usr/include/openssl/x509.h" 2 3 4
18498 
18499 
18500 # 1 "/usr/include/openssl/dh.h" 1 3 4
18501 /* crypto/dh/dh.h */
18502 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18503  * All rights reserved.
18504  *
18505  * This package is an SSL implementation written
18506  * by Eric Young (eay@cryptsoft.com).
18507  * The implementation was written so as to conform with Netscapes SSL.
18508  *
18509  * This library is free for commercial and non-commercial use as long as
18510  * the following conditions are aheared to.  The following conditions
18511  * apply to all code found in this distribution, be it the RC4, RSA,
18512  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18513  * included with this distribution is covered by the same copyright terms
18514  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18515  *
18516  * Copyright remains Eric Young's, and as such any Copyright notices in
18517  * the code are not to be removed.
18518  * If this package is used in a product, Eric Young should be given attribution
18519  * as the author of the parts of the library used.
18520  * This can be in the form of a textual message at program startup or
18521  * in documentation (online or textual) provided with the package.
18522  *
18523  * Redistribution and use in source and binary forms, with or without
18524  * modification, are permitted provided that the following conditions
18525  * are met:
18526  * 1. Redistributions of source code must retain the copyright
18527  *    notice, this list of conditions and the following disclaimer.
18528  * 2. Redistributions in binary form must reproduce the above copyright
18529  *    notice, this list of conditions and the following disclaimer in the
18530  *    documentation and/or other materials provided with the distribution.
18531  * 3. All advertising materials mentioning features or use of this software
18532  *    must display the following acknowledgement:
18533  *    "This product includes cryptographic software written by
18534  *     Eric Young (eay@cryptsoft.com)"
18535  *    The word 'cryptographic' can be left out if the rouines from the library
18536  *    being used are not cryptographic related :-).
18537  * 4. If you include any Windows specific code (or a derivative thereof) from
18538  *    the apps directory (application code) you must include an acknowledgement:
18539  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18540  *
18541  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18542  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18543  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18544  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18545  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18546  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18547  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18548  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18549  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18550  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18551  * SUCH DAMAGE.
18552  *
18553  * The licence and distribution terms for any publically available version or
18554  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18555  * copied and put under another distribution licence
18556  * [including the GNU Public Licence.]
18557  */
18558 # 103 "/usr/include/openssl/x509.h" 2 3 4
18559 
18560 
18561 
18562 
18563 # 1 "/usr/include/openssl/sha.h" 1 3 4
18564 /* crypto/sha/sha.h */
18565 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18566  * All rights reserved.
18567  *
18568  * This package is an SSL implementation written
18569  * by Eric Young (eay@cryptsoft.com).
18570  * The implementation was written so as to conform with Netscapes SSL.
18571  *
18572  * This library is free for commercial and non-commercial use as long as
18573  * the following conditions are aheared to.  The following conditions
18574  * apply to all code found in this distribution, be it the RC4, RSA,
18575  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18576  * included with this distribution is covered by the same copyright terms
18577  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18578  *
18579  * Copyright remains Eric Young's, and as such any Copyright notices in
18580  * the code are not to be removed.
18581  * If this package is used in a product, Eric Young should be given attribution
18582  * as the author of the parts of the library used.
18583  * This can be in the form of a textual message at program startup or
18584  * in documentation (online or textual) provided with the package.
18585  *
18586  * Redistribution and use in source and binary forms, with or without
18587  * modification, are permitted provided that the following conditions
18588  * are met:
18589  * 1. Redistributions of source code must retain the copyright
18590  *    notice, this list of conditions and the following disclaimer.
18591  * 2. Redistributions in binary form must reproduce the above copyright
18592  *    notice, this list of conditions and the following disclaimer in the
18593  *    documentation and/or other materials provided with the distribution.
18594  * 3. All advertising materials mentioning features or use of this software
18595  *    must display the following acknowledgement:
18596  *    "This product includes cryptographic software written by
18597  *     Eric Young (eay@cryptsoft.com)"
18598  *    The word 'cryptographic' can be left out if the rouines from the library
18599  *    being used are not cryptographic related :-).
18600  * 4. If you include any Windows specific code (or a derivative thereof) from
18601  *    the apps directory (application code) you must include an acknowledgement:
18602  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18603  *
18604  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18605  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18606  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18607  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18608  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18609  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18610  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18611  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18612  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18613  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18614  * SUCH DAMAGE.
18615  *
18616  * The licence and distribution terms for any publically available version or
18617  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18618  * copied and put under another distribution licence
18619  * [including the GNU Public Licence.]
18620  */
18621 
18622 
18623 
18624 
18625 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
18626 /* e_os2.h */
18627 /* ====================================================================
18628  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
18629  *
18630  * Redistribution and use in source and binary forms, with or without
18631  * modification, are permitted provided that the following conditions
18632  * are met:
18633  *
18634  * 1. Redistributions of source code must retain the above copyright
18635  *    notice, this list of conditions and the following disclaimer.
18636  *
18637  * 2. Redistributions in binary form must reproduce the above copyright
18638  *    notice, this list of conditions and the following disclaimer in
18639  *    the documentation and/or other materials provided with the
18640  *    distribution.
18641  *
18642  * 3. All advertising materials mentioning features or use of this
18643  *    software must display the following acknowledgment:
18644  *    "This product includes software developed by the OpenSSL Project
18645  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18646  *
18647  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18648  *    endorse or promote products derived from this software without
18649  *    prior written permission. For written permission, please contact
18650  *    openssl-core@openssl.org.
18651  *
18652  * 5. Products derived from this software may not be called "OpenSSL"
18653  *    nor may "OpenSSL" appear in their names without prior written
18654  *    permission of the OpenSSL Project.
18655  *
18656  * 6. Redistributions of any form whatsoever must retain the following
18657  *    acknowledgment:
18658  *    "This product includes software developed by the OpenSSL Project
18659  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18660  *
18661  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18662  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18663  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18664  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18665  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18666  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18667  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18668  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18669  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18670  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18671  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18672  * OF THE POSSIBILITY OF SUCH DAMAGE.
18673  * ====================================================================
18674  *
18675  * This product includes cryptographic software written by Eric Young
18676  * (eay@cryptsoft.com).  This product includes software written by Tim
18677  * Hudson (tjh@cryptsoft.com).
18678  *
18679  */
18680 
18681 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
18682 /* opensslconf.h */
18683 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
18684 
18685 
18686 
18687 
18688 /* OpenSSL was configured with the following options: */
18689 # 108 "/usr/include/openssl/opensslconf.h" 3 4
18690 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
18691    asks for it.  This is a transient feature that is provided for those
18692    who haven't had the time to do the appropriate changes in their
18693    applications.  */
18694 # 204 "/usr/include/openssl/opensslconf.h" 3 4
18695 /* crypto/opensslconf.h.in */
18696 
18697 /* Generate 80386 code? */
18698 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
18699 # 63 "/usr/include/openssl/sha.h" 2 3 4
18700 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
18701 /*
18702  * CDDL HEADER START
18703  *
18704  * The contents of this file are subject to the terms of the
18705  * Common Development and Distribution License, Version 1.0 only
18706  * (the "License").  You may not use this file except in compliance
18707  * with the License.
18708  *
18709  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18710  * or http://www.opensolaris.org/os/licensing.
18711  * See the License for the specific language governing permissions
18712  * and limitations under the License.
18713  *
18714  * When distributing Covered Code, include this CDDL HEADER in each
18715  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18716  * If applicable, add the following below this CDDL HEADER, with the
18717  * fields enclosed by brackets "[]" replaced with your own identifying
18718  * information: Portions Copyright [yyyy] [name of copyright owner]
18719  *
18720  * CDDL HEADER END
18721  */
18722 /*	Copyright (c) 1988 AT&T	*/
18723 /*	  All Rights Reserved  	*/
18724 
18725 
18726 /*
18727  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
18728  * Use is subject to license terms.
18729  */
18730 # 64 "/usr/include/openssl/sha.h" 2 3 4
18731 # 77 "/usr/include/openssl/sha.h" 3 4
18732 /*-
18733  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18734  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
18735  * ! SHA_LONG_LOG2 has to be defined along.                        !
18736  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18737  */
18738 # 100 "/usr/include/openssl/sha.h" 3 4
18739 typedef struct SHAstate_st {
18740     unsigned int h0, h1, h2, h3, h4;
18741     unsigned int Nl, Nh;
18742     unsigned int data[16];
18743     unsigned int num;
18744 } SHA_CTX;
18745 
18746 
18747 
18748 
18749 
18750 int SHA_Init(SHA_CTX *c);
18751 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
18752 int SHA_Final(unsigned char *md, SHA_CTX *c);
18753 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
18754 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
18755 
18756 
18757 
18758 
18759 
18760 int SHA1_Init(SHA_CTX *c);
18761 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
18762 int SHA1_Final(unsigned char *md, SHA_CTX *c);
18763 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
18764 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
18765 # 134 "/usr/include/openssl/sha.h" 3 4
18766 typedef struct SHA256state_st {
18767     unsigned int h[8];
18768     unsigned int Nl, Nh;
18769     unsigned int data[16];
18770     unsigned int num, md_len;
18771 } SHA256_CTX;
18772 
18773 
18774 
18775 
18776 
18777 
18778 int SHA224_Init(SHA256_CTX *c);
18779 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
18780 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
18781 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
18782 int SHA256_Init(SHA256_CTX *c);
18783 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
18784 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
18785 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
18786 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
18787 
18788 
18789 
18790 
18791 
18792 
18793 /*
18794  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
18795  * being exactly 64-bit wide. See Implementation Notes in sha512.c
18796  * for further details.
18797  */
18798 /*
18799  * SHA-512 treats input data as a
18800  * contiguous array of 64 bit
18801  * wide big-endian values.
18802  */
18803 # 183 "/usr/include/openssl/sha.h" 3 4
18804 typedef struct SHA512state_st {
18805     unsigned long long h[8];
18806     unsigned long long Nl, Nh;
18807     union {
18808         unsigned long long d[16];
18809         unsigned char p[(16*8)];
18810     } u;
18811     unsigned int num, md_len;
18812 } SHA512_CTX;
18813 
18814 
18815 
18816 
18817 
18818 
18819 
18820 int SHA384_Init(SHA512_CTX *c);
18821 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
18822 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
18823 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
18824 int SHA512_Init(SHA512_CTX *c);
18825 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
18826 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
18827 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
18828 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
18829 # 108 "/usr/include/openssl/x509.h" 2 3 4
18830 
18831 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
18832 /* ====================================================================
18833  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
18834  *
18835  * Redistribution and use in source and binary forms, with or without
18836  * modification, are permitted provided that the following conditions
18837  * are met:
18838  *
18839  * 1. Redistributions of source code must retain the above copyright
18840  *    notice, this list of conditions and the following disclaimer.
18841  *
18842  * 2. Redistributions in binary form must reproduce the above copyright
18843  *    notice, this list of conditions and the following disclaimer in
18844  *    the documentation and/or other materials provided with the
18845  *    distribution.
18846  *
18847  * 3. All advertising materials mentioning features or use of this
18848  *    software must display the following acknowledgment:
18849  *    "This product includes software developed by the OpenSSL Project
18850  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18851  *
18852  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18853  *    endorse or promote products derived from this software without
18854  *    prior written permission. For written permission, please contact
18855  *    openssl-core@openssl.org.
18856  *
18857  * 5. Products derived from this software may not be called "OpenSSL"
18858  *    nor may "OpenSSL" appear in their names without prior written
18859  *    permission of the OpenSSL Project.
18860  *
18861  * 6. Redistributions of any form whatsoever must retain the following
18862  *    acknowledgment:
18863  *    "This product includes software developed by the OpenSSL Project
18864  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18865  *
18866  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18867  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18868  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18869  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18870  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18871  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18872  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18873  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18874  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18875  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18876  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18877  * OF THE POSSIBILITY OF SUCH DAMAGE.
18878  * ====================================================================
18879  *
18880  * This product includes cryptographic software written by Eric Young
18881  * (eay@cryptsoft.com).  This product includes software written by Tim
18882  * Hudson (tjh@cryptsoft.com).
18883  *
18884  */
18885 # 110 "/usr/include/openssl/x509.h" 2 3 4
18886 # 137 "/usr/include/openssl/x509.h" 3 4
18887 typedef struct X509_objects_st {
18888     int nid;
18889     int (*a2i) (void);
18890     int (*i2a) (void);
18891 } X509_OBJECTS;
18892 
18893 struct X509_algor_st {
18894     ASN1_OBJECT *algorithm;
18895     ASN1_TYPE *parameter;
18896 } /* X509_ALGOR */ ;
18897 
18898 
18899 
18900 typedef struct stack_st_X509_ALGOR X509_ALGORS;
18901 
18902 typedef struct X509_val_st {
18903     ASN1_TIME *notBefore;
18904     ASN1_TIME *notAfter;
18905 } X509_VAL;
18906 
18907 struct X509_pubkey_st {
18908     X509_ALGOR *algor;
18909     ASN1_BIT_STRING *public_key;
18910     EVP_PKEY *pkey;
18911 };
18912 
18913 typedef struct X509_sig_st {
18914     X509_ALGOR *algor;
18915     ASN1_OCTET_STRING *digest;
18916 } X509_SIG;
18917 
18918 typedef struct X509_name_entry_st {
18919     ASN1_OBJECT *object;
18920     ASN1_STRING *value;
18921     int set;
18922     int size; /* temp variable */
18923 } X509_NAME_ENTRY;
18924 
18925 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
18926 
18927 
18928 /* we always keep X509_NAMEs in 2 forms. */
18929 struct X509_name_st {
18930     struct stack_st_X509_NAME_ENTRY *entries;
18931     int modified; /* true if 'bytes' needs to be built */
18932 
18933     BUF_MEM *bytes;
18934 
18935 
18936 
18937 /*      unsigned long hash; Keep the hash around for lookups */
18938     unsigned char *canon_enc;
18939     int canon_enclen;
18940 } /* X509_NAME */ ;
18941 
18942 struct stack_st_X509_NAME { _STACK stack; };
18943 
18944 
18945 
18946 typedef struct X509_extension_st {
18947     ASN1_OBJECT *object;
18948     ASN1_BOOLEAN critical;
18949     ASN1_OCTET_STRING *value;
18950 } X509_EXTENSION;
18951 
18952 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
18953 
18954 struct stack_st_X509_EXTENSION { _STACK stack; };
18955 
18956 
18957 /* a sequence of these are used */
18958 typedef struct x509_attributes_st {
18959     ASN1_OBJECT *object;
18960     int single; /* 0 for a set, 1 for a single item (which is
18961                                  * wrong) */
18962     union {
18963         char *ptr;
18964         /*
18965          * 0
18966          */ struct stack_st_ASN1_TYPE *set;
18967         /*
18968          * 1
18969          */ ASN1_TYPE *single;
18970     } value;
18971 } X509_ATTRIBUTE;
18972 
18973 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
18974 
18975 
18976 typedef struct X509_req_info_st {
18977     ASN1_ENCODING enc;
18978     ASN1_INTEGER *version;
18979     X509_NAME *subject;
18980     X509_PUBKEY *pubkey;
18981     /*  d=2 hl=2 l=  0 cons: cont: 00 */
18982     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
18983 } X509_REQ_INFO;
18984 
18985 typedef struct X509_req_st {
18986     X509_REQ_INFO *req_info;
18987     X509_ALGOR *sig_alg;
18988     ASN1_BIT_STRING *signature;
18989     int references;
18990 } X509_REQ;
18991 
18992 typedef struct x509_cinf_st {
18993     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
18994     ASN1_INTEGER *serialNumber;
18995     X509_ALGOR *signature;
18996     X509_NAME *issuer;
18997     X509_VAL *validity;
18998     X509_NAME *subject;
18999     X509_PUBKEY *key;
19000     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
19001     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
19002     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
19003     ASN1_ENCODING enc;
19004 } X509_CINF;
19005 
19006 /*
19007  * This stuff is certificate "auxiliary info" it contains details which are
19008  * useful in certificate stores and databases. When used this is tagged onto
19009  * the end of the certificate itself
19010  */
19011 
19012 typedef struct x509_cert_aux_st {
19013     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
19014     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
19015     ASN1_UTF8STRING *alias; /* "friendly name" */
19016     ASN1_OCTET_STRING *keyid; /* key id of private key */
19017     struct stack_st_X509_ALGOR *other; /* other unspecified info */
19018 } X509_CERT_AUX;
19019 
19020 struct x509_st {
19021     X509_CINF *cert_info;
19022     X509_ALGOR *sig_alg;
19023     ASN1_BIT_STRING *signature;
19024     int valid;
19025     int references;
19026     char *name;
19027     CRYPTO_EX_DATA ex_data;
19028     /* These contain copies of various extension values */
19029     long ex_pathlen;
19030     long ex_pcpathlen;
19031     unsigned long ex_flags;
19032     unsigned long ex_kusage;
19033     unsigned long ex_xkusage;
19034     unsigned long ex_nscert;
19035     ASN1_OCTET_STRING *skid;
19036     AUTHORITY_KEYID *akid;
19037     X509_POLICY_CACHE *policy_cache;
19038     struct stack_st_DIST_POINT *crldp;
19039     struct stack_st_GENERAL_NAME *altname;
19040     NAME_CONSTRAINTS *nc;
19041 
19042 
19043 
19044 
19045 
19046     unsigned char sha1_hash[20];
19047 
19048     X509_CERT_AUX *aux;
19049 } /* X509 */ ;
19050 
19051 struct stack_st_X509 { _STACK stack; };
19052 
19053 
19054 /* This is used for a table of trust checking functions */
19055 
19056 typedef struct x509_trust_st {
19057     int trust;
19058     int flags;
19059     int (*check_trust) (struct x509_trust_st *, X509 *, int);
19060     char *name;
19061     int arg1;
19062     void *arg2;
19063 } X509_TRUST;
19064 
19065 struct stack_st_X509_TRUST { _STACK stack; };
19066 
19067 typedef struct x509_cert_pair_st {
19068     X509 *forward;
19069     X509 *reverse;
19070 } X509_CERT_PAIR;
19071 
19072 /* standard trust ids */
19073 # 335 "/usr/include/openssl/x509.h" 3 4
19074 /* Keep these up to date! */
19075 
19076 
19077 
19078 /* trust_flags values */
19079 
19080 
19081 
19082 /* check_trust return codes */
19083 
19084 
19085 
19086 
19087 
19088 /* Flags for X509_print_ex() */
19089 # 366 "/usr/include/openssl/x509.h" 3 4
19090 /* Flags specific to X509_NAME_print_ex() */
19091 
19092 /* The field separator information */
19093 # 381 "/usr/include/openssl/x509.h" 3 4
19094 /* How the field name is shown */
19095 # 392 "/usr/include/openssl/x509.h" 3 4
19096 /*
19097  * This determines if we dump fields we don't recognise: RFC2253 requires
19098  * this.
19099  */
19100 
19101 
19102 
19103 
19104 
19105 
19106 /* Complete set of RFC2253 flags */
19107 
19108 
19109 
19110 
19111 
19112 
19113 
19114 /* readable oneline form */
19115 
19116 
19117 
19118 
19119 
19120 
19121 
19122 /* readable multiline form */
19123 # 427 "/usr/include/openssl/x509.h" 3 4
19124 struct x509_revoked_st {
19125     ASN1_INTEGER *serialNumber;
19126     ASN1_TIME *revocationDate;
19127     struct stack_st_X509_EXTENSION /* optional */ *extensions;
19128     /* Set up if indirect CRL */
19129     struct stack_st_GENERAL_NAME *issuer;
19130     /* Revocation reason */
19131     int reason;
19132     int sequence; /* load sequence */
19133 };
19134 
19135 struct stack_st_X509_REVOKED { _STACK stack; };
19136 
19137 
19138 typedef struct X509_crl_info_st {
19139     ASN1_INTEGER *version;
19140     X509_ALGOR *sig_alg;
19141     X509_NAME *issuer;
19142     ASN1_TIME *lastUpdate;
19143     ASN1_TIME *nextUpdate;
19144     struct stack_st_X509_REVOKED *revoked;
19145     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
19146     ASN1_ENCODING enc;
19147 } X509_CRL_INFO;
19148 
19149 struct X509_crl_st {
19150     /* actual signature */
19151     X509_CRL_INFO *crl;
19152     X509_ALGOR *sig_alg;
19153     ASN1_BIT_STRING *signature;
19154     int references;
19155     int flags;
19156     /* Copies of various extensions */
19157     AUTHORITY_KEYID *akid;
19158     ISSUING_DIST_POINT *idp;
19159     /* Convenient breakdown of IDP */
19160     int idp_flags;
19161     int idp_reasons;
19162     /* CRL and base CRL numbers for delta processing */
19163     ASN1_INTEGER *crl_number;
19164     ASN1_INTEGER *base_crl_number;
19165 
19166     unsigned char sha1_hash[20];
19167 
19168     struct stack_st_GENERAL_NAMES *issuers;
19169     const X509_CRL_METHOD *meth;
19170     void *meth_data;
19171 } /* X509_CRL */ ;
19172 
19173 struct stack_st_X509_CRL { _STACK stack; };
19174 
19175 
19176 typedef struct private_key_st {
19177     int version;
19178     /* The PKCS#8 data types */
19179     X509_ALGOR *enc_algor;
19180     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
19181     /* When decrypted, the following will not be NULL */
19182     EVP_PKEY *dec_pkey;
19183     /* used to encrypt and decrypt */
19184     int key_length;
19185     char *key_data;
19186     int key_free; /* true if we should auto free key_data */
19187     /* expanded version of 'enc_algor' */
19188     EVP_CIPHER_INFO cipher;
19189     int references;
19190 } X509_PKEY;
19191 
19192 
19193 typedef struct X509_info_st {
19194     X509 *x509;
19195     X509_CRL *crl;
19196     X509_PKEY *x_pkey;
19197     EVP_CIPHER_INFO enc_cipher;
19198     int enc_len;
19199     char *enc_data;
19200     int references;
19201 } X509_INFO;
19202 
19203 struct stack_st_X509_INFO { _STACK stack; };
19204 
19205 
19206 /*
19207  * The next 2 structures and their 8 routines were sent to me by Pat Richard
19208  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
19209  * useful if you are writing a CA web page
19210  */
19211 typedef struct Netscape_spkac_st {
19212     X509_PUBKEY *pubkey;
19213     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
19214 } NETSCAPE_SPKAC;
19215 
19216 typedef struct Netscape_spki_st {
19217     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
19218     X509_ALGOR *sig_algor;
19219     ASN1_BIT_STRING *signature;
19220 } NETSCAPE_SPKI;
19221 
19222 /* Netscape certificate sequence structure */
19223 typedef struct Netscape_certificate_sequence {
19224     ASN1_OBJECT *type;
19225     struct stack_st_X509 *certs;
19226 } NETSCAPE_CERT_SEQUENCE;
19227 
19228 /*- Unused (and iv length is wrong)
19229 typedef struct CBCParameter_st
19230         {
19231         unsigned char iv[8];
19232         } CBC_PARAM;
19233 */
19234 
19235 /* Password based encryption structure */
19236 
19237 typedef struct PBEPARAM_st {
19238     ASN1_OCTET_STRING *salt;
19239     ASN1_INTEGER *iter;
19240 } PBEPARAM;
19241 
19242 /* Password based encryption V2 structures */
19243 
19244 typedef struct PBE2PARAM_st {
19245     X509_ALGOR *keyfunc;
19246     X509_ALGOR *encryption;
19247 } PBE2PARAM;
19248 
19249 typedef struct PBKDF2PARAM_st {
19250 /* Usually OCTET STRING but could be anything */
19251     ASN1_TYPE *salt;
19252     ASN1_INTEGER *iter;
19253     ASN1_INTEGER *keylength;
19254     X509_ALGOR *prf;
19255 } PBKDF2PARAM;
19256 
19257 /* PKCS#8 private key info structure */
19258 
19259 struct pkcs8_priv_key_info_st {
19260     /* Flag for various broken formats */
19261     int broken;
19262 
19263 
19264 
19265 
19266 
19267     ASN1_INTEGER *version;
19268     X509_ALGOR *pkeyalg;
19269     /* Should be OCTET STRING but some are broken */
19270     ASN1_TYPE *pkey;
19271     struct stack_st_X509_ATTRIBUTE *attributes;
19272 };
19273 
19274 
19275 
19276 
19277 
19278 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
19279 /* crypto/x509/x509_vfy.h */
19280 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19281  * All rights reserved.
19282  *
19283  * This package is an SSL implementation written
19284  * by Eric Young (eay@cryptsoft.com).
19285  * The implementation was written so as to conform with Netscapes SSL.
19286  *
19287  * This library is free for commercial and non-commercial use as long as
19288  * the following conditions are aheared to.  The following conditions
19289  * apply to all code found in this distribution, be it the RC4, RSA,
19290  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19291  * included with this distribution is covered by the same copyright terms
19292  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19293  *
19294  * Copyright remains Eric Young's, and as such any Copyright notices in
19295  * the code are not to be removed.
19296  * If this package is used in a product, Eric Young should be given attribution
19297  * as the author of the parts of the library used.
19298  * This can be in the form of a textual message at program startup or
19299  * in documentation (online or textual) provided with the package.
19300  *
19301  * Redistribution and use in source and binary forms, with or without
19302  * modification, are permitted provided that the following conditions
19303  * are met:
19304  * 1. Redistributions of source code must retain the copyright
19305  *    notice, this list of conditions and the following disclaimer.
19306  * 2. Redistributions in binary form must reproduce the above copyright
19307  *    notice, this list of conditions and the following disclaimer in the
19308  *    documentation and/or other materials provided with the distribution.
19309  * 3. All advertising materials mentioning features or use of this software
19310  *    must display the following acknowledgement:
19311  *    "This product includes cryptographic software written by
19312  *     Eric Young (eay@cryptsoft.com)"
19313  *    The word 'cryptographic' can be left out if the rouines from the library
19314  *    being used are not cryptographic related :-).
19315  * 4. If you include any Windows specific code (or a derivative thereof) from
19316  *    the apps directory (application code) you must include an acknowledgement:
19317  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19318  *
19319  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19320  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19321  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19322  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19323  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19324  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19325  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19326  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19327  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19328  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19329  * SUCH DAMAGE.
19330  *
19331  * The licence and distribution terms for any publically available version or
19332  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19333  * copied and put under another distribution licence
19334  * [including the GNU Public Licence.]
19335  */
19336 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
19337 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19338 /* opensslconf.h */
19339 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19340 
19341 
19342 
19343 
19344 /* OpenSSL was configured with the following options: */
19345 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19346 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19347    asks for it.  This is a transient feature that is provided for those
19348    who haven't had the time to do the appropriate changes in their
19349    applications.  */
19350 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19351 /* crypto/opensslconf.h.in */
19352 
19353 /* Generate 80386 code? */
19354 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
19355 
19356 # 1 "/usr/include/openssl/lhash.h" 1 3 4
19357 /* crypto/lhash/lhash.h */
19358 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19359  * All rights reserved.
19360  *
19361  * This package is an SSL implementation written
19362  * by Eric Young (eay@cryptsoft.com).
19363  * The implementation was written so as to conform with Netscapes SSL.
19364  *
19365  * This library is free for commercial and non-commercial use as long as
19366  * the following conditions are aheared to.  The following conditions
19367  * apply to all code found in this distribution, be it the RC4, RSA,
19368  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19369  * included with this distribution is covered by the same copyright terms
19370  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19371  *
19372  * Copyright remains Eric Young's, and as such any Copyright notices in
19373  * the code are not to be removed.
19374  * If this package is used in a product, Eric Young should be given attribution
19375  * as the author of the parts of the library used.
19376  * This can be in the form of a textual message at program startup or
19377  * in documentation (online or textual) provided with the package.
19378  *
19379  * Redistribution and use in source and binary forms, with or without
19380  * modification, are permitted provided that the following conditions
19381  * are met:
19382  * 1. Redistributions of source code must retain the copyright
19383  *    notice, this list of conditions and the following disclaimer.
19384  * 2. Redistributions in binary form must reproduce the above copyright
19385  *    notice, this list of conditions and the following disclaimer in the
19386  *    documentation and/or other materials provided with the distribution.
19387  * 3. All advertising materials mentioning features or use of this software
19388  *    must display the following acknowledgement:
19389  *    "This product includes cryptographic software written by
19390  *     Eric Young (eay@cryptsoft.com)"
19391  *    The word 'cryptographic' can be left out if the rouines from the library
19392  *    being used are not cryptographic related :-).
19393  * 4. If you include any Windows specific code (or a derivative thereof) from
19394  *    the apps directory (application code) you must include an acknowledgement:
19395  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19396  *
19397  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19398  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19399  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19400  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19401  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19402  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19403  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19404  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19405  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19406  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19407  * SUCH DAMAGE.
19408  *
19409  * The licence and distribution terms for any publically available version or
19410  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19411  * copied and put under another distribution licence
19412  * [including the GNU Public Licence.]
19413  */
19414 
19415 /*
19416  * Header for dynamic hash table routines Author - Eric Young
19417  */
19418 
19419 
19420 
19421 
19422 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
19423 /* e_os2.h */
19424 /* ====================================================================
19425  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
19426  *
19427  * Redistribution and use in source and binary forms, with or without
19428  * modification, are permitted provided that the following conditions
19429  * are met:
19430  *
19431  * 1. Redistributions of source code must retain the above copyright
19432  *    notice, this list of conditions and the following disclaimer.
19433  *
19434  * 2. Redistributions in binary form must reproduce the above copyright
19435  *    notice, this list of conditions and the following disclaimer in
19436  *    the documentation and/or other materials provided with the
19437  *    distribution.
19438  *
19439  * 3. All advertising materials mentioning features or use of this
19440  *    software must display the following acknowledgment:
19441  *    "This product includes software developed by the OpenSSL Project
19442  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19443  *
19444  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19445  *    endorse or promote products derived from this software without
19446  *    prior written permission. For written permission, please contact
19447  *    openssl-core@openssl.org.
19448  *
19449  * 5. Products derived from this software may not be called "OpenSSL"
19450  *    nor may "OpenSSL" appear in their names without prior written
19451  *    permission of the OpenSSL Project.
19452  *
19453  * 6. Redistributions of any form whatsoever must retain the following
19454  *    acknowledgment:
19455  *    "This product includes software developed by the OpenSSL Project
19456  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19457  *
19458  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19459  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19460  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19461  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19462  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19463  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19464  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19465  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19466  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19467  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19468  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19469  * OF THE POSSIBILITY OF SUCH DAMAGE.
19470  * ====================================================================
19471  *
19472  * This product includes cryptographic software written by Eric Young
19473  * (eay@cryptsoft.com).  This product includes software written by Tim
19474  * Hudson (tjh@cryptsoft.com).
19475  *
19476  */
19477 
19478 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19479 /* opensslconf.h */
19480 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19481 
19482 
19483 
19484 
19485 /* OpenSSL was configured with the following options: */
19486 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19487 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19488    asks for it.  This is a transient feature that is provided for those
19489    who haven't had the time to do the appropriate changes in their
19490    applications.  */
19491 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19492 /* crypto/opensslconf.h.in */
19493 
19494 /* Generate 80386 code? */
19495 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19496 # 67 "/usr/include/openssl/lhash.h" 2 3 4
19497 
19498 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
19499 /*
19500  * CDDL HEADER START
19501  *
19502  * The contents of this file are subject to the terms of the
19503  * Common Development and Distribution License (the "License").
19504  * You may not use this file except in compliance with the License.
19505  *
19506  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
19507  * or http://www.opensolaris.org/os/licensing.
19508  * See the License for the specific language governing permissions
19509  * and limitations under the License.
19510  *
19511  * When distributing Covered Code, include this CDDL HEADER in each
19512  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19513  * If applicable, add the following below this CDDL HEADER, with the
19514  * fields enclosed by brackets "[]" replaced with your own identifying
19515  * information: Portions Copyright [yyyy] [name of copyright owner]
19516  *
19517  * CDDL HEADER END
19518  */
19519 
19520 /*
19521  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
19522  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
19523  */
19524 
19525 /*	Copyright (c) 1988 AT&T	*/
19526 /*	  All Rights Reserved  	*/
19527 
19528 /*
19529  * User-visible pieces of the ANSI C standard I/O package.
19530  */
19531 # 69 "/usr/include/openssl/lhash.h" 2 3 4
19532 
19533 
19534 
19535 # 1 "/usr/include/openssl/bio.h" 1 3 4
19536 /* crypto/bio/bio.h */
19537 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19538  * All rights reserved.
19539  *
19540  * This package is an SSL implementation written
19541  * by Eric Young (eay@cryptsoft.com).
19542  * The implementation was written so as to conform with Netscapes SSL.
19543  *
19544  * This library is free for commercial and non-commercial use as long as
19545  * the following conditions are aheared to.  The following conditions
19546  * apply to all code found in this distribution, be it the RC4, RSA,
19547  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19548  * included with this distribution is covered by the same copyright terms
19549  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19550  *
19551  * Copyright remains Eric Young's, and as such any Copyright notices in
19552  * the code are not to be removed.
19553  * If this package is used in a product, Eric Young should be given attribution
19554  * as the author of the parts of the library used.
19555  * This can be in the form of a textual message at program startup or
19556  * in documentation (online or textual) provided with the package.
19557  *
19558  * Redistribution and use in source and binary forms, with or without
19559  * modification, are permitted provided that the following conditions
19560  * are met:
19561  * 1. Redistributions of source code must retain the copyright
19562  *    notice, this list of conditions and the following disclaimer.
19563  * 2. Redistributions in binary form must reproduce the above copyright
19564  *    notice, this list of conditions and the following disclaimer in the
19565  *    documentation and/or other materials provided with the distribution.
19566  * 3. All advertising materials mentioning features or use of this software
19567  *    must display the following acknowledgement:
19568  *    "This product includes cryptographic software written by
19569  *     Eric Young (eay@cryptsoft.com)"
19570  *    The word 'cryptographic' can be left out if the rouines from the library
19571  *    being used are not cryptographic related :-).
19572  * 4. If you include any Windows specific code (or a derivative thereof) from
19573  *    the apps directory (application code) you must include an acknowledgement:
19574  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19575  *
19576  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19577  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19578  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19579  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19580  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19581  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19582  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19583  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19584  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19585  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19586  * SUCH DAMAGE.
19587  *
19588  * The licence and distribution terms for any publically available version or
19589  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19590  * copied and put under another distribution licence
19591  * [including the GNU Public Licence.]
19592  */
19593 # 73 "/usr/include/openssl/lhash.h" 2 3 4
19594 
19595 
19596 
19597 
19598 
19599 
19600 typedef struct lhash_node_st {
19601     void *data;
19602     struct lhash_node_st *next;
19603 
19604     unsigned long hash;
19605 
19606 } LHASH_NODE;
19607 
19608 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
19609 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
19610 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
19611 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
19612 
19613 /*
19614  * Macros for declaring and implementing type-safe wrappers for LHASH
19615  * callbacks. This way, callbacks can be provided to LHASH structures without
19616  * function pointer casting and the macro-defined callbacks provide
19617  * per-variable casting before deferring to the underlying type-specific
19618  * callbacks. NB: It is possible to place a "static" in front of both the
19619  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
19620  */
19621 
19622 /* First: "hash" functions */
19623 # 110 "/usr/include/openssl/lhash.h" 3 4
19624 /* Second: "compare" functions */
19625 # 120 "/usr/include/openssl/lhash.h" 3 4
19626 /* Third: "doall" functions */
19627 # 129 "/usr/include/openssl/lhash.h" 3 4
19628 /* Fourth: "doall_arg" functions */
19629 # 139 "/usr/include/openssl/lhash.h" 3 4
19630 typedef struct lhash_st {
19631     LHASH_NODE **b;
19632     LHASH_COMP_FN_TYPE comp;
19633     LHASH_HASH_FN_TYPE hash;
19634     unsigned int num_nodes;
19635     unsigned int num_alloc_nodes;
19636     unsigned int p;
19637     unsigned int pmax;
19638     unsigned long up_load; /* load times 256 */
19639     unsigned long down_load; /* load times 256 */
19640     unsigned long num_items;
19641     unsigned long num_expands;
19642     unsigned long num_expand_reallocs;
19643     unsigned long num_contracts;
19644     unsigned long num_contract_reallocs;
19645     unsigned long num_hash_calls;
19646     unsigned long num_comp_calls;
19647     unsigned long num_insert;
19648     unsigned long num_replace;
19649     unsigned long num_delete;
19650     unsigned long num_no_delete;
19651     unsigned long num_retrieve;
19652     unsigned long num_retrieve_miss;
19653     unsigned long num_hash_comps;
19654     int error;
19655 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
19656                                  * and friends */
19657 
19658 
19659 
19660 /*
19661  * Indicates a malloc() error in the last call, this is only bad in
19662  * lh_insert().
19663  */
19664 
19665 
19666 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
19667 void lh_free(_LHASH *lh);
19668 void *lh_insert(_LHASH *lh, void *data);
19669 void *lh_delete(_LHASH *lh, const void *data);
19670 void *lh_retrieve(_LHASH *lh, const void *data);
19671 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
19672 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
19673 unsigned long lh_strhash(const char *c);
19674 unsigned long lh_num_items(const _LHASH *lh);
19675 
19676 
19677 void lh_stats(const _LHASH *lh, FILE *out);
19678 void lh_node_stats(const _LHASH *lh, FILE *out);
19679 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
19680 
19681 
19682 
19683 void lh_stats_bio(const _LHASH *lh, BIO *out);
19684 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
19685 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
19686 
19687 
19688 /* Type checking... */
19689 # 206 "/usr/include/openssl/lhash.h" 3 4
19690 /* Define wrapper functions. */
19691 # 233 "/usr/include/openssl/lhash.h" 3 4
19692 struct lhash_st_OPENSSL_STRING { int dummy; };
19693 struct lhash_st_OPENSSL_CSTRING { int dummy; };
19694 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
19695 
19696 # 1 "/usr/include/openssl/bio.h" 1 3 4
19697 /* crypto/bio/bio.h */
19698 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19699  * All rights reserved.
19700  *
19701  * This package is an SSL implementation written
19702  * by Eric Young (eay@cryptsoft.com).
19703  * The implementation was written so as to conform with Netscapes SSL.
19704  *
19705  * This library is free for commercial and non-commercial use as long as
19706  * the following conditions are aheared to.  The following conditions
19707  * apply to all code found in this distribution, be it the RC4, RSA,
19708  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19709  * included with this distribution is covered by the same copyright terms
19710  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19711  *
19712  * Copyright remains Eric Young's, and as such any Copyright notices in
19713  * the code are not to be removed.
19714  * If this package is used in a product, Eric Young should be given attribution
19715  * as the author of the parts of the library used.
19716  * This can be in the form of a textual message at program startup or
19717  * in documentation (online or textual) provided with the package.
19718  *
19719  * Redistribution and use in source and binary forms, with or without
19720  * modification, are permitted provided that the following conditions
19721  * are met:
19722  * 1. Redistributions of source code must retain the copyright
19723  *    notice, this list of conditions and the following disclaimer.
19724  * 2. Redistributions in binary form must reproduce the above copyright
19725  *    notice, this list of conditions and the following disclaimer in the
19726  *    documentation and/or other materials provided with the distribution.
19727  * 3. All advertising materials mentioning features or use of this software
19728  *    must display the following acknowledgement:
19729  *    "This product includes cryptographic software written by
19730  *     Eric Young (eay@cryptsoft.com)"
19731  *    The word 'cryptographic' can be left out if the rouines from the library
19732  *    being used are not cryptographic related :-).
19733  * 4. If you include any Windows specific code (or a derivative thereof) from
19734  *    the apps directory (application code) you must include an acknowledgement:
19735  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19736  *
19737  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19738  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19739  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19740  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19741  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19742  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19743  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19744  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19745  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19746  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19747  * SUCH DAMAGE.
19748  *
19749  * The licence and distribution terms for any publically available version or
19750  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19751  * copied and put under another distribution licence
19752  * [including the GNU Public Licence.]
19753  */
19754 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
19755 # 1 "/usr/include/openssl/crypto.h" 1 3 4
19756 /* crypto/crypto.h */
19757 /* ====================================================================
19758  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
19759  *
19760  * Redistribution and use in source and binary forms, with or without
19761  * modification, are permitted provided that the following conditions
19762  * are met:
19763  *
19764  * 1. Redistributions of source code must retain the above copyright
19765  *    notice, this list of conditions and the following disclaimer.
19766  *
19767  * 2. Redistributions in binary form must reproduce the above copyright
19768  *    notice, this list of conditions and the following disclaimer in
19769  *    the documentation and/or other materials provided with the
19770  *    distribution.
19771  *
19772  * 3. All advertising materials mentioning features or use of this
19773  *    software must display the following acknowledgment:
19774  *    "This product includes software developed by the OpenSSL Project
19775  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19776  *
19777  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19778  *    endorse or promote products derived from this software without
19779  *    prior written permission. For written permission, please contact
19780  *    openssl-core@openssl.org.
19781  *
19782  * 5. Products derived from this software may not be called "OpenSSL"
19783  *    nor may "OpenSSL" appear in their names without prior written
19784  *    permission of the OpenSSL Project.
19785  *
19786  * 6. Redistributions of any form whatsoever must retain the following
19787  *    acknowledgment:
19788  *    "This product includes software developed by the OpenSSL Project
19789  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19790  *
19791  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19792  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19793  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19794  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19795  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19796  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19797  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19798  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19799  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19800  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19801  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19802  * OF THE POSSIBILITY OF SUCH DAMAGE.
19803  * ====================================================================
19804  *
19805  * This product includes cryptographic software written by Eric Young
19806  * (eay@cryptsoft.com).  This product includes software written by Tim
19807  * Hudson (tjh@cryptsoft.com).
19808  *
19809  */
19810 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
19811  * All rights reserved.
19812  *
19813  * This package is an SSL implementation written
19814  * by Eric Young (eay@cryptsoft.com).
19815  * The implementation was written so as to conform with Netscapes SSL.
19816  *
19817  * This library is free for commercial and non-commercial use as long as
19818  * the following conditions are aheared to.  The following conditions
19819  * apply to all code found in this distribution, be it the RC4, RSA,
19820  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19821  * included with this distribution is covered by the same copyright terms
19822  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19823  *
19824  * Copyright remains Eric Young's, and as such any Copyright notices in
19825  * the code are not to be removed.
19826  * If this package is used in a product, Eric Young should be given attribution
19827  * as the author of the parts of the library used.
19828  * This can be in the form of a textual message at program startup or
19829  * in documentation (online or textual) provided with the package.
19830  *
19831  * Redistribution and use in source and binary forms, with or without
19832  * modification, are permitted provided that the following conditions
19833  * are met:
19834  * 1. Redistributions of source code must retain the copyright
19835  *    notice, this list of conditions and the following disclaimer.
19836  * 2. Redistributions in binary form must reproduce the above copyright
19837  *    notice, this list of conditions and the following disclaimer in the
19838  *    documentation and/or other materials provided with the distribution.
19839  * 3. All advertising materials mentioning features or use of this software
19840  *    must display the following acknowledgement:
19841  *    "This product includes cryptographic software written by
19842  *     Eric Young (eay@cryptsoft.com)"
19843  *    The word 'cryptographic' can be left out if the rouines from the library
19844  *    being used are not cryptographic related :-).
19845  * 4. If you include any Windows specific code (or a derivative thereof) from
19846  *    the apps directory (application code) you must include an acknowledgement:
19847  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19848  *
19849  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19850  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19851  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19852  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19853  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19854  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19855  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19856  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19857  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19858  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19859  * SUCH DAMAGE.
19860  *
19861  * The licence and distribution terms for any publically available version or
19862  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19863  * copied and put under another distribution licence
19864  * [including the GNU Public Licence.]
19865  */
19866 /* ====================================================================
19867  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
19868  * ECDH support in OpenSSL originally developed by
19869  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
19870  */
19871 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
19872 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
19873 /* ====================================================================
19874  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
19875  *
19876  * Redistribution and use in source and binary forms, with or without
19877  * modification, are permitted provided that the following conditions
19878  * are met:
19879  *
19880  * 1. Redistributions of source code must retain the above copyright
19881  *    notice, this list of conditions and the following disclaimer.
19882  *
19883  * 2. Redistributions in binary form must reproduce the above copyright
19884  *    notice, this list of conditions and the following disclaimer in
19885  *    the documentation and/or other materials provided with the
19886  *    distribution.
19887  *
19888  * 3. All advertising materials mentioning features or use of this
19889  *    software must display the following acknowledgment:
19890  *    "This product includes software developed by the OpenSSL Project
19891  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19892  *
19893  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19894  *    endorse or promote products derived from this software without
19895  *    prior written permission. For written permission, please contact
19896  *    openssl-core@openssl.org.
19897  *
19898  * 5. Products derived from this software may not be called "OpenSSL"
19899  *    nor may "OpenSSL" appear in their names without prior written
19900  *    permission of the OpenSSL Project.
19901  *
19902  * 6. Redistributions of any form whatsoever must retain the following
19903  *    acknowledgment:
19904  *    "This product includes software developed by the OpenSSL Project
19905  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19906  *
19907  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19908  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19909  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19910  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19911  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19912  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19913  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19914  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19915  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19916  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19917  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19918  * OF THE POSSIBILITY OF SUCH DAMAGE.
19919  * ====================================================================
19920  *
19921  * This product includes cryptographic software written by Eric Young
19922  * (eay@cryptsoft.com).  This product includes software written by Tim
19923  * Hudson (tjh@cryptsoft.com).
19924  *
19925  */
19926 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
19927 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
19928 typedef struct x509_file_st {
19929     int num_paths; /* number of paths to files or directories */
19930     int num_alloced;
19931     char **paths; /* the list of paths or directories */
19932     int *path_type;
19933 } X509_CERT_FILE_CTX;
19934 
19935 /*******************************/
19936 /*-
19937 SSL_CTX -> X509_STORE
19938                 -> X509_LOOKUP
19939                         ->X509_LOOKUP_METHOD
19940                 -> X509_LOOKUP
19941                         ->X509_LOOKUP_METHOD
19942 
19943 SSL     -> X509_STORE_CTX
19944                 ->X509_STORE
19945 
19946 The X509_STORE holds the tables etc for verification stuff.
19947 A X509_STORE_CTX is used while validating a single certificate.
19948 The X509_STORE has X509_LOOKUPs for looking up certs.
19949 The X509_STORE then calls a function to actually verify the
19950 certificate chain.
19951 */
19952 
19953 
19954 
19955 
19956 
19957 
19958 
19959 typedef struct x509_object_st {
19960     /* one of the above types */
19961     int type;
19962     union {
19963         char *ptr;
19964         X509 *x509;
19965         X509_CRL *crl;
19966         EVP_PKEY *pkey;
19967     } data;
19968 } X509_OBJECT;
19969 
19970 typedef struct x509_lookup_st X509_LOOKUP;
19971 
19972 struct stack_st_X509_LOOKUP { _STACK stack; };
19973 struct stack_st_X509_OBJECT { _STACK stack; };
19974 
19975 /* This is a static that defines the function interface */
19976 typedef struct x509_lookup_method_st {
19977     const char *name;
19978     int (*new_item) (X509_LOOKUP *ctx);
19979     void (*free) (X509_LOOKUP *ctx);
19980     int (*init) (X509_LOOKUP *ctx);
19981     int (*shutdown) (X509_LOOKUP *ctx);
19982     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
19983                  char **ret);
19984     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
19985                            X509_OBJECT *ret);
19986     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
19987                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
19988     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
19989                                unsigned char *bytes, int len,
19990                                X509_OBJECT *ret);
19991     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
19992                          X509_OBJECT *ret);
19993 } X509_LOOKUP_METHOD;
19994 
19995 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
19996 
19997 /*
19998  * This structure hold all parameters associated with a verify operation by
19999  * including an X509_VERIFY_PARAM structure in related structures the
20000  * parameters used can be customized
20001  */
20002 
20003 typedef struct X509_VERIFY_PARAM_st {
20004     char *name;
20005     time_t check_time; /* Time to use */
20006     unsigned long inh_flags; /* Inheritance flags */
20007     unsigned long flags; /* Various verify flags */
20008     int purpose; /* purpose to check untrusted certificates */
20009     int trust; /* trust setting to check */
20010     int depth; /* Verify depth */
20011     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
20012     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
20013 } X509_VERIFY_PARAM;
20014 
20015 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
20016 
20017 /*
20018  * This is used to hold everything.  It is used for all certificate
20019  * validation.  Once we have a certificate chain, the 'verify' function is
20020  * then called to actually check the cert chain.
20021  */
20022 struct x509_store_st {
20023     /* The following is a cache of trusted certs */
20024     int cache; /* if true, stash any hits */
20025     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
20026     /* These are external lookup methods */
20027     struct stack_st_X509_LOOKUP *get_cert_methods;
20028     X509_VERIFY_PARAM *param;
20029     /* Callbacks for various operations */
20030     /* called to verify a certificate */
20031     int (*verify) (X509_STORE_CTX *ctx);
20032     /* error callback */
20033     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
20034     /* get issuers cert from ctx */
20035     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20036     /* check issued */
20037     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
20038     /* Check revocation status of chain */
20039     int (*check_revocation) (X509_STORE_CTX *ctx);
20040     /* retrieve CRL */
20041     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
20042     /* Check CRL validity */
20043     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
20044     /* Check certificate against CRL */
20045     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
20046     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
20047     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
20048     int (*cleanup) (X509_STORE_CTX *ctx);
20049     CRYPTO_EX_DATA ex_data;
20050     int references;
20051 } /* X509_STORE */ ;
20052 
20053 int X509_STORE_set_depth(X509_STORE *store, int depth);
20054 
20055 
20056 
20057 
20058 /* This is the functions plus an instance of the local variables. */
20059 struct x509_lookup_st {
20060     int init; /* have we been started */
20061     int skip; /* don't use us. */
20062     X509_LOOKUP_METHOD *method; /* the functions */
20063     char *method_data; /* method data */
20064     X509_STORE *store_ctx; /* who owns us */
20065 } /* X509_LOOKUP */ ;
20066 
20067 /*
20068  * This is a used when verifying cert chains.  Since the gathering of the
20069  * cert chain can take some time (and have to be 'retried', this needs to be
20070  * kept and passed around.
20071  */
20072 struct x509_store_ctx_st { /* X509_STORE_CTX */
20073     X509_STORE *ctx;
20074     /* used when looking up certs */
20075     int current_method;
20076     /* The following are set by the caller */
20077     /* The cert to check */
20078     X509 *cert;
20079     /* chain of X509s - untrusted - passed in */
20080     struct stack_st_X509 *untrusted;
20081     /* set of CRLs passed in */
20082     struct stack_st_X509_CRL *crls;
20083     X509_VERIFY_PARAM *param;
20084     /* Other info for use with get_issuer() */
20085     void *other_ctx;
20086     /* Callbacks for various operations */
20087     /* called to verify a certificate */
20088     int (*verify) (X509_STORE_CTX *ctx);
20089     /* error callback */
20090     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
20091     /* get issuers cert from ctx */
20092     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20093     /* check issued */
20094     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
20095     /* Check revocation status of chain */
20096     int (*check_revocation) (X509_STORE_CTX *ctx);
20097     /* retrieve CRL */
20098     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
20099     /* Check CRL validity */
20100     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
20101     /* Check certificate against CRL */
20102     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
20103     int (*check_policy) (X509_STORE_CTX *ctx);
20104     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
20105     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
20106     int (*cleanup) (X509_STORE_CTX *ctx);
20107     /* The following is built up */
20108     /* if 0, rebuild chain */
20109     int valid;
20110     /* index of last untrusted cert */
20111     int last_untrusted;
20112     /* chain of X509s - built up and trusted */
20113     struct stack_st_X509 *chain;
20114     /* Valid policy tree */
20115     X509_POLICY_TREE *tree;
20116     /* Require explicit policy value */
20117     int explicit_policy;
20118     /* When something goes wrong, this is why */
20119     int error_depth;
20120     int error;
20121     X509 *current_cert;
20122     /* cert currently being tested as valid issuer */
20123     X509 *current_issuer;
20124     /* current CRL */
20125     X509_CRL *current_crl;
20126     /* score of current CRL */
20127     int current_crl_score;
20128     /* Reason mask */
20129     unsigned int current_reasons;
20130     /* For CRL path validation: parent context */
20131     X509_STORE_CTX *parent;
20132     CRYPTO_EX_DATA ex_data;
20133 } /* X509_STORE_CTX */ ;
20134 
20135 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
20136 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
20137 /* These are 'informational' when looking for issuer cert */
20138 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
20139 /* Suite B mode algorithm violation */
20140 
20141 
20142 
20143 
20144 
20145 
20146 
20147 /* Host, email and IP check errors */
20148 
20149 
20150 
20151 
20152 /* Caller error */
20153 
20154 /* Issuer lookup error */
20155 
20156 
20157 
20158 
20159 /* Certificate verify flags */
20160 
20161 /* Send issuer+subject checks to verify_cb */
20162 
20163 /* Use check time instead of current time */
20164 
20165 /* Lookup CRLs */
20166 
20167 /* Lookup CRLs for whole chain */
20168 
20169 /* Ignore unhandled critical extensions */
20170 
20171 /* Disable workarounds for broken certificates */
20172 
20173 /* Enable proxy certificate validation */
20174 
20175 /* Enable policy checking */
20176 
20177 /* Policy variable require-explicit-policy */
20178 
20179 /* Policy variable inhibit-any-policy */
20180 
20181 /* Policy variable inhibit-policy-mapping */
20182 
20183 /* Notify callback that policy is OK */
20184 
20185 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
20186 
20187 /* Delta CRL support */
20188 
20189 /* Check selfsigned CA signature */
20190 
20191 /* Use trusted store first */
20192 
20193 /* Suite B 128 bit only mode: not normally used */
20194 
20195 /* Suite B 192 bit only mode */
20196 
20197 /* Suite B 128 bit mode allowing 192 bit algorithms */
20198 
20199 
20200 /* Allow partial chains if at least one certificate is in trusted store */
20201 
20202 /*
20203  * If the initial chain is not trusted, do not attempt to build an alternative
20204  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
20205  * will force the behaviour to match that of previous versions.
20206  */
20207 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
20208 /* Internal use: mask of policy related options */
20209 
20210 
20211 
20212 
20213 
20214 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
20215                                X509_NAME *name);
20216 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
20217                                              int type, X509_NAME *name);
20218 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
20219                                         X509_OBJECT *x);
20220 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
20221 void X509_OBJECT_free_contents(X509_OBJECT *a);
20222 X509_STORE *X509_STORE_new(void);
20223 void X509_STORE_free(X509_STORE *v);
20224 
20225 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
20226 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
20227 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
20228 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
20229 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
20230 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
20231 
20232 void X509_STORE_set_verify_cb(X509_STORE *ctx,
20233                               int (*verify_cb) (int, X509_STORE_CTX *));
20234 
20235 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
20236                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
20237                                                               *ctx,
20238                                                               X509_NAME *nm));
20239 
20240 X509_STORE_CTX *X509_STORE_CTX_new(void);
20241 
20242 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
20243 
20244 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
20245 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
20246                         X509 *x509, struct stack_st_X509 *chain);
20247 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
20248 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
20249 
20250 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
20251 
20252 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
20253 
20254 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
20255 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
20256 
20257 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
20258 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
20259 
20260 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
20261                               X509_OBJECT *ret);
20262 
20263 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
20264                      long argl, char **ret);
20265 
20266 
20267 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
20268 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
20269 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
20270 
20271 
20272 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
20273 void X509_LOOKUP_free(X509_LOOKUP *ctx);
20274 int X509_LOOKUP_init(X509_LOOKUP *ctx);
20275 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
20276                            X509_OBJECT *ret);
20277 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
20278                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
20279 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
20280                                unsigned char *bytes, int len,
20281                                X509_OBJECT *ret);
20282 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
20283                          X509_OBJECT *ret);
20284 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
20285 
20286 
20287 int X509_STORE_load_locations(X509_STORE *ctx,
20288                               const char *file, const char *dir);
20289 int X509_STORE_set_default_paths(X509_STORE *ctx);
20290 
20291 
20292 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
20293                                     CRYPTO_EX_new *new_func,
20294                                     CRYPTO_EX_dup *dup_func,
20295                                     CRYPTO_EX_free *free_func);
20296 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
20297 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
20298 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
20299 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
20300 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
20301 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
20302 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
20303 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
20304 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
20305 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
20306 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
20307 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
20308 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
20309 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
20310 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
20311 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
20312 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
20313                                    int purpose, int trust);
20314 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
20315 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
20316                              time_t t);
20317 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
20318                                   int (*verify_cb) (int, X509_STORE_CTX *));
20319 
20320 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
20321 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
20322 
20323 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
20324 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
20325 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
20326 
20327 /* X509_VERIFY_PARAM functions */
20328 
20329 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
20330 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
20331 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
20332                               const X509_VERIFY_PARAM *from);
20333 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
20334                            const X509_VERIFY_PARAM *from);
20335 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
20336 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
20337                                 unsigned long flags);
20338 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
20339                                   unsigned long flags);
20340 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
20341 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
20342 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
20343 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
20344 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
20345 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
20346                                   ASN1_OBJECT *policy);
20347 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
20348                                     struct stack_st_ASN1_OBJECT *policies);
20349 
20350 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
20351                                 const char *name, size_t namelen);
20352 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
20353                                 const char *name, size_t namelen);
20354 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
20355                                      unsigned int flags);
20356 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
20357 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
20358                                  const char *email, size_t emaillen);
20359 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
20360                               const unsigned char *ip, size_t iplen);
20361 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
20362                                   const char *ipasc);
20363 
20364 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
20365 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
20366 
20367 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
20368 int X509_VERIFY_PARAM_get_count(void);
20369 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
20370 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
20371 void X509_VERIFY_PARAM_table_cleanup(void);
20372 
20373 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
20374                       struct stack_st_X509 *certs,
20375                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
20376 
20377 void X509_policy_tree_free(X509_POLICY_TREE *tree);
20378 
20379 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
20380 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
20381                                                int i);
20382 
20383 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
20384                                                            X509_POLICY_TREE
20385                                                            *tree);
20386 
20387 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
20388                                                                 X509_POLICY_TREE
20389                                                                 *tree);
20390 
20391 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
20392 
20393 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
20394                                               int i);
20395 
20396 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
20397 
20398 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
20399                                                            X509_POLICY_NODE
20400                                                            *node);
20401 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
20402                                                      *node);
20403 # 582 "/usr/include/openssl/x509.h" 2 3 4
20404 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
20405 /* crypto/pkcs7/pkcs7.h */
20406 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20407  * All rights reserved.
20408  *
20409  * This package is an SSL implementation written
20410  * by Eric Young (eay@cryptsoft.com).
20411  * The implementation was written so as to conform with Netscapes SSL.
20412  *
20413  * This library is free for commercial and non-commercial use as long as
20414  * the following conditions are aheared to.  The following conditions
20415  * apply to all code found in this distribution, be it the RC4, RSA,
20416  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20417  * included with this distribution is covered by the same copyright terms
20418  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20419  *
20420  * Copyright remains Eric Young's, and as such any Copyright notices in
20421  * the code are not to be removed.
20422  * If this package is used in a product, Eric Young should be given attribution
20423  * as the author of the parts of the library used.
20424  * This can be in the form of a textual message at program startup or
20425  * in documentation (online or textual) provided with the package.
20426  *
20427  * Redistribution and use in source and binary forms, with or without
20428  * modification, are permitted provided that the following conditions
20429  * are met:
20430  * 1. Redistributions of source code must retain the copyright
20431  *    notice, this list of conditions and the following disclaimer.
20432  * 2. Redistributions in binary form must reproduce the above copyright
20433  *    notice, this list of conditions and the following disclaimer in the
20434  *    documentation and/or other materials provided with the distribution.
20435  * 3. All advertising materials mentioning features or use of this software
20436  *    must display the following acknowledgement:
20437  *    "This product includes cryptographic software written by
20438  *     Eric Young (eay@cryptsoft.com)"
20439  *    The word 'cryptographic' can be left out if the rouines from the library
20440  *    being used are not cryptographic related :-).
20441  * 4. If you include any Windows specific code (or a derivative thereof) from
20442  *    the apps directory (application code) you must include an acknowledgement:
20443  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20444  *
20445  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20446  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20447  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20448  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20449  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20450  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20451  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20452  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20453  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20454  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20455  * SUCH DAMAGE.
20456  *
20457  * The licence and distribution terms for any publically available version or
20458  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20459  * copied and put under another distribution licence
20460  * [including the GNU Public Licence.]
20461  */
20462 
20463 
20464 
20465 
20466 # 1 "/usr/include/openssl/asn1.h" 1 3 4
20467 /* crypto/asn1/asn1.h */
20468 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20469  * All rights reserved.
20470  *
20471  * This package is an SSL implementation written
20472  * by Eric Young (eay@cryptsoft.com).
20473  * The implementation was written so as to conform with Netscapes SSL.
20474  *
20475  * This library is free for commercial and non-commercial use as long as
20476  * the following conditions are aheared to.  The following conditions
20477  * apply to all code found in this distribution, be it the RC4, RSA,
20478  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20479  * included with this distribution is covered by the same copyright terms
20480  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20481  *
20482  * Copyright remains Eric Young's, and as such any Copyright notices in
20483  * the code are not to be removed.
20484  * If this package is used in a product, Eric Young should be given attribution
20485  * as the author of the parts of the library used.
20486  * This can be in the form of a textual message at program startup or
20487  * in documentation (online or textual) provided with the package.
20488  *
20489  * Redistribution and use in source and binary forms, with or without
20490  * modification, are permitted provided that the following conditions
20491  * are met:
20492  * 1. Redistributions of source code must retain the copyright
20493  *    notice, this list of conditions and the following disclaimer.
20494  * 2. Redistributions in binary form must reproduce the above copyright
20495  *    notice, this list of conditions and the following disclaimer in the
20496  *    documentation and/or other materials provided with the distribution.
20497  * 3. All advertising materials mentioning features or use of this software
20498  *    must display the following acknowledgement:
20499  *    "This product includes cryptographic software written by
20500  *     Eric Young (eay@cryptsoft.com)"
20501  *    The word 'cryptographic' can be left out if the rouines from the library
20502  *    being used are not cryptographic related :-).
20503  * 4. If you include any Windows specific code (or a derivative thereof) from
20504  *    the apps directory (application code) you must include an acknowledgement:
20505  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20506  *
20507  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20508  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20509  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20510  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20511  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20512  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20513  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20514  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20515  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20516  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20517  * SUCH DAMAGE.
20518  *
20519  * The licence and distribution terms for any publically available version or
20520  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20521  * copied and put under another distribution licence
20522  * [including the GNU Public Licence.]
20523  */
20524 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
20525 # 1 "/usr/include/openssl/bio.h" 1 3 4
20526 /* crypto/bio/bio.h */
20527 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
20528  * All rights reserved.
20529  *
20530  * This package is an SSL implementation written
20531  * by Eric Young (eay@cryptsoft.com).
20532  * The implementation was written so as to conform with Netscapes SSL.
20533  *
20534  * This library is free for commercial and non-commercial use as long as
20535  * the following conditions are aheared to.  The following conditions
20536  * apply to all code found in this distribution, be it the RC4, RSA,
20537  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
20538  * included with this distribution is covered by the same copyright terms
20539  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
20540  *
20541  * Copyright remains Eric Young's, and as such any Copyright notices in
20542  * the code are not to be removed.
20543  * If this package is used in a product, Eric Young should be given attribution
20544  * as the author of the parts of the library used.
20545  * This can be in the form of a textual message at program startup or
20546  * in documentation (online or textual) provided with the package.
20547  *
20548  * Redistribution and use in source and binary forms, with or without
20549  * modification, are permitted provided that the following conditions
20550  * are met:
20551  * 1. Redistributions of source code must retain the copyright
20552  *    notice, this list of conditions and the following disclaimer.
20553  * 2. Redistributions in binary form must reproduce the above copyright
20554  *    notice, this list of conditions and the following disclaimer in the
20555  *    documentation and/or other materials provided with the distribution.
20556  * 3. All advertising materials mentioning features or use of this software
20557  *    must display the following acknowledgement:
20558  *    "This product includes cryptographic software written by
20559  *     Eric Young (eay@cryptsoft.com)"
20560  *    The word 'cryptographic' can be left out if the rouines from the library
20561  *    being used are not cryptographic related :-).
20562  * 4. If you include any Windows specific code (or a derivative thereof) from
20563  *    the apps directory (application code) you must include an acknowledgement:
20564  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
20565  *
20566  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
20567  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20568  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20569  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20570  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20571  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20572  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20573  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20574  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20575  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20576  * SUCH DAMAGE.
20577  *
20578  * The licence and distribution terms for any publically available version or
20579  * derivative of this code cannot be changed.  i.e. this code cannot simply be
20580  * copied and put under another distribution licence
20581  * [including the GNU Public Licence.]
20582  */
20583 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
20584 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
20585 /* e_os2.h */
20586 /* ====================================================================
20587  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
20588  *
20589  * Redistribution and use in source and binary forms, with or without
20590  * modification, are permitted provided that the following conditions
20591  * are met:
20592  *
20593  * 1. Redistributions of source code must retain the above copyright
20594  *    notice, this list of conditions and the following disclaimer.
20595  *
20596  * 2. Redistributions in binary form must reproduce the above copyright
20597  *    notice, this list of conditions and the following disclaimer in
20598  *    the documentation and/or other materials provided with the
20599  *    distribution.
20600  *
20601  * 3. All advertising materials mentioning features or use of this
20602  *    software must display the following acknowledgment:
20603  *    "This product includes software developed by the OpenSSL Project
20604  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20605  *
20606  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20607  *    endorse or promote products derived from this software without
20608  *    prior written permission. For written permission, please contact
20609  *    openssl-core@openssl.org.
20610  *
20611  * 5. Products derived from this software may not be called "OpenSSL"
20612  *    nor may "OpenSSL" appear in their names without prior written
20613  *    permission of the OpenSSL Project.
20614  *
20615  * 6. Redistributions of any form whatsoever must retain the following
20616  *    acknowledgment:
20617  *    "This product includes software developed by the OpenSSL Project
20618  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20619  *
20620  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20621  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20622  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20623  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20624  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20625  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20626  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20627  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20628  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20629  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20630  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20631  * OF THE POSSIBILITY OF SUCH DAMAGE.
20632  * ====================================================================
20633  *
20634  * This product includes cryptographic software written by Eric Young
20635  * (eay@cryptsoft.com).  This product includes software written by Tim
20636  * Hudson (tjh@cryptsoft.com).
20637  *
20638  */
20639 
20640 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
20641 /* opensslconf.h */
20642 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
20643 
20644 
20645 
20646 
20647 /* OpenSSL was configured with the following options: */
20648 # 108 "/usr/include/openssl/opensslconf.h" 3 4
20649 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
20650    asks for it.  This is a transient feature that is provided for those
20651    who haven't had the time to do the appropriate changes in their
20652    applications.  */
20653 # 204 "/usr/include/openssl/opensslconf.h" 3 4
20654 /* crypto/opensslconf.h.in */
20655 
20656 /* Generate 80386 code? */
20657 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
20658 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
20659 
20660 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
20661 /* ====================================================================
20662  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
20663  *
20664  * Redistribution and use in source and binary forms, with or without
20665  * modification, are permitted provided that the following conditions
20666  * are met:
20667  *
20668  * 1. Redistributions of source code must retain the above copyright
20669  *    notice, this list of conditions and the following disclaimer.
20670  *
20671  * 2. Redistributions in binary form must reproduce the above copyright
20672  *    notice, this list of conditions and the following disclaimer in
20673  *    the documentation and/or other materials provided with the
20674  *    distribution.
20675  *
20676  * 3. All advertising materials mentioning features or use of this
20677  *    software must display the following acknowledgment:
20678  *    "This product includes software developed by the OpenSSL Project
20679  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20680  *
20681  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20682  *    endorse or promote products derived from this software without
20683  *    prior written permission. For written permission, please contact
20684  *    openssl-core@openssl.org.
20685  *
20686  * 5. Products derived from this software may not be called "OpenSSL"
20687  *    nor may "OpenSSL" appear in their names without prior written
20688  *    permission of the OpenSSL Project.
20689  *
20690  * 6. Redistributions of any form whatsoever must retain the following
20691  *    acknowledgment:
20692  *    "This product includes software developed by the OpenSSL Project
20693  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20694  *
20695  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20696  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20697  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20698  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20699  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20700  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20701  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20702  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20703  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20704  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20705  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20706  * OF THE POSSIBILITY OF SUCH DAMAGE.
20707  * ====================================================================
20708  *
20709  * This product includes cryptographic software written by Eric Young
20710  * (eay@cryptsoft.com).  This product includes software written by Tim
20711  * Hudson (tjh@cryptsoft.com).
20712  *
20713  */
20714 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
20715 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
20716 /* ====================================================================
20717  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
20718  *
20719  * Redistribution and use in source and binary forms, with or without
20720  * modification, are permitted provided that the following conditions
20721  * are met:
20722  *
20723  * 1. Redistributions of source code must retain the above copyright
20724  *    notice, this list of conditions and the following disclaimer.
20725  *
20726  * 2. Redistributions in binary form must reproduce the above copyright
20727  *    notice, this list of conditions and the following disclaimer in
20728  *    the documentation and/or other materials provided with the
20729  *    distribution.
20730  *
20731  * 3. All advertising materials mentioning features or use of this
20732  *    software must display the following acknowledgment:
20733  *    "This product includes software developed by the OpenSSL Project
20734  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20735  *
20736  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
20737  *    endorse or promote products derived from this software without
20738  *    prior written permission. For written permission, please contact
20739  *    openssl-core@openssl.org.
20740  *
20741  * 5. Products derived from this software may not be called "OpenSSL"
20742  *    nor may "OpenSSL" appear in their names without prior written
20743  *    permission of the OpenSSL Project.
20744  *
20745  * 6. Redistributions of any form whatsoever must retain the following
20746  *    acknowledgment:
20747  *    "This product includes software developed by the OpenSSL Project
20748  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
20749  *
20750  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
20751  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20752  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20753  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
20754  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20755  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20756  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20757  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20758  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
20759  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
20760  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20761  * OF THE POSSIBILITY OF SUCH DAMAGE.
20762  * ====================================================================
20763  *
20764  * This product includes cryptographic software written by Eric Young
20765  * (eay@cryptsoft.com).  This product includes software written by Tim
20766  * Hudson (tjh@cryptsoft.com).
20767  *
20768  */
20769 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
20770 # 79 "/usr/include/openssl/pkcs7.h" 3 4
20771 /*-
20772 Encryption_ID           DES-CBC
20773 Digest_ID               MD5
20774 Digest_Encryption_ID    rsaEncryption
20775 Key_Encryption_ID       rsaEncryption
20776 */
20777 
20778 typedef struct pkcs7_issuer_and_serial_st {
20779     X509_NAME *issuer;
20780     ASN1_INTEGER *serial;
20781 } PKCS7_ISSUER_AND_SERIAL;
20782 
20783 typedef struct pkcs7_signer_info_st {
20784     ASN1_INTEGER *version; /* version 1 */
20785     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
20786     X509_ALGOR *digest_alg;
20787     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
20788     X509_ALGOR *digest_enc_alg;
20789     ASN1_OCTET_STRING *enc_digest;
20790     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
20791     /* The private key to sign with */
20792     EVP_PKEY *pkey;
20793 } PKCS7_SIGNER_INFO;
20794 
20795 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
20796 
20797 
20798 typedef struct pkcs7_recip_info_st {
20799     ASN1_INTEGER *version; /* version 0 */
20800     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
20801     X509_ALGOR *key_enc_algor;
20802     ASN1_OCTET_STRING *enc_key;
20803     X509 *cert; /* get the pub-key from this */
20804 } PKCS7_RECIP_INFO;
20805 
20806 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
20807 
20808 
20809 typedef struct pkcs7_signed_st {
20810     ASN1_INTEGER *version; /* version 1 */
20811     struct stack_st_X509_ALGOR *md_algs; /* md used */
20812     struct stack_st_X509 *cert; /* [ 0 ] */
20813     struct stack_st_X509_CRL *crl; /* [ 1 ] */
20814     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
20815     struct pkcs7_st *contents;
20816 } PKCS7_SIGNED;
20817 /*
20818  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
20819  * merging the two
20820  */
20821 
20822 typedef struct pkcs7_enc_content_st {
20823     ASN1_OBJECT *content_type;
20824     X509_ALGOR *algorithm;
20825     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
20826     const EVP_CIPHER *cipher;
20827 } PKCS7_ENC_CONTENT;
20828 
20829 typedef struct pkcs7_enveloped_st {
20830     ASN1_INTEGER *version; /* version 0 */
20831     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
20832     PKCS7_ENC_CONTENT *enc_data;
20833 } PKCS7_ENVELOPE;
20834 
20835 typedef struct pkcs7_signedandenveloped_st {
20836     ASN1_INTEGER *version; /* version 1 */
20837     struct stack_st_X509_ALGOR *md_algs; /* md used */
20838     struct stack_st_X509 *cert; /* [ 0 ] */
20839     struct stack_st_X509_CRL *crl; /* [ 1 ] */
20840     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
20841     PKCS7_ENC_CONTENT *enc_data;
20842     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
20843 } PKCS7_SIGN_ENVELOPE;
20844 
20845 typedef struct pkcs7_digest_st {
20846     ASN1_INTEGER *version; /* version 0 */
20847     X509_ALGOR *md; /* md used */
20848     struct pkcs7_st *contents;
20849     ASN1_OCTET_STRING *digest;
20850 } PKCS7_DIGEST;
20851 
20852 typedef struct pkcs7_encrypted_st {
20853     ASN1_INTEGER *version; /* version 0 */
20854     PKCS7_ENC_CONTENT *enc_data;
20855 } PKCS7_ENCRYPT;
20856 
20857 typedef struct pkcs7_st {
20858     /*
20859      * The following is non NULL if it contains ASN1 encoding of this
20860      * structure
20861      */
20862     unsigned char *asn1;
20863     long length;
20864 
20865 
20866 
20867     int state; /* used during processing */
20868     int detached;
20869     ASN1_OBJECT *type;
20870     /* content as defined by the type */
20871     /*
20872      * all encryption/message digests are applied to the 'contents', leaving
20873      * out the 'type' field.
20874      */
20875     union {
20876         char *ptr;
20877         /* NID_pkcs7_data */
20878         ASN1_OCTET_STRING *data;
20879         /* NID_pkcs7_signed */
20880         PKCS7_SIGNED *sign;
20881         /* NID_pkcs7_enveloped */
20882         PKCS7_ENVELOPE *enveloped;
20883         /* NID_pkcs7_signedAndEnveloped */
20884         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
20885         /* NID_pkcs7_digest */
20886         PKCS7_DIGEST *digest;
20887         /* NID_pkcs7_encrypted */
20888         PKCS7_ENCRYPT *encrypted;
20889         /* Anything else */
20890         ASN1_TYPE *other;
20891     } d;
20892 } PKCS7;
20893 
20894 struct stack_st_PKCS7 { _STACK stack; };
20895 
20896 
20897 # 227 "/usr/include/openssl/pkcs7.h" 3 4
20898 /* S/MIME related flags */
20899 # 246 "/usr/include/openssl/pkcs7.h" 3 4
20900 /* Flags: for compatibility with older code */
20901 # 258 "/usr/include/openssl/pkcs7.h" 3 4
20902 PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void); void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a); PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, const unsigned char **in, long len); int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ISSUER_AND_SERIAL_it;
20903 
20904 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
20905                                    const EVP_MD *type, unsigned char *md,
20906                                    unsigned int *len);
20907 
20908 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
20909 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
20910 
20911 PKCS7 *PKCS7_dup(PKCS7 *p7);
20912 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
20913 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
20914 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
20915 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
20916 
20917 PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void); void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a); PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, const unsigned char **in, long len); int i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS7_SIGNER_INFO_it;
20918 PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void); void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a); PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, const unsigned char **in, long len); int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS7_RECIP_INFO_it;
20919 PKCS7_SIGNED *PKCS7_SIGNED_new(void); void PKCS7_SIGNED_free(PKCS7_SIGNED *a); PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, const unsigned char **in, long len); int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **out); extern const ASN1_ITEM PKCS7_SIGNED_it;
20920 PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void); void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a); PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, const unsigned char **in, long len); int i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ENC_CONTENT_it;
20921 PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void); void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a); PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, const unsigned char **in, long len); int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ENVELOPE_it;
20922 PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void); void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a); PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, const unsigned char **in, long len); int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **out); extern const ASN1_ITEM PKCS7_SIGN_ENVELOPE_it;
20923 PKCS7_DIGEST *PKCS7_DIGEST_new(void); void PKCS7_DIGEST_free(PKCS7_DIGEST *a); PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, const unsigned char **in, long len); int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **out); extern const ASN1_ITEM PKCS7_DIGEST_it;
20924 PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void); void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a); PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, const unsigned char **in, long len); int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **out); extern const ASN1_ITEM PKCS7_ENCRYPT_it;
20925 PKCS7 *PKCS7_new(void); void PKCS7_free(PKCS7 *a); PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len); int i2d_PKCS7(PKCS7 *a, unsigned char **out); extern const ASN1_ITEM PKCS7_it;
20926 
20927 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
20928 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
20929 
20930 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
20931 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
20932 
20933 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
20934 
20935 int PKCS7_set_type(PKCS7 *p7, int type);
20936 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
20937 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
20938 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
20939                           const EVP_MD *dgst);
20940 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
20941 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
20942 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
20943 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
20944 int PKCS7_content_new(PKCS7 *p7, int nid);
20945 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
20946                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
20947 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
20948                           X509 *x509);
20949 
20950 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
20951 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
20952 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
20953 
20954 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
20955                                        EVP_PKEY *pkey, const EVP_MD *dgst);
20956 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
20957 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
20958 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
20959 
20960 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
20961 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
20962                                  X509_ALGOR **pdig, X509_ALGOR **psig);
20963 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
20964 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
20965 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
20966 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
20967 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
20968 
20969 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
20970 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
20971 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
20972                                void *data);
20973 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
20974                         void *value);
20975 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
20976 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
20977 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
20978                                 struct stack_st_X509_ATTRIBUTE *sk);
20979 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
20980                          struct stack_st_X509_ATTRIBUTE *sk);
20981 
20982 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
20983                   BIO *data, int flags);
20984 
20985 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
20986                                          X509 *signcert, EVP_PKEY *pkey,
20987                                          const EVP_MD *md, int flags);
20988 
20989 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
20990 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
20991                  BIO *indata, BIO *out, int flags);
20992 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
20993                                    int flags);
20994 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
20995                      int flags);
20996 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
20997                   int flags);
20998 
20999 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
21000                               struct stack_st_X509_ALGOR *cap);
21001 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
21002 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
21003 
21004 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
21005 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
21006 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
21007                              const unsigned char *md, int mdlen);
21008 
21009 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
21010 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
21011 
21012 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
21013 
21014 /* BEGIN ERROR CODES */
21015 /*
21016  * The following lines are auto generated by the script mkerr.pl. Any changes
21017  * made after this point may be overwritten when the script is next run.
21018  */
21019 void ERR_load_PKCS7_strings(void);
21020 
21021 /* Error codes for the PKCS7 functions. */
21022 
21023 /* Function codes. */
21024 # 421 "/usr/include/openssl/pkcs7.h" 3 4
21025 /* Reason codes. */
21026 # 583 "/usr/include/openssl/x509.h" 2 3 4
21027 # 592 "/usr/include/openssl/x509.h" 3 4
21028 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
21029 # 608 "/usr/include/openssl/x509.h" 3 4
21030 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
21031 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
21032                                      int (*crl_free) (X509_CRL *crl),
21033                                      int (*crl_lookup) (X509_CRL *crl,
21034                                                         X509_REVOKED **ret,
21035                                                         ASN1_INTEGER *ser,
21036                                                         X509_NAME *issuer),
21037                                      int (*crl_verify) (X509_CRL *crl,
21038                                                         EVP_PKEY *pk));
21039 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
21040 
21041 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
21042 void *X509_CRL_get_meth_data(X509_CRL *crl);
21043 
21044 /*
21045  * This one is only used so that a binary form can output, as in
21046  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
21047  */
21048 
21049 
21050 const char *X509_verify_cert_error_string(long n);
21051 
21052 
21053 int X509_verify(X509 *a, EVP_PKEY *r);
21054 
21055 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
21056 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
21057 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
21058 
21059 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
21060 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
21061 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
21062 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
21063 
21064 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
21065 
21066 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
21067 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
21068 
21069 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
21070 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
21071 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
21072 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
21073 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
21074 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
21075 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
21076 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
21077 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
21078 
21079 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
21080                        unsigned char *md, unsigned int *len);
21081 int X509_digest(const X509 *data, const EVP_MD *type,
21082                 unsigned char *md, unsigned int *len);
21083 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
21084                     unsigned char *md, unsigned int *len);
21085 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
21086                     unsigned char *md, unsigned int *len);
21087 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
21088                      unsigned char *md, unsigned int *len);
21089 
21090 
21091 
21092 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
21093 int i2d_X509_fp(FILE *fp, X509 *x509);
21094 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
21095 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
21096 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
21097 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
21098 
21099 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
21100 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
21101 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
21102 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
21103 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
21104 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
21105 
21106 
21107 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
21108 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
21109 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
21110 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
21111 
21112 
21113 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
21114 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
21115 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
21116 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
21117 
21118 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
21119 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
21120 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
21121                                                 PKCS8_PRIV_KEY_INFO **p8inf);
21122 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
21123 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
21124 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
21125 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
21126 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
21127 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
21128 
21129 
21130 
21131 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
21132 int i2d_X509_bio(BIO *bp, X509 *x509);
21133 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
21134 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
21135 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
21136 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
21137 
21138 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
21139 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
21140 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
21141 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
21142 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
21143 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
21144 
21145 
21146 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
21147 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
21148 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
21149 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
21150 
21151 
21152 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
21153 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
21154 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
21155 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
21156 
21157 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
21158 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
21159 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
21160                                                  PKCS8_PRIV_KEY_INFO **p8inf);
21161 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
21162 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
21163 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
21164 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
21165 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
21166 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
21167 
21168 
21169 X509 *X509_dup(X509 *x509);
21170 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
21171 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
21172 X509_CRL *X509_CRL_dup(X509_CRL *crl);
21173 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
21174 X509_REQ *X509_REQ_dup(X509_REQ *req);
21175 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
21176 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
21177                     void *pval);
21178 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
21179                      X509_ALGOR *algor);
21180 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
21181 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
21182 
21183 X509_NAME *X509_NAME_dup(X509_NAME *xn);
21184 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
21185 
21186 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
21187 int X509_cmp_current_time(const ASN1_TIME *s);
21188 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
21189 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
21190                             int offset_day, long offset_sec, time_t *t);
21191 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
21192 
21193 const char *X509_get_default_cert_area(void);
21194 const char *X509_get_default_cert_dir(void);
21195 const char *X509_get_default_cert_file(void);
21196 const char *X509_get_default_cert_dir_env(void);
21197 const char *X509_get_default_cert_file_env(void);
21198 const char *X509_get_default_private_dir(void);
21199 
21200 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
21201 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
21202 
21203 X509_ALGOR *X509_ALGOR_new(void); void X509_ALGOR_free(X509_ALGOR *a); X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, const unsigned char **in, long len); int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **out); extern const ASN1_ITEM X509_ALGOR_it;
21204 X509_ALGORS *d2i_X509_ALGORS(X509_ALGORS **a, const unsigned char **in, long len); int i2d_X509_ALGORS(X509_ALGORS *a, unsigned char **out); extern const ASN1_ITEM X509_ALGORS_it;
21205 X509_VAL *X509_VAL_new(void); void X509_VAL_free(X509_VAL *a); X509_VAL *d2i_X509_VAL(X509_VAL **a, const unsigned char **in, long len); int i2d_X509_VAL(X509_VAL *a, unsigned char **out); extern const ASN1_ITEM X509_VAL_it;
21206 
21207 X509_PUBKEY *X509_PUBKEY_new(void); void X509_PUBKEY_free(X509_PUBKEY *a); X509_PUBKEY *d2i_X509_PUBKEY(X509_PUBKEY **a, const unsigned char **in, long len); int i2d_X509_PUBKEY(X509_PUBKEY *a, unsigned char **out); extern const ASN1_ITEM X509_PUBKEY_it;
21208 
21209 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
21210 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
21211 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
21212 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
21213 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
21214 
21215 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
21216 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
21217 
21218 
21219 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
21220 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
21221 
21222 
21223 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
21224 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
21225 
21226 
21227 X509_SIG *X509_SIG_new(void); void X509_SIG_free(X509_SIG *a); X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len); int i2d_X509_SIG(X509_SIG *a, unsigned char **out); extern const ASN1_ITEM X509_SIG_it;
21228 X509_REQ_INFO *X509_REQ_INFO_new(void); void X509_REQ_INFO_free(X509_REQ_INFO *a); X509_REQ_INFO *d2i_X509_REQ_INFO(X509_REQ_INFO **a, const unsigned char **in, long len); int i2d_X509_REQ_INFO(X509_REQ_INFO *a, unsigned char **out); extern const ASN1_ITEM X509_REQ_INFO_it;
21229 X509_REQ *X509_REQ_new(void); void X509_REQ_free(X509_REQ *a); X509_REQ *d2i_X509_REQ(X509_REQ **a, const unsigned char **in, long len); int i2d_X509_REQ(X509_REQ *a, unsigned char **out); extern const ASN1_ITEM X509_REQ_it;
21230 
21231 X509_ATTRIBUTE *X509_ATTRIBUTE_new(void); void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a); X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, const unsigned char **in, long len); int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a, unsigned char **out); extern const ASN1_ITEM X509_ATTRIBUTE_it;
21232 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
21233 
21234 X509_EXTENSION *X509_EXTENSION_new(void); void X509_EXTENSION_free(X509_EXTENSION *a); X509_EXTENSION *d2i_X509_EXTENSION(X509_EXTENSION **a, const unsigned char **in, long len); int i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **out); extern const ASN1_ITEM X509_EXTENSION_it;
21235 X509_EXTENSIONS *d2i_X509_EXTENSIONS(X509_EXTENSIONS **a, const unsigned char **in, long len); int i2d_X509_EXTENSIONS(X509_EXTENSIONS *a, unsigned char **out); extern const ASN1_ITEM X509_EXTENSIONS_it;
21236 
21237 X509_NAME_ENTRY *X509_NAME_ENTRY_new(void); void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a); X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, const unsigned char **in, long len); int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **out); extern const ASN1_ITEM X509_NAME_ENTRY_it;
21238 
21239 X509_NAME *X509_NAME_new(void); void X509_NAME_free(X509_NAME *a); X509_NAME *d2i_X509_NAME(X509_NAME **a, const unsigned char **in, long len); int i2d_X509_NAME(X509_NAME *a, unsigned char **out); extern const ASN1_ITEM X509_NAME_it;
21240 
21241 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
21242 
21243 X509_CINF *X509_CINF_new(void); void X509_CINF_free(X509_CINF *a); X509_CINF *d2i_X509_CINF(X509_CINF **a, const unsigned char **in, long len); int i2d_X509_CINF(X509_CINF *a, unsigned char **out); extern const ASN1_ITEM X509_CINF_it;
21244 
21245 X509 *X509_new(void); void X509_free(X509 *a); X509 *d2i_X509(X509 **a, const unsigned char **in, long len); int i2d_X509(X509 *a, unsigned char **out); extern const ASN1_ITEM X509_it;
21246 X509_CERT_AUX *X509_CERT_AUX_new(void); void X509_CERT_AUX_free(X509_CERT_AUX *a); X509_CERT_AUX *d2i_X509_CERT_AUX(X509_CERT_AUX **a, const unsigned char **in, long len); int i2d_X509_CERT_AUX(X509_CERT_AUX *a, unsigned char **out); extern const ASN1_ITEM X509_CERT_AUX_it;
21247 
21248 X509_CERT_PAIR *X509_CERT_PAIR_new(void); void X509_CERT_PAIR_free(X509_CERT_PAIR *a); X509_CERT_PAIR *d2i_X509_CERT_PAIR(X509_CERT_PAIR **a, const unsigned char **in, long len); int i2d_X509_CERT_PAIR(X509_CERT_PAIR *a, unsigned char **out); extern const ASN1_ITEM X509_CERT_PAIR_it;
21249 
21250 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
21251                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
21252 int X509_set_ex_data(X509 *r, int idx, void *arg);
21253 void *X509_get_ex_data(X509 *r, int idx);
21254 int i2d_X509_AUX(X509 *a, unsigned char **pp);
21255 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
21256 
21257 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
21258 
21259 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
21260                          const X509 *x);
21261 int X509_get_signature_nid(const X509 *x);
21262 
21263 int X509_alias_set1(X509 *x, unsigned char *name, int len);
21264 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
21265 unsigned char *X509_alias_get0(X509 *x, int *len);
21266 unsigned char *X509_keyid_get0(X509 *x, int *len);
21267 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
21268                                                                 int);
21269 int X509_TRUST_set(int *t, int trust);
21270 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
21271 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
21272 void X509_trust_clear(X509 *x);
21273 void X509_reject_clear(X509 *x);
21274 
21275 X509_REVOKED *X509_REVOKED_new(void); void X509_REVOKED_free(X509_REVOKED *a); X509_REVOKED *d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len); int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **out); extern const ASN1_ITEM X509_REVOKED_it;
21276 X509_CRL_INFO *X509_CRL_INFO_new(void); void X509_CRL_INFO_free(X509_CRL_INFO *a); X509_CRL_INFO *d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len); int i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **out); extern const ASN1_ITEM X509_CRL_INFO_it;
21277 X509_CRL *X509_CRL_new(void); void X509_CRL_free(X509_CRL *a); X509_CRL *d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len); int i2d_X509_CRL(X509_CRL *a, unsigned char **out); extern const ASN1_ITEM X509_CRL_it;
21278 
21279 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
21280 int X509_CRL_get0_by_serial(X509_CRL *crl,
21281                             X509_REVOKED **ret, ASN1_INTEGER *serial);
21282 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
21283 
21284 X509_PKEY *X509_PKEY_new(void);
21285 void X509_PKEY_free(X509_PKEY *a);
21286 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
21287 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
21288                          long length);
21289 
21290 NETSCAPE_SPKI *NETSCAPE_SPKI_new(void); void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a); NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, const unsigned char **in, long len); int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_SPKI_it;
21291 NETSCAPE_SPKAC *NETSCAPE_SPKAC_new(void); void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a); NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, long len); int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_SPKAC_it;
21292 NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len); int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **out); extern const ASN1_ITEM NETSCAPE_CERT_SEQUENCE_it;
21293 
21294 
21295 X509_INFO *X509_INFO_new(void);
21296 void X509_INFO_free(X509_INFO *a);
21297 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
21298 
21299 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
21300                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
21301 
21302 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
21303                 unsigned char *md, unsigned int *len);
21304 
21305 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
21306               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
21307               char *data, EVP_PKEY *pkey, const EVP_MD *type);
21308 
21309 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
21310                      unsigned char *md, unsigned int *len);
21311 
21312 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
21313                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
21314 
21315 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
21316                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
21317                    EVP_PKEY *pkey, const EVP_MD *type);
21318 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
21319                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
21320                        void *asn, EVP_MD_CTX *ctx);
21321 
21322 
21323 int X509_set_version(X509 *x, long version);
21324 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
21325 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
21326 int X509_set_issuer_name(X509 *x, X509_NAME *name);
21327 X509_NAME *X509_get_issuer_name(X509 *a);
21328 int X509_set_subject_name(X509 *x, X509_NAME *name);
21329 X509_NAME *X509_get_subject_name(X509 *a);
21330 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
21331 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
21332 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
21333 EVP_PKEY *X509_get_pubkey(X509 *x);
21334 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
21335 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
21336 
21337 int X509_REQ_set_version(X509_REQ *x, long version);
21338 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
21339 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
21340 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
21341 int X509_REQ_extension_nid(int nid);
21342 int *X509_REQ_get_extension_nids(void);
21343 void X509_REQ_set_extension_nids(int *nids);
21344 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
21345 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
21346                                 int nid);
21347 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
21348 int X509_REQ_get_attr_count(const X509_REQ *req);
21349 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
21350 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
21351                              int lastpos);
21352 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
21353 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
21354 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
21355 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
21356                               const ASN1_OBJECT *obj, int type,
21357                               const unsigned char *bytes, int len);
21358 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
21359                               int nid, int type,
21360                               const unsigned char *bytes, int len);
21361 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
21362                               const char *attrname, int type,
21363                               const unsigned char *bytes, int len);
21364 
21365 int X509_CRL_set_version(X509_CRL *x, long version);
21366 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
21367 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
21368 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
21369 int X509_CRL_sort(X509_CRL *crl);
21370 
21371 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
21372 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
21373 
21374 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
21375                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
21376 
21377 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
21378 
21379 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
21380 int X509_chain_check_suiteb(int *perror_depth,
21381                             X509 *x, struct stack_st_X509 *chain,
21382                             unsigned long flags);
21383 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
21384 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
21385 
21386 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
21387 unsigned long X509_issuer_and_serial_hash(X509 *a);
21388 
21389 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
21390 unsigned long X509_issuer_name_hash(X509 *a);
21391 
21392 int X509_subject_name_cmp(const X509 *a, const X509 *b);
21393 unsigned long X509_subject_name_hash(X509 *x);
21394 
21395 
21396 unsigned long X509_issuer_name_hash_old(X509 *a);
21397 unsigned long X509_subject_name_hash_old(X509 *x);
21398 
21399 
21400 int X509_cmp(const X509 *a, const X509 *b);
21401 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
21402 unsigned long X509_NAME_hash(X509_NAME *x);
21403 unsigned long X509_NAME_hash_old(X509_NAME *x);
21404 
21405 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
21406 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
21407 
21408 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
21409                      unsigned long cflag);
21410 int X509_print_fp(FILE *bp, X509 *x);
21411 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
21412 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
21413 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
21414                           unsigned long flags);
21415 
21416 
21417 
21418 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
21419 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
21420                        unsigned long flags);
21421 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
21422                   unsigned long cflag);
21423 int X509_print(BIO *bp, X509 *x);
21424 int X509_ocspid_print(BIO *bp, X509 *x);
21425 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
21426 int X509_CRL_print(BIO *bp, X509_CRL *x);
21427 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
21428                       unsigned long cflag);
21429 int X509_REQ_print(BIO *bp, X509_REQ *req);
21430 
21431 
21432 int X509_NAME_entry_count(X509_NAME *name);
21433 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
21434 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
21435                               char *buf, int len);
21436 
21437 /*
21438  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
21439  * lastpos, search after that position on.
21440  */
21441 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
21442 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
21443                                int lastpos);
21444 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
21445 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
21446 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
21447                         int loc, int set);
21448 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
21449                                unsigned char *bytes, int len, int loc,
21450                                int set);
21451 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
21452                                unsigned char *bytes, int len, int loc,
21453                                int set);
21454 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
21455                                                const char *field, int type,
21456                                                const unsigned char *bytes,
21457                                                int len);
21458 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
21459                                                int type, unsigned char *bytes,
21460                                                int len);
21461 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
21462                                const unsigned char *bytes, int len, int loc,
21463                                int set);
21464 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
21465                                                ASN1_OBJECT *obj, int type,
21466                                                const unsigned char *bytes,
21467                                                int len);
21468 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
21469 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
21470                              const unsigned char *bytes, int len);
21471 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
21472 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
21473 
21474 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
21475 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
21476                           int nid, int lastpos);
21477 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
21478                           ASN1_OBJECT *obj, int lastpos);
21479 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
21480                                int crit, int lastpos);
21481 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
21482 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
21483 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
21484                                          X509_EXTENSION *ex, int loc);
21485 
21486 int X509_get_ext_count(X509 *x);
21487 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
21488 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
21489 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
21490 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
21491 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
21492 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
21493 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
21494 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
21495                       unsigned long flags);
21496 
21497 int X509_CRL_get_ext_count(X509_CRL *x);
21498 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
21499 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
21500 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
21501 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
21502 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
21503 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
21504 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
21505 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
21506                           unsigned long flags);
21507 
21508 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
21509 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
21510 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
21511                                 int lastpos);
21512 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
21513 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
21514 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
21515 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
21516 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
21517 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
21518                               unsigned long flags);
21519 
21520 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
21521                                              int nid, int crit,
21522                                              ASN1_OCTET_STRING *data);
21523 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
21524                                              ASN1_OBJECT *obj, int crit,
21525                                              ASN1_OCTET_STRING *data);
21526 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
21527 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
21528 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
21529 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
21530 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
21531 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
21532 
21533 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
21534 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
21535                            int lastpos);
21536 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
21537                            ASN1_OBJECT *obj, int lastpos);
21538 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
21539 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
21540 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
21541                                            X509_ATTRIBUTE *attr);
21542 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
21543                                                   **x, const ASN1_OBJECT *obj,
21544                                                   int type,
21545                                                   const unsigned char *bytes,
21546                                                   int len);
21547 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
21548                                                   **x, int nid, int type,
21549                                                   const unsigned char *bytes,
21550                                                   int len);
21551 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
21552                                                   **x, const char *attrname,
21553                                                   int type,
21554                                                   const unsigned char *bytes,
21555                                                   int len);
21556 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
21557                               int lastpos, int type);
21558 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
21559                                              int atrtype, const void *data,
21560                                              int len);
21561 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
21562                                              const ASN1_OBJECT *obj,
21563                                              int atrtype, const void *data,
21564                                              int len);
21565 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
21566                                              const char *atrname, int type,
21567                                              const unsigned char *bytes,
21568                                              int len);
21569 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
21570 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
21571                              const void *data, int len);
21572 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
21573                                void *data);
21574 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
21575 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
21576 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
21577 
21578 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
21579 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
21580 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
21581                              int lastpos);
21582 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
21583 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
21584 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
21585 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
21586                               const ASN1_OBJECT *obj, int type,
21587                               const unsigned char *bytes, int len);
21588 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
21589                               int nid, int type,
21590                               const unsigned char *bytes, int len);
21591 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
21592                               const char *attrname, int type,
21593                               const unsigned char *bytes, int len);
21594 
21595 int X509_verify_cert(X509_STORE_CTX *ctx);
21596 
21597 /* lookup a cert from a X509 STACK */
21598 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
21599                                      ASN1_INTEGER *serial);
21600 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
21601 
21602 PBEPARAM *PBEPARAM_new(void); void PBEPARAM_free(PBEPARAM *a); PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len); int i2d_PBEPARAM(PBEPARAM *a, unsigned char **out); extern const ASN1_ITEM PBEPARAM_it;
21603 PBE2PARAM *PBE2PARAM_new(void); void PBE2PARAM_free(PBE2PARAM *a); PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len); int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **out); extern const ASN1_ITEM PBE2PARAM_it;
21604 PBKDF2PARAM *PBKDF2PARAM_new(void); void PBKDF2PARAM_free(PBKDF2PARAM *a); PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len); int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out); extern const ASN1_ITEM PBKDF2PARAM_it;
21605 
21606 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
21607                          const unsigned char *salt, int saltlen);
21608 
21609 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
21610                           const unsigned char *salt, int saltlen);
21611 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
21612                            unsigned char *salt, int saltlen);
21613 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
21614                               unsigned char *salt, int saltlen,
21615                               unsigned char *aiv, int prf_nid);
21616 
21617 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
21618                              int prf_nid, int keylen);
21619 
21620 /* PKCS#8 utilities */
21621 
21622 PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void); void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *a); PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, const unsigned char **in, long len); int i2d_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO *a, unsigned char **out); extern const ASN1_ITEM PKCS8_PRIV_KEY_INFO_it;
21623 
21624 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
21625 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
21626 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
21627 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
21628 
21629 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
21630                     int version, int ptype, void *pval,
21631                     unsigned char *penc, int penclen);
21632 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
21633                     const unsigned char **pk, int *ppklen,
21634                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
21635 
21636 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
21637                            int ptype, void *pval,
21638                            unsigned char *penc, int penclen);
21639 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
21640                            const unsigned char **pk, int *ppklen,
21641                            X509_ALGOR **pa, X509_PUBKEY *pub);
21642 
21643 int X509_check_trust(X509 *x, int id, int flags);
21644 int X509_TRUST_get_count(void);
21645 X509_TRUST *X509_TRUST_get0(int idx);
21646 int X509_TRUST_get_by_id(int id);
21647 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
21648                    char *name, int arg1, void *arg2);
21649 void X509_TRUST_cleanup(void);
21650 int X509_TRUST_get_flags(X509_TRUST *xp);
21651 char *X509_TRUST_get0_name(X509_TRUST *xp);
21652 int X509_TRUST_get_trust(X509_TRUST *xp);
21653 
21654 /* BEGIN ERROR CODES */
21655 /*
21656  * The following lines are auto generated by the script mkerr.pl. Any changes
21657  * made after this point may be overwritten when the script is next run.
21658  */
21659 
21660 void ERR_load_X509_strings(void);
21661 
21662 /* Error codes for the X509 functions. */
21663 
21664 /* Function codes. */
21665 # 1291 "/usr/include/openssl/x509.h" 3 4
21666 /* Reason codes. */
21667 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
21668 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
21669 /*
21670  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21671  *
21672  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21673  * Use is subject to license terms.
21674  */
21675 
21676 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
21677 /*	  All Rights Reserved  	*/
21678 
21679 /*
21680  * BIND 4.9.3:
21681  *
21682  * Copyright (c) 1980, 1983, 1988, 1993
21683  *	The Regents of the University of California.  All rights reserved.
21684  *
21685  * Redistribution and use in source and binary forms, with or without
21686  * modification, are permitted provided that the following conditions
21687  * are met:
21688  * 1. Redistributions of source code must retain the above copyright
21689  *    notice, this list of conditions and the following disclaimer.
21690  * 2. Redistributions in binary form must reproduce the above copyright
21691  *    notice, this list of conditions and the following disclaimer in the
21692  *    documentation and/or other materials provided with the distribution.
21693  * 3. All advertising materials mentioning features or use of this software
21694  *    must display the following acknowledgement:
21695  *	This product includes software developed by the University of
21696  *	California, Berkeley and its contributors.
21697  * 4. Neither the name of the University nor the names of its contributors
21698  *    may be used to endorse or promote products derived from this software
21699  *    without specific prior written permission.
21700  *
21701  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21702  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21703  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21704  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21705  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21706  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21707  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21708  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21709  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21710  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21711  * SUCH DAMAGE.
21712  * -
21713  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
21714  *
21715  * Permission to use, copy, modify, and distribute this software for any
21716  * purpose with or without fee is hereby granted, provided that the above
21717  * copyright notice and this permission notice appear in all copies, and that
21718  * the name of Digital Equipment Corporation not be used in advertising or
21719  * publicity pertaining to distribution of the document or software without
21720  * specific, written prior permission.
21721  *
21722  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
21723  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
21724  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
21725  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
21726  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
21727  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
21728  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21729  * SOFTWARE.
21730  * --Copyright--
21731  *
21732  * End BIND 4.9.3
21733  */
21734 
21735 /*
21736  * Structures returned by network data base library.
21737  * All addresses are supplied in host order, and
21738  * returned in network order (suitable for use in system calls).
21739  */
21740 
21741 
21742 
21743 
21744 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21745 /*
21746  * CDDL HEADER START
21747  *
21748  * The contents of this file are subject to the terms of the
21749  * Common Development and Distribution License (the "License").
21750  * You may not use this file except in compliance with the License.
21751  *
21752  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21753  * or http://www.opensolaris.org/os/licensing.
21754  * See the License for the specific language governing permissions
21755  * and limitations under the License.
21756  *
21757  * When distributing Covered Code, include this CDDL HEADER in each
21758  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21759  * If applicable, add the following below this CDDL HEADER, with the
21760  * fields enclosed by brackets "[]" replaced with your own identifying
21761  * information: Portions Copyright [yyyy] [name of copyright owner]
21762  *
21763  * CDDL HEADER END
21764  */
21765 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21766 /*	  All Rights Reserved  	*/
21767 
21768 
21769 /*
21770  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21771  * Use is subject to license terms.
21772  *
21773  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21774  * Copyright 2016 Joyent, Inc.
21775  */
21776 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
21777 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
21778 /*
21779  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21780  * Use is subject to license terms.
21781  *
21782  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
21783  */
21784 /*
21785  * Copyright (c) 1982, 1986 Regents of the University of California.
21786  * All rights reserved.
21787  *
21788  * Redistribution and use in source and binary forms are permitted
21789  * provided that this notice is preserved and that due credit is given
21790  * to the University of California at Berkeley. The name of the University
21791  * may not be used to endorse or promote products derived from this
21792  * software without specific prior written permission. This software
21793  * is provided ``as is'' without express or implied warranty.
21794  */
21795 
21796 /*
21797  * Constants and structures defined by the internet system,
21798  * according to following documents
21799  *
21800  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
21801  *	http://www.iana.org/assignments/protocol-numbers
21802  *	http://www.iana.org/assignments/port-numbers
21803  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
21804  *
21805  */
21806 
21807 
21808 
21809 
21810 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
21811 /*
21812  * CDDL HEADER START
21813  *
21814  * The contents of this file are subject to the terms of the
21815  * Common Development and Distribution License (the "License").
21816  * You may not use this file except in compliance with the License.
21817  *
21818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21819  * or http://www.opensolaris.org/os/licensing.
21820  * See the License for the specific language governing permissions
21821  * and limitations under the License.
21822  *
21823  * When distributing Covered Code, include this CDDL HEADER in each
21824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21825  * If applicable, add the following below this CDDL HEADER, with the
21826  * fields enclosed by brackets "[]" replaced with your own identifying
21827  * information: Portions Copyright [yyyy] [name of copyright owner]
21828  *
21829  * CDDL HEADER END
21830  */
21831 
21832 /*
21833  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
21834  * Copyright 2016 Joyent, Inc.
21835  *
21836  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
21837  * Use is subject to license terms.
21838  */
21839 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
21840 
21841 
21842 
21843 
21844 
21845 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21846 /*
21847  * CDDL HEADER START
21848  *
21849  * The contents of this file are subject to the terms of the
21850  * Common Development and Distribution License (the "License").
21851  * You may not use this file except in compliance with the License.
21852  *
21853  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21854  * or http://www.opensolaris.org/os/licensing.
21855  * See the License for the specific language governing permissions
21856  * and limitations under the License.
21857  *
21858  * When distributing Covered Code, include this CDDL HEADER in each
21859  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21860  * If applicable, add the following below this CDDL HEADER, with the
21861  * fields enclosed by brackets "[]" replaced with your own identifying
21862  * information: Portions Copyright [yyyy] [name of copyright owner]
21863  *
21864  * CDDL HEADER END
21865  */
21866 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21867 /*	  All Rights Reserved  	*/
21868 
21869 
21870 /*
21871  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21872  * Use is subject to license terms.
21873  *
21874  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21875  * Copyright 2016 Joyent, Inc.
21876  */
21877 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
21878 
21879 
21880 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
21881 /*
21882  * CDDL HEADER START
21883  *
21884  * The contents of this file are subject to the terms of the
21885  * Common Development and Distribution License (the "License").
21886  * You may not use this file except in compliance with the License.
21887  *
21888  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21889  * or http://www.opensolaris.org/os/licensing.
21890  * See the License for the specific language governing permissions
21891  * and limitations under the License.
21892  *
21893  * When distributing Covered Code, include this CDDL HEADER in each
21894  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21895  * If applicable, add the following below this CDDL HEADER, with the
21896  * fields enclosed by brackets "[]" replaced with your own identifying
21897  * information: Portions Copyright [yyyy] [name of copyright owner]
21898  *
21899  * CDDL HEADER END
21900  */
21901 /*
21902  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21903  * Use is subject to license terms.
21904  */
21905 
21906 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
21907 /*	  All Rights Reserved	*/
21908 
21909 /*
21910  * Portions of this source code were derived from Berkeley 4.3 BSD
21911  * under license from the Regents of the University of California.
21912  */
21913 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
21914 typedef uint16_t sa_family_t;
21915 
21916 
21917 /*
21918  * Structure used by kernel to store most
21919  * addresses.
21920  */
21921 struct sockaddr {
21922  sa_family_t sa_family; /* address family */
21923  char sa_data[14]; /* up to 14 bytes of direct address */
21924 };
21925 
21926 
21927 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
21928 /*
21929  * CDDL HEADER START
21930  *
21931  * The contents of this file are subject to the terms of the
21932  * Common Development and Distribution License (the "License").
21933  * You may not use this file except in compliance with the License.
21934  *
21935  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21936  * or http://www.opensolaris.org/os/licensing.
21937  * See the License for the specific language governing permissions
21938  * and limitations under the License.
21939  *
21940  * When distributing Covered Code, include this CDDL HEADER in each
21941  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21942  * If applicable, add the following below this CDDL HEADER, with the
21943  * fields enclosed by brackets "[]" replaced with your own identifying
21944  * information: Portions Copyright [yyyy] [name of copyright owner]
21945  *
21946  * CDDL HEADER END
21947  */
21948 /*
21949  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
21950  */
21951 
21952 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
21953 /*	  All Rights Reserved  	*/
21954 
21955 /*
21956  * University Copyright- Copyright (c) 1982, 1986, 1988
21957  * The Regents of the University of California
21958  * All Rights Reserved
21959  *
21960  * University Acknowledgment- Portions of this document are derived from
21961  * software developed by the University of California, Berkeley, and its
21962  * contributors.
21963  */
21964 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
21965 /*
21966  * Definitions for UNIX IPC domain.
21967  */
21968 struct sockaddr_un {
21969  sa_family_t sun_family; /* AF_UNIX */
21970  char sun_path[108]; /* path name (gag) */
21971 };
21972 
21973 
21974 
21975 /*
21976  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
21977  * change.
21978  *
21979  * Also, include a strlen() prototype, and we have to protect it w.r.t.
21980  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
21981  */
21982 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
21983 extern size_t strlen(const char *);
21984 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
21985 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
21986 /*
21987  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
21988  * Use is subject to license terms.
21989  */
21990 /*
21991  * Copyright (c) 1990, 1993
21992  *	The Regents of the University of California.  All rights reserved.
21993  *
21994  * Redistribution and use in source and binary forms, with or without
21995  * modification, are permitted provided that the following conditions
21996  * are met:
21997  * 1. Redistributions of source code must retain the above copyright
21998  *    notice, this list of conditions and the following disclaimer.
21999  * 2. Redistributions in binary form must reproduce the above copyright
22000  *    notice, this list of conditions and the following disclaimer in the
22001  *    documentation and/or other materials provided with the distribution.
22002  * 3. All advertising materials mentioning features or use of this software
22003  *    must display the following acknowledgement:
22004  *	This product includes software developed by the University of
22005  *	California, Berkeley and its contributors.
22006  * 4. Neither the name of the University nor the names of its contributors
22007  *    may be used to endorse or promote products derived from this software
22008  *    without specific prior written permission.
22009  *
22010  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22011  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22012  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22013  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22014  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22015  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22016  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22017  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22018  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22019  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22020  * SUCH DAMAGE.
22021  */
22022 
22023 
22024 
22025 
22026 #pragma ident "%Z%%M%	%I%	%E% SMI"
22027 /* from UCB 8.1 (Berkeley) 6/10/93 */
22028 
22029 
22030 
22031 
22032 
22033 /*
22034  * A Link-Level Sockaddr may specify the interface in one of two
22035  * ways: either by means of a system-provided index number (computed
22036  * anew and possibly differently on every reboot), or by a human-readable
22037  * string such as "il0" (for managerial convenience).
22038  *
22039  * Census taking actions, such as something akin to SIOCGCONF would return
22040  * both the index and the human name.
22041  *
22042  * High volume transactions (such as giving a link-level ``from'' address
22043  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
22044  * form, (which requires fewer copy operations and less space).
22045  *
22046  * The form and interpretation  of the link-level address is purely a matter
22047  * of convention between the device driver and its consumers; however, it is
22048  * expected that all drivers for an interface of a given if_type will agree.
22049  */
22050 
22051 /*
22052  * Structure of a Link-Level sockaddr:
22053  */
22054 struct sockaddr_dl {
22055  ushort_t sdl_family; /* AF_LINK */
22056  ushort_t sdl_index; /* if != 0, system given index for interface */
22057  uchar_t sdl_type; /* interface type */
22058  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
22059  uchar_t sdl_alen; /* link level address length */
22060  uchar_t sdl_slen; /* link layer selector length */
22061  char sdl_data[244]; /* contains both if name and ll address */
22062 };
22063 
22064 
22065 
22066 
22067 extern char *_link_ntoa(const unsigned char *, char *, int, int);
22068 extern unsigned char *_link_aton(const char *, int *);
22069 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
22070 
22071 
22072 
22073 /*
22074  * sockaddr_storage:
22075  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
22076  * structures. Has sufficient size and alignment for those sockaddrs.
22077  */
22078 
22079 /*
22080  * Desired maximum size, alignment size and related types.
22081  */
22082 
22083 
22084 /*
22085  * To represent desired sockaddr max alignment for platform, a
22086  * type is chosen which may depend on implementation platform architecture.
22087  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
22088  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
22089  * on platforms where it is possible to do so. (e.g not possible on ia32).
22090  * For all currently supported platforms by our implementation
22091  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
22092  * type "double" is suitable for that intent.
22093  *
22094  * Note: Type "double" is chosen over the more obvious integer type int64_t.
22095  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
22096  */
22097 typedef double sockaddr_maxalign_t;
22098 
22099 
22100 
22101 /*
22102  * Definitions used for sockaddr_storage structure paddings design.
22103  */
22104 
22105 
22106 
22107 
22108 struct sockaddr_storage {
22109  sa_family_t ss_family; /* Address family */
22110  /* Following fields are implementation specific */
22111  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
22112  sockaddr_maxalign_t _ss_align;
22113  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
22114 };
22115 
22116 
22117 /*
22118  * To be compatible with the Linux interfaces used, this structure is
22119  * placed in socket_impl.h so that an include for <sys/socket.h> will
22120  * pickup this structure. This structure is for use with PF_PACKET
22121  * sockets.
22122  */
22123 struct sockaddr_ll {
22124  uint16_t sll_family;
22125  uint16_t sll_protocol;
22126  int32_t sll_ifindex;
22127  uint16_t sll_hatype;
22128  uint8_t sll_pkttype;
22129  uint8_t sll_halen;
22130  uint8_t sll_addr[8];
22131 };
22132 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22133 
22134 
22135 
22136 
22137 
22138 /*
22139  * The socklen definitions are reproduced here from sys/socket.h so as to
22140  * not introduce that namespace into existing users of netinet/in.h.
22141  */
22142 
22143 
22144 
22145 typedef uint32_t socklen_t;
22146 
22147 
22148 
22149 
22150 
22151 typedef void *Psocklen_t;
22152 
22153 
22154 
22155 
22156 
22157 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
22158 /*
22159  * CDDL HEADER START
22160  *
22161  * The contents of this file are subject to the terms of the
22162  * Common Development and Distribution License (the "License").
22163  * You may not use this file except in compliance with the License.
22164  *
22165  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22166  * or http://www.opensolaris.org/os/licensing.
22167  * See the License for the specific language governing permissions
22168  * and limitations under the License.
22169  *
22170  * When distributing Covered Code, include this CDDL HEADER in each
22171  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22172  * If applicable, add the following below this CDDL HEADER, with the
22173  * fields enclosed by brackets "[]" replaced with your own identifying
22174  * information: Portions Copyright [yyyy] [name of copyright owner]
22175  *
22176  * CDDL HEADER END
22177  */
22178 /*
22179  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22180  * Use is subject to license terms.
22181  */
22182 
22183 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22184 /*	  All Rights Reserved  	*/
22185 
22186 
22187 
22188 
22189 
22190 /*
22191  * For source compatibility
22192  */
22193 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
22194 /*
22195  * CDDL HEADER START
22196  *
22197  * The contents of this file are subject to the terms of the
22198  * Common Development and Distribution License (the "License").
22199  * You may not use this file except in compliance with the License.
22200  *
22201  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22202  * or http://www.opensolaris.org/os/licensing.
22203  * See the License for the specific language governing permissions
22204  * and limitations under the License.
22205  *
22206  *
22207  * When distributing Covered Code, include this CDDL HEADER in each
22208  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22209  * If applicable, add the following below this CDDL HEADER, with the
22210  * fields enclosed by brackets "[]" replaced with your own identifying
22211  * information: Portions Copyright [yyyy] [name of copyright owner]
22212  *
22213  * CDDL HEADER END
22214  */
22215 
22216 /*
22217  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22218  * Use is subject to license terms.
22219  * Copyright 2016 Joyent, Inc.
22220  */
22221 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22222 
22223 
22224 
22225 
22226 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
22227 /*
22228  * CDDL HEADER START
22229  *
22230  * The contents of this file are subject to the terms of the
22231  * Common Development and Distribution License, Version 1.0 only
22232  * (the "License").  You may not use this file except in compliance
22233  * with the License.
22234  *
22235  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22236  * or http://www.opensolaris.org/os/licensing.
22237  * See the License for the specific language governing permissions
22238  * and limitations under the License.
22239  *
22240  * When distributing Covered Code, include this CDDL HEADER in each
22241  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22242  * If applicable, add the following below this CDDL HEADER, with the
22243  * fields enclosed by brackets "[]" replaced with your own identifying
22244  * information: Portions Copyright [yyyy] [name of copyright owner]
22245  *
22246  * CDDL HEADER END
22247  */
22248 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22249 /*	  All Rights Reserved  	*/
22250 
22251 
22252 /*
22253  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22254  *
22255  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
22256  * All rights reserved.
22257  */
22258 
22259 /*
22260  * Copyright 2015, Joyent, Inc.
22261  */
22262 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22263 /*
22264  * Structure of file descriptor/event pairs supplied in
22265  * the poll arrays.
22266  */
22267 typedef struct pollfd {
22268  int fd; /* file desc to poll */
22269  short events; /* events of interest on fd */
22270  short revents; /* events that occurred on fd */
22271 } pollfd_t;
22272 
22273 typedef unsigned long nfds_t;
22274 
22275 /*
22276  * Testable select events
22277  */
22278 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22279 /*
22280  * Non-testable poll events (may not be specified in events field,
22281  * but may be returned in revents field).
22282  */
22283 
22284 
22285 
22286 
22287 /*
22288  * These events will never be specified in revents, but may be specified in
22289  * events to control /dev/poll behavior.
22290  */
22291 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
22292 int poll(struct pollfd *, nfds_t, int);
22293 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22294 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
22295 /*
22296  * CDDL HEADER START
22297  *
22298  * The contents of this file are subject to the terms of the
22299  * Common Development and Distribution License, Version 1.0 only
22300  * (the "License").  You may not use this file except in compliance
22301  * with the License.
22302  *
22303  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22304  * or http://www.opensolaris.org/os/licensing.
22305  * See the License for the specific language governing permissions
22306  * and limitations under the License.
22307  *
22308  * When distributing Covered Code, include this CDDL HEADER in each
22309  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22310  * If applicable, add the following below this CDDL HEADER, with the
22311  * fields enclosed by brackets "[]" replaced with your own identifying
22312  * information: Portions Copyright [yyyy] [name of copyright owner]
22313  *
22314  * CDDL HEADER END
22315  */
22316 /*
22317  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
22318  * All rights reserved.
22319  */
22320 
22321 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22322 /*	  All Rights Reserved  	*/
22323 
22324 
22325 
22326 
22327 
22328 #pragma ident "%Z%%M%	%I%	%E% SMI"
22329 
22330 
22331 
22332 
22333 
22334 /*
22335  * This file contains all machine-dependent declarations
22336  * in STREAMS.
22337  */
22338 
22339 /*
22340  * Copy data from one data buffer to another.
22341  * The addresses must be word aligned - if not, use bcopy!
22342  */
22343 
22344 
22345 /*
22346  * save the address of the calling function on the 3b2 to
22347  * enable tracking of who is allocating message blocks
22348  */
22349 
22350 
22351 /*
22352  * macro to check pointer alignment
22353  * (true if alignment is sufficient for worst case)
22354  */
22355 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22356 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
22357 /*
22358  * CDDL HEADER START
22359  *
22360  * The contents of this file are subject to the terms of the
22361  * Common Development and Distribution License (the "License").
22362  * You may not use this file except in compliance with the License.
22363  *
22364  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22365  * or http://www.opensolaris.org/os/licensing.
22366  * See the License for the specific language governing permissions
22367  * and limitations under the License.
22368  *
22369  * When distributing Covered Code, include this CDDL HEADER in each
22370  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22371  * If applicable, add the following below this CDDL HEADER, with the
22372  * fields enclosed by brackets "[]" replaced with your own identifying
22373  * information: Portions Copyright [yyyy] [name of copyright owner]
22374  *
22375  * CDDL HEADER END
22376  */
22377 /*
22378  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22379  * Use is subject to license terms.
22380  */
22381 
22382 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22383 /*	  All Rights Reserved  	*/
22384 
22385 /*
22386  * Portions of this source code were derived from Berkeley 4.3 BSD
22387  * under license from the Regents of the University of California.
22388  */
22389 
22390 
22391 
22392 
22393 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22394 /*
22395  * CDDL HEADER START
22396  *
22397  * The contents of this file are subject to the terms of the
22398  * Common Development and Distribution License (the "License").
22399  * You may not use this file except in compliance with the License.
22400  *
22401  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22402  * or http://www.opensolaris.org/os/licensing.
22403  * See the License for the specific language governing permissions
22404  * and limitations under the License.
22405  *
22406  * When distributing Covered Code, include this CDDL HEADER in each
22407  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22408  * If applicable, add the following below this CDDL HEADER, with the
22409  * fields enclosed by brackets "[]" replaced with your own identifying
22410  * information: Portions Copyright [yyyy] [name of copyright owner]
22411  *
22412  * CDDL HEADER END
22413  */
22414 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22415 /*	  All Rights Reserved  	*/
22416 
22417 
22418 /*
22419  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22420  * Use is subject to license terms.
22421  *
22422  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22423  * Copyright 2016 Joyent, Inc.
22424  */
22425 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
22426 
22427 
22428 
22429 
22430 
22431 /*
22432  * The credential is an opaque kernel private data structure defined in
22433  * <sys/cred_impl.h>.
22434  */
22435 
22436 typedef struct cred cred_t;
22437 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
22438 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
22439 /*
22440  * CDDL HEADER START
22441  *
22442  * The contents of this file are subject to the terms of the
22443  * Common Development and Distribution License, Version 1.0 only
22444  * (the "License").  You may not use this file except in compliance
22445  * with the License.
22446  *
22447  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22448  * or http://www.opensolaris.org/os/licensing.
22449  * See the License for the specific language governing permissions
22450  * and limitations under the License.
22451  *
22452  * When distributing Covered Code, include this CDDL HEADER in each
22453  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22454  * If applicable, add the following below this CDDL HEADER, with the
22455  * fields enclosed by brackets "[]" replaced with your own identifying
22456  * information: Portions Copyright [yyyy] [name of copyright owner]
22457  *
22458  * CDDL HEADER END
22459  */
22460 /*
22461  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
22462  * All rights reserved.
22463  */
22464 
22465 /*
22466  * t_lock.h:	Prototypes for disp_locks, plus include files
22467  *		that describe the interfaces to kernel synch.
22468  *		objects.
22469  */
22470 
22471 
22472 
22473 
22474 #pragma ident "%Z%%M%	%I%	%E% SMI"
22475 
22476 
22477 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
22478 /*
22479  * CDDL HEADER START
22480  *
22481  * The contents of this file are subject to the terms of the
22482  * Common Development and Distribution License (the "License").
22483  * You may not use this file except in compliance with the License.
22484  *
22485  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22486  * or http://www.opensolaris.org/os/licensing.
22487  * See the License for the specific language governing permissions
22488  * and limitations under the License.
22489  *
22490  * When distributing Covered Code, include this CDDL HEADER in each
22491  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22492  * If applicable, add the following below this CDDL HEADER, with the
22493  * fields enclosed by brackets "[]" replaced with your own identifying
22494  * information: Portions Copyright [yyyy] [name of copyright owner]
22495  *
22496  * CDDL HEADER END
22497  */
22498 /*
22499  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
22500  * Use is subject to license terms.
22501  * Copyright 2016 Joyent, Inc.
22502  */
22503 
22504 
22505 
22506 
22507 #pragma ident "%Z%%M%	%I%	%E% SMI"
22508 
22509 
22510 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22511 /*
22512  * CDDL HEADER START
22513  *
22514  * The contents of this file are subject to the terms of the
22515  * Common Development and Distribution License (the "License").
22516  * You may not use this file except in compliance with the License.
22517  *
22518  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22519  * or http://www.opensolaris.org/os/licensing.
22520  * See the License for the specific language governing permissions
22521  * and limitations under the License.
22522  *
22523  * When distributing Covered Code, include this CDDL HEADER in each
22524  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22525  * If applicable, add the following below this CDDL HEADER, with the
22526  * fields enclosed by brackets "[]" replaced with your own identifying
22527  * information: Portions Copyright [yyyy] [name of copyright owner]
22528  *
22529  * CDDL HEADER END
22530  */
22531 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22532 /*	  All Rights Reserved  	*/
22533 
22534 
22535 /*
22536  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22537  * Use is subject to license terms.
22538  *
22539  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22540  * Copyright 2016 Joyent, Inc.
22541  */
22542 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
22543 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
22544 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22545 /*	  All Rights Reserved  	*/
22546 
22547 
22548 /*
22549  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
22550  * All rights reserved.  The Berkeley software License Agreement
22551  * specifies the terms and conditions for redistribution.
22552  */
22553 
22554 /*
22555  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22556  *
22557  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22558  * Use is subject to license terms.
22559  *
22560  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22561  */
22562 
22563 /*
22564  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
22565  */
22566 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
22567 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
22568 typedef lock_t disp_lock_t; /* dispatcher lock type */
22569 
22570 /*
22571  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
22572  * an adaptive mutex, depending on what interrupt levels use it.
22573  */
22574 
22575 
22576 /*
22577  * Macro to control loops which spin on a lock and then check state
22578  * periodically.  Its passed an integer, and returns a boolean value
22579  * that if true indicates its a good time to get the scheduler lock and
22580  * check the state of the current owner of the lock.
22581  */
22582 
22583 
22584 /*
22585  * Externs for CLOCK_LOCK and clock resolution
22586  */
22587 extern volatile uint32_t hres_lock;
22588 extern hrtime_t hrtime_base;
22589 extern int clock_res;
22590 
22591 
22592 
22593 /*
22594  * The definitions of the symbolic interrupt levels:
22595  *
22596  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
22597  *
22598  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
22599  *                   highest level at which one may acquire adaptive locks)
22600  *                   Also the highest level at which one may be preempted.
22601  *
22602  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
22603  *                   operations.
22604  *
22605  * The constraints on the platform:
22606  *
22607  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
22608  *  - LOCK_LEVEL must be less than DISP_LEVEL
22609  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
22610  *
22611  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
22612  * changing this relationship is probably possible but not advised.
22613  *
22614  */
22615 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
22616 /*
22617  * The following mask is for the cpu_intr_actv bits corresponding to
22618  * high-level PILs. It should equal:
22619  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
22620  */
22621 
22622 
22623 /*
22624  * The semaphore code depends on being able to represent a lock plus
22625  * owner in a single 32-bit word.  (Mutexes used to have a similar
22626  * dependency, but no longer.)  Thus the owner must contain at most
22627  * 24 significant bits.  At present only threads and semaphores
22628  * must be aware of this vile constraint.  Different ISAs may handle this
22629  * differently depending on their capabilities (e.g. compare-and-swap)
22630  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
22631  */
22632 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
22633 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
22634 /*
22635  * CDDL HEADER START
22636  *
22637  * The contents of this file are subject to the terms of the
22638  * Common Development and Distribution License (the "License").
22639  * You may not use this file except in compliance with the License.
22640  *
22641  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22642  * or http://www.opensolaris.org/os/licensing.
22643  * See the License for the specific language governing permissions
22644  * and limitations under the License.
22645  *
22646  * When distributing Covered Code, include this CDDL HEADER in each
22647  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22648  * If applicable, add the following below this CDDL HEADER, with the
22649  * fields enclosed by brackets "[]" replaced with your own identifying
22650  * information: Portions Copyright [yyyy] [name of copyright owner]
22651  *
22652  * CDDL HEADER END
22653  */
22654 
22655 /*
22656  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
22657  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
22658  */
22659 
22660 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22661 /*	  All Rights Reserved  	*/
22662 
22663 /*
22664  * University Copyright- Copyright (c) 1982, 1986, 1988
22665  * The Regents of the University of California
22666  * All Rights Reserved
22667  *
22668  * University Acknowledgment- Portions of this document are derived from
22669  * software developed by the University of California, Berkeley, and its
22670  * contributors.
22671  */
22672 
22673 
22674 
22675 
22676 
22677 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22678 /*
22679  * CDDL HEADER START
22680  *
22681  * The contents of this file are subject to the terms of the
22682  * Common Development and Distribution License (the "License").
22683  * You may not use this file except in compliance with the License.
22684  *
22685  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22686  * or http://www.opensolaris.org/os/licensing.
22687  * See the License for the specific language governing permissions
22688  * and limitations under the License.
22689  *
22690  * When distributing Covered Code, include this CDDL HEADER in each
22691  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22692  * If applicable, add the following below this CDDL HEADER, with the
22693  * fields enclosed by brackets "[]" replaced with your own identifying
22694  * information: Portions Copyright [yyyy] [name of copyright owner]
22695  *
22696  * CDDL HEADER END
22697  */
22698 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22699 /*	  All Rights Reserved  	*/
22700 
22701 
22702 /*
22703  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22704  * Use is subject to license terms.
22705  *
22706  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22707  * Copyright 2016 Joyent, Inc.
22708  */
22709 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
22710 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
22711 /*
22712  * CDDL HEADER START
22713  *
22714  * The contents of this file are subject to the terms of the
22715  * Common Development and Distribution License (the "License").
22716  * You may not use this file except in compliance with the License.
22717  *
22718  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22719  * or http://www.opensolaris.org/os/licensing.
22720  * See the License for the specific language governing permissions
22721  * and limitations under the License.
22722  *
22723  *
22724  * When distributing Covered Code, include this CDDL HEADER in each
22725  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22726  * If applicable, add the following below this CDDL HEADER, with the
22727  * fields enclosed by brackets "[]" replaced with your own identifying
22728  * information: Portions Copyright [yyyy] [name of copyright owner]
22729  *
22730  * CDDL HEADER END
22731  */
22732 
22733 /*
22734  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22735  * Use is subject to license terms.
22736  * Copyright 2016 Joyent, Inc.
22737  */
22738 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
22739 
22740 
22741 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
22742 /*
22743  * This file and its contents are supplied under the terms of the
22744  * Common Development and Distribution License ("CDDL"), version 1.0.
22745  * You may only use this file in accordance with the terms of version
22746  * 1.0 of the CDDL.
22747  *
22748  * A full copy of the text of the CDDL should have accompanied this
22749  * source.  A copy of the CDDL is also available via the Internet at
22750  * http://www.illumos.org/license/CDDL.
22751  */
22752 
22753 /*
22754  * Copyright 2014-2016 PALO, Richard.
22755  */
22756 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
22757 
22758 
22759 
22760 
22761 
22762 /*
22763  * Fundamental variables; don't change too often.
22764  */
22765 
22766 /*
22767  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
22768  * an early merge with AT&T source.  It has also historically been defined
22769  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
22770  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
22771  * Subsequent versions of the IEEE Standard as well as the X/Open
22772  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
22773  * while still allowing for it's existence in other headers.  With the
22774  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
22775  */
22776 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22777     /* compatibility purposes only	*/
22778     /* and will be removed in a	*/
22779     /* later release		*/
22780 
22781 /*
22782  * These define the maximum and minimum allowable values of the
22783  * configurable parameter NGROUPS_MAX.
22784  */
22785 
22786 
22787 
22788 
22789 /*
22790  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
22791  */
22792 
22793 
22794 /*
22795  * Default process priority.  Keep it in sync with limits.h.
22796  */
22797 
22798 
22799 /*
22800  * Fundamental constants of the implementation--cannot be changed easily.
22801  */
22802 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22803 /* REMOTE -- whether machine is primary, secondary, or regular */
22804 
22805 
22806 
22807 /*
22808  * MAXPATHLEN defines the longest permissible path length,
22809  * including the terminating null, after expanding symbolic links.
22810  * TYPICALMAXPATHLEN is used in a few places as an optimization
22811  * with a local buffer on the stack to avoid kmem_alloc().
22812  * MAXSYMLINKS defines the maximum number of symbolic links
22813  * that may be expanded in a path name. It should be set high
22814  * enough to allow all legitimate uses, but halt infinite loops
22815  * reasonably quickly.
22816  * MAXNAMELEN is the length (including the terminating null) of
22817  * the longest permissible file (component) name.
22818  */
22819 
22820 
22821 
22822 
22823 
22824 /*
22825  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
22826  * including the terminating NUL.  Note that this must not be larger
22827  * than related networking constants such as LIFNAMSIZ.
22828  */
22829 
22830 
22831 
22832 
22833 
22834 
22835 /*
22836  * The following are defined to be the same as
22837  * defined in /usr/include/limits.h.  They are
22838  * needed for pipe and FIFO compatibility.
22839  */
22840 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22841 /* macros replacing interleaving functions */
22842 
22843 
22844 
22845 /*
22846  * File system parameters and macros.
22847  *
22848  * The file system is made out of blocks of at most MAXBSIZE units,
22849  * with smaller units (fragments) only in the last direct block.
22850  * MAXBSIZE primarily determines the size of buffers in the buffer
22851  * pool. It may be made larger without any effect on existing
22852  * file systems; however making it smaller make make some file
22853  * systems unmountable.
22854  *
22855  * Note that the blocked devices are assumed to have DEV_BSIZE
22856  * "sectors" and that fragments must be some multiple of this size.
22857  */
22858 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22859 /*	64 bit versions of btodb and dbtob */
22860 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22861 /*
22862  * Size of arg list passed in by user.
22863  */
22864 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22865 /*
22866  * Scale factor for scaled integers used to count
22867  * %cpu time and load averages.
22868  */
22869 
22870 
22871 
22872 /*
22873  * Delay units are in microseconds.
22874  *
22875  * XXX	These macros are not part of the DDI!
22876  */
22877 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22878 /*
22879  * The following is to free utilities from machine dependencies within
22880  * an architecture. Must be included after definition of DEV_BSIZE.
22881  */
22882 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
22883 /*
22884  * The following are assorted machine dependent values which can be
22885  * obtained in a machine independent manner through sysconf(2) or
22886  * sysinfo(2). In order to guarantee that these provide the expected
22887  * value at all times, the System Private interface (leading underscore)
22888  * is used.
22889  */
22890 
22891 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
22892 /*
22893  * CDDL HEADER START
22894  *
22895  * The contents of this file are subject to the terms of the
22896  * Common Development and Distribution License (the "License").
22897  * You may not use this file except in compliance with the License.
22898  *
22899  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22900  * or http://www.opensolaris.org/os/licensing.
22901  * See the License for the specific language governing permissions
22902  * and limitations under the License.
22903  *
22904  * When distributing Covered Code, include this CDDL HEADER in each
22905  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22906  * If applicable, add the following below this CDDL HEADER, with the
22907  * fields enclosed by brackets "[]" replaced with your own identifying
22908  * information: Portions Copyright [yyyy] [name of copyright owner]
22909  *
22910  * CDDL HEADER END
22911  */
22912 
22913 /*
22914  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
22915  *	  All Rights Reserved
22916  *
22917  */
22918 
22919 /*
22920  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22921  * Use is subject to license terms.
22922  */
22923 
22924 /*
22925  * WARNING: This is an implementation-specific header,
22926  * its contents are not guaranteed. Applications
22927  * should include <unistd.h> and not this header.
22928  */
22929 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
22930 
22931 
22932 
22933 
22934 
22935 
22936 extern long _sysconf(int); /* System Private interface to sysconf() */
22937 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
22938 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
22939 /*
22940  * CDDL HEADER START
22941  *
22942  * The contents of this file are subject to the terms of the
22943  * Common Development and Distribution License (the "License").
22944  * You may not use this file except in compliance with the License.
22945  *
22946  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22947  * or http://www.opensolaris.org/os/licensing.
22948  * See the License for the specific language governing permissions
22949  * and limitations under the License.
22950  *
22951  * When distributing Covered Code, include this CDDL HEADER in each
22952  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22953  * If applicable, add the following below this CDDL HEADER, with the
22954  * fields enclosed by brackets "[]" replaced with your own identifying
22955  * information: Portions Copyright [yyyy] [name of copyright owner]
22956  *
22957  * CDDL HEADER END
22958  */
22959 /*
22960  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
22961  */
22962 
22963 
22964 
22965 
22966 
22967 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
22968 /*
22969  * CDDL HEADER START
22970  *
22971  * The contents of this file are subject to the terms of the
22972  * Common Development and Distribution License (the "License").
22973  * You may not use this file except in compliance with the License.
22974  *
22975  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22976  * or http://www.opensolaris.org/os/licensing.
22977  * See the License for the specific language governing permissions
22978  * and limitations under the License.
22979  *
22980  * When distributing Covered Code, include this CDDL HEADER in each
22981  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22982  * If applicable, add the following below this CDDL HEADER, with the
22983  * fields enclosed by brackets "[]" replaced with your own identifying
22984  * information: Portions Copyright [yyyy] [name of copyright owner]
22985  *
22986  * CDDL HEADER END
22987  */
22988 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
22989 /*	  All Rights Reserved  	*/
22990 
22991 
22992 /*
22993  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22994  * Use is subject to license terms.
22995  *
22996  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
22997  * Copyright 2016 Joyent, Inc.
22998  */
22999 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
23000 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
23001 /*
23002  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
23003  *
23004  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
23005  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
23006  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
23007  * cookie argument to mutex_init() encodes the interrupt level to block.
23008  * The iblock cookie must be NULL for adaptive locks.
23009  *
23010  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
23011  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
23012  *
23013  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
23014  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
23015  *
23016  * Mutex statistics can be gathered on the fly, without rebooting or
23017  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
23018  */
23019 typedef enum {
23020  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
23021  MUTEX_SPIN = 1, /* block interrupts and spin */
23022  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
23023  MUTEX_DEFAULT = 6 /* kernel default mutex */
23024 } kmutex_type_t;
23025 
23026 typedef struct mutex {
23027 
23028 
23029 
23030  void *_opaque[2];
23031 
23032 } kmutex_t;
23033 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23034 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
23035 /*
23036  * CDDL HEADER START
23037  *
23038  * The contents of this file are subject to the terms of the
23039  * Common Development and Distribution License (the "License").
23040  * You may not use this file except in compliance with the License.
23041  *
23042  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23043  * or http://www.opensolaris.org/os/licensing.
23044  * See the License for the specific language governing permissions
23045  * and limitations under the License.
23046  *
23047  * When distributing Covered Code, include this CDDL HEADER in each
23048  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23049  * If applicable, add the following below this CDDL HEADER, with the
23050  * fields enclosed by brackets "[]" replaced with your own identifying
23051  * information: Portions Copyright [yyyy] [name of copyright owner]
23052  *
23053  * CDDL HEADER END
23054  */
23055 /*
23056  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23057  * Use is subject to license terms.
23058  */
23059 
23060 /*
23061  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
23062  */
23063 
23064 
23065 
23066 
23067 /*
23068  * Public interface to readers/writer locks.  See rwlock(9F) for details.
23069  */
23070 
23071 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23072 /*
23073  * CDDL HEADER START
23074  *
23075  * The contents of this file are subject to the terms of the
23076  * Common Development and Distribution License (the "License").
23077  * You may not use this file except in compliance with the License.
23078  *
23079  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23080  * or http://www.opensolaris.org/os/licensing.
23081  * See the License for the specific language governing permissions
23082  * and limitations under the License.
23083  *
23084  * When distributing Covered Code, include this CDDL HEADER in each
23085  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23086  * If applicable, add the following below this CDDL HEADER, with the
23087  * fields enclosed by brackets "[]" replaced with your own identifying
23088  * information: Portions Copyright [yyyy] [name of copyright owner]
23089  *
23090  * CDDL HEADER END
23091  */
23092 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23093 /*	  All Rights Reserved  	*/
23094 
23095 
23096 /*
23097  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23098  * Use is subject to license terms.
23099  *
23100  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23101  * Copyright 2016 Joyent, Inc.
23102  */
23103 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
23104 
23105 
23106 
23107 
23108 
23109 
23110 
23111 typedef enum {
23112  RW_DRIVER = 2, /* driver (DDI) rwlock */
23113  RW_DEFAULT = 4 /* kernel default rwlock */
23114 } krw_type_t;
23115 
23116 typedef enum {
23117  RW_WRITER,
23118  RW_READER,
23119  RW_READER_STARVEWRITER
23120 } krw_t;
23121 
23122 typedef struct _krwlock {
23123  void *_opaque[1];
23124 } krwlock_t;
23125 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23126 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
23127 /*
23128  * CDDL HEADER START
23129  *
23130  * The contents of this file are subject to the terms of the
23131  * Common Development and Distribution License, Version 1.0 only
23132  * (the "License").  You may not use this file except in compliance
23133  * with the License.
23134  *
23135  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23136  * or http://www.opensolaris.org/os/licensing.
23137  * See the License for the specific language governing permissions
23138  * and limitations under the License.
23139  *
23140  * When distributing Covered Code, include this CDDL HEADER in each
23141  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23142  * If applicable, add the following below this CDDL HEADER, with the
23143  * fields enclosed by brackets "[]" replaced with your own identifying
23144  * information: Portions Copyright [yyyy] [name of copyright owner]
23145  *
23146  * CDDL HEADER END
23147  */
23148 /*
23149  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
23150  * All rights reserved.
23151  */
23152 
23153 
23154 
23155 
23156 #pragma ident "%Z%%M%	%I%	%E% SMI"
23157 
23158 /*
23159  * Public interface to semaphores.  See semaphore(9F) for details.
23160  */
23161 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
23162 typedef enum {
23163  SEMA_DEFAULT,
23164  SEMA_DRIVER
23165 } ksema_type_t;
23166 
23167 typedef struct _ksema {
23168  void * _opaque[2]; /* 2 words on 4 byte alignment */
23169 } ksema_t;
23170 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23171 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
23172 /*
23173  * CDDL HEADER START
23174  *
23175  * The contents of this file are subject to the terms of the
23176  * Common Development and Distribution License (the "License").
23177  * You may not use this file except in compliance with the License.
23178  *
23179  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23180  * or http://www.opensolaris.org/os/licensing.
23181  * See the License for the specific language governing permissions
23182  * and limitations under the License.
23183  *
23184  * When distributing Covered Code, include this CDDL HEADER in each
23185  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23186  * If applicable, add the following below this CDDL HEADER, with the
23187  * fields enclosed by brackets "[]" replaced with your own identifying
23188  * information: Portions Copyright [yyyy] [name of copyright owner]
23189  *
23190  * CDDL HEADER END
23191  */
23192 /*
23193  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23194  * Use is subject to license terms.
23195  */
23196 
23197 /*
23198  * Copyright (c) 2012 by Delphix. All rights reserved.
23199  */
23200 
23201 /*
23202  * condvar.h:
23203  *
23204  * definitions for thread synchronization primitives: condition variables
23205  * This is the public part of the interface to condition variables. The
23206  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
23207  */
23208 
23209 
23210 
23211 
23212 
23213 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23214 /*
23215  * CDDL HEADER START
23216  *
23217  * The contents of this file are subject to the terms of the
23218  * Common Development and Distribution License (the "License").
23219  * You may not use this file except in compliance with the License.
23220  *
23221  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23222  * or http://www.opensolaris.org/os/licensing.
23223  * See the License for the specific language governing permissions
23224  * and limitations under the License.
23225  *
23226  * When distributing Covered Code, include this CDDL HEADER in each
23227  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23228  * If applicable, add the following below this CDDL HEADER, with the
23229  * fields enclosed by brackets "[]" replaced with your own identifying
23230  * information: Portions Copyright [yyyy] [name of copyright owner]
23231  *
23232  * CDDL HEADER END
23233  */
23234 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23235 /*	  All Rights Reserved  	*/
23236 
23237 
23238 /*
23239  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23240  * Use is subject to license terms.
23241  *
23242  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23243  * Copyright 2016 Joyent, Inc.
23244  */
23245 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
23246 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
23247 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23248 /*	  All Rights Reserved  	*/
23249 
23250 
23251 /*
23252  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
23253  * All rights reserved.  The Berkeley software License Agreement
23254  * specifies the terms and conditions for redistribution.
23255  */
23256 
23257 /*
23258  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23259  *
23260  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23261  * Use is subject to license terms.
23262  *
23263  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23264  */
23265 
23266 /*
23267  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
23268  */
23269 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
23270 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
23271 /*
23272  * Condtion variables.
23273  */
23274 
23275 typedef struct _kcondvar {
23276  ushort_t _opaque;
23277 } kcondvar_t;
23278 
23279 typedef enum {
23280  CV_DEFAULT,
23281  CV_DRIVER
23282 } kcv_type_t;
23283 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
23284 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
23285 /*
23286  * Mutual exclusion locks described in common/sys/mutex.h.
23287  *
23288  * Semaphores described in common/sys/semaphore.h.
23289  *
23290  * Readers/Writer locks described in common/sys/rwlock.h.
23291  *
23292  * Condition variables described in common/sys/condvar.h
23293  */
23294 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23295 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
23296 /*
23297  * CDDL HEADER START
23298  *
23299  * The contents of this file are subject to the terms of the
23300  * Common Development and Distribution License, Version 1.0 only
23301  * (the "License").  You may not use this file except in compliance
23302  * with the License.
23303  *
23304  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23305  * or http://www.opensolaris.org/os/licensing.
23306  * See the License for the specific language governing permissions
23307  * and limitations under the License.
23308  *
23309  * When distributing Covered Code, include this CDDL HEADER in each
23310  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23311  * If applicable, add the following below this CDDL HEADER, with the
23312  * fields enclosed by brackets "[]" replaced with your own identifying
23313  * information: Portions Copyright [yyyy] [name of copyright owner]
23314  *
23315  * CDDL HEADER END
23316  */
23317 /*
23318  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23319  * Use is subject to license terms.
23320  */
23321 
23322 
23323 
23324 
23325 #pragma ident "%Z%%M%	%I%	%E% SMI"
23326 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
23327 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23328 /*
23329  * CDDL HEADER START
23330  *
23331  * The contents of this file are subject to the terms of the
23332  * Common Development and Distribution License (the "License").
23333  * You may not use this file except in compliance with the License.
23334  *
23335  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23336  * or http://www.opensolaris.org/os/licensing.
23337  * See the License for the specific language governing permissions
23338  * and limitations under the License.
23339  *
23340  *
23341  * When distributing Covered Code, include this CDDL HEADER in each
23342  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23343  * If applicable, add the following below this CDDL HEADER, with the
23344  * fields enclosed by brackets "[]" replaced with your own identifying
23345  * information: Portions Copyright [yyyy] [name of copyright owner]
23346  *
23347  * CDDL HEADER END
23348  */
23349 
23350 /*
23351  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23352  * Use is subject to license terms.
23353  * Copyright 2016 Joyent, Inc.
23354  */
23355 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
23356 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
23357 /*
23358  * XXX	Ick.  This type needs to be visible outside the above guard because
23359  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
23360  * If we can make proc internals less visible, (which we obviously should)
23361  * then this can be invisible too.
23362  */
23363 typedef unsigned int model_t;
23364 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
23365 
23366 
23367 
23368 
23369 
23370 /*
23371  * Data queue.
23372  *
23373  * NOTE: The *only* public fields are documented in queue(9S).
23374  *       Everything else is implementation-private.
23375  *
23376  * The locking rules for the queue_t structure are extremely subtle and vary
23377  * widely depending on the field in question.  As such, each field is
23378  * annotated according to the following legend:
23379  *
23380  *   Q9S: The field is documented in queue(9S) and may be accessed without
23381  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
23382  *        However, no fields can be directly modified unless q_lock is held
23383  *        (which is not possible in a DDI compliant STREAMS module), with the
23384  *        following exceptions:
23385  *
23386  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
23387  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
23388  *		    locking rules on it.
23389  *         - q_qinfo: can be modified before qprocson().
23390  *
23391  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
23392  *		    rules of the STREAMS module.  The STREAMS framework never
23393  *		    modifies these fields, and is tolerant of temporarily
23394  *		    stale field values.
23395  *
23396  *	  In general, the STREAMS framework employs one of the following
23397  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
23398  *
23399  *	   - The field is only modified by the framework when the stream is
23400  *	     locked with strlock() (q_next).
23401  *
23402  *	   - The field is modified by the framework, but the modifies are
23403  *	     atomic, and temporarily stale values are harmless (q_count,
23404  *	     q_first, q_last).
23405  *
23406  *	   - The field is modified by the framework, but the field's visible
23407  *	     values are either constant or directly under the control
23408  *	     of the STREAMS module itself (q_flag).
23409  *
23410  *   QLK: The field must be accessed or modified under q_lock, except when
23411  *        the stream has been locked with strlock().  If multiple q_locks must
23412  *        be acquired, q_locks at higher addresses must be taken first.
23413  *
23414  *   STR: The field can be accessed without a lock, but must be modified under
23415  *	  strlock().
23416  *
23417  *   SQLK: The field must be accessed or modified under SQLOCK().
23418  *
23419  *   NOLK: The field can be accessed without a lock, but can only be modified
23420  *	   when the queue_t is not known to any other threads.
23421  *
23422  *   SVLK: The field must be accessed or modified under the service_queue lock.
23423  *         Note that service_lock must be taken after any needed q_locks,
23424  *	   and that no other lock should be taken while service_lock is held.
23425  *
23426  * In addition, it is always acceptable to modify a field that is not yet
23427  * known to any other threads -- and other special case exceptions exist in
23428  * the code.  Also, q_lock is used with q_wait to implement a stream head
23429  * monitor for reads and writes.
23430  */
23431 typedef struct queue {
23432  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
23433  struct msgb *q_first; /* Q9S: first message in Q	*/
23434  struct msgb *q_last; /* Q9S: last message in Q	*/
23435  struct queue *q_next; /* Q9S: next Q in stream	*/
23436  struct queue *q_link; /* SVLK: next Q for scheduling	*/
23437  void *q_ptr; /* Q9S: module-specific data	*/
23438  size_t q_count; /* Q9S: number of bytes on Q	*/
23439  uint_t q_flag; /* Q9S: Q state			*/
23440  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
23441  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
23442  size_t q_hiwat; /* Q9S: Q high water mark	*/
23443  size_t q_lowat; /* Q9S: Q low water mark	*/
23444  struct qband *q_bandp; /* QLK: band flow information	*/
23445  kmutex_t q_lock; /* NOLK: structure lock		*/
23446  struct stdata *q_stream; /* NOLK: stream backpointer	*/
23447  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
23448  unsigned char q_nband; /* QLK: number of bands		*/
23449  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
23450  struct queue *q_nfsrv; /* STR: next Q with svc routine */
23451  ushort_t q_draining; /* QLK: Q is draining		*/
23452  short q_struiot; /* QLK: sync streams Q UIO mode	*/
23453  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
23454  size_t q_mblkcnt; /* QLK: mblk count		*/
23455  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
23456  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
23457  pri_t q_spri; /* QLK: Q scheduling priority	*/
23458 
23459  /*
23460 	 * Syncq scheduling
23461 	 */
23462  struct msgb *q_sqhead; /* QLK: first syncq message	*/
23463  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
23464  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
23465  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
23466  uint_t q_sqflags; /* SQLK: syncq flags		*/
23467  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
23468 
23469  /*
23470 	 * NOLK: Reference to the queue's module's implementation
23471 	 * structure. This will be NULL for queues associated with drivers.
23472 	 */
23473  struct fmodsw_impl *q_fp;
23474 } queue_t;
23475 
23476 /*
23477  * Queue flags; unused flags not documented in queue(9S) can be recycled.
23478  */
23479 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23480 /*	UNUSED		0x00000200	   was QHLIST			*/
23481 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
23482 
23483 
23484 
23485 
23486 
23487 
23488      /* all MT type flags		*/
23489 
23490 
23491 
23492 
23493 
23494 
23495 /*	UNUSED		0x00400000	   was QHOT			*/
23496 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
23497 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
23498 
23499 
23500 
23501 
23502      /* direct interface to/from sockfs */
23503 
23504 /* queue sqflags (protected by SQLOCK). */
23505 
23506 
23507      /* This is also noted by the	*/
23508      /* q_draining field, but this one is */
23509      /* protected by SQLOCK */
23510 
23511 /*
23512  * Structure that describes the separate information
23513  * for each priority band in the queue.
23514  */
23515 typedef struct qband {
23516  struct qband *qb_next; /* next band's info */
23517  size_t qb_count; /* number of bytes in band */
23518  struct msgb *qb_first; /* beginning of band's data */
23519  struct msgb *qb_last; /* end of band's data */
23520  size_t qb_hiwat; /* high water mark for band */
23521  size_t qb_lowat; /* low water mark for band */
23522  uint_t qb_flag; /* see below */
23523  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
23524 } qband_t;
23525 
23526 /*
23527  * qband flags
23528  */
23529 
23530 
23531 
23532 
23533 /*
23534  * Maximum number of bands.
23535  */
23536 
23537 
23538 /*
23539  * Fields that can be manipulated through strqset() and strqget().
23540  */
23541 typedef enum qfields {
23542  QHIWAT = 0, /* q_hiwat or qb_hiwat */
23543  QLOWAT = 1, /* q_lowat or qb_lowat */
23544  QMAXPSZ = 2, /* q_maxpsz */
23545  QMINPSZ = 3, /* q_minpsz */
23546  QCOUNT = 4, /* q_count or qb_count */
23547  QFIRST = 5, /* q_first or qb_first */
23548  QLAST = 6, /* q_last or qb_last */
23549  QFLAG = 7, /* q_flag or qb_flag */
23550  QSTRUIOT = 8, /* q_struiot */
23551  QBAD = 9
23552 } qfields_t;
23553 
23554 /*
23555  * Module information structure
23556  */
23557 struct module_info {
23558  ushort_t mi_idnum; /* module id number */
23559  char *mi_idname; /* module name */
23560  ssize_t mi_minpsz; /* min packet size accepted */
23561  ssize_t mi_maxpsz; /* max packet size accepted */
23562  size_t mi_hiwat; /* hi-water mark */
23563  size_t mi_lowat; /* lo-water mark */
23564 };
23565 
23566 /*
23567  * queue information structure (with Synchronous STREAMS extensions)
23568  */
23569 struct qinit {
23570  int (*qi_putp)(); /* put procedure */
23571  int (*qi_srvp)(); /* service procedure */
23572  int (*qi_qopen)(); /* called on startup */
23573  int (*qi_qclose)(); /* called on finish */
23574  int (*qi_qadmin)(); /* for future use */
23575  struct module_info *qi_minfo; /* module information structure */
23576  struct module_stat *qi_mstat; /* module statistics structure */
23577  int (*qi_rwp)(); /* r/w procedure */
23578  int (*qi_infop)(); /* information procedure */
23579  int qi_struiot; /* stream uio type for struio() */
23580 };
23581 
23582 /*
23583  * Values for qi_struiot and q_struiot:
23584  */
23585 
23586 
23587 
23588 
23589 /*
23590  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
23591  */
23592 struct streamtab {
23593  struct qinit *st_rdinit;
23594  struct qinit *st_wrinit;
23595  struct qinit *st_muxrinit;
23596  struct qinit *st_muxwinit;
23597 };
23598 
23599 /*
23600  * Structure sent to mux drivers to indicate a link.
23601  */
23602 struct linkblk {
23603  queue_t *l_qtop; /* lowest level write queue of upper stream */
23604     /* (set to NULL for persistent links) */
23605  queue_t *l_qbot; /* highest level write queue of lower stream */
23606  int l_index; /* index for lower stream. */
23607 };
23608 
23609 /*
23610  * Esballoc data buffer freeing routine
23611  */
23612 typedef struct free_rtn {
23613  void (*free_func)();
23614  caddr_t free_arg;
23615 } frtn_t;
23616 
23617 /*
23618  * Data block descriptor
23619  *
23620  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
23621  * as described in datab(9S).  Everything else is implementation-private.
23622  */
23623 
23624 
23625 
23626 typedef struct datab {
23627  frtn_t *db_frtnp;
23628  unsigned char *db_base;
23629  unsigned char *db_lim;
23630  unsigned char db_ref;
23631  unsigned char db_type;
23632  unsigned char db_flags;
23633  unsigned char db_struioflag;
23634  pid_t db_cpid; /* cached pid, needs verification */
23635  void *db_cache; /* kmem cache descriptor */
23636  struct msgb *db_mblk;
23637  void (*db_free)(struct msgb *, struct datab *);
23638  void (*db_lastfree)(struct msgb *, struct datab *);
23639  intptr_t db_cksumstart;
23640  intptr_t db_cksumend;
23641  intptr_t db_cksumstuff;
23642  union {
23643   double enforce_alignment;
23644   unsigned char data[8];
23645   struct {
23646    union {
23647     uint32_t u32;
23648     uint16_t u16;
23649    } cksum_val; /* used to store calculated cksum */
23650    uint16_t flags;
23651    uint16_t pad;
23652   } cksum;
23653   /*
23654 		 * Union used for future extensions (pointer to data ?).
23655 		 */
23656  } db_struioun;
23657  struct fthdr *db_fthdr;
23658  cred_t *db_credp; /* credential */
23659 } dblk_t;
23660 
23661 
23662 
23663 
23664 /*
23665  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
23666  */
23667 
23668 
23669 
23670 /*
23671  * Used by GLDv2 to store the TCI information.
23672  */
23673 
23674 
23675 /*
23676  * Message block descriptor
23677  */
23678 typedef struct msgb {
23679  struct msgb *b_next;
23680  struct msgb *b_prev;
23681  struct msgb *b_cont;
23682  unsigned char *b_rptr;
23683  unsigned char *b_wptr;
23684  struct datab *b_datap;
23685  unsigned char b_band;
23686  unsigned char b_tag;
23687  unsigned short b_flag;
23688  queue_t *b_queue; /* for sync queues */
23689 } mblk_t;
23690 
23691 /*
23692  * bcache descriptor
23693  */
23694 typedef struct bcache {
23695  kmutex_t mutex;
23696  struct kmem_cache *buffer_cache;
23697  struct kmem_cache *dblk_cache;
23698  int alloc;
23699  int destroy;
23700  size_t size;
23701  uint_t align;
23702 } bcache_t;
23703 
23704 /*
23705  * db_flags values (all implementation private!)
23706  */
23707 
23708 
23709 
23710 
23711 /*
23712  * db_struioflag values:
23713  */
23714 
23715 
23716 
23717 
23718 
23719 
23720 /*
23721  * Message flags.  These are interpreted by the stream head.
23722  */
23723 
23724 
23725     /* write side of stream */
23726 
23727 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
23728 
23729 
23730 
23731 
23732 /*
23733  * Streams message types.
23734  */
23735 
23736 /*
23737  * Data and protocol messages (regular and priority)
23738  */
23739 
23740 
23741 
23742 
23743 /*
23744  * Control messages (regular and priority)
23745  */
23746 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23747 /*
23748  * Control messages (high priority; go to head of queue)
23749  */
23750 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23751 /*
23752  * Queue message class definitions.
23753  */
23754 
23755 
23756 
23757 /*
23758  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
23759  */
23760 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23761 struct iocblk {
23762  int ioc_cmd; /* ioctl command type */
23763  cred_t *ioc_cr; /* full credentials */
23764  uint_t ioc_id; /* ioctl id */
23765  size_t ioc_count; /* count of bytes in data field */
23766  int ioc_error; /* error code */
23767  int ioc_rval; /* return value  */
23768  int ioc_fill1;
23769  uint_t ioc_flag; /* see below */
23770  int ioc_filler[2]; /* reserved for future use */
23771 };
23772 
23773 
23774 typedef struct iocblk *IOCP;
23775 
23776 /* {ioc,cp}_flags values */
23777 
23778 
23779 
23780 
23781 
23782 
23783 
23784 /*
23785  *	Is the ioctl data formatted for our native model?
23786  */
23787 
23788 
23789 
23790 /*
23791  * structure for the M_COPYIN and M_COPYOUT message types.
23792  */
23793 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23794 struct copyreq {
23795  int cq_cmd; /* ioctl command (from ioc_cmd) */
23796  cred_t *cq_cr; /* full credentials */
23797  uint_t cq_id; /* ioctl id (from ioc_id) */
23798  caddr_t cq_addr; /* address to copy data to/from */
23799  size_t cq_size; /* number of bytes to copy */
23800  uint_t cq_flag; /* must be zero */
23801  mblk_t *cq_private; /* private state information */
23802  int cq_filler[4]; /* reserved for future use */
23803 };
23804 
23805 
23806 /*
23807  * structure for the M_IOCDATA message type.
23808  */
23809 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23810 struct copyresp {
23811  int cp_cmd; /* ioctl command (from ioc_cmd) */
23812  cred_t *cp_cr; /* full credentials */
23813  uint_t cp_id; /* ioctl id (from ioc_id) */
23814  caddr_t cp_rval; /* status of request: 0 -> success */
23815      /* 		non-zero -> failure */
23816  size_t cp_pad1;
23817  uint_t cp_pad2;
23818  mblk_t *cp_private; /* private state information */
23819  uint_t cp_flag; /* datamodel IOC_ flags; see above */
23820  int cp_filler[3];
23821 };
23822 
23823 
23824 /*
23825  * Since these structures are all intended to travel in the same message
23826  * at different stages of a STREAMS ioctl, this union is used to determine
23827  * the message size in strdoioctl().
23828  */
23829 union ioctypes {
23830  struct iocblk iocblk;
23831  struct copyreq copyreq;
23832  struct copyresp copyresp;
23833 };
23834 
23835 /*
23836  * Options structure for M_SETOPTS message.  This is sent upstream
23837  * by a module or driver to set stream head options.
23838  */
23839 struct stroptions {
23840  uint_t so_flags; /* options to set */
23841  short so_readopt; /* read option */
23842  ushort_t so_wroff; /* write offset */
23843  ssize_t so_minpsz; /* minimum read packet size */
23844  ssize_t so_maxpsz; /* maximum read packet size */
23845  size_t so_hiwat; /* read queue high water mark */
23846  size_t so_lowat; /* read queue low water mark */
23847  unsigned char so_band; /* band for water marks */
23848  ushort_t so_erropt; /* error option */
23849  ssize_t so_maxblk; /* maximum message block size */
23850  ushort_t so_copyopt; /* copy options (see stropts.h) */
23851  ushort_t so_tail; /* space available at the end */
23852 };
23853 
23854 /* flags for stream options set message */
23855 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
23856 /*
23857  * Miscellaneous parameters and flags.
23858  */
23859 
23860 /*
23861  * Values for stream flag in open to indicate module open, clone open,
23862  * and the return value for failure.
23863  */
23864 
23865 
23866 
23867 
23868 /*
23869  * Priority definitions for block allocation.
23870  */
23871 
23872 
23873 
23874 
23875 /*
23876  * Value for packet size that denotes infinity
23877  */
23878 
23879 
23880 /*
23881  * Flags for flushq()
23882  */
23883 
23884 
23885 
23886 /*
23887  * Flag for transparent ioctls
23888  */
23889 
23890 
23891 /*
23892  * Stream head default high/low water marks
23893  */
23894 
23895 
23896 
23897 /*
23898  * qwriter perimeter types
23899  */
23900 
23901 
23902 
23903 /*
23904  * Definitions of Streams macros and function interfaces.
23905  */
23906 
23907 /*
23908  * canenable - check if queue can be enabled by putq().
23909  */
23910 
23911 
23912 /*
23913  * Test if data block type is one of the data messages (i.e. not a control
23914  * message).
23915  */
23916 
23917 
23918 
23919 
23920 
23921 
23922 
23923 /*
23924  * Extract queue class of message block.
23925  */
23926 
23927 
23928 /*
23929  * Align address on next lower word boundary.
23930  */
23931 
23932 
23933 /*
23934  * Find the max size of data block.
23935  */
23936 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
23937 
23938 /*
23939  * Symbols such as htonl() are required to be exposed through this file,
23940  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
23941  */
23942 
23943 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
23944 /*
23945  * CDDL HEADER START
23946  *
23947  * The contents of this file are subject to the terms of the
23948  * Common Development and Distribution License (the "License").
23949  * You may not use this file except in compliance with the License.
23950  *
23951  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23952  * or http://www.opensolaris.org/os/licensing.
23953  * See the License for the specific language governing permissions
23954  * and limitations under the License.
23955  *
23956  * When distributing Covered Code, include this CDDL HEADER in each
23957  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23958  * If applicable, add the following below this CDDL HEADER, with the
23959  * fields enclosed by brackets "[]" replaced with your own identifying
23960  * information: Portions Copyright [yyyy] [name of copyright owner]
23961  *
23962  * CDDL HEADER END
23963  */
23964 
23965 /*
23966  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23967  * Use is subject to license terms.
23968  */
23969 
23970 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23971 /*	  All Rights Reserved  	*/
23972 
23973 /*
23974  * University Copyright- Copyright (c) 1982, 1986, 1988
23975  * The Regents of the University of California
23976  * All Rights Reserved
23977  *
23978  * University Acknowledgment- Portions of this document are derived from
23979  * software developed by the University of California, Berkeley, and its
23980  * contributors.
23981  */
23982 
23983 
23984 
23985 
23986 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
23987 /*
23988  * CDDL HEADER START
23989  *
23990  * The contents of this file are subject to the terms of the
23991  * Common Development and Distribution License (the "License").
23992  * You may not use this file except in compliance with the License.
23993  *
23994  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23995  * or http://www.opensolaris.org/os/licensing.
23996  * See the License for the specific language governing permissions
23997  * and limitations under the License.
23998  *
23999  *
24000  * When distributing Covered Code, include this CDDL HEADER in each
24001  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24002  * If applicable, add the following below this CDDL HEADER, with the
24003  * fields enclosed by brackets "[]" replaced with your own identifying
24004  * information: Portions Copyright [yyyy] [name of copyright owner]
24005  *
24006  * CDDL HEADER END
24007  */
24008 
24009 /*
24010  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24011  * Use is subject to license terms.
24012  * Copyright 2016 Joyent, Inc.
24013  */
24014 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
24015 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
24016 /*
24017  * CDDL HEADER START
24018  *
24019  * The contents of this file are subject to the terms of the
24020  * Common Development and Distribution License, Version 1.0 only
24021  * (the "License").  You may not use this file except in compliance
24022  * with the License.
24023  *
24024  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24025  * or http://www.opensolaris.org/os/licensing.
24026  * See the License for the specific language governing permissions
24027  * and limitations under the License.
24028  *
24029  * When distributing Covered Code, include this CDDL HEADER in each
24030  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24031  * If applicable, add the following below this CDDL HEADER, with the
24032  * fields enclosed by brackets "[]" replaced with your own identifying
24033  * information: Portions Copyright [yyyy] [name of copyright owner]
24034  *
24035  * CDDL HEADER END
24036  */
24037 /*
24038  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24039  *
24040  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24041  * Use is subject to license terms.
24042  */
24043 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
24044 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24045 /*
24046  * macros for conversion between host and (internet) network byte order
24047  */
24048 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24049 typedef uint16_t in_port_t;
24050 
24051 
24052 
24053 
24054 typedef uint32_t in_addr_t;
24055 
24056 
24057 
24058 extern uint32_t htonl(uint32_t);
24059 extern uint16_t htons(uint16_t);
24060 extern uint32_t ntohl(uint32_t);
24061 extern uint16_t ntohs(uint16_t);
24062 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24063 extern uint64_t htonll(uint64_t);
24064 extern uint64_t ntohll(uint64_t);
24065 
24066 
24067 
24068 
24069 
24070 
24071 /*
24072  * Macros to reverse byte order
24073  */
24074 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24075 /*
24076  * Macros to convert from a specific byte order to/from native byte order
24077  */
24078 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24079 /*
24080  * Macros to read unaligned values from a specific byte order to
24081  * native byte order
24082  */
24083 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
24084 /*
24085  * Macros to write unaligned values from native byte order to a specific byte
24086  * order.
24087  */
24088 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
24089 
24090 
24091 
24092 
24093 
24094 
24095 
24096 /*
24097  * Note: IPv4 address data structures usage conventions.
24098  * The "in_addr_t" type below (required by Unix standards)
24099  * is NOT a typedef of "struct in_addr" and violates the usual
24100  * conventions where "struct <name>" and <name>_t are corresponding
24101  * typedefs.
24102  * To minimize confusion, kernel data structures/usage prefers use
24103  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
24104  * The user level APIs continue to follow the historic popular
24105  * practice of using "struct in_addr".
24106  */
24107 
24108 
24109 
24110 
24111 
24112 
24113 
24114 typedef uint32_t ipaddr_t;
24115 
24116 
24117 
24118 
24119 struct in6_addr {
24120  union {
24121   /*
24122 		 * Note: Static initalizers of "union" type assume
24123 		 * the constant on the RHS is the type of the first member
24124 		 * of union.
24125 		 * To make static initializers (and efficient usage) work,
24126 		 * the order of members exposed to user and kernel view of
24127 		 * this data structure is different.
24128 		 * User environment sees specified uint8_t type as first
24129 		 * member whereas kernel sees most efficient type as
24130 		 * first member.
24131 		 */
24132 
24133 
24134 
24135 
24136   uint8_t _S6_u8[16]; /* IPv6 address */
24137   uint32_t _S6_u32[4]; /* IPv6 address */
24138 
24139   uint32_t __S6_align; /* Align on 32 bit boundary */
24140  } _S6_un;
24141 };
24142 
24143 
24144 
24145 
24146 
24147 
24148 
24149 typedef struct in6_addr in6_addr_t;
24150 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24151 /*
24152  * Protocols
24153  *
24154  * Some of these constant names are copied for the DTrace IP provider in
24155  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
24156  * in sync.
24157  */
24158 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24159       /* Transmission Protocol */
24160 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24161 /*
24162  * Port/socket numbers: network standard functions
24163  *
24164  * Entries should exist here for each port number compiled into an ON
24165  * component, such as snoop.
24166  */
24167 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24168 /*
24169  * Port/socket numbers: host specific functions
24170  */
24171 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24172 /*
24173  * Internet Key Exchange (IKE) ports
24174  */
24175 
24176 
24177 
24178 /*
24179  * UNIX TCP sockets
24180  */
24181 
24182 
24183 
24184 
24185 
24186 
24187 /*
24188  * UNIX UDP sockets
24189  */
24190 
24191 
24192 
24193 
24194 
24195 
24196 
24197 /*
24198  * DHCPv6 UDP ports
24199  */
24200 
24201 
24202 
24203 
24204 
24205 /*
24206  * Ports < IPPORT_RESERVED are reserved for
24207  * privileged processes (e.g. root).
24208  * Ports > IPPORT_USERRESERVED are reserved
24209  * for servers, not necessarily privileged.
24210  */
24211 
24212 
24213 
24214 /*
24215  * Link numbers
24216  */
24217 
24218 
24219 
24220 
24221 /*
24222  * IPv4 Internet address
24223  *	This definition contains obsolete fields for compatibility
24224  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
24225  *	divisions into fixed fields misleading at best.  New code
24226  *	should use only the s_addr field.
24227  */
24228 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24229 struct in_addr {
24230  union {
24231   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
24232   struct { uint16_t s_w1, s_w2; } S_un_w;
24233 
24234   uint32_t S_addr;
24235 
24236 
24237 
24238  } S_un;
24239 
24240 
24241 
24242 
24243 
24244 
24245 };
24246 
24247 /*
24248  * Definitions of bits in internet address integers.
24249  * On subnets, the decomposition of addresses to host and net parts
24250  * is done according to subnet mask, not the masks here.
24251  *
24252  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
24253  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
24254  * obsolete". IN_MULTICAST macro should be used to test if a address
24255  * is a multicast address.
24256  */
24257 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24258 /*
24259  * We have removed CLASS E checks from the kernel
24260  * But we preserve these defines for userland in order
24261  * to avoid compile  breakage of some 3rd party piece of software
24262  */
24263 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24264 /* Scoped IPv4 prefixes (in host byte-order) */
24265 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24266 /* RFC 3927 IPv4 link local address (i in host byte-order) */
24267 
24268 
24269 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
24270 
24271 
24272 
24273 
24274 
24275 
24276 /*
24277  * Define a macro to stuff the loopback address into an Internet address
24278  */
24279 
24280 
24281 
24282 
24283 
24284 
24285 /*
24286  * IPv4 Socket address.
24287  */
24288 struct sockaddr_in {
24289  sa_family_t sin_family;
24290  in_port_t sin_port;
24291  struct in_addr sin_addr;
24292 
24293  char sin_zero[8];
24294 
24295 
24296 
24297 };
24298 
24299 
24300 /*
24301  * IPv6 socket address.
24302  */
24303 struct sockaddr_in6 {
24304  sa_family_t sin6_family;
24305  in_port_t sin6_port;
24306  uint32_t sin6_flowinfo;
24307  struct in6_addr sin6_addr;
24308  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
24309  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
24310 };
24311 
24312 /*
24313  * Macros for accessing the traffic class and flow label fields from
24314  * sin6_flowinfo.
24315  * These are designed to be applied to a 32-bit value.
24316  */
24317 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24318 /* masks */
24319 
24320 
24321 
24322 
24323 
24324 /*
24325  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
24326  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
24327  * only. They need to be different for User/Kernel versions because union
24328  * component data structure is defined differently (it is identical at
24329  * binary representation level).
24330  *
24331  * const struct in6_addr IN6ADDR_ANY_INIT;
24332  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
24333  */
24334 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24335 /*
24336  * RFC 2553 specifies the following macros. Their type is defined
24337  * as "int" in the RFC but they only have boolean significance
24338  * (zero or non-zero). For the purposes of our comment notation,
24339  * we assume a hypothetical type "bool" defined as follows to
24340  * write the prototypes assumed for macros in our comments better.
24341  *
24342  * typedef int bool;
24343  */
24344 
24345 /*
24346  * IN6 macros used to test for special IPv6 addresses
24347  * (Mostly from spec)
24348  *
24349  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
24350  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
24351  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
24352  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
24353  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
24354  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
24355  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
24356  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
24357  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
24358  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
24359  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
24360  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
24361  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
24362  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
24363  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
24364  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
24365  *	     const struct in6_addr *);			    -- Not from RFC2553
24366  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
24367  */
24368 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24369 /*
24370  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
24371  * Note: This macro is currently NOT defined in RFC2553 specification
24372  * and not a standard macro that portable applications should use.
24373  */
24374 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24375 /* Exclude loopback and unspecified address */
24376 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24377 /*
24378  * Note:
24379  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
24380  * specification and not a standard macro that portable applications
24381  * should use.
24382  */
24383 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24384 /*
24385  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
24386  * RFC, and shouldn't be used by portable applications.  It is used to see
24387  * if an address is a solicited-node multicast address, which is prefixed
24388  * with ff02:0:0:0:0:1:ff00::/104.
24389  */
24390 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24391 /*
24392  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
24393  * 6to4 addresses have the same /48 prefix, and, hence, are from the
24394  * same 6to4 site.
24395  */
24396 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24397 /*
24398  * IN6_IS_ADDR_LINKSCOPE
24399  * Identifies an address as being either link-local, link-local multicast or
24400  * node-local multicast.  All types of addresses are considered to be unique
24401  * within the scope of a given link.
24402  */
24403 
24404 
24405 
24406 
24407 /*
24408  * Useful utility macros for operations with IPv6 addresses
24409  * Note: These macros are NOT defined in the RFC2553 or any other
24410  * standard specification and are not standard macros that portable
24411  * applications should use.
24412  */
24413 
24414 /*
24415  * IN6_V4MAPPED_TO_INADDR
24416  * IN6_V4MAPPED_TO_IPADDR
24417  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
24418  *	Note: These macros are NOT defined in RFC2553 or any other standard
24419  *	specification and are not macros that portable applications should
24420  *	use.
24421  *
24422  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
24423  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
24424  *
24425  */
24426 
24427 
24428 
24429 
24430 
24431 /*
24432  * IN6_INADDR_TO_V4MAPPED
24433  * IN6_IPADDR_TO_V4MAPPED
24434  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
24435  *	address.
24436  *	Note: These macros are NOT defined in RFC2553 or any other standard
24437  *	specification and are not macros that portable applications should
24438  *	use.
24439  *
24440  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
24441  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
24442  *
24443  */
24444 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24445 /*
24446  * IN6_6TO4_TO_V4ADDR
24447  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
24448  *      address.
24449  *	Note: This macro is NOT defined in RFC2553 or any other standard
24450  *	specification and is not a macro that portable applications should
24451  *	use.
24452  *	Note: we don't use the IPADDR form of the macro because we need
24453  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
24454  *	32-bit aligned.
24455  *
24456  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
24457  *
24458  */
24459 
24460 
24461 
24462 
24463 
24464 
24465 /*
24466  * IN6_V4ADDR_TO_6TO4
24467  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
24468  *	will be created from the IPv4 Address.
24469  *	Note:  This method for creating 6to4 addresses is not standardized
24470  *	outside of Solaris.  The newly created 6to4 address will be of the form
24471  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
24472  *	HOSTID will equal 1.
24473  *
24474  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
24475  *
24476  */
24477 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24478 /*
24479  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
24480  *	 Compares if IPv6 addresses are equal.
24481  * Note: Compares in order of high likelyhood of a miss so we minimize
24482  * compares. (Current heuristic order, compare in reverse order of
24483  * uint32_t units)
24484  *
24485  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
24486  *			    const struct in6_addr *);
24487  */
24488 
24489 
24490 
24491 
24492 
24493 
24494 /*
24495  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
24496  *	Compares if prefixed parts of IPv6 addresses are equal.
24497  *
24498  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
24499  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
24500  *				       const struct in6_addr *,
24501  *				       int);
24502  */
24503 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24504 /*
24505  * Options for use with [gs]etsockopt at the IP level.
24506  *
24507  * Note: Some of the IP_ namespace has conflict with and
24508  * and is exposed through <xti.h>. (It also requires exposing
24509  * options not implemented). The options with potential
24510  * for conflicts use #ifndef guards.
24511  */
24512 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24513 /*
24514  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
24515  * is used to differentiate b/w the two.
24516  */
24517 
24518 
24519 
24520 
24521 
24522 /*
24523  * Different preferences that can be requested from IPSEC protocols.
24524  */
24525 
24526 
24527 
24528 
24529 /*
24530  * This can be used with the setsockopt() call to set per socket security
24531  * options. When the application uses per-socket API, we will reflect
24532  * the request on both outbound and inbound packets.
24533  */
24534 
24535 typedef struct ipsec_req {
24536  uint_t ipsr_ah_req; /* AH request */
24537  uint_t ipsr_esp_req; /* ESP request */
24538  uint_t ipsr_self_encap_req; /* Self-Encap request */
24539  uint8_t ipsr_auth_alg; /* Auth algs for AH */
24540  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
24541  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
24542 } ipsec_req_t;
24543 
24544 /*
24545  * MCAST_* options are protocol-independent.  The actual definitions
24546  * are with the v6 options below; this comment is here to note the
24547  * namespace usage.
24548  *
24549  * #define	MCAST_JOIN_GROUP	0x29
24550  * #define	MCAST_LEAVE_GROUP	0x2a
24551  * #define	MCAST_BLOCK_SOURCE	0x2b
24552  * #define	MCAST_UNBLOCK_SOURCE	0x2c
24553  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
24554  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
24555  */
24556 
24557 
24558 /*
24559  * SunOS private (potentially not portable) IP_ option names
24560  */
24561 
24562 
24563 
24564 /* can be reused		0x44 */
24565 
24566 
24567 /*
24568  * Option values and names (when !_XPG5) shared with <xti_inet.h>
24569  */
24570 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24571 /*
24572  * The following option values are reserved by <xti_inet.h>
24573  *
24574  * T_IP_OPTIONS	0x107	 -  IP per-packet options
24575  * T_IP_TOS	0x108	 -  IP per packet type of service
24576  */
24577 
24578 /*
24579  * Default value constants for multicast attributes controlled by
24580  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
24581  */
24582 
24583 
24584 
24585 
24586 /*
24587  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
24588  */
24589 struct ip_mreq {
24590  struct in_addr imr_multiaddr; /* IP multicast address of group */
24591  struct in_addr imr_interface; /* local IP address of interface */
24592 };
24593 
24594 /*
24595  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
24596  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
24597  */
24598 struct ip_mreq_source {
24599  struct in_addr imr_multiaddr; /* IP address of group */
24600  struct in_addr imr_sourceaddr; /* IP address of source */
24601  struct in_addr imr_interface; /* IP address of interface */
24602 };
24603 
24604 /*
24605  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
24606  * IPv6 addresses.
24607  */
24608 struct ipv6_mreq {
24609  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
24610  unsigned int ipv6mr_interface; /* interface index */
24611 };
24612 
24613 /*
24614  * Use #pragma pack() construct to force 32-bit alignment on amd64.
24615  * This is needed to keep the structure size and offsets consistent
24616  * between a 32-bit app and the 64-bit amd64 kernel in structures
24617  * where 64-bit alignment would create gaps (in this case, structures
24618  * which have a uint32_t followed by a struct sockaddr_storage).
24619  */
24620 
24621 
24622 
24623 
24624 /*
24625  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
24626  */
24627 struct group_req {
24628  uint32_t gr_interface; /* interface index */
24629  struct sockaddr_storage gr_group; /* group address */
24630 };
24631 
24632 /*
24633  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
24634  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
24635  */
24636 struct group_source_req {
24637  uint32_t gsr_interface; /* interface index */
24638  struct sockaddr_storage gsr_group; /* group address */
24639  struct sockaddr_storage gsr_source; /* source address */
24640 };
24641 
24642 /*
24643  * Argument for SIOC[GS]MSFILTER ioctls
24644  */
24645 struct group_filter {
24646  uint32_t gf_interface; /* interface index */
24647  struct sockaddr_storage gf_group; /* multicast address */
24648  uint32_t gf_fmode; /* filter mode */
24649  uint32_t gf_numsrc; /* number of sources */
24650  struct sockaddr_storage gf_slist[1]; /* source address */
24651 };
24652 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24653 /*
24654  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
24655  */
24656 struct ip_msfilter {
24657  struct in_addr imsf_multiaddr; /* IP multicast address of group */
24658  struct in_addr imsf_interface; /* local IP address of interface */
24659  uint32_t imsf_fmode; /* filter mode */
24660  uint32_t imsf_numsrc; /* number of sources in src_list */
24661  struct in_addr imsf_slist[1]; /* start of source list */
24662 };
24663 
24664 
24665 
24666 
24667 
24668 /*
24669  * Multicast source filter manipulation functions in libsocket;
24670  * defined in RFC 3678.
24671  */
24672 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
24673    uint_t, struct sockaddr_storage *);
24674 
24675 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
24676    uint_t *, struct sockaddr_storage *);
24677 
24678 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
24679    uint32_t, struct in_addr *);
24680 
24681 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
24682    uint32_t *, struct in_addr *);
24683 
24684 /*
24685  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
24686  */
24687 
24688 
24689 
24690 /*
24691  * Argument struct for IP_PKTINFO option
24692  */
24693 typedef struct in_pktinfo {
24694  unsigned int ipi_ifindex; /* send/recv interface index */
24695  struct in_addr ipi_spec_dst; /* matched source address */
24696  struct in_addr ipi_addr; /* src/dst address in IP hdr */
24697 } in_pktinfo_t;
24698 
24699 /*
24700  * Argument struct for IPV6_PKTINFO option
24701  */
24702 struct in6_pktinfo {
24703  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
24704  unsigned int ipi6_ifindex; /* send/recv interface index */
24705 };
24706 
24707 /*
24708  * Argument struct for IPV6_MTUINFO option
24709  */
24710 struct ip6_mtuinfo {
24711  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
24712  uint32_t ip6m_mtu; /* path MTU in host byte order */
24713 };
24714 
24715 /*
24716  * IPv6 routing header types
24717  */
24718 
24719 
24720 extern socklen_t inet6_rth_space(int type, int segments);
24721 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
24722 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
24723 extern int inet6_rth_reverse(const void *in, void *out);
24724 extern int inet6_rth_segments(const void *bp);
24725 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
24726 
24727 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
24728 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
24729  uint8_t type, socklen_t len, uint_t align, void **databufp);
24730 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
24731 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
24732  socklen_t vallen);
24733 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
24734  uint8_t *typep, socklen_t *lenp, void **databufp);
24735 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
24736  uint8_t type, socklen_t *lenp, void **databufp);
24737 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
24738  socklen_t vallen);
24739 
24740 
24741 /*
24742  * Argument structure for IP_ADD_PROXY_ADDR.
24743  * Note that this is an unstable, experimental interface. It may change
24744  * later. Don't use it unless you know what it is.
24745  */
24746 typedef struct {
24747  struct in_addr in_prefix_addr;
24748  unsigned int in_prefix_len;
24749 } in_prefix_t;
24750 
24751 
24752 
24753 /*
24754  * IPv6 options
24755  */
24756 
24757      /* packets. */
24758      /* argument type: uint_t */
24759 
24760      /* multicast packets. */
24761      /* argument type: struct in6_addr */
24762 
24763      /* multicast packets. */
24764      /* argument type: uint_t */
24765 
24766      /* multicast packets on same socket. */
24767      /* argument type: uint_t */
24768 
24769      /* argument type: struct ipv6_mreq */
24770 
24771      /* argument type: struct ipv6_mreq */
24772 
24773 /*
24774  * Other XPG6 constants.
24775  */
24776 
24777      /* decimal notation. */
24778 
24779      /* standard colon-hex notation. */
24780 
24781 
24782 
24783 
24784 
24785 /*
24786  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
24787  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
24788  * and IPV6_LEAVE_GROUP respectively.
24789  */
24790 
24791      /* argument type: struct ipv6_mreq */
24792 
24793      /* argument type: struct ipv6_mreq */
24794 
24795 
24796      /* arg type: "struct in6_pktingo" - */
24797 
24798 
24799 
24800 
24801      /* the routing header */
24802 
24803 
24804      /* the routing header */
24805 
24806 
24807 
24808 
24809 /*
24810  * This options exists for backwards compatability and should no longer be
24811  * used.  Use IPV6_RECVDSTOPTS instead.
24812  */
24813 
24814 
24815 
24816 
24817 /*
24818  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
24819  * the receipt of both headers.
24820  */
24821 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24822 /*
24823  * enable/disable receipt of both both IPV6_DSTOPTS headers.
24824  */
24825 
24826 
24827 /*
24828  * protocol-independent multicast membership options.
24829  */
24830 
24831 
24832 
24833 
24834 
24835 
24836 
24837 /* 32Bit field for IPV6_SRC_PREFERENCES */
24838 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
24839 /*
24840  * SunOS private (potentially not portable) IPV6_ option names
24841  */
24842 
24843 
24844      /* unspecified (all zeros) */
24845 
24846 /*
24847  * Miscellaneous IPv6 constants.
24848  */
24849 
24850 
24851 
24852 
24853 /*
24854  * Extern declarations for pre-defined global const variables
24855  */
24856 
24857 
24858 
24859 extern const struct in6_addr in6addr_any;
24860 extern const struct in6_addr in6addr_loopback;
24861 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
24862 
24863 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
24864 /*
24865  * CDDL HEADER START
24866  *
24867  * The contents of this file are subject to the terms of the
24868  * Common Development and Distribution License (the "License").
24869  * You may not use this file except in compliance with the License.
24870  *
24871  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24872  * or http://www.opensolaris.org/os/licensing.
24873  * See the License for the specific language governing permissions
24874  * and limitations under the License.
24875  *
24876  * When distributing Covered Code, include this CDDL HEADER in each
24877  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24878  * If applicable, add the following below this CDDL HEADER, with the
24879  * fields enclosed by brackets "[]" replaced with your own identifying
24880  * information: Portions Copyright [yyyy] [name of copyright owner]
24881  *
24882  * CDDL HEADER END
24883  */
24884 /*
24885  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24886  *
24887  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24888  */
24889 
24890 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
24891 /*	  All Rights Reserved	*/
24892 
24893 /*
24894  * University Copyright- Copyright (c) 1982, 1986, 1988
24895  * The Regents of the University of California
24896  * All Rights Reserved
24897  *
24898  * University Acknowledgment- Portions of this document are derived from
24899  * software developed by the University of California, Berkeley, and its
24900  * contributors.
24901  */
24902 
24903 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
24904 
24905 
24906 
24907 
24908 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
24909 /*
24910  * CDDL HEADER START
24911  *
24912  * The contents of this file are subject to the terms of the
24913  * Common Development and Distribution License (the "License").
24914  * You may not use this file except in compliance with the License.
24915  *
24916  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24917  * or http://www.opensolaris.org/os/licensing.
24918  * See the License for the specific language governing permissions
24919  * and limitations under the License.
24920  *
24921  * When distributing Covered Code, include this CDDL HEADER in each
24922  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24923  * If applicable, add the following below this CDDL HEADER, with the
24924  * fields enclosed by brackets "[]" replaced with your own identifying
24925  * information: Portions Copyright [yyyy] [name of copyright owner]
24926  *
24927  * CDDL HEADER END
24928  */
24929 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24930 /*	  All Rights Reserved  	*/
24931 
24932 
24933 /*
24934  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24935  * Use is subject to license terms.
24936  *
24937  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24938  * Copyright 2016 Joyent, Inc.
24939  */
24940 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
24941 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
24942 /*
24943  * CDDL HEADER START
24944  *
24945  * The contents of this file are subject to the terms of the
24946  * Common Development and Distribution License (the "License").
24947  * You may not use this file except in compliance with the License.
24948  *
24949  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24950  * or http://www.opensolaris.org/os/licensing.
24951  * See the License for the specific language governing permissions
24952  * and limitations under the License.
24953  *
24954  * When distributing Covered Code, include this CDDL HEADER in each
24955  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24956  * If applicable, add the following below this CDDL HEADER, with the
24957  * fields enclosed by brackets "[]" replaced with your own identifying
24958  * information: Portions Copyright [yyyy] [name of copyright owner]
24959  *
24960  * CDDL HEADER END
24961  */
24962 /*
24963  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24964  *
24965  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24966  * Use is subject to license terms.
24967  *
24968  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24969  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
24970  */
24971 
24972 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24973 /*	  All Rights Reserved  	*/
24974 
24975 /*
24976  * University Copyright- Copyright (c) 1982, 1986, 1988
24977  * The Regents of the University of California
24978  * All Rights Reserved
24979  *
24980  * University Acknowledgment- Portions of this document are derived from
24981  * software developed by the University of California, Berkeley, and its
24982  * contributors.
24983  */
24984 
24985 
24986 
24987 
24988 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
24989 /*
24990  * CDDL HEADER START
24991  *
24992  * The contents of this file are subject to the terms of the
24993  * Common Development and Distribution License (the "License").
24994  * You may not use this file except in compliance with the License.
24995  *
24996  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24997  * or http://www.opensolaris.org/os/licensing.
24998  * See the License for the specific language governing permissions
24999  * and limitations under the License.
25000  *
25001  * When distributing Covered Code, include this CDDL HEADER in each
25002  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25003  * If applicable, add the following below this CDDL HEADER, with the
25004  * fields enclosed by brackets "[]" replaced with your own identifying
25005  * information: Portions Copyright [yyyy] [name of copyright owner]
25006  *
25007  * CDDL HEADER END
25008  */
25009 
25010 /*
25011  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25012  * Copyright 2016 Joyent, Inc.
25013  *
25014  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25015  * Use is subject to license terms.
25016  */
25017 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
25018 
25019 
25020 
25021 
25022 
25023 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25024 /*
25025  * CDDL HEADER START
25026  *
25027  * The contents of this file are subject to the terms of the
25028  * Common Development and Distribution License (the "License").
25029  * You may not use this file except in compliance with the License.
25030  *
25031  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25032  * or http://www.opensolaris.org/os/licensing.
25033  * See the License for the specific language governing permissions
25034  * and limitations under the License.
25035  *
25036  * When distributing Covered Code, include this CDDL HEADER in each
25037  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25038  * If applicable, add the following below this CDDL HEADER, with the
25039  * fields enclosed by brackets "[]" replaced with your own identifying
25040  * information: Portions Copyright [yyyy] [name of copyright owner]
25041  *
25042  * CDDL HEADER END
25043  */
25044 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25045 /*	  All Rights Reserved  	*/
25046 
25047 
25048 /*
25049  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25050  * Use is subject to license terms.
25051  *
25052  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25053  * Copyright 2016 Joyent, Inc.
25054  */
25055 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
25056 
25057 /*
25058  * I/O parameter information.  A uio structure describes the I/O which
25059  * is to be performed by an operation.  Typically the data movement will
25060  * be performed by a routine such as uiomove(), which updates the uio
25061  * structure to reflect what was done.
25062  */
25063 
25064 
25065 
25066 
25067 
25068 
25069 
25070 typedef struct iovec {
25071  caddr_t iov_base;
25072 
25073 
25074 
25075  long iov_len;
25076 
25077 } iovec_t;
25078 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25079 /*
25080  * Segment flag values.
25081  */
25082 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
25083 
25084 typedef struct uio {
25085  iovec_t *uio_iov; /* pointer to array of iovecs */
25086  int uio_iovcnt; /* number of iovecs */
25087  lloff_t _uio_offset; /* file offset */
25088  uio_seg_t uio_segflg; /* address space (kernel or user) */
25089  uint16_t uio_fmode; /* file mode flags */
25090  uint16_t uio_extflg; /* extended flags */
25091  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
25092  ssize_t uio_resid; /* residual count */
25093 } uio_t;
25094 
25095 /*
25096  * Extended uio_t uioa_t used for asynchronous uio.
25097  *
25098  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
25099  *	 as there isn't a formal definition of IOV_MAX for the kernel.
25100  */
25101 
25102 
25103 typedef struct uioa_page_s { /* locked uio_iov state */
25104  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
25105  void **uioa_ppp; /* page_t or pfn_t arrary */
25106  caddr_t uioa_base; /* address base */
25107  size_t uioa_len; /* span length */
25108 } uioa_page_t;
25109 
25110 typedef struct uioa_s {
25111  iovec_t *uio_iov; /* pointer to array of iovecs */
25112  int uio_iovcnt; /* number of iovecs */
25113  lloff_t _uio_offset; /* file offset */
25114  uio_seg_t uio_segflg; /* address space (kernel or user) */
25115  uint16_t uio_fmode; /* file mode flags */
25116  uint16_t uio_extflg; /* extended flags */
25117  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
25118  ssize_t uio_resid; /* residual count */
25119  /*
25120 	 * uioa extended members.
25121 	 */
25122  uint32_t uioa_state; /* state of asynch i/o */
25123  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
25124  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
25125  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
25126  void *uioa_hwst[4]; /* opaque hardware state */
25127  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
25128 } uioa_t;
25129 
25130 /*
25131  * uio extensions
25132  *
25133  * PSARC 2009/478: Copy Reduction Interfaces
25134  */
25135 typedef enum xuio_type {
25136  UIOTYPE_ASYNCIO,
25137  UIOTYPE_ZEROCOPY
25138 } xuio_type_t;
25139 
25140 typedef struct xuio {
25141  uio_t xu_uio; /* Embedded UIO structure */
25142 
25143  /* Extended uio fields */
25144  enum xuio_type xu_type; /* What kind of uio structure? */
25145  union {
25146   /* Async I/O Support, intend to replace uioa_t. */
25147   struct {
25148    uint32_t xu_a_state; /* state of async i/o */
25149    /* bytes that have been uioamove()ed */
25150    ssize_t xu_a_mbytes;
25151    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
25152    /* pointer into lcur->uioa_ppp[] */
25153    void **xu_a_lppp;
25154    void *xu_a_hwst[4]; /* opaque hardware state */
25155    /* Per iov locked pages */
25156    uioa_page_t xu_a_locked[16];
25157   } xu_aio;
25158 
25159   /*
25160 		 * Copy Reduction Support -- facilate loaning / returning of
25161 		 * filesystem cache buffers.
25162 		 */
25163   struct {
25164    int xu_zc_rw; /* read or write buffer */
25165    void *xu_zc_priv; /* fs specific */
25166   } xu_zc;
25167  } xu_ext;
25168 } xuio_t;
25169 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25170 /*
25171  * I/O direction.
25172  */
25173 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
25174 
25175 /*
25176  * uio_extflg: extended flags
25177  *
25178  * NOTE: This flag will be used in uiomove to determine if non-temporal
25179  * access, ie, access bypassing caches, should be used.  Filesystems that
25180  * don't initialize this field could experience suboptimal performance due to
25181  * the random data the field contains.
25182  *
25183  * NOTE: This flag is also used by uioasync callers to pass an extended
25184  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
25185  * consumers of a uioa_t require the uio_extflg to be initialized.
25186  */
25187 
25188 
25189 
25190 
25191 
25192 
25193 /*
25194  * Global uioasync capability shadow state.
25195  */
25196 typedef struct uioasync_s {
25197  boolean_t enabled; /* Is uioasync enabled? */
25198  size_t mincnt; /* Minimum byte count for use of */
25199 } uioasync_t;
25200 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25201 extern ssize_t readv(int, const struct iovec *, int);
25202 extern ssize_t writev(int, const struct iovec *, int);
25203 
25204 /*
25205  * When in the large file compilation environment,
25206  * map preadv/pwritev to their 64 bit offset versions
25207  */
25208 
25209 
25210 
25211 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25212 #pragma redefine_extname preadv preadv64
25213 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25214 
25215 
25216 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25217 #pragma redefine_extname pwritev pwritev64
25218 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25219 
25220 
25221 
25222 
25223 
25224 
25225 
25226 /* In the LP64 compilation environment, the APIs are already large file */
25227 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
25228 extern ssize_t preadv(int, const struct iovec *, int, off_t);
25229 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
25230 
25231 /*
25232  * preadv64 and pwritev64 should be defined when:
25233  * - Using the transitional compilation environment, and not
25234  *     the large file compilation environment.
25235  */
25236 
25237 
25238 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
25239 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
25240 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25241 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25242 /*
25243  * CDDL HEADER START
25244  *
25245  * The contents of this file are subject to the terms of the
25246  * Common Development and Distribution License (the "License").
25247  * You may not use this file except in compliance with the License.
25248  *
25249  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25250  * or http://www.opensolaris.org/os/licensing.
25251  * See the License for the specific language governing permissions
25252  * and limitations under the License.
25253  *
25254  * When distributing Covered Code, include this CDDL HEADER in each
25255  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25256  * If applicable, add the following below this CDDL HEADER, with the
25257  * fields enclosed by brackets "[]" replaced with your own identifying
25258  * information: Portions Copyright [yyyy] [name of copyright owner]
25259  *
25260  * CDDL HEADER END
25261  */
25262 
25263 /*
25264  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25265  * Copyright 2016 Joyent, Inc.
25266  *
25267  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25268  * Use is subject to license terms.
25269  */
25270 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25271 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
25272 /*
25273  * CDDL HEADER START
25274  *
25275  * The contents of this file are subject to the terms of the
25276  * Common Development and Distribution License (the "License").
25277  * You may not use this file except in compliance with the License.
25278  *
25279  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25280  * or http://www.opensolaris.org/os/licensing.
25281  * See the License for the specific language governing permissions
25282  * and limitations under the License.
25283  *
25284  * When distributing Covered Code, include this CDDL HEADER in each
25285  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25286  * If applicable, add the following below this CDDL HEADER, with the
25287  * fields enclosed by brackets "[]" replaced with your own identifying
25288  * information: Portions Copyright [yyyy] [name of copyright owner]
25289  *
25290  * CDDL HEADER END
25291  */
25292 /*
25293  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25294  * Use is subject to license terms.
25295  */
25296 
25297 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25298 /*	  All Rights Reserved	*/
25299 
25300 /*
25301  * Portions of this source code were derived from Berkeley 4.3 BSD
25302  * under license from the Regents of the University of California.
25303  */
25304 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25305 
25306 
25307 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
25308 /*
25309  * CDDL HEADER START
25310  *
25311  * The contents of this file are subject to the terms of the
25312  * Common Development and Distribution License, Version 1.0 only
25313  * (the "License").  You may not use this file except in compliance
25314  * with the License.
25315  *
25316  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25317  * or http://www.opensolaris.org/os/licensing.
25318  * See the License for the specific language governing permissions
25319  * and limitations under the License.
25320  *
25321  * When distributing Covered Code, include this CDDL HEADER in each
25322  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25323  * If applicable, add the following below this CDDL HEADER, with the
25324  * fields enclosed by brackets "[]" replaced with your own identifying
25325  * information: Portions Copyright [yyyy] [name of copyright owner]
25326  *
25327  * CDDL HEADER END
25328  */
25329 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25330 /*	  All Rights Reserved  	*/
25331 
25332 
25333 /*
25334  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
25335  *
25336  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
25337  * Use is subject to license terms.
25338  */
25339 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
25340 struct netconfig {
25341  char *nc_netid; /* network identifier		*/
25342  unsigned int nc_semantics; /* defined below		*/
25343  unsigned int nc_flag; /* defined below		*/
25344  char *nc_protofmly; /* protocol family name		*/
25345  char *nc_proto; /* protocol name		*/
25346  char *nc_device; /* device name for network id	*/
25347  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
25348  char **nc_lookups; /* list of lookup directories	*/
25349  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
25350 };
25351 
25352 typedef struct {
25353  struct netconfig **nc_head;
25354  struct netconfig **nc_curr;
25355 } NCONF_HANDLE;
25356 
25357 /*
25358  *	Values of nc_semantics
25359  */
25360 
25361 
25362 
25363 
25364 
25365 /*
25366  * NOT FOR PUBLIC USE, Solaris internal only.
25367  * This value of nc_semantics is strictly for use of Remote Direct
25368  * Memory Access provider interfaces in Solaris only and not for
25369  * general use. Do not use this value for general purpose user or
25370  * kernel programming. If used the behavior is undefined.
25371  * This is a PRIVATE interface to be used by Solaris kRPC only.
25372  */
25373 
25374 
25375 /*
25376  *	Values of nc_flag
25377  */
25378 
25379 
25380 
25381 
25382 
25383 /*
25384  *	Values of nc_protofmly
25385  */
25386 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
25387 /*
25388  * NOT FOR PUBLIC USE, Solaris internal only.
25389  * This value of nc_semantics is strictly for use of Remote Direct
25390  * Memory Access provider interfaces in Solaris only and not for
25391  * general use. Do not use this value for general purpose user or
25392  * kernel programming. If used the behavior is undefined.
25393  * This is a PRIVATE interface to be used by Solaris kRPC only.
25394  */
25395 
25396 
25397 /*
25398  *	Values for nc_proto
25399  */
25400 
25401 
25402 
25403 
25404 
25405 
25406 /*
25407  * 	Values for nc_proto for "rdma" protofmly
25408  */
25409 
25410 
25411 
25412 
25413 extern void *setnetconfig(void);
25414 extern int endnetconfig(void *);
25415 extern struct netconfig *getnetconfig(void *);
25416 extern struct netconfig *getnetconfigent(const char *);
25417 extern void freenetconfigent(struct netconfig *);
25418 extern void *setnetpath(void);
25419 extern int endnetpath(void *);
25420 extern struct netconfig *getnetpath(void *);
25421 extern void nc_perror(const char *);
25422 extern char *nc_sperror(void);
25423 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25424 
25425 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
25426 /*
25427  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25428  * Use is subject to license terms.
25429  *
25430  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25431  */
25432 /*
25433  * Copyright (c) 1982, 1986 Regents of the University of California.
25434  * All rights reserved.
25435  *
25436  * Redistribution and use in source and binary forms are permitted
25437  * provided that this notice is preserved and that due credit is given
25438  * to the University of California at Berkeley. The name of the University
25439  * may not be used to endorse or promote products derived from this
25440  * software without specific prior written permission. This software
25441  * is provided ``as is'' without express or implied warranty.
25442  */
25443 
25444 /*
25445  * Constants and structures defined by the internet system,
25446  * according to following documents
25447  *
25448  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
25449  *	http://www.iana.org/assignments/protocol-numbers
25450  *	http://www.iana.org/assignments/port-numbers
25451  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
25452  *
25453  */
25454 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
25455 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25456 /*
25457  * Definitions related to sockets: types, address families, options.
25458  */
25459 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25460 /*
25461  * Types
25462  */
25463 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25464 /*
25465  * Flags for socket() and accept4()
25466  */
25467 
25468 
25469 
25470 
25471 /*
25472  * Option flags per-socket.
25473  */
25474 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25475 /*
25476  * Socket options are passed using a signed integer, but it is also rare
25477  * for more than one to ever be passed at the same time with setsockopt
25478  * and only one at a time can be retrieved with getsockopt.
25479  *
25480  * Since the lower numbers cannot be renumbered for compatibility reasons,
25481  * it would seem that we need to start a new number space (0x40000000 -
25482  * 0x7fffffff) for those that don't need to be stored as a bit flag
25483  * somewhere. This limits the flag options to 30 but that seems to be
25484  * plenty, anyway. 0x40000000 is reserved for future use.
25485  */
25486 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25487 /*
25488  * N.B.: The following definition is present only for compatibility
25489  * with release 3.0.  It will disappear in later releases.
25490  */
25491 
25492 
25493 /*
25494  * Additional options, not kept in so_options.
25495  */
25496 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25497 /* "Socket"-level control message types: */
25498 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25499 /*
25500  * Socket filter options
25501  */
25502 
25503 
25504 
25505 
25506 
25507 /*
25508  * Structure returned by FIL_LIST
25509  */
25510 struct fil_info {
25511  int fi_flags; /* see below (FILF_*) */
25512  int fi_pos; /* position (0 is bottom) */
25513  char fi_name[32]; /* filter name */
25514 };
25515 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25516 /*
25517  * Structure used for manipulating linger option.
25518  */
25519 struct linger {
25520  int l_onoff; /* option on/off */
25521  int l_linger; /* linger time */
25522 };
25523 
25524 /*
25525  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
25526  */
25527 
25528 
25529 
25530 
25531 
25532 
25533 
25534 /*
25535  * Address families.
25536  *
25537  * Some of these constant names are copied for the DTrace IP provider in
25538  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
25539  * in sync.
25540  */
25541 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25542 /*
25543  * Protocol families, same as address families for now.
25544  */
25545 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25546 /*
25547  * Maximum queue length specifiable by listen.
25548  */
25549 
25550 
25551 /*
25552  * Message header for recvmsg and sendmsg calls.
25553  */
25554 struct msghdr {
25555  void *msg_name; /* optional address */
25556  socklen_t msg_namelen; /* size of address */
25557  struct iovec *msg_iov; /* scatter/gather array */
25558  int msg_iovlen; /* # elements in msg_iov */
25559 
25560 
25561 
25562 
25563 
25564 
25565  caddr_t msg_accrights; /* access rights sent/received */
25566  int msg_accrightslen;
25567 
25568 };
25569 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25570 /* Added for XPGv2 compliance */
25571 
25572 
25573 
25574 
25575 
25576      /* with left over data */
25577 /* End of XPGv2 compliance */
25578 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25579 /* Added for XPGv2 compliance */
25580 
25581 
25582 
25583 
25584 struct cmsghdr {
25585  socklen_t cmsg_len; /* data byte count, including hdr */
25586  int cmsg_level; /* originating protocol */
25587  int cmsg_type; /* protocol-specific type */
25588 };
25589 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
25590 extern int accept(int, struct sockaddr *, Psocklen_t);
25591 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
25592 extern int bind(int, const struct sockaddr *, socklen_t);
25593 extern int connect(int, const struct sockaddr *, socklen_t);
25594 extern int getpeername(int, struct sockaddr *, Psocklen_t);
25595 extern int getsockname(int, struct sockaddr *, Psocklen_t);
25596 extern int getsockopt(int, int, int, void *, Psocklen_t);
25597 extern int listen(int, int); /* XXX - fixme???  where do I go */
25598 extern int socketpair(int, int, int, int *);
25599 extern ssize_t recv(int, void *, size_t, int);
25600 extern ssize_t recvfrom(int, void *, size_t, int,
25601  struct sockaddr *, Psocklen_t);
25602 extern ssize_t recvmsg(int, struct msghdr *, int);
25603 extern ssize_t send(int, const void *, size_t, int);
25604 extern ssize_t sendmsg(int, const struct msghdr *, int);
25605 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
25606  socklen_t);
25607 extern int setsockopt(int, int, int, const void *, socklen_t);
25608 extern int shutdown(int, int);
25609 extern int socket(int, int, int);
25610 
25611 
25612 extern int sockatmark(int);
25613 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25614 
25615 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
25616 /*
25617  * CDDL HEADER START
25618  *
25619  * The contents of this file are subject to the terms of the
25620  * Common Development and Distribution License (the "License").
25621  * You may not use this file except in compliance with the License.
25622  *
25623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25624  * or http://www.opensolaris.org/os/licensing.
25625  * See the License for the specific language governing permissions
25626  * and limitations under the License.
25627  *
25628  * When distributing Covered Code, include this CDDL HEADER in each
25629  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25630  * If applicable, add the following below this CDDL HEADER, with the
25631  * fields enclosed by brackets "[]" replaced with your own identifying
25632  * information: Portions Copyright [yyyy] [name of copyright owner]
25633  *
25634  * CDDL HEADER END
25635  */
25636 
25637 /*
25638  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
25639  * Copyright 2016 Joyent, Inc.
25640  *
25641  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25642  * Use is subject to license terms.
25643  */
25644 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
25645 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
25646 struct hostent {
25647  char *h_name; /* official name of host */
25648  char **h_aliases; /* alias list */
25649  int h_addrtype; /* host address type */
25650  int h_length; /* length of address */
25651  char **h_addr_list; /* list of addresses from name server */
25652 
25653 };
25654 
25655 
25656 /*
25657  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
25658  * and Service Name Translation.
25659  */
25660 
25661 
25662 struct addrinfo {
25663  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
25664  int ai_family; /* PF_xxx */
25665  int ai_socktype; /* SOCK_xxx */
25666  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
25667 
25668 
25669 
25670  socklen_t ai_addrlen;
25671  char *ai_canonname; /* canonical name for hostname */
25672  struct sockaddr *ai_addr; /* binary address */
25673  struct addrinfo *ai_next; /* next structure in linked list */
25674 };
25675 
25676 /*
25677  * The flag 0x8000 is currently reserved for private use between libnsl and
25678  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
25679  */
25680 /* addrinfo flags */
25681 
25682 
25683 
25684 
25685 
25686 /* getipnodebyname() flags */
25687 
25688 
25689 
25690 
25691 
25692 /*
25693  * These were defined in RFC 2553 but not SUSv3
25694  * or RFC 3493 which obsoleted 2553.
25695  */
25696 
25697 
25698 
25699 /* addrinfo errors */
25700 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
25701 /* getnameinfo flags */
25702 
25703 
25704 
25705 
25706 
25707 
25708 
25709 /* Not listed in any standards document */
25710 
25711 
25712 
25713 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
25714 
25715 
25716 
25717 
25718 
25719 /*
25720  * Scope delimit character
25721  */
25722 
25723 
25724 
25725 /*
25726  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
25727  * and algorithms.
25728  */
25729 
25730 typedef struct ipsecalgent {
25731  char **a_names; /* algorithm names */
25732  int a_proto_num; /* protocol number */
25733  int a_alg_num; /* algorithm number */
25734  char *a_mech_name; /* encryption framework mechanism name */
25735  int *a_block_sizes; /* supported block sizes */
25736  int *a_key_sizes; /* supported key sizes */
25737  int a_key_increment; /* key size increment */
25738  int *a_mech_params; /* mechanism specific parameters */
25739  int a_alg_flags; /* algorithm flags */
25740 } ipsecalgent_t;
25741 
25742 /* well-known IPsec protocol numbers */
25743 
25744 
25745 
25746 
25747 
25748 /*
25749  * Assumption here is that a network number
25750  * fits in 32 bits -- probably a poor one.
25751  */
25752 struct netent {
25753  char *n_name; /* official name of net */
25754  char **n_aliases; /* alias list */
25755  int n_addrtype; /* net address type */
25756  in_addr_t n_net; /* network # */
25757 };
25758 
25759 struct protoent {
25760  char *p_name; /* official protocol name */
25761  char **p_aliases; /* alias list */
25762  int p_proto; /* protocol # */
25763 };
25764 
25765 struct servent {
25766  char *s_name; /* official service name */
25767  char **s_aliases; /* alias list */
25768  int s_port; /* port # */
25769  char *s_proto; /* protocol to use */
25770 };
25771 
25772 
25773 struct hostent *gethostbyname_r
25774  (const char *, struct hostent *, char *, int, int *h_errnop);
25775 struct hostent *gethostbyaddr_r
25776  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
25777 struct hostent *getipnodebyname(const char *, int, int, int *);
25778 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
25779 void freehostent(struct hostent *);
25780 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
25781 
25782 struct servent *getservbyname_r
25783  (const char *name, const char *, struct servent *, char *, int);
25784 struct servent *getservbyport_r
25785  (int port, const char *, struct servent *, char *, int);
25786 struct servent *getservent_r(struct servent *, char *, int);
25787 
25788 struct netent *getnetbyname_r
25789  (const char *, struct netent *, char *, int);
25790 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
25791 struct netent *getnetent_r(struct netent *, char *, int);
25792 
25793 struct protoent *getprotobyname_r
25794  (const char *, struct protoent *, char *, int);
25795 struct protoent *getprotobynumber_r
25796  (int, struct protoent *, char *, int);
25797 struct protoent *getprotoent_r(struct protoent *, char *, int);
25798 
25799 int getnetgrent_r(char **, char **, char **, char *, int);
25800 int innetgr(const char *, const char *, const char *, const char *);
25801 
25802 
25803 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
25804 struct hostent *gethostbyname(const char *);
25805 struct hostent *gethostent(void);
25806 struct netent *getnetbyaddr(in_addr_t, int);
25807 struct netent *getnetbyname(const char *);
25808 struct netent *getnetent(void);
25809 struct protoent *getprotobyname(const char *);
25810 struct protoent *getprotobynumber(int);
25811 struct protoent *getprotoent(void);
25812 struct servent *getservbyname(const char *, const char *);
25813 struct servent *getservbyport(int, const char *);
25814 struct servent *getservent(void);
25815 
25816 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
25817 
25818 struct hostent *gethostbyaddr(const void *, socklen_t, int);
25819 
25820 
25821 
25822 
25823 
25824 int endhostent(void);
25825 int endnetent(void);
25826 int endprotoent(void);
25827 int endservent(void);
25828 int sethostent(int);
25829 int setnetent(int);
25830 int setprotoent(int);
25831 int setservent(int);
25832 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
25833 int getaddrinfo(const char *,
25834    const char *,
25835    const struct addrinfo *,
25836    struct addrinfo **);
25837 void freeaddrinfo(struct addrinfo *);
25838 const char *gai_strerror(int);
25839 int getnameinfo(const struct sockaddr *,
25840    socklen_t, char *, socklen_t,
25841    char *, socklen_t, int);
25842 
25843 
25844 
25845 int getnetgrent(char **, char **, char **);
25846 int setnetgrent(const char *);
25847 int endnetgrent(void);
25848 int rcmd(char **, unsigned short,
25849  const char *, const char *, const char *, int *);
25850 int rcmd_af(char **, unsigned short,
25851  const char *, const char *, const char *, int *, int);
25852 int rresvport_af(int *, int);
25853 int rresvport_addr(int *, struct sockaddr_storage *);
25854 int rexec(char **, unsigned short,
25855  const char *, const char *, const char *, int *);
25856 int rexec_af(char **, unsigned short,
25857  const char *, const char *, const char *, int *, int);
25858 int rresvport(int *);
25859 int ruserok(const char *, int, const char *, const char *);
25860 /* BIND */
25861 struct hostent *gethostbyname2(const char *, int);
25862 void herror(const char *);
25863 const char *hstrerror(int);
25864 /* End BIND */
25865 
25866 /* IPsec algorithm prototype definitions */
25867 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
25868 struct ipsecalgent *getipsecalgbynum(int, int, int *);
25869 int getipsecprotobyname(const char *doi_name);
25870 char *getipsecprotobynum(int doi_domain);
25871 void freeipsecalgent(struct ipsecalgent *ptr);
25872 /* END IPsec algorithm prototype definitions */
25873 
25874 
25875 
25876 /*
25877  * Error return codes from gethostbyname() and gethostbyaddr()
25878  * (when using the resolver)
25879  */
25880 
25881 extern int h_errno;
25882 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
25883 /*
25884  * Error return codes from gethostbyname() and gethostbyaddr()
25885  * (left in extern int h_errno).
25886  */
25887 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
25888 /* BIND */
25889 
25890 
25891 /* End BIND */
25892 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
25893 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
25894 /*
25895  * CDDL HEADER START
25896  *
25897  * The contents of this file are subject to the terms of the
25898  * Common Development and Distribution License, Version 1.0 only
25899  * (the "License").  You may not use this file except in compliance
25900  * with the License.
25901  *
25902  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25903  * or http://www.opensolaris.org/os/licensing.
25904  * See the License for the specific language governing permissions
25905  * and limitations under the License.
25906  *
25907  * When distributing Covered Code, include this CDDL HEADER in each
25908  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25909  * If applicable, add the following below this CDDL HEADER, with the
25910  * fields enclosed by brackets "[]" replaced with your own identifying
25911  * information: Portions Copyright [yyyy] [name of copyright owner]
25912  *
25913  * CDDL HEADER END
25914  */
25915 /*
25916  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25917  * Use is subject to license terms.
25918  */
25919 
25920 
25921 
25922 
25923 #pragma ident "%Z%%M%	%I%	%E% SMI"
25924 
25925 
25926 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
25927 /*
25928  * CDDL HEADER START
25929  *
25930  * The contents of this file are subject to the terms of the
25931  * Common Development and Distribution License (the "License").
25932  * You may not use this file except in compliance with the License.
25933  *
25934  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25935  * or http://www.opensolaris.org/os/licensing.
25936  * See the License for the specific language governing permissions
25937  * and limitations under the License.
25938  *
25939  * When distributing Covered Code, include this CDDL HEADER in each
25940  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25941  * If applicable, add the following below this CDDL HEADER, with the
25942  * fields enclosed by brackets "[]" replaced with your own identifying
25943  * information: Portions Copyright [yyyy] [name of copyright owner]
25944  *
25945  * CDDL HEADER END
25946  */
25947 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25948 /*	  All Rights Reserved  	*/
25949 
25950 
25951 /*
25952  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25953  * Use is subject to license terms.
25954  *
25955  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
25956  * Copyright 2016 Joyent, Inc.
25957  */
25958 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
25959 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
25960 /*
25961  * CDDL HEADER START
25962  *
25963  * The contents of this file are subject to the terms of the
25964  * Common Development and Distribution License, Version 1.0 only
25965  * (the "License").  You may not use this file except in compliance
25966  * with the License.
25967  *
25968  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25969  * or http://www.opensolaris.org/os/licensing.
25970  * See the License for the specific language governing permissions
25971  * and limitations under the License.
25972  *
25973  * When distributing Covered Code, include this CDDL HEADER in each
25974  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25975  * If applicable, add the following below this CDDL HEADER, with the
25976  * fields enclosed by brackets "[]" replaced with your own identifying
25977  * information: Portions Copyright [yyyy] [name of copyright owner]
25978  *
25979  * CDDL HEADER END
25980  */
25981 /*
25982  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
25983  * Use is subject to license terms.
25984  */
25985 
25986 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
25987 /*	  All Rights Reserved  	*/
25988 
25989 /*
25990  * University Copyright- Copyright (c) 1982, 1986, 1988
25991  * The Regents of the University of California
25992  * All Rights Reserved
25993  *
25994  * University Acknowledgment- Portions of this document are derived from
25995  * software developed by the University of California, Berkeley, and its
25996  * contributors.
25997  */
25998 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
25999 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
26000 /*
26001  * CDDL HEADER START
26002  *
26003  * The contents of this file are subject to the terms of the
26004  * Common Development and Distribution License, Version 1.0 only
26005  * (the "License").  You may not use this file except in compliance
26006  * with the License.
26007  *
26008  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26009  * or http://www.opensolaris.org/os/licensing.
26010  * See the License for the specific language governing permissions
26011  * and limitations under the License.
26012  *
26013  * When distributing Covered Code, include this CDDL HEADER in each
26014  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26015  * If applicable, add the following below this CDDL HEADER, with the
26016  * fields enclosed by brackets "[]" replaced with your own identifying
26017  * information: Portions Copyright [yyyy] [name of copyright owner]
26018  *
26019  * CDDL HEADER END
26020  */
26021 /*
26022  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
26023  * Use is subject to license terms.
26024  */
26025 
26026 
26027 
26028 
26029 #pragma ident "%Z%%M%	%I%	%E% SMI"
26030 
26031 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
26032 /*
26033  * CDDL HEADER START
26034  *
26035  * The contents of this file are subject to the terms of the
26036  * Common Development and Distribution License (the "License").
26037  * You may not use this file except in compliance with the License.
26038  *
26039  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26040  * or http://www.opensolaris.org/os/licensing.
26041  * See the License for the specific language governing permissions
26042  * and limitations under the License.
26043  *
26044  * When distributing Covered Code, include this CDDL HEADER in each
26045  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26046  * If applicable, add the following below this CDDL HEADER, with the
26047  * fields enclosed by brackets "[]" replaced with your own identifying
26048  * information: Portions Copyright [yyyy] [name of copyright owner]
26049  *
26050  * CDDL HEADER END
26051  */
26052 
26053 /*
26054  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
26055  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
26056  */
26057 
26058 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
26059 /*	  All Rights Reserved  	*/
26060 
26061 /*
26062  * University Copyright- Copyright (c) 1982, 1986, 1988
26063  * The Regents of the University of California
26064  * All Rights Reserved
26065  *
26066  * University Acknowledgment- Portions of this document are derived from
26067  * software developed by the University of California, Berkeley, and its
26068  * contributors.
26069  */
26070 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
26071 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
26072 typedef struct {
26073  char hostname[256];
26074  ushort_t port;
26075 } url_hport_t;
26076 
26077 typedef struct {
26078  boolean_t https;
26079  url_hport_t hport;
26080  char abspath[1024];
26081 } url_t;
26082 
26083 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
26084 extern int url_parse(const char *, url_t *);
26085 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
26086 
26087 
26088 
26089 
26090 
26091 /* State information returned by http_conn_info() */
26092 typedef struct {
26093  url_t uri; /* URI last loaded */
26094  url_hport_t proxy; /* proxy, if any being used */
26095  boolean_t keepalive; /* Keepalive setting being used */
26096  uint_t read_timeout; /* Timeout to use for socket reads */
26097 } http_conninfo_t;
26098 
26099 
26100 /* Structure for version of the http file */
26101 typedef struct {
26102  uint_t maj_ver; /* Major version */
26103  uint_t min_ver; /* Minor version */
26104  uint_t micro_ver; /* Micro version */
26105 } boot_http_ver_t;
26106 
26107 /* Internal Libhttp errors */
26108 
26109 
26110 
26111     /* necessarily the underlying transport */
26112     /* connection). */
26113 
26114     /* error. */
26115 
26116 
26117 
26118     /* No matching entry */
26119 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
26120 /* Sources of errors */
26121 
26122 
26123 
26124 
26125 
26126 
26127 
26128 typedef struct {
26129  uint_t code; /* status code */
26130  char *statusmsg; /* status message */
26131  uint_t nresphdrs; /* number of response headers */
26132 } http_respinfo_t;
26133 
26134 
26135 typedef void *http_handle_t;
26136 
26137 boot_http_ver_t const *http_get_version(void);
26138 void http_set_p12_format(int);
26139 void http_set_verbose(boolean_t);
26140 int http_set_cipher_list(const char *);
26141 http_handle_t http_srv_init(const url_t *);
26142 int http_set_proxy(http_handle_t, const url_hport_t *);
26143 int http_set_keepalive(http_handle_t, boolean_t);
26144 int http_set_socket_read_timeout(http_handle_t, uint_t);
26145 int http_set_basic_auth(http_handle_t, const char *, const char *);
26146 int http_set_random_file(http_handle_t, const char *);
26147 int http_set_certificate_authority_file(const char *);
26148 int http_set_client_certificate_file(http_handle_t, const char *);
26149 int http_set_password(http_handle_t, const char *);
26150 int http_set_key_file_password(http_handle_t, const char *);
26151 int http_set_private_key_file(http_handle_t, const char *);
26152 
26153 int http_srv_connect(http_handle_t);
26154 int http_head_request(http_handle_t, const char *);
26155 int http_get_request(http_handle_t, const char *);
26156 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
26157 void http_free_respinfo(http_respinfo_t *);
26158 int http_process_headers(http_handle_t, http_respinfo_t **);
26159 int http_process_part_headers(http_handle_t, http_respinfo_t **);
26160 char *http_get_header_value(http_handle_t, const char *);
26161 char *http_get_response_header(http_handle_t, uint_t);
26162 int http_read_body(http_handle_t, char *, size_t);
26163 int http_srv_disconnect(http_handle_t);
26164 int http_srv_close(http_handle_t);
26165 http_conninfo_t *http_get_conn_info(http_handle_t);
26166 int http_conn_is_https(http_handle_t, boolean_t *);
26167 ulong_t http_get_lasterr(http_handle_t, uint_t *);
26168 void http_decode_err(ulong_t, int *, int *, int *);
26169 char const *http_errorstr(uint_t, ulong_t);
26170 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26171 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
26172 /*
26173  * CDDL HEADER START
26174  *
26175  * The contents of this file are subject to the terms of the
26176  * Common Development and Distribution License (the "License").
26177  * You may not use this file except in compliance with the License.
26178  *
26179  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26180  * or http://www.opensolaris.org/os/licensing.
26181  * See the License for the specific language governing permissions
26182  * and limitations under the License.
26183  *
26184  * When distributing Covered Code, include this CDDL HEADER in each
26185  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26186  * If applicable, add the following below this CDDL HEADER, with the
26187  * fields enclosed by brackets "[]" replaced with your own identifying
26188  * information: Portions Copyright [yyyy] [name of copyright owner]
26189  *
26190  * CDDL HEADER END
26191  */
26192 
26193 /*
26194  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26195  * Use is subject to license terms.
26196  */
26197 
26198 
26199 
26200 
26201 
26202 /*
26203  * Module:	pkgerr.h
26204  * Description:
26205  *
26206  *   Implements error routines to handle the creation,
26207  *   management, and destruction of error objects, which
26208  *   hold error messages and codes returned from libpkg
26209  *   routines that support the objects defined herein.
26210  */
26211 
26212 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
26213 /*
26214  * CDDL HEADER START
26215  *
26216  * The contents of this file are subject to the terms of the
26217  * Common Development and Distribution License (the "License").
26218  * You may not use this file except in compliance with the License.
26219  *
26220  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26221  * or http://www.opensolaris.org/os/licensing.
26222  * See the License for the specific language governing permissions
26223  * and limitations under the License.
26224  *
26225  * When distributing Covered Code, include this CDDL HEADER in each
26226  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26227  * If applicable, add the following below this CDDL HEADER, with the
26228  * fields enclosed by brackets "[]" replaced with your own identifying
26229  * information: Portions Copyright [yyyy] [name of copyright owner]
26230  *
26231  * CDDL HEADER END
26232  */
26233 
26234 /*
26235  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
26236  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
26237  */
26238 
26239 /*	Copyright (c) 1988 AT&T	*/
26240 /*	  All Rights Reserved  	*/
26241 
26242 /*
26243  * User-visible pieces of the ANSI C standard I/O package.
26244  */
26245 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
26246 
26247 
26248 
26249 
26250 
26251 /*
26252  * Public Definitions
26253  */
26254 
26255 typedef enum {
26256  PKGERR_OK = 0,
26257  PKGERR_EXIST,
26258  PKGERR_READ,
26259  PKGERR_CORRUPT,
26260  PKGERR_PARSE,
26261  PKGERR_BADPASS,
26262  PKGERR_BADALIAS,
26263  PKGERR_INTERNAL,
26264  PKGERR_UNSUP,
26265  PKGERR_NOALIAS,
26266  PKGERR_NOALIASMATCH,
26267  PKGERR_MULTIPLE,
26268  PKGERR_INCOMPLETE,
26269  PKGERR_NOPRIVKEY,
26270  PKGERR_NOPUBKEY,
26271  PKGERR_NOCACERT,
26272  PKGERR_NOMEM,
26273  PKGERR_CHAIN,
26274  PKGERR_LOCKED,
26275  PKGERR_WRITE,
26276  PKGERR_UNLOCK,
26277  PKGERR_TIME,
26278  PKGERR_DUPLICATE,
26279  PKGERR_WEB,
26280  PKGERR_VERIFY
26281 } PKG_ERR_CODE;
26282 
26283 /*
26284  * Public Structures
26285  */
26286 
26287 /* external reference to PKG_ERR object (contents private) */
26288 typedef PKG_ERR_CODE pkg_err_t;
26289 
26290 typedef struct _pkg_err_struct PKG_ERR;
26291 
26292 /*
26293  * Public Methods
26294  */
26295 
26296 PKG_ERR *pkgerr_new();
26297 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
26298 void pkgerr_clear(PKG_ERR *);
26299 int pkgerr_dump(PKG_ERR *, FILE *);
26300 int pkgerr_num(PKG_ERR *);
26301 char *pkgerr_get(PKG_ERR *, int);
26302 void pkgerr_free(PKG_ERR *);
26303 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26304 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
26305 /*
26306  * CDDL HEADER START
26307  *
26308  * The contents of this file are subject to the terms of the
26309  * Common Development and Distribution License (the "License").
26310  * You may not use this file except in compliance with the License.
26311  *
26312  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26313  * or http://www.opensolaris.org/os/licensing.
26314  * See the License for the specific language governing permissions
26315  * and limitations under the License.
26316  *
26317  * When distributing Covered Code, include this CDDL HEADER in each
26318  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26319  * If applicable, add the following below this CDDL HEADER, with the
26320  * fields enclosed by brackets "[]" replaced with your own identifying
26321  * information: Portions Copyright [yyyy] [name of copyright owner]
26322  *
26323  * CDDL HEADER END
26324  */
26325 
26326 /*
26327  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26328  * Use is subject to license terms.
26329  */
26330 
26331 
26332 
26333 
26334 
26335 /*
26336  * Module:	keystore.h
26337  * Description:	This module contains the structure definitions for processing
26338  *		package keystore files.
26339  */
26340 
26341 
26342 
26343 
26344 
26345 # 1 "/usr/include/openssl/evp.h" 1 3 4
26346 /* crypto/evp/evp.h */
26347 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26348  * All rights reserved.
26349  *
26350  * This package is an SSL implementation written
26351  * by Eric Young (eay@cryptsoft.com).
26352  * The implementation was written so as to conform with Netscapes SSL.
26353  *
26354  * This library is free for commercial and non-commercial use as long as
26355  * the following conditions are aheared to.  The following conditions
26356  * apply to all code found in this distribution, be it the RC4, RSA,
26357  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26358  * included with this distribution is covered by the same copyright terms
26359  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26360  *
26361  * Copyright remains Eric Young's, and as such any Copyright notices in
26362  * the code are not to be removed.
26363  * If this package is used in a product, Eric Young should be given attribution
26364  * as the author of the parts of the library used.
26365  * This can be in the form of a textual message at program startup or
26366  * in documentation (online or textual) provided with the package.
26367  *
26368  * Redistribution and use in source and binary forms, with or without
26369  * modification, are permitted provided that the following conditions
26370  * are met:
26371  * 1. Redistributions of source code must retain the copyright
26372  *    notice, this list of conditions and the following disclaimer.
26373  * 2. Redistributions in binary form must reproduce the above copyright
26374  *    notice, this list of conditions and the following disclaimer in the
26375  *    documentation and/or other materials provided with the distribution.
26376  * 3. All advertising materials mentioning features or use of this software
26377  *    must display the following acknowledgement:
26378  *    "This product includes cryptographic software written by
26379  *     Eric Young (eay@cryptsoft.com)"
26380  *    The word 'cryptographic' can be left out if the rouines from the library
26381  *    being used are not cryptographic related :-).
26382  * 4. If you include any Windows specific code (or a derivative thereof) from
26383  *    the apps directory (application code) you must include an acknowledgement:
26384  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26385  *
26386  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26387  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26388  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26389  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26390  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26391  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26392  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26393  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26394  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26395  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26396  * SUCH DAMAGE.
26397  *
26398  * The licence and distribution terms for any publically available version or
26399  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26400  * copied and put under another distribution licence
26401  * [including the GNU Public Licence.]
26402  */
26403 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
26404 # 1 "/usr/include/openssl/x509.h" 1 3 4
26405 /* crypto/x509/x509.h */
26406 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
26407  * All rights reserved.
26408  *
26409  * This package is an SSL implementation written
26410  * by Eric Young (eay@cryptsoft.com).
26411  * The implementation was written so as to conform with Netscapes SSL.
26412  *
26413  * This library is free for commercial and non-commercial use as long as
26414  * the following conditions are aheared to.  The following conditions
26415  * apply to all code found in this distribution, be it the RC4, RSA,
26416  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
26417  * included with this distribution is covered by the same copyright terms
26418  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
26419  *
26420  * Copyright remains Eric Young's, and as such any Copyright notices in
26421  * the code are not to be removed.
26422  * If this package is used in a product, Eric Young should be given attribution
26423  * as the author of the parts of the library used.
26424  * This can be in the form of a textual message at program startup or
26425  * in documentation (online or textual) provided with the package.
26426  *
26427  * Redistribution and use in source and binary forms, with or without
26428  * modification, are permitted provided that the following conditions
26429  * are met:
26430  * 1. Redistributions of source code must retain the copyright
26431  *    notice, this list of conditions and the following disclaimer.
26432  * 2. Redistributions in binary form must reproduce the above copyright
26433  *    notice, this list of conditions and the following disclaimer in the
26434  *    documentation and/or other materials provided with the distribution.
26435  * 3. All advertising materials mentioning features or use of this software
26436  *    must display the following acknowledgement:
26437  *    "This product includes cryptographic software written by
26438  *     Eric Young (eay@cryptsoft.com)"
26439  *    The word 'cryptographic' can be left out if the rouines from the library
26440  *    being used are not cryptographic related :-).
26441  * 4. If you include any Windows specific code (or a derivative thereof) from
26442  *    the apps directory (application code) you must include an acknowledgement:
26443  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
26444  *
26445  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
26446  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26447  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26448  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26449  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26450  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26451  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26452  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26453  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26454  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26455  * SUCH DAMAGE.
26456  *
26457  * The licence and distribution terms for any publically available version or
26458  * derivative of this code cannot be changed.  i.e. this code cannot simply be
26459  * copied and put under another distribution licence
26460  * [including the GNU Public Licence.]
26461  */
26462 /* ====================================================================
26463  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
26464  * ECDH support in OpenSSL originally developed by
26465  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
26466  */
26467 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
26468 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
26469 /*
26470  * CDDL HEADER START
26471  *
26472  * The contents of this file are subject to the terms of the
26473  * Common Development and Distribution License (the "License").
26474  * You may not use this file except in compliance with the License.
26475  *
26476  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26477  * or http://www.opensolaris.org/os/licensing.
26478  * See the License for the specific language governing permissions
26479  * and limitations under the License.
26480  *
26481  * When distributing Covered Code, include this CDDL HEADER in each
26482  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26483  * If applicable, add the following below this CDDL HEADER, with the
26484  * fields enclosed by brackets "[]" replaced with your own identifying
26485  * information: Portions Copyright [yyyy] [name of copyright owner]
26486  *
26487  * CDDL HEADER END
26488  */
26489 
26490 /*
26491  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
26492  * Use is subject to license terms.
26493  */
26494 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
26495 
26496 /* keystore structures */
26497 
26498 /* this opaque type represents a keystore */
26499 typedef void *keystore_handle_t;
26500 
26501 /* flags passed to open_keystore */
26502 
26503 /* opens keystore read-only.  Attempts to modify results in an error */
26504 
26505 
26506 /* opens keystore read-write */
26507 
26508 
26509 /*
26510  * tells open_keystore to fall back to app-generic paths in the case that
26511  * the app-specific paths do not exist.
26512  */
26513 
26514 
26515 /*
26516  * tells open_keystore to use the app-specific paths no matter what,
26517  * failing if they cannot be used for any reason.
26518  */
26519 
26520 
26521 /* masks off various types of flags */
26522 
26523 
26524 
26525 /* default is read-only, soft */
26526 
26527 
26528 
26529 /*
26530  * possible encoding formats used by the library, used
26531  * by print_cert
26532  */
26533 typedef enum {
26534  KEYSTORE_FORMAT_PEM,
26535  KEYSTORE_FORMAT_DER,
26536  KEYSTORE_FORMAT_TEXT
26537 } keystore_encoding_format_t;
26538 
26539 /*
26540  * structure passed back to password callback for determining how
26541  * to prompt for passphrase, and where to record errors
26542  */
26543 typedef struct {
26544  PKG_ERR *err;
26545 } keystore_passphrase_data;
26546 
26547 
26548 /* max length of a passphrase.  One could use a short story! */
26549 
26550 
26551 /* callback for collecting passphrase when open_keystore() is called */
26552 typedef int keystore_passphrase_cb(char *, int, int, void *);
26553 
26554 /* names of the individual files within the keystore path */
26555 
26556 
26557 
26558 
26559 /* keystore.c */
26560 extern int open_keystore(PKG_ERR *, char *, char *,
26561     keystore_passphrase_cb, long flags, keystore_handle_t *);
26562 
26563 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
26564     keystore_encoding_format_t, FILE *);
26565 
26566 extern int check_cert(PKG_ERR *, X509 *);
26567 
26568 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
26569 
26570 extern int print_cert(PKG_ERR *, X509 *,
26571     keystore_encoding_format_t, char *, boolean_t, FILE *);
26572 
26573 extern int close_keystore(PKG_ERR *, keystore_handle_t,
26574     keystore_passphrase_cb);
26575 
26576 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
26577 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
26578     char *, keystore_handle_t);
26579 
26580 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
26581     char *);
26582 
26583 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
26584     char *, EVP_PKEY **, X509 **);
26585 
26586 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
26587     struct stack_st_X509 **);
26588 
26589 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
26590     struct stack_st_X509 **);
26591 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26592 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
26593 /*
26594  * CDDL HEADER START
26595  *
26596  * The contents of this file are subject to the terms of the
26597  * Common Development and Distribution License (the "License").
26598  * You may not use this file except in compliance with the License.
26599  *
26600  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26601  * or http://www.opensolaris.org/os/licensing.
26602  * See the License for the specific language governing permissions
26603  * and limitations under the License.
26604  *
26605  * When distributing Covered Code, include this CDDL HEADER in each
26606  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26607  * If applicable, add the following below this CDDL HEADER, with the
26608  * fields enclosed by brackets "[]" replaced with your own identifying
26609  * information: Portions Copyright [yyyy] [name of copyright owner]
26610  *
26611  * CDDL HEADER END
26612  */
26613 
26614 /*
26615  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26616  * Use is subject to license terms.
26617  */
26618 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
26619 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
26620 /*
26621  * CDDL HEADER START
26622  *
26623  * The contents of this file are subject to the terms of the
26624  * Common Development and Distribution License (the "License").
26625  * You may not use this file except in compliance with the License.
26626  *
26627  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
26628  * or http://www.opensolaris.org/os/licensing.
26629  * See the License for the specific language governing permissions
26630  * and limitations under the License.
26631  *
26632  * When distributing Covered Code, include this CDDL HEADER in each
26633  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
26634  * If applicable, add the following below this CDDL HEADER, with the
26635  * fields enclosed by brackets "[]" replaced with your own identifying
26636  * information: Portions Copyright [yyyy] [name of copyright owner]
26637  *
26638  * CDDL HEADER END
26639  */
26640 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
26641 /*	  All Rights Reserved  	*/
26642 
26643 /*
26644  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26645  * Use is subject to license terms.
26646  */
26647 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
26648 
26649 struct mergstat {
26650  unsigned setuid:1; /* pkgmap entry has setuid */
26651  unsigned setgid:1; /* ... and/or setgid bit set */
26652  unsigned contchg:1; /* contents of the files different */
26653  unsigned attrchg:1; /* attributes are different */
26654  unsigned shared:1; /* > 1 pkg associated with this */
26655  unsigned osetuid:1; /* installed set[ug]id process ... */
26656  unsigned osetgid:1; /* ... being overwritten by pkg. */
26657  unsigned rogue:1; /* conflicting file not owned by a package */
26658  unsigned dir2nondir:1; /* was a directory & now a non-directory */
26659  unsigned replace:1; /* merge makes no sense for this object pair */
26660  unsigned denied:1; /* for some reason this was not allowed in */
26661  unsigned preloaded:1; /* already checked in a prior pkg op */
26662  unsigned processed:1; /* already installed or removed */
26663  unsigned parentsyml2dir:1;
26664  /* parent directory changed from symlink to a directory */
26665 };
26666 
26667 /*
26668  * This is information required by pkgadd for fast operation. A
26669  * cfextra struct is tagged to each cfent structure requiring
26670  * processing. This is how we avoid some unneeded repetition. The
26671  * entries incorporating the word 'local' refer to the path that
26672  * gets us to the delivered package file. In other words, to install
26673  * a file we usually copy from 'local' to 'path' below. In the case
26674  * of a link, where no actual copying takes place, local is the source
26675  * of the link. Note that environment variables are not evaluated in
26676  * the locals unless they are links since the literal path is how
26677  * pkgadd finds the entry under the reloc directory.
26678  */
26679 struct cfextra {
26680  struct cfent cf_ent; /* basic contents file entry */
26681  struct mergstat mstat; /* merge status for installs */
26682  uint32_t fsys_value; /* fstab[] entry index */
26683  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
26684  char *client_path; /* the client-relative path */
26685  char *server_path; /* the server-relative path */
26686  char *map_path; /* as read from the pkgmap */
26687  char *client_local; /* client_relative local */
26688  char *server_local; /* server relative local */
26689 };
26690 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
26691 
26692 /*
26693  * The contents database file interface.
26694  */
26695 
26696 typedef struct pkg_server *PKGserver;
26697 
26698 /* Some commands modify the internal database: add them here */
26699 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26700 typedef enum {
26701  INVALID, /* Not initialized */
26702  NEVER, /* Don't start, does check if it is running. */
26703  FLUSH_LOG, /* Run it once to incorporate the log. */
26704  RUN_ONCE, /* Run until the current client stops. */
26705  TIMEOUT, /* Run until a timeout occurs. */
26706  PERMANENT, /* Run until it is externally terminated. */
26707  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
26708 } start_mode_t;
26709 
26710 typedef struct pkgcmd {
26711  int cmd;
26712  char buf[1];
26713 } pkgcmd_t;
26714 
26715 typedef struct pkgfilter {
26716  int cmd;
26717  int len;
26718  char buf[1];
26719 } pkgfilter_t;
26720 
26721 /*
26722  * Virtual File Protocol definitions
26723  */
26724 
26725 /*
26726  * flags associated with virtual file protocol operations; note that these flags
26727  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
26728  */
26729 
26730 typedef unsigned long VFPFLAGS_T;
26731 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26732 /* virtual file protocol object */
26733 
26734 typedef struct _vfp VFP_T;
26735 
26736 /* structure behind the virtual file protocol object */
26737 
26738 struct _vfp {
26739  FILE *_vfpFile; /* -> opened FILE */
26740  char *_vfpCurr; /* -> current byte to read/write */
26741  char *_vfpHighWater; /* -> last byte modified */
26742  char *_vfpEnd; /* -> last data byte */
26743  char *_vfpPath; /* -> path associated with FILE */
26744  char *_vfpStart; /* -> first data byte */
26745  void *_vfpExtra; /* undefined */
26746  size_t _vfpSize; /* size of mapped/allocated area */
26747  size_t _vfpMapSize; /* # mapped bytes */
26748  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
26749  int _vfpOverflow; /* non-zero if buffer write overflow */
26750  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
26751  dev_t _vfpCkDev; /* checkpoint device i.d. */
26752  ino_t _vfpCkIno; /* checkpoint inode # */
26753  off_t _vfpCkSize; /* checkpoint size */
26754  time_t _vfpCkMtime; /* checkpoint modification time */
26755 };
26756 
26757 /*
26758  * get highest modified byte (length) contained in vfp
26759  *
26760  * determine number of bytes to write - it will be the highest of:
26761  *  -- the current pointer into the file - this is updated whenever
26762  *	the location of the file is changed by a single byte
26763  *  -- the last "high water mark" - the last known location that
26764  *	was written to the file - updated only when the location
26765  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
26766  *	vfpTruncate, vfpRewind.
26767  * this reduces the "bookkeeping" that needs to be done to know
26768  * how many bytes to write out to the file - typically a file is
26769  * written sequentially so the current file pointer is sufficient
26770  * to determine how many bytes to write out.
26771  */
26772 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26773 /*
26774  * increment current pointer by specified delta
26775  * if the delta exceeds the buffer size, set pointer to buffer end
26776  */
26777 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26778 /* get the path associated with the vfp */
26779 
26780 
26781 /* get a string from the vfp into a fixed size buffer */
26782 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26783 /* get number of bytes remaining to read */
26784 
26785 
26786 
26787 
26788 /* get number of bytes remaining to write */
26789 
26790 
26791 
26792 
26793 /* put current character and increment to next */
26794 
26795 
26796 
26797 
26798 
26799 
26800 /* put integer to current character and increment */
26801 
26802 
26803 /* put long to current character and increment */
26804 
26805 
26806 /* get current character and increment to next */
26807 
26808 
26809 /* get current character - do not increment */
26810 
26811 
26812 /* get pointer to current character */
26813 
26814 
26815 /* increment current character pointer */
26816 
26817 
26818 /* decrement current character pointer */
26819 
26820 
26821 /* get pointer to first data byte in buffer */
26822 
26823 
26824 /* get pointer to last data byte in buffer */
26825 
26826 
26827 /* set pointer to current character */
26828 
26829 
26830 
26831 
26832 
26833 
26834 /* set pointer to last data byte in buffer */
26835 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26836 /* seek to end of file - one past last data byte in file */
26837 
26838 
26839 /* get number of bytes between current char and specified char */
26840 
26841 
26842 
26843 /* put string to current character and increment */
26844 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26845 /* put fixed number of bytes to current character and increment */
26846 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26847 /* put format one arg to current character and increment */
26848 
26849 
26850 
26851 
26852 
26853 
26854 
26855 struct dm_buf {
26856  char *text_buffer; /* start of allocated buffer */
26857  int offset; /* number of bytes into the text_buffer */
26858  int allocation; /* size of buffer in bytes */
26859 };
26860 
26861 /* This structure is used to hold a dynamically growing string */
26862 
26863 struct dstr {
26864  char *pc;
26865  int len;
26866  int max;
26867 };
26868 
26869 /* setmapmode() defines */
26870 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26871 /* max length for printed attributes */
26872 
26873 
26874 /*
26875  * These three defines indicate that the prototype file contains a '?'
26876  * meaning do not specify this data in the pkgmap entry.
26877  */
26878 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26879 /* Settings for network admin defaults */
26880 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
26881 /* package header magic tokens */
26882 
26883 
26884 
26885 /* name of security files */
26886 
26887 
26888 
26889 
26890 
26891 
26892 /*
26893  * The next three mean that no mode, owner or group was specified or that the
26894  * one specified is invalid for some reason. Sometimes this is an error in
26895  * which case it is generally converted to CUR* with a warning. Other times
26896  * it means "look it up" by stating the existing file system object pointred
26897  * to in the prototype file.
26898  */
26899 
26900 
26901 
26902 
26903 /* string comparitor abbreviators */
26904 
26905 
26906 
26907 
26908 
26909 
26910 extern FILE *epopen(char *cmd, char *mode);
26911 extern char **gpkglist(char *dir, char **pkg, char **catg);
26912 extern int is_not_valid_length(char **category);
26913 extern int is_not_valid_category(char **category, char *progname);
26914 extern int is_same_CATEGORY(char **category, char *installed_category);
26915 extern char **get_categories(char *catg_arg);
26916 
26917 extern void pkglist_cont(char *keyword);
26918 extern char **pkgalias(char *pkg);
26919 extern char *get_prog_name(void);
26920 extern char *set_prog_name(char *name);
26921 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
26922 extern int ckparam(char *param, char *value);
26923 extern int ckvolseq(char *dir, int part, int nparts);
26924 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
26925    int allow_checksum);
26926 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
26927 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
26928       struct cinfo *cinfo);
26929 extern char *getErrbufAddr(void);
26930 extern int getErrbufSize(void);
26931 extern char *getErrstr(void);
26932 extern void setErrstr(char *errstr);
26933 extern int devtype(char *alias, struct pkgdev *devp);
26934 extern int ds_totread; /* total number of parts read */
26935 extern int ds_close(int pkgendflg);
26936 extern int ds_findpkg(char *device, char *pkg);
26937 extern int ds_getinfo(char *string);
26938 extern int ds_getpkg(char *device, int n, char *dstdir);
26939 extern int ds_ginit(char *device);
26940 extern boolean_t ds_fd_open(void);
26941 extern int ds_init(char *device, char **pkg, char *norewind);
26942 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
26943 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
26944 extern int BIO_dump_cmd(char *cmd, BIO *bio);
26945 extern int ds_next(char *, char *);
26946 extern int ds_readbuf(char *device);
26947 extern int epclose(FILE *pp);
26948 extern int esystem(char *cmd, int ifd, int ofd);
26949 extern int e_ExecCmdArray(int *r_status, char **r_results,
26950    char *a_inputFile, char *a_cmd, char **a_args);
26951 extern int e_ExecCmdList(int *r_status, char **r_results,
26952    char *a_inputFile, char *a_cmd, ...);
26953 extern int gpkgmap(struct cfent *ept, FILE *fp);
26954 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
26955 extern void setmapmode(int mode_no);
26956 extern int isFdRemote(int a_fd);
26957 extern int isFstypeRemote(char *a_fstype);
26958 extern int isPathRemote(char *a_path);
26959 extern int iscpio(char *path, int *iscomp);
26960 extern int isdir(char *path);
26961 extern int isfile(char *dir, char *file);
26962 extern int fmkdir(char *a_path, int a_mode);
26963 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
26964    ...);
26965 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
26966    char *arg[]);
26967 extern int pkghead(char *device);
26968 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
26969    int getvolflg);
26970 extern int pkgtrans(char *device1, char *device2, char **pkg,
26971    int options, keystore_handle_t, char *);
26972 extern int pkgumount(struct pkgdev *devp);
26973 extern int ppkgmap(struct cfent *ept, FILE *fp);
26974 extern int putcfile(struct cfent *ept, FILE *fp);
26975 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
26976 extern int rrmdir(char *path);
26977 extern void set_memalloc_failure_func(void (*)(int));
26978 extern void *xmalloc(size_t size);
26979 extern void *xrealloc(void *ptr, size_t size);
26980 extern char *xstrdup(char *str);
26981 extern void set_passphrase_prompt(char *);
26982 extern void set_passphrase_passarg(char *);
26983 extern int pkg_passphrase_cb(char *, int, int, void *);
26984 
26985 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
26986 extern struct group *cgrgid(gid_t gid);
26987 extern struct group *cgrnam(char *nam);
26988 extern struct passwd *cpwnam(char *nam);
26989 extern struct passwd *cpwuid(uid_t uid);
26990 extern struct group *clgrgid(gid_t gid);
26991 extern struct group *clgrnam(char *nam);
26992 extern struct passwd *clpwnam(char *nam);
26993 extern struct passwd *clpwuid(uid_t uid);
26994 extern void basepath(char *path, char *basedir, char *ir);
26995 extern void canonize(char *file);
26996 extern void canonize_slashes(char *file);
26997 extern void checksum_off(void);
26998 extern void checksum_on(void);
26999 extern void cvtpath(char *path, char *copy);
27000 extern void ds_order(char *list[]);
27001 extern void ds_putinfo(char *buf, size_t);
27002 extern void ds_skiptoend(char *device);
27003 extern void ecleanup(void);
27004 /*PRINTFLIKE1*/
27005 extern void logerr(char *fmt, ...);
27006 extern int mappath(int flag, char *path);
27007 extern int mapvar(int flag, char *varname);
27008 /*PRINTFLIKE1*/
27009 extern void progerr(char *fmt, ...);
27010 extern void pkgerr(PKG_ERR *);
27011 extern void rpterr(void);
27012 extern void tputcfent(struct cfent *ept, FILE *fp);
27013 extern void set_nonABI_symlinks(void);
27014 extern int nonABI_symlinks(void);
27015 extern void disable_attribute_check(void);
27016 extern int get_disable_attribute_check(void);
27017 
27018 /* security.c */
27019 extern void sec_init(void);
27020 extern char *get_subject_display_name(X509 *);
27021 extern char *get_issuer_display_name(X509 *);
27022 extern char *get_serial_num(X509 *);
27023 extern char *get_fingerprint(X509 *, const EVP_MD *);
27024 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
27025     struct stack_st_X509 *, struct stack_st_X509 **);
27026 
27027 /* pkgstr.c */
27028 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
27029    char *a_buf, int a_bufLen);
27030 char *pkgstrConvertPathToBasename(char *a_path);
27031 char *pkgstrConvertPathToDirname(char *a_path);
27032 char *pkgstrDup(char *a_str);
27033 char *pkgstrLocatePathBasename(char *a_path);
27034 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
27035 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
27036 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
27037    char *a_separators);
27038 void pkgstrExpandTokens(char **a_old, char *a_string,
27039    char a_separator, char *a_separators);
27040 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
27041    char *a_separators);
27042 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
27043    char *a_separators, char *a_buf, int a_bufLen);
27044 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
27045 char *pkgstrPrintf(char *a_format, ...);
27046 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
27047 void pkgstrRemoveToken(char **r_string, char *a_token,
27048    char *a_separators, int a_index);
27049 void pkgstrRemoveLeadingWhitespace(char **a_str);
27050 /* vfpops.c */
27051 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
27052    char *a_path);
27053 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
27054    char *a_mode, VFPFLAGS_T a_flags);
27055 extern int vfpClearModified(VFP_T *a_vfp);
27056 extern int vfpClose(VFP_T **r_vfp);
27057 extern int vfpGetModified(VFP_T *a_vfp);
27058 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
27059    VFPFLAGS_T a_flags);
27060 extern void vfpRewind(VFP_T *a_vfp);
27061 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
27062    size_t a_nbyte, off_t a_offset);
27063 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
27064 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
27065 extern int vfpSetModified(VFP_T *a_vfp);
27066 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
27067 extern void vfpTruncate(VFP_T *a_vfp);
27068 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
27069 
27070 /* handlelocalfs.c */
27071 boolean_t enable_local_fs(void);
27072 boolean_t restore_local_fs(void);
27073 
27074 /* pkgserv.c */
27075 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
27076 extern void pkgcloseserver(PKGserver);
27077 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
27078     int *);
27079 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
27080 extern int pkgsync(const char *, const char *, boolean_t);
27081 extern int pkgservercommitfile(VFP_T *, PKGserver);
27082 extern int pkgopenfilter(PKGserver server, const char *pkginst);
27083 extern void pkgclosefilter(PKGserver);
27084 extern char *pkggetentry(PKGserver, int *, int *);
27085 extern char *pkggetentry_named(PKGserver, const char *, int *,
27086     int *);
27087 extern void pkgserversetmode(start_mode_t);
27088 extern start_mode_t pkgservergetmode(void);
27089 extern start_mode_t pkgparsemode(const char *);
27090 extern char *pkgmodeargument(start_mode_t);
27091 # 49 "special.c" 2
27092 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
27093 /*
27094  * CDDL HEADER START
27095  *
27096  * The contents of this file are subject to the terms of the
27097  * Common Development and Distribution License (the "License").
27098  * You may not use this file except in compliance with the License.
27099  *
27100  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27101  * or http://www.opensolaris.org/os/licensing.
27102  * See the License for the specific language governing permissions
27103  * and limitations under the License.
27104  *
27105  * When distributing Covered Code, include this CDDL HEADER in each
27106  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27107  * If applicable, add the following below this CDDL HEADER, with the
27108  * fields enclosed by brackets "[]" replaced with your own identifying
27109  * information: Portions Copyright [yyyy] [name of copyright owner]
27110  *
27111  * CDDL HEADER END
27112  */
27113 /*
27114  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27115  *
27116  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27117  * Use is subject to license terms.
27118  */
27119 
27120 
27121 
27122 
27123 
27124 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
27125 /*
27126  * CDDL HEADER START
27127  *
27128  * The contents of this file are subject to the terms of the
27129  * Common Development and Distribution License (the "License").
27130  * You may not use this file except in compliance with the License.
27131  *
27132  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
27133  * or http://www.opensolaris.org/os/licensing.
27134  * See the License for the specific language governing permissions
27135  * and limitations under the License.
27136  *
27137  *
27138  * When distributing Covered Code, include this CDDL HEADER in each
27139  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27140  * If applicable, add the following below this CDDL HEADER, with the
27141  * fields enclosed by brackets "[]" replaced with your own identifying
27142  * information: Portions Copyright [yyyy] [name of copyright owner]
27143  *
27144  * CDDL HEADER END
27145  */
27146 
27147 /*
27148  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27149  * Use is subject to license terms.
27150  * Copyright 2016 Joyent, Inc.
27151  */
27152 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
27153 
27154 
27155 
27156 
27157 
27158 /*
27159  * wchar_t is a built-in type in standard C++ and as such is not
27160  * defined here when using standard C++. However, the GNU compiler
27161  * fixincludes utility nonetheless creates its own version of this
27162  * header for use by gcc and g++. In that version it adds a redundant
27163  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
27164  * header we need to include the following magic comment:
27165  *
27166  * we must use the C++ compiler's type
27167  *
27168  * The above comment should not be removed or changed until GNU
27169  * gcc/fixinc/inclhack.def is updated to bypass this header.
27170  */
27171 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
27172 extern char *dcgettext(const char *, const char *, const int);
27173 extern char *dgettext(const char *, const char *);
27174 extern char *gettext(const char *);
27175 extern char *textdomain(const char *);
27176 extern char *bindtextdomain(const char *, const char *);
27177 
27178 /*
27179  * LI18NUX 2000 Globalization Specification Version 1.0
27180  * with Amendment 2
27181  */
27182 extern char *dcngettext(const char *, const char *,
27183  const char *, unsigned long int, int);
27184 extern char *dngettext(const char *, const char *,
27185  const char *, unsigned long int);
27186 extern char *ngettext(const char *, const char *, unsigned long int);
27187 extern char *bind_textdomain_codeset(const char *, const char *);
27188 
27189 /* Word handling functions --- requires dynamic linking */
27190 /* Warning: these are experimental and subject to change. */
27191 extern int wdinit(void);
27192 extern int wdchkind(wchar_t);
27193 extern int wdbindf(wchar_t, wchar_t, int);
27194 extern wchar_t *wddelim(wchar_t, wchar_t, int);
27195 extern wchar_t mcfiller(void);
27196 extern int mcwrap(void);
27197 # 50 "special.c" 2
27198 
27199 /* This specifies the maximum length of a contents file line read in. */
27200 # 61 "special.c"
27201 /*
27202  * strcompare
27203  *
27204  * This function is used by qsort to sort an array of special contents
27205  * rule strings.  This array must be sorted to facilitate efficient
27206  * rule processing.  See qsort(3c) regarding qsort compare functions.
27207  */
27208 static int
27209 strcompare(const void *pv1, const void *pv2)
27210 {
27211  char **ppc1 = (char **) pv1;
27212  char **ppc2 = (char **) pv2;
27213  int i = strcmp(*ppc1, *ppc2);
27214  if (i < 0)
27215   return (-1);
27216  if (i > 0)
27217   return (1);
27218  return (0);
27219 }
27220 
27221 /*
27222  * match
27223  *
27224  * This function determines whether a file name (pc) matches a rule
27225  * from the special contents file (pcrule).  We assume that neither
27226  * string is ever NULL.
27227  *
27228  * Return: 1 on match, 0 on no match.
27229  * Side effects: none.
27230  */
27231 static int
27232 match(const char *pc, char *pcrule)
27233 {
27234  int n = strlen(pcrule);
27235  int wild = 0;
27236  if (pcrule[n - 1] == '*') {
27237   wild = 1;
27238   pcrule[n - 1] = '\0';
27239  }
27240 
27241  if (!wild) {
27242   if (fnmatch(pc, pcrule, 0x01) == 0 ||
27243       fnmatch(pc, pcrule, 0) == 0)
27244   return (1);
27245  } else {
27246   int j;
27247   j = strncmp(pc, pcrule, n - 1);
27248   pcrule[n - 1] = '*';
27249   if (j == 0)
27250    return (1);
27251  }
27252  return (0);
27253 }
27254 
27255 /*
27256  * search_special_contents
27257  *
27258  * This function assumes that a series of calls will be made requesting
27259  * whether a given path matches the special contents rules or not.  We
27260  * assume that
27261  *
27262  *   a) the special_contents array is sorted
27263  *   b) the calls will be made with paths in a sorted order
27264  *
27265  * Given that, we can keep track of where the last search ended and
27266  * begin the new search at that point.  This reduces the cost of a
27267  * special contents matching search to O(n) from O(n^2).
27268  *
27269  *   ppcSC  A pointer to an array of special contents obtained via
27270  *	  get_special_contents().
27271  *   path   A path: determine whether it matches the special
27272  *	  contents rules or not.
27273  *   piX    The position in the special_contents array we have already
27274  *	  arrived at through searching.  This must be initialized to
27275  *	  zero before initiating a series of search_special_contents
27276  *	  operations.
27277  *
27278  * Example:
27279  * {
27280  *	int i = 0, j, max;
27281  *	char **ppSC = NULL;
27282  *	if (get_special_contents(NULL, &ppcSC, &max) != 0) exit(1);
27283  *	for (j = 0; paths != NULL && paths[j] != NULL; j++) {
27284  *		if (search_special_contents(ppcSC, path[j], &i)) {
27285  *			do_something_with_special_path(path[j]);
27286  *		}
27287  *	}
27288  * }
27289  *
27290  * Return: 1 if there is a match, 0 otherwise.
27291  * Side effects: The value of *piX will be set between calls to this
27292  *    function.  To make this function thread safe, use search arrays.
27293  *    Also:  Nonmatching entries are eliminated, set to NULL.
27294  */
27295 static int
27296 search_special_contents(char **ppcSC, const char *pcpath, int *piX, int max)
27297 {
27298  int wild;
27299  if (ppcSC == 0 || *piX == max)
27300   return (0);
27301 
27302  while (*piX < max) {
27303 
27304   int j, k;
27305   if (ppcSC[*piX] == 0) {
27306    (*piX)++;
27307    continue;
27308   }
27309 
27310   j = strlen(ppcSC[*piX]);
27311   k = strcmp(pcpath, ppcSC[*piX]);
27312   wild = (ppcSC[*piX][j - 1] == '*');
27313 
27314   /*
27315 		 * Depending on whether the path string compared with the
27316 		 * rule, we take different actions.  If the path is less
27317 		 * than the rule, we keep the rule.  If the path equals
27318 		 * the rule, we advance the rule (as long as the rule is
27319 		 * not a wild card).  If the path is greater than the rule,
27320 		 * we have to advance the rule list until we are less or equal
27321 		 * again.  This way we only have to make one pass through the
27322 		 * rules, as we make one pass through the path strings.  We
27323 		 * assume that the rules and the path strings are sorted.
27324 		 */
27325   if (k < 0) {
27326 
27327    if (wild == 0)
27328     return (0);
27329 
27330    if (match(pcpath, ppcSC[*piX]))
27331     return (1);
27332    break;
27333 
27334   } else if (k == 0) {
27335 
27336    int x = match(pcpath, ppcSC[*piX]);
27337    if (wild == 0) (*piX)++;
27338    return (x);
27339 
27340   } else {
27341    /* One last try. */
27342    if (match(pcpath, ppcSC[*piX]))
27343     return (1);
27344 
27345    /*
27346 			 * As pcpath > ppcSC[*piX] we have passed up this
27347 			 * rule - it cannot apply.  Therefore, we do not
27348 			 * need to retain it.  Removing the rule will make
27349 			 * subsequent searching more efficient.
27350 			 */
27351    free(ppcSC[*piX]);
27352    ppcSC[*piX] = 0;
27353 
27354    (*piX)++;
27355   }
27356  }
27357  return (0);
27358 }
27359 
27360 /*
27361  * get_special_contents
27362  *
27363  * Retrieves the special contents file entries, if they exist.  These
27364  * are sorted.  We do not assume the special_contents file is in sorted
27365  * order.
27366  *
27367  *   pcroot   The root of the install database.  If NULL assume '/'.
27368  *   pppcSC   A pointer to a char **.  This pointer will be set to
27369  *		point at NULL if there is no special_contents file or
27370  *		to a sorted array of strings, NULL terminated, otherwise.
27371  *   piMax    The # of entries in the special contents result.
27372  *
27373  * Returns:  0 on no error, nonzero on error.
27374  * Side effects:  the pppcSC pointer is set to point at a newly
27375  *   allocated array of pointers to strings..  The caller must
27376  *   free this buffer.  The value of *piMax is set to the # of
27377  *   entries in ppcSC.
27378  */
27379 static int
27380 get_special_contents(const char *pcroot, char ***pppcSC, int *piMax)
27381 {
27382  int e, i;
27383  FILE *fp;
27384  char line[2048];
27385  char **ppc;
27386  char *pc = "var/sadm/install/special_contents";
27387  char path[1024];
27388  struct stat s;
27389 
27390  /* Initialize the return values. */
27391  *piMax = 0;
27392  *pppcSC = 0;
27393 
27394  if (pcroot == 0) {
27395   pcroot = "/";
27396  }
27397 
27398  if (pcroot[strlen(pcroot) - 1] == '/') {
27399   if (snprintf(path, 1024, "%s%s", pcroot, pc) >= 1024) {
27400    progerr(gettext("unable to maintain package contents text: alternate " "root path too long"));
27401    return (1);
27402   }
27403  } else {
27404   if (snprintf(path, 1024, "%s/%s", pcroot, pc)
27405       >= 1024) {
27406    progerr(gettext("unable to maintain package contents text: alternate " "root path too long"));
27407    return (1);
27408   }
27409  }
27410 
27411  (*(___errno())) = 0;
27412  e = stat(path, &s);
27413  if (e != 0 && (*(___errno())) == 2)
27414   return (0); /* No special contents file.  Do nothing. */
27415 
27416  if (access(path, 4) != 0 || (fp = fopen(path, "r")) == 0) {
27417   /* Could not open special contents which exists */
27418   progerr(gettext("unable to maintain package contents text due to " "an access failure."));
27419   return (1);
27420  }
27421 
27422  for (i = 0; fgets(line, 2048, fp) != 0; i++);
27423  rewind(fp);
27424  if ((ppc = (char **) calloc(i + 1, sizeof (char *))) == 0) {
27425   progerr(gettext("unable to maintain package contents text due to " "insufficient memory."));
27426   return (1);
27427  }
27428 
27429  for (i = 0; fgets(line, 2048, fp) != 0; ) {
27430   int n;
27431   if (line[0] == '#' || line[0] == ' ' || line[0] == '\n' ||
27432       line[0] == '\t' || line[0] == '\r')
27433    continue;
27434   n = strlen(line);
27435   if (line[n - 1] == '\n')
27436    line[n - 1] = '\0';
27437   ppc[i++] = strdup(line);
27438  }
27439 
27440  qsort(ppc, i, sizeof (char *), strcompare);
27441 
27442  *pppcSC = ppc;
27443  *piMax = i;
27444  return (0);
27445 }
27446 
27447 /*
27448  * free_special_contents
27449  *
27450  * This function frees special_contents which have been allocated using
27451  * get_special_contents.
27452  *
27453  *   pppcSC    A pointer to a buffer allocated using get_special_contents.
27454  *   max       The number of entries allocated.
27455  *
27456  * Result: None.
27457  * Side effects: Frees memory allocated using get_special_contents and
27458  *    sets the pointer passed in to NULL.
27459  */
27460 static void
27461 free_special_contents(char ***pppcSC, int max)
27462 {
27463  int i;
27464  char **ppc = 0;
27465  if (*pppcSC == 0)
27466   return;
27467 
27468  ppc = *pppcSC;
27469  for (i = 0; ppc != 0 && i < max; i++)
27470   if (ppc[i] == 0)
27471    free(ppc[i]);
27472 
27473  if (ppc != 0)
27474   free(ppc);
27475 
27476  *pppcSC = 0;
27477 }
27478 
27479 /*
27480  * get_path
27481  *
27482  * Return the first field of a string delimited by a space.
27483  *
27484  *   pcline	A line from the contents file.
27485  *
27486  * Return: NULL if an error.  Otherwise a string allocated by this
27487  *   function.  The caller must free the string.
27488  * Side effects: none.
27489  */
27490 static char *
27491 get_path(const char *pcline)
27492 {
27493  int i = strcspn(pcline, " ");
27494  char *pc = 0;
27495  if (i <= 1 || (pc = (char *) calloc(i + 1, 1)) == 0)
27496   return (0);
27497  (void) memcpy(pc, pcline, i);
27498  return (pc);
27499 }
27500 
27501 /*
27502  * generate_special_contents_rules
27503  *
27504  * This procedure will generate an array of integers which will be a mask
27505  * to apply to the ppcfextra array.  If set to 1, then the content must be
27506  * added to the contents file.  Otherwise it will not be:  The old contents
27507  * file will be used for this path value, if one even exists.
27508  *
27509  *    ient	The number of ppcfextra contents installed.
27510  *    ppcfent	The contents installed.
27511  *    ppcSC	The rules (special contents)
27512  *    max	The number of special contents rules.
27513  *    ppiIndex	The array of integer values, determining whether
27514  *		individual ppcfextra items match special contents rules.
27515  *		This array will be created and set in this function and
27516  *		returned.
27517  *
27518  * Return: 0 success, nonzero failure
27519  * Side effects: allocates an array of integers that the caller must free.
27520  */
27521 static int
27522 generate_special_contents_rules(int ient, struct cfent **ppcfent,
27523     char **ppcSC, int max, int **ppiIndex)
27524 {
27525  int i, j;
27526  int *pi = (int *) calloc(ient, sizeof (int));
27527  if (pi == 0) {
27528   progerr(gettext("unable to maintain package contents text due to " "insufficient memory."));
27529   return (1);
27530  }
27531 
27532  /*
27533 	 * For each entry in ppcfextra, check if it matches a rule.
27534 	 * If it does not, set the entry in the index to -1.
27535 	 */
27536  for (i = 0, j = 0; i < ient && j < max; i++) {
27537   if (search_special_contents(ppcSC, ppcfent[i]->path,
27538       &j, max) == 1) {
27539    pi[i] = 1;
27540 
27541   } else {
27542    pi[i] = 0;
27543   }
27544  }
27545 
27546  /*
27547 	 * In case we ran out of rules before contents, we will not use
27548 	 * those contents.  Make sure these contents are set to 0 and
27549 	 * will not be copied from the ppcfent array into the contents
27550 	 * file.
27551 	 */
27552  for (i = i; i < ient; i++)
27553   pi[i] = 0;
27554 
27555  *ppiIndex = pi;
27556  return (0);
27557 }
27558 
27559 
27560 /*
27561  * pathcmp
27562  *
27563  * Compare a path to a cfent.  It will match either if the path is
27564  * equal to the cfent path, or if the cfent is a symbolic or link
27565  * and *that* matches.
27566  *
27567  *    path	a path
27568  *    pent      a contents entry
27569  *
27570  * Returns: as per strcmp
27571  * Side effects: none.
27572  */
27573 static int
27574 pathcmp(const char *pc, const struct cfent *pent)
27575 {
27576  int i;
27577  if ((pent->ftype == 's' || pent->ftype == 'l') &&
27578      pent->ainfo.local) {
27579   char *p, *q;
27580   if ((p = strstr(pc, "=")) == 0) {
27581 
27582    i = strcmp(pc, pent->path);
27583 
27584    /* A path without additional chars strcmp's to less */
27585    if (i == 0)
27586     i = -1;
27587 
27588   } else {
27589    /* Break the link path into two pieces. */
27590    *p = '\0';
27591 
27592    /* Compare the first piece. */
27593    i = strcmp(pc, pent->path);
27594 
27595    /* If equal we must compare the second piece. */
27596    if (i == 0) {
27597     q = p + 1;
27598     i = strcmp(q, pent->ainfo.local);
27599    }
27600 
27601    /* Restore the link path. */
27602    *p = '=';
27603   }
27604  } else {
27605   i = strcmp(pc, pent->path);
27606  }
27607 
27608  return (i);
27609 }
27610 
27611 /*
27612  * -----------------------------------------------------------------------
27613  * Externally visible function.
27614  */
27615 
27616 /*
27617  * special_contents_remove
27618  *
27619  * Given a set of entries to remove and an alternate root, this function
27620  * will do everything required to ensure that the entries are removed
27621  * from the contents file if they are listed in the special_contents
27622  * file.  The contents file will get changed only in the case that the
27623  * entire operation has succeeded.
27624  *
27625  *  ient	The number of entries.
27626  *  ppcfent	The entries to remove.
27627  *  pcroot	The alternate install root.  Could be NULL.  In this
27628  *		case, assume root is '/'
27629  *
27630  * Result: 0 on success, nonzero on failure.  If an error occurs, an
27631  *    error string will get output to standard error alerting the user.
27632  * Side effects: The contents file may change as a result of this call,
27633  *    such that lines in the in the file will be changed or removed.
27634  *    If the call fails, a t.contents file may be left behind.  This
27635  *    temporary file should be removed subsequently.
27636  */
27637 int
27638 special_contents_remove(int ient, struct cfent **ppcfent, const char *pcroot)
27639 {
27640  int result = 0; /* Assume we will succeed.  Return result. */
27641  char **ppcSC = 0; /* The special contents rules, sorted. */
27642  int i, j; /* Indexes into contents & special contents */
27643  FILE *fpi = 0, /* Input of contents file */
27644      *fpo = 0; /* Output to temp contents file */
27645  char cpath[1024], /* Contents file path */
27646      tcpath[1024]; /* Temp contents file path */
27647  const char *pccontents = "var/sadm/install/contents";
27648  const char *pctcontents = "var/sadm/install/t.contents";
27649  char line[8192]; /* Reads in and writes out contents lines. */
27650  time_t t; /* Used to create a timestamp comment. */
27651  int max; /* Max number of special contents entries. */
27652  int *piIndex; /* An index to ppcfents to remove from cfile */
27653 
27654  cpath[0] = tcpath[0] = '\0';
27655 
27656  if (ient == 0 || ppcfent == 0 || ppcfent[0] == 0) {
27657   goto remove_done;
27658  }
27659 
27660  if ((get_special_contents(pcroot, &ppcSC, &max)) != 0) {
27661   result = 1;
27662   goto remove_done;
27663  }
27664 
27665  /* Check if there are no special contents actions to take. */
27666  if (ppcSC == 0) {
27667   goto remove_done;
27668  }
27669 
27670  if (pcroot == 0) pcroot = "/";
27671  if (pcroot[strlen(pcroot) - 1] == '/') {
27672   if (snprintf(cpath, 1024, "%s%s", pcroot, pccontents)
27673       >= 1024 ||
27674       snprintf(tcpath, 1024, "%s%s", pcroot, pctcontents)
27675       >= 1024) {
27676    progerr(gettext("unable to maintain package contents text: alternate " "root path too long"));
27677    result = -1;
27678    goto remove_done;
27679   }
27680  } else {
27681   if (snprintf(cpath, 1024, "%s/%s", pcroot, pccontents)
27682       >= 1024 ||
27683       snprintf(tcpath, 1024, "%s/%s", pcroot, pctcontents)
27684       >= 1024) {
27685    progerr(gettext("unable to maintain package contents text: alternate " "root path too long"));
27686    result = -1;
27687    goto remove_done;
27688   }
27689  }
27690 
27691  /* Open the temporary contents file to write, contents to read. */
27692  if (access(cpath, 0 | 4) != 0) {
27693   /*
27694 		 * This is not a problem since no contents means nothing
27695 		 * to remove due to special contents rules.
27696 		 */
27697   result = 0;
27698   cpath[0] = '\0'; /* This signals omission of 'rename cleanup' */
27699   goto remove_done;
27700  }
27701 
27702  if (access(cpath, 2) != 0) {
27703   /* can't write contents file, something is wrong. */
27704   progerr(gettext("unable to maintain package contents text due to " "an access failure."));
27705   result = 1;
27706   goto remove_done;
27707 
27708  }
27709 
27710  if ((fpi = fopen(cpath, "r")) == 0) {
27711   /* Given the access test above, this should not happen. */
27712   progerr(gettext("unable to maintain package contents text due to " "an access failure."));
27713   result = 1;
27714   goto remove_done;
27715  }
27716 
27717  if ((fpo = fopen(tcpath, "w")) == 0) {
27718   /* open t.contents failed */
27719   progerr(gettext("unable to maintain package contents text due to " "an access failure."));
27720   result = 1;
27721   goto remove_done;
27722  }
27723 
27724  if (generate_special_contents_rules(ient, ppcfent, ppcSC, max, &piIndex)
27725      != 0) {
27726   result = 1;
27727   goto remove_done;
27728  }
27729 
27730  /*
27731 	 * Copy contents to t.contents unless there is an entry in
27732 	 * the ppcfent array which corresponds to an index set to 1.
27733 	 *
27734 	 * These items are the removed package contents which matche an
27735 	 * entry in ppcSC (the special_contents rules).
27736 	 *
27737 	 * Since both the contents and rules are sorted, we can
27738 	 * make a single efficient pass.
27739 	 */
27740  (void) memset(line, 0, 8192);
27741 
27742  for (i = 0, j = 0; fgets(line, 8192, fpi) != 0; ) {
27743 
27744   char *pcpath = 0;
27745 
27746   /*
27747 		 * Note:  This could be done better:  We should figure out
27748 		 * which are the last 2 lines and only trim those off.
27749 		 * This will suffice to do this and will only be done as
27750 		 * part of special_contents handling.
27751 		 */
27752   if (line[0] == '#')
27753    continue; /* Do not copy the final 2 comment lines */
27754 
27755   pcpath = get_path(line);
27756 
27757   if (pcpath != 0 && i < ient) {
27758    int k;
27759    while (piIndex[i] == 0)
27760     i++;
27761 
27762    if (i < ient)
27763     k = pathcmp(pcpath, ppcfent[i]);
27764 
27765    if (k < 0 || i >= ient) {
27766     /* Just copy contents -> t.contents */
27767     /*EMPTY*/
27768    } else if (k == 0) {
27769     /* We have a match.  Do not copy the content. */
27770     i++;
27771     free(pcpath);
27772     (void) memset(line, 0, 8192);
27773     continue;
27774    } else while (i < ient) {
27775 
27776     /*
27777 				 * This is a complex case:  The content
27778 				 * entry is further along alphabetically
27779 				 * than the rule.  Skip over all rules which
27780 				 * apply until we come to a rule which is
27781 				 * greater than the current entry, or equal
27782 				 * to it.  If equal, do not copy, otherwise
27783 				 * do copy the entry.
27784 				 */
27785     if (piIndex[i] == 0) {
27786      i++;
27787      continue;
27788     } else if ((k = pathcmp(pcpath, ppcfent[i]))
27789         >= 0) {
27790      i++;
27791      if (k == 0) {
27792       free(pcpath);
27793       (void) memset(line, 0, 8192);
27794       break;
27795      }
27796     } else {
27797      /* path < rule, end special case */
27798      break;
27799     }
27800    }
27801 
27802    /*
27803 			 * Avoid copying the old content when path == rule
27804 			 * This occurs when the complex case ends on a match.
27805 			 */
27806    if (k == 0)
27807     continue;
27808   }
27809 
27810   if (fprintf(fpo, "%s", line) < 0) {
27811    /* Failing to write output would be catastrophic. */
27812    progerr(gettext("unable to maintain package contents text due to " "an access failure."));
27813    result = 1;
27814    break;
27815   }
27816   (void) memset(line, 0, 8192);
27817  }
27818 
27819  t = time(0);
27820  (void) fprintf(fpo, "# Last modified by pkgremove\n");
27821  (void) fprintf(fpo, "# %s", ctime(&t));
27822 
27823 remove_done:
27824  free_special_contents(&ppcSC, max);
27825 
27826  if (fpi != 0)
27827   (void) fclose(fpi);
27828 
27829  if (fpo != 0)
27830   (void) fclose(fpo);
27831 
27832  if (result == 0) {
27833   if (tcpath[0] != '\0' && cpath[0] != '\0' &&
27834       rename(tcpath, cpath) != 0) {
27835    progerr(gettext("unable to maintain package contents text due to " "an access failure."));
27836    result = 1;
27837   }
27838  } else {
27839   if (tcpath[0] != '\0' && remove(tcpath) != 0) {
27840    /*
27841 			 * Do not output a diagnostic message.  This condition
27842 			 * occurs only when we are unable to clean up after
27843 			 * a failure.  A temporary file will linger.
27844 			 */
27845    result = 1;
27846   }
27847  }
27848 
27849  return (result);
27850 }
27851