1 # 1 "backup.c"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "backup.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 1993 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
32 /* All Rights Reserved */
33 
34 
35 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
36 /*
37  * CDDL HEADER START
38  *
39  * The contents of this file are subject to the terms of the
40  * Common Development and Distribution License (the "License").
41  * You may not use this file except in compliance with the License.
42  *
43  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
44  * or http://www.opensolaris.org/os/licensing.
45  * See the License for the specific language governing permissions
46  * and limitations under the License.
47  *
48  * When distributing Covered Code, include this CDDL HEADER in each
49  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
50  * If applicable, add the following below this CDDL HEADER, with the
51  * fields enclosed by brackets "[]" replaced with your own identifying
52  * information: Portions Copyright [yyyy] [name of copyright owner]
53  *
54  * CDDL HEADER END
55  */
56 
57 /*
58  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
59  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
60  */
61 
62 /*	Copyright (c) 1988 AT&T	*/
63 /*	  All Rights Reserved  	*/
64 
65 /*
66  * User-visible pieces of the ANSI C standard I/O package.
67  */
68 
69 
70 
71 
72 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
73 /*
74  * CDDL HEADER START
75  *
76  * The contents of this file are subject to the terms of the
77  * Common Development and Distribution License (the "License").
78  * You may not use this file except in compliance with the License.
79  *
80  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
81  * or http://www.opensolaris.org/os/licensing.
82  * See the License for the specific language governing permissions
83  * and limitations under the License.
84  *
85  * When distributing Covered Code, include this CDDL HEADER in each
86  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
87  * If applicable, add the following below this CDDL HEADER, with the
88  * fields enclosed by brackets "[]" replaced with your own identifying
89  * information: Portions Copyright [yyyy] [name of copyright owner]
90  *
91  * CDDL HEADER END
92  */
93 
94 /*
95  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
96  * Copyright 2016 Joyent, Inc.
97  *
98  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
99  * Use is subject to license terms.
100  */
101 
102 
103 
104 
105 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h" 1
106 /*
107  * CDDL HEADER START
108  *
109  * The contents of this file are subject to the terms of the
110  * Common Development and Distribution License, Version 1.0 only
111  * (the "License").  You may not use this file except in compliance
112  * with the License.
113  *
114  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
115  * or http://www.opensolaris.org/os/licensing.
116  * See the License for the specific language governing permissions
117  * and limitations under the License.
118  *
119  * When distributing Covered Code, include this CDDL HEADER in each
120  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
121  * If applicable, add the following below this CDDL HEADER, with the
122  * fields enclosed by brackets "[]" replaced with your own identifying
123  * information: Portions Copyright [yyyy] [name of copyright owner]
124  *
125  * CDDL HEADER END
126  */
127 /*
128  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
129  * Use is subject to license terms.
130  */
131 /*
132  * Copyright 2015 EveryCity Ltd. All rights reserved.
133  */
134 
135 
136 
137 
138 /*
139  * This file contains definitions designed to enable different compilers
140  * to be used harmoniously on Solaris systems.
141  */
142 
143 
144 
145 
146 
147 /*
148  * Allow for version tests for compiler bugs and features.
149  */
150 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
151 /*
152  * analogous to lint's PRINTFLIKEn
153  */
154 
155 
156 
157 
158 
159 /*
160  * Handle the kernel printf routines that can take '%b' too
161  */
162 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
163 /*
164  * This one's pretty obvious -- the function never returns
165  */
166 
167 
168 /*
169  * The function is 'extern inline' and expects GNU C89 behaviour, not C99
170  * behaviour.
171  *
172  * Should only be used on 'extern inline' definitions for GCC.
173  */
174 
175 
176 
177 
178 
179 
180 /*
181  * The function has control flow such that it may return multiple times (in
182  * the manner of setjmp or vfork)
183  */
184 
185 
186 
187 
188 
189 
190 /*
191  * This is an appropriate label for functions that do not
192  * modify their arguments, e.g. strlen()
193  */
194 
195 
196 /*
197  * This is a stronger form of __pure__. Can be used for functions
198  * that do not modify their arguments and don't depend on global
199  * memory.
200  */
201 
202 
203 
204 
205 /*
206  * This attribute, attached to a variable, means that the variable is meant to
207  * be possibly unused. GCC will not produce a warning for this variable.
208  */
209 # 138 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/ccompile.h"
210 /*
211  * Shorthand versions for readability
212  */
213 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
214 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
215 /*
216  * CDDL HEADER START
217  *
218  * The contents of this file are subject to the terms of the
219  * Common Development and Distribution License (the "License").
220  * You may not use this file except in compliance with the License.
221  *
222  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
223  * or http://www.opensolaris.org/os/licensing.
224  * See the License for the specific language governing permissions
225  * and limitations under the License.
226  *
227  *
228  * When distributing Covered Code, include this CDDL HEADER in each
229  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
230  * If applicable, add the following below this CDDL HEADER, with the
231  * fields enclosed by brackets "[]" replaced with your own identifying
232  * information: Portions Copyright [yyyy] [name of copyright owner]
233  *
234  * CDDL HEADER END
235  */
236 
237 /*
238  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
239  * Use is subject to license terms.
240  * Copyright 2016 Joyent, Inc.
241  */
242 
243 
244 
245 
246 /*
247  * This header file serves to group a set of well known defines and to
248  * set these for each instruction set architecture.  These defines may
249  * be divided into two groups;  characteristics of the processor and
250  * implementation choices for Solaris on a processor.
251  *
252  * Processor Characteristics:
253  *
254  * _LITTLE_ENDIAN / _BIG_ENDIAN:
255  *	The natural byte order of the processor.  A pointer to an int points
256  *	to the least/most significant byte of that int.
257  *
258  * _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
259  *	The processor specific direction of stack growth.  A push onto the
260  *	stack increases/decreases the stack pointer, so it stores data at
261  *	successively higher/lower addresses.  (Stackless machines ignored
262  *	without regrets).
263  *
264  * _LONG_LONG_HTOL / _LONG_LONG_LTOH:
265  *	A pointer to a long long points to the most/least significant long
266  *	within that long long.
267  *
268  * _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
269  *	The C compiler assigns bit fields from the high/low to the low/high end
270  *	of an int (most to least significant vs. least to most significant).
271  *
272  * _IEEE_754:
273  *	The processor (or supported implementations of the processor)
274  *	supports the ieee-754 floating point standard.  No other floating
275  *	point standards are supported (or significant).  Any other supported
276  *	floating point formats are expected to be cased on the ISA processor
277  *	symbol.
278  *
279  * _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
280  *	The C Compiler implements objects of type `char' as `unsigned' or
281  *	`signed' respectively.  This is really an implementation choice of
282  *	the compiler writer, but it is specified in the ABI and tends to
283  *	be uniform across compilers for an instruction set architecture.
284  *	Hence, it has the properties of a processor characteristic.
285  *
286  * _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
287  * _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
288  * _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
289  *	The ABI defines alignment requirements of each of the primitive
290  *	object types.  Some, if not all, may be hardware requirements as
291  * 	well.  The values are expressed in "byte-alignment" units.
292  *
293  * _MAX_ALIGNMENT:
294  *	The most stringent alignment requirement as specified by the ABI.
295  *	Equal to the maximum of all the above _XXX_ALIGNMENT values.
296  *
297  * _MAX_ALIGNMENT_TYPE:
298  * 	The name of the C type that has the value descried in _MAX_ALIGNMENT.
299  *
300  * _ALIGNMENT_REQUIRED:
301  *	True or false (1 or 0) whether or not the hardware requires the ABI
302  *	alignment.
303  *
304  * _LONG_LONG_ALIGNMENT_32
305  *	The 32-bit ABI supported by a 64-bit kernel may have different
306  *	alignment requirements for primitive object types.  The value of this
307  *	identifier is expressed in "byte-alignment" units.
308  *
309  * _HAVE_CPUID_INSN
310  *	This indicates that the architecture supports the 'cpuid'
311  *	instruction as defined by Intel.  (Intel allows other vendors
312  *	to extend the instruction for their own purposes.)
313  *
314  *
315  * Implementation Choices:
316  *
317  * _ILP32 / _LP64:
318  *	This specifies the compiler data type implementation as specified in
319  *	the relevant ABI.  The choice between these is strongly influenced
320  *	by the underlying hardware, but is not absolutely tied to it.
321  *	Currently only two data type models are supported:
322  *
323  *	_ILP32:
324  *		Int/Long/Pointer are 32 bits.  This is the historical UNIX
325  *		and Solaris implementation.  Due to its historical standing,
326  *		this is the default case.
327  *
328  *	_LP64:
329  *		Long/Pointer are 64 bits, Int is 32 bits.  This is the chosen
330  *		implementation for 64-bit ABIs such as SPARC V9.
331  *
332  *	_I32LPx:
333  *		A compilation environment where 'int' is 32-bit, and
334  *		longs and pointers are simply the same size.
335  *
336  *	In all cases, Char is 8 bits and Short is 16 bits.
337  *
338  * _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
339  *	This specifies the form of the disk VTOC (or label):
340  *
341  *	_SUNOS_VTOC_8:
342  *		This is a VTOC form which is upwardly compatible with the
343  *		SunOS 4.x disk label and allows 8 partitions per disk.
344  *
345  *	_SUNOS_VTOC_16:
346  *		In this format the incore vtoc image matches the ondisk
347  *		version.  It allows 16 slices per disk, and is not
348  *		compatible with the SunOS 4.x disk label.
349  *
350  *	Note that these are not the only two VTOC forms possible and
351  *	additional forms may be added.  One possible form would be the
352  *	SVr4 VTOC form.  The symbol for that is reserved now, although
353  *	it is not implemented.
354  *
355  *	_SVR4_VTOC_16:
356  *		This VTOC form is compatible with the System V Release 4
357  *		VTOC (as implemented on the SVr4 Intel and 3b ports) with
358  *		16 partitions per disk.
359  *
360  *
361  * _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
362  *	This describes the type of addresses used by system DMA:
363  *
364  *	_DMA_USES_PHYSADDR:
365  *		This type of DMA, used in the x86 implementation,
366  *		requires physical addresses for DMA buffers.  The 24-bit
367  *		addresses used by some legacy boards is the source of the
368  *		"low-memory" (<16MB) requirement for some devices using DMA.
369  *
370  *	_DMA_USES_VIRTADDR:
371  *		This method of DMA allows the use of virtual addresses for
372  *		DMA transfers.
373  *
374  * _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
375  *      This indicates the presence/absence of an fdisk table.
376  *
377  *      _FIRMWARE_NEEDS_FDISK
378  *              The fdisk table is required by system firmware.  If present,
379  *              it allows a disk to be subdivided into multiple fdisk
380  *              partitions, each of which is equivalent to a separate,
381  *              virtual disk.  This enables the co-existence of multiple
382  *              operating systems on a shared hard disk.
383  *
384  *      _NO_FDISK_PRESENT
385  *              If the fdisk table is absent, it is assumed that the entire
386  *              media is allocated for a single operating system.
387  *
388  * _HAVE_TEM_FIRMWARE
389  *	Defined if this architecture has the (fallback) option of
390  *	using prom_* calls for doing I/O if a suitable kernel driver
391  *	is not available to do it.
392  *
393  * _DONT_USE_1275_GENERIC_NAMES
394  *		Controls whether or not device tree node names should
395  *		comply with the IEEE 1275 "Generic Names" Recommended
396  *		Practice. With _DONT_USE_GENERIC_NAMES, device-specific
397  *		names identifying the particular device will be used.
398  *
399  * __i386_COMPAT
400  *	This indicates whether the i386 ABI is supported as a *non-native*
401  *	mode for the platform.  When this symbol is defined:
402  *	-	32-bit xstat-style system calls are enabled
403  *	-	32-bit xmknod-style system calls are enabled
404  *	-	32-bit system calls use i386 sizes -and- alignments
405  *
406  *	Note that this is NOT defined for the i386 native environment!
407  *
408  * __x86
409  *	This is ONLY a synonym for defined(__i386) || defined(__amd64)
410  *	which is useful only insofar as these two architectures share
411  *	common attributes.  Analogous to __sparc.
412  *
413  * _PSM_MODULES
414  *	This indicates whether or not the implementation uses PSM
415  *	modules for processor support, reading /etc/mach from inside
416  *	the kernel to extract a list.
417  *
418  * _RTC_CONFIG
419  *	This indicates whether or not the implementation uses /etc/rtc_config
420  *	to configure the real-time clock in the kernel.
421  *
422  * _UNIX_KRTLD
423  *	This indicates that the implementation uses a dynamically
424  *	linked unix + krtld to form the core kernel image at boot
425  *	time, or (in the absence of this symbol) a prelinked kernel image.
426  *
427  * _OBP
428  *	This indicates the firmware interface is OBP.
429  *
430  * _SOFT_HOSTID
431  *	This indicates that the implementation obtains the hostid
432  *	from the file /etc/hostid, rather than from hardware.
433  */
434 
435 
436 
437 
438 
439 /*
440  * The following set of definitions characterize Solaris on AMD's
441  * 64-bit systems.
442  */
443 # 305 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
444 /*
445  * Define the appropriate "processor characteristics"
446  */
447 # 333 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
448 /*
449  * Define the appropriate "implementation choices".
450  */
451 # 351 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h"
452 /*
453  * The following set of definitions characterize the Solaris on SPARC systems.
454  *
455  * The symbol __sparc indicates any of the SPARC family of processor
456  * architectures.  This includes SPARC V7, SPARC V8 and SPARC V9.
457  *
458  * The symbol __sparcv8 indicates the 32-bit SPARC V8 architecture as defined
459  * by Version 8 of the SPARC Architecture Manual.  (SPARC V7 is close enough
460  * to SPARC V8 for the former to be subsumed into the latter definition.)
461  *
462  * The symbol __sparcv9 indicates the 64-bit SPARC V9 architecture as defined
463  * by Version 9 of the SPARC Architecture Manual.
464  *
465  * The symbols __sparcv8 and __sparcv9 are mutually exclusive, and are only
466  * relevant when the symbol __sparc is defined.
467  */
468 /*
469  * XXX Due to the existence of 5110166, "defined(__sparcv9)" needs to be added
470  * to support backwards builds.  This workaround should be removed in s10_71.
471  */
472 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 2
473 
474 
475 
476 
477 
478 /*
479  * Values of _POSIX_C_SOURCE
480  *
481  *		undefined   not a POSIX compilation
482  *		1	    POSIX.1-1990 compilation
483  *		2	    POSIX.2-1992 compilation
484  *		199309L	    POSIX.1b-1993 compilation (Real Time)
485  *		199506L	    POSIX.1c-1995 compilation (POSIX Threads)
486  *		200112L	    POSIX.1-2001 compilation (Austin Group Revision)
487  *		200809L     POSIX.1-2008 compilation
488  */
489 
490 
491 
492 
493 /*
494  * The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
495  * and _STDC_C99 are Sun implementation specific macros created in order to
496  * compress common standards specified feature test macros for easier reading.
497  * These macros should not be used by the application developer as
498  * unexpected results may occur. Instead, the user should reference
499  * standards(5) for correct usage of the standards feature test macros.
500  *
501  * __XOPEN_OR_POSIX     Used in cases where a symbol is defined by both
502  *                      X/Open or POSIX or in the negative, when neither
503  *                      X/Open or POSIX defines a symbol.
504  *
505  * _STRICT_STDC         __STDC__ is specified by the C Standards and defined
506  *                      by the compiler. For Sun compilers the value of
507  *                      __STDC__ is either 1, 0, or not defined based on the
508  *                      compilation mode (see cc(1)). When the value of
509  *                      __STDC__ is 1 and in the absence of any other feature
510  *                      test macros, the namespace available to the application
511  *                      is limited to only those symbols defined by the C
512  *                      Standard. _STRICT_STDC provides a more readable means
513  *                      of identifying symbols defined by the standard, or in
514  *                      the negative, symbols that are extensions to the C
515  *                      Standard. See additional comments for GNU C differences.
516  *
517  * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
518  *                      defined by the compiler and indicates the version of
519  *                      the C standard. A value of 199901L indicates a
520  *                      compiler that complies with ISO/IEC 9899:1999, other-
521  *                      wise known as the C99 standard.
522  *
523  * _STDC_C11		Like _STDC_C99 except that the value of __STDC_VERSION__
524  *                      is 201112L indicating a compiler that compiles with
525  *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
526  *
527  * _STRICT_SYMBOLS	Used in cases where symbol visibility is restricted
528  *                      by the standards, and the user has not explicitly
529  *                      relaxed the strictness via __EXTENSIONS__.
530  */
531 
532 
533 
534 
535 
536 /*
537  * ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
538  * 99899:2011 specify the following predefined macro name:
539  *
540  * __STDC__	The integer constant 1, intended to indicate a conforming
541  *		implementation.
542  *
543  * Furthermore, a strictly conforming program shall use only those features
544  * of the language and library specified in these standards. A conforming
545  * implementation shall accept any strictly conforming program.
546  *
547  * Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
548  * strictly conforming environments and __STDC__ to 0 for environments that
549  * use ANSI C semantics but allow extensions to the C standard. For non-ANSI
550  * C semantics, Sun's C compiler does not define __STDC__.
551  *
552  * The GNU C project interpretation is that __STDC__ should always be defined
553  * to 1 for compilation modes that accept ANSI C syntax regardless of whether
554  * or not extensions to the C standard are used. Violations of conforming
555  * behavior are conditionally flagged as warnings via the use of the
556  * -pedantic option. In addition to defining __STDC__ to 1, the GNU C
557  * compiler also defines __STRICT_ANSI__ as a means of specifying strictly
558  * conforming environments using the -ansi or -std=<standard> options.
559  *
560  * In the absence of any other compiler options, Sun and GNU set the value
561  * of __STDC__ as follows when using the following options:
562  *
563  *				Value of __STDC__  __STRICT_ANSI__
564  *
565  * cc -Xa (default)			0	      undefined
566  * cc -Xt (transitional)		0             undefined
567  * cc -Xc (strictly conforming)		1	      undefined
568  * cc -Xs (K&R C)		    undefined	      undefined
569  *
570  * gcc (default)			1	      undefined
571  * gcc -ansi, -std={c89, c99,...)  	1              defined
572  * gcc -traditional (K&R)	    undefined	      undefined
573  *
574  * The default compilation modes for Sun C compilers versus GNU C compilers
575  * results in a differing value for __STDC__ which results in a more
576  * restricted namespace when using Sun compilers. To allow both GNU and Sun
577  * interpretations to peacefully co-exist, we use the following Sun
578  * implementation _STRICT_STDC_ macro:
579  */
580 # 150 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
581 /*
582  * Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
583  */
584 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
585 /*
586  * Use strict symbol visibility.
587  */
588 
589 
590 
591 
592 
593 /*
594  * Large file interfaces:
595  *
596  *	_LARGEFILE_SOURCE
597  *		1		large file-related additions to POSIX
598  *				interfaces requested (fseeko, etc.)
599  *	_LARGEFILE64_SOURCE
600  *		1		transitional large-file-related interfaces
601  *				requested (seek64, stat64, etc.)
602  *
603  * The corresponding announcement macros are respectively:
604  *	_LFS_LARGEFILE
605  *	_LFS64_LARGEFILE
606  * (These are set in <unistd.h>.)
607  *
608  * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
609  * well.
610  *
611  * The large file interfaces are made visible regardless of the initial values
612  * of the feature test macros under certain circumstances:
613  *    -	If no explicit standards-conforming environment is requested (neither
614  *	of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
615  *	__STDC__ does not imply standards conformance).
616  *    -	Extended system interfaces are explicitly requested (__EXTENSIONS__
617  * 	is defined).
618  *    -	Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
619  *	defined).  (Note that this dependency is an artifact of the current
620  *	kernel implementation and may change in future releases.)
621  */
622 # 210 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
623 /*
624  * Large file compilation environment control:
625  *
626  * The setting of _FILE_OFFSET_BITS controls the size of various file-related
627  * types and governs the mapping between file-related source function symbol
628  * names and the corresponding binary entry points.
629  *
630  * In the 32-bit environment, the default value is 32; if not set, set it to
631  * the default here, to simplify tests in other headers.
632  *
633  * In the 64-bit compilation environment, the only value allowed is 64.
634  */
635 # 238 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
636 /*
637  * Use of _XOPEN_SOURCE
638  *
639  * The following X/Open specifications are supported:
640  *
641  * X/Open Portability Guide, Issue 3 (XPG3)
642  * X/Open CAE Specification, Issue 4 (XPG4)
643  * X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
644  * X/Open CAE Specification, Issue 5 (XPG5)
645  * Open Group Technical Standard, Issue 6 (XPG6), also referred to as
646  *    IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
647  * Open Group Technical Standard, Issue 7 (XPG7), also referred to as
648  *    IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
649  *
650  * XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
651  * XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
652  *     Version 2 (SUSv2)
653  * XPG6 is the result of a merge of the X/Open and POSIX specifications
654  *     and as such is also referred to as IEEE Std. 1003.1-2001 in
655  *     addition to UNIX 03 and SUSv3.
656  * XPG7 is also referred to as UNIX 08 and SUSv4.
657  *
658  * When writing a conforming X/Open application, as per the specification
659  * requirements, the appropriate feature test macros must be defined at
660  * compile time. These are as follows. For more info, see standards(5).
661  *
662  * Feature Test Macro				     Specification
663  * ------------------------------------------------  -------------
664  * _XOPEN_SOURCE                                         XPG3
665  * _XOPEN_SOURCE && _XOPEN_VERSION = 4                   XPG4
666  * _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1           XPG4v2
667  * _XOPEN_SOURCE = 500                                   XPG5
668  * _XOPEN_SOURCE = 600  (or POSIX_C_SOURCE=200112L)      XPG6
669  * _XOPEN_SOURCE = 700  (or POSIX_C_SOURCE=200809L)      XPG7
670  *
671  * In order to simplify the guards within the headers, the following
672  * implementation private test macros have been created. Applications
673  * must NOT use these private test macros as unexpected results will
674  * occur.
675  *
676  * Note that in general, the use of these private macros is cumulative.
677  * For example, the use of _XPG3 with no other restrictions on the X/Open
678  * namespace will make the symbols visible for XPG3 through XPG6
679  * compilation environments. The use of _XPG4_2 with no other X/Open
680  * namespace restrictions indicates that the symbols were introduced in
681  * XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
682  * environments, but not for XPG3 or XPG4 compilation environments.
683  *
684  * _XPG3    X/Open Portability Guide, Issue 3 (XPG3)
685  * _XPG4    X/Open CAE Specification, Issue 4 (XPG4)
686  * _XPG4_2  X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
687  * _XPG5    X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
688  * _XPG6    Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
689  * _XPG7    Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
690  */
691 
692 /* X/Open Portability Guide, Issue 3 */
693 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
694 /*
695  * _XOPEN_VERSION is defined by the X/Open specifications and is not
696  * normally defined by the application, except in the case of an XPG4
697  * application.  On the implementation side, _XOPEN_VERSION defined with
698  * the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
699  * with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
700  * _XOPEN_VERSION  defined with a value of 500 indicates an XPG5 (UNIX 98)
701  * application and with a value of 600 indicates an XPG6 (UNIX 03)
702  * application and with a value of 700 indicates an XPG7 (UNIX 08).
703  * The appropriate version is determined by the use of the
704  * feature test macros described earlier.  The value of _XOPEN_VERSION
705  * defaults to 3 otherwise indicating support for XPG3 applications.
706  */
707 # 368 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
708 /*
709  * ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
710  * conforming environments.  ISO 9899:1999 says it does.
711  *
712  * The presence of _LONGLONG_TYPE says "long long exists" which is therefore
713  * defined in all but strictly conforming environments that disallow it.
714  */
715 # 388 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
716 /*
717  * The following macro defines a value for the ISO C99 restrict
718  * keyword so that _RESTRICT_KYWD resolves to "restrict" if
719  * an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
720  * if any other compiler is used. This allows for the use of single
721  * prototype declarations regardless of compiler version.
722  */
723 # 410 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h"
724 /*
725  * The following macro defines a value for the ISO C11 _Noreturn
726  * keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
727  * an ISO C11 compiler is used and "" (null string) if any other
728  * compiler is used. This allows for the use of single prototype
729  * declarations regardless of compiler version.
730  */
731 
732 
733 
734 
735 
736 
737 
738 /*
739  * The following macro indicates header support for the ANSI C++
740  * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
741  */
742 
743 
744 /*
745  * The following macro indicates header support for the C99 standard,
746  * ISO/IEC 9899:1999, Programming Languages - C.
747  */
748 
749 
750 /*
751  * The following macro indicates header support for the C99 standard,
752  * ISO/IEC 9899:2011, Programming Languages - C.
753  */
754 
755 
756 /*
757  * The following macro indicates header support for DTrace. The value is an
758  * integer that corresponds to the major version number for DTrace.
759  */
760 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
761 
762 
763 
764 
765 
766 /*
767  * Do all of our 'redefine_extname' processing before
768  * declarations of the associated functions are seen.
769  * This is necessary to keep gcc happy.
770  */
771 
772 
773 /* large file compilation environment setup */
774 
775 
776 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
777 #pragma redefine_extname fopen fopen64
778 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
779 
780 
781 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
782 #pragma redefine_extname freopen freopen64
783 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
784 
785 
786 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
787 #pragma redefine_extname tmpfile tmpfile64
788 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
789 
790 
791 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
792 #pragma redefine_extname fgetpos fgetpos64
793 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
794 
795 
796 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
797 #pragma redefine_extname fsetpos fsetpos64
798 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
799 
800 
801 
802 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
803 #pragma redefine_extname fseeko fseeko64
804 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
805 
806 
807 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
808 #pragma redefine_extname ftello ftello64
809 # 59 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
810 
811 
812 
813 
814 /* In the LP64 compilation environment, all APIs are already large file */
815 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
816 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 1
817 /*
818  * CDDL HEADER START
819  *
820  * The contents of this file are subject to the terms of the
821  * Common Development and Distribution License, Version 1.0 only
822  * (the "License").  You may not use this file except in compliance
823  * with the License.
824  *
825  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
826  * or http://www.opensolaris.org/os/licensing.
827  * See the License for the specific language governing permissions
828  * and limitations under the License.
829  *
830  * When distributing Covered Code, include this CDDL HEADER in each
831  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
832  * If applicable, add the following below this CDDL HEADER, with the
833  * fields enclosed by brackets "[]" replaced with your own identifying
834  * information: Portions Copyright [yyyy] [name of copyright owner]
835  *
836  * CDDL HEADER END
837  */
838 /*
839  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
840  * Copyright 2014 PALO, Richard.
841  *
842  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
843  * Use is subject to license terms.
844  */
845 
846 /*	Copyright (c) 1988 AT&T	*/
847 /*	  All Rights Reserved  	*/
848 
849 /*
850  * An application should not include this header directly.  Instead it
851  * should be included only through the inclusion of other Sun headers.
852  *
853  * The contents of this header is limited to identifiers specified in the
854  * C Standard.  Any new identifiers specified in future amendments to the
855  * C Standard must be placed in this header.  If these new identifiers
856  * are required to also be in the C++ Standard "std" namespace, then for
857  * anything other than macro definitions, corresponding "using" directives
858  * must also be added to <stdio.h>.
859  */
860 
861 /*
862  * User-visible pieces of the ANSI C standard I/O package.
863  */
864 
865 
866 
867 
868 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
869 /*
870  * CDDL HEADER START
871  *
872  * The contents of this file are subject to the terms of the
873  * Common Development and Distribution License (the "License").
874  * You may not use this file except in compliance with the License.
875  *
876  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
877  * or http://www.opensolaris.org/os/licensing.
878  * See the License for the specific language governing permissions
879  * and limitations under the License.
880  *
881  * When distributing Covered Code, include this CDDL HEADER in each
882  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
883  * If applicable, add the following below this CDDL HEADER, with the
884  * fields enclosed by brackets "[]" replaced with your own identifying
885  * information: Portions Copyright [yyyy] [name of copyright owner]
886  *
887  * CDDL HEADER END
888  */
889 
890 /*
891  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
892  * Copyright 2016 Joyent, Inc.
893  *
894  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
895  * Use is subject to license terms.
896  */
897 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
898 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
899 /*
900  * This file and its contents are supplied under the terms of the
901  * Common Development and Distribution License ("CDDL"), version 1.0.
902  * You may only use this file in accordance with the terms of version
903  * 1.0 of the CDDL.
904  *
905  * A full copy of the text of the CDDL should have accompanied this
906  * source.  A copy of the CDDL is also available via the Internet at
907  * http://www.illumos.org/license/CDDL.
908  */
909 
910 /*
911  * Copyright 2014-2016 PALO, Richard.
912  */
913 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
914 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1
915 /*
916  * CDDL HEADER START
917  *
918  * The contents of this file are subject to the terms of the
919  * Common Development and Distribution License, Version 1.0 only
920  * (the "License").  You may not use this file except in compliance
921  * with the License.
922  *
923  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
924  * or http://www.opensolaris.org/os/licensing.
925  * See the License for the specific language governing permissions
926  * and limitations under the License.
927  *
928  * When distributing Covered Code, include this CDDL HEADER in each
929  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
930  * If applicable, add the following below this CDDL HEADER, with the
931  * fields enclosed by brackets "[]" replaced with your own identifying
932  * information: Portions Copyright [yyyy] [name of copyright owner]
933  *
934  * CDDL HEADER END
935  */
936 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
937 /*	  All Rights Reserved	*/
938 
939 
940 /*
941  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
942  *
943  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
944  * Use is subject to license terms.
945  */
946 
947 
948 
949 
950 /*
951  * An application should not include this header directly.  Instead it
952  * should be included only through the inclusion of other Sun headers.
953  *
954  * The purpose of this header is to provide the type definitions for
955  * the va_list argument used by a number of printf and printf like
956  * functions. The headers that define these various function prototypes
957  * #include this header directly. These include but are not necessarily
958  * limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
959  * <syslog.h>. The type definitions included in this header are for
960  * the benefit of consumers of va_list.
961  *
962  * Any application that accepts variable argument lists must as documented,
963  * include either <varargs.h> or the preferred <stdarg.h>. Doing so will
964  * pull in the appropriate compiler protocols defined in <sys/va_impl.h>
965  * which is in turn is included by <varargs.h> and <stdarg.h>. See comments
966  * in <sys/va_impl.h> for more detailed information regarding implementation
967  * and compiler specific protocols.
968  */
969 
970 /*
971  * The common definitions exported by this header or compilers using
972  * this header are:
973  *
974  * the identifier __builtin_va_alist for the variable list pseudo parameter
975  * the type __va_alist_type for the variable list pseudo parameter
976  * the type __va_list defining the type of the variable list iterator
977  *
978  * The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
979  * (__GNUC__) and processor macros (e.g. __amd64) are intended to be
980  * defined by the compilation system, not the user of the system.
981  */
982 
983 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
984 /*
985  * CDDL HEADER START
986  *
987  * The contents of this file are subject to the terms of the
988  * Common Development and Distribution License (the "License").
989  * You may not use this file except in compliance with the License.
990  *
991  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
992  * or http://www.opensolaris.org/os/licensing.
993  * See the License for the specific language governing permissions
994  * and limitations under the License.
995  *
996  *
997  * When distributing Covered Code, include this CDDL HEADER in each
998  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
999  * If applicable, add the following below this CDDL HEADER, with the
1000  * fields enclosed by brackets "[]" replaced with your own identifying
1001  * information: Portions Copyright [yyyy] [name of copyright owner]
1002  *
1003  * CDDL HEADER END
1004  */
1005 
1006 /*
1007  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1008  * Use is subject to license terms.
1009  * Copyright 2016 Joyent, Inc.
1010  */
1011 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 2
1012 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h"
1013 typedef __builtin_va_list __gnuc_va_list;
1014 /*
1015  * XX64 This seems unnecessary .. but is needed because vcmn_err is
1016  *	defined with __va_list instead of plain old va_list.
1017  *	Perhaps that should be fixed!
1018  */
1019 typedef __builtin_va_list __va_list;
1020 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1021 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h" 1
1022 /*
1023  * CDDL HEADER START
1024  *
1025  * The contents of this file are subject to the terms of the
1026  * Common Development and Distribution License, Version 1.0 only
1027  * (the "License").  You may not use this file except in compliance
1028  * with the License.
1029  *
1030  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1031  * or http://www.opensolaris.org/os/licensing.
1032  * See the License for the specific language governing permissions
1033  * and limitations under the License.
1034  *
1035  * When distributing Covered Code, include this CDDL HEADER in each
1036  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1037  * If applicable, add the following below this CDDL HEADER, with the
1038  * fields enclosed by brackets "[]" replaced with your own identifying
1039  * information: Portions Copyright [yyyy] [name of copyright owner]
1040  *
1041  * CDDL HEADER END
1042  */
1043 /*
1044  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1045  * Use is subject to license terms.
1046  */
1047 
1048 
1049 
1050 
1051 #pragma ident "%Z%%M%	%I%	%E% SMI"
1052 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_tag.h"
1053 typedef struct __FILE __FILE;
1054 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1055 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 1
1056 /*
1057  * CDDL HEADER START
1058  *
1059  * The contents of this file are subject to the terms of the
1060  * Common Development and Distribution License (the "License").
1061  * You may not use this file except in compliance with the License.
1062  *
1063  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1064  * or http://www.opensolaris.org/os/licensing.
1065  * See the License for the specific language governing permissions
1066  * and limitations under the License.
1067  *
1068  * When distributing Covered Code, include this CDDL HEADER in each
1069  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1070  * If applicable, add the following below this CDDL HEADER, with the
1071  * fields enclosed by brackets "[]" replaced with your own identifying
1072  * information: Portions Copyright [yyyy] [name of copyright owner]
1073  *
1074  * CDDL HEADER END
1075  */
1076 
1077 /*
1078  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1079  * Use is subject to license terms.
1080  */
1081 
1082 
1083 
1084 
1085 #pragma ident "%Z%%M%	%I%	%E% SMI"
1086 
1087 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1088 /*
1089  * CDDL HEADER START
1090  *
1091  * The contents of this file are subject to the terms of the
1092  * Common Development and Distribution License (the "License").
1093  * You may not use this file except in compliance with the License.
1094  *
1095  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1096  * or http://www.opensolaris.org/os/licensing.
1097  * See the License for the specific language governing permissions
1098  * and limitations under the License.
1099  *
1100  *
1101  * When distributing Covered Code, include this CDDL HEADER in each
1102  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1103  * If applicable, add the following below this CDDL HEADER, with the
1104  * fields enclosed by brackets "[]" replaced with your own identifying
1105  * information: Portions Copyright [yyyy] [name of copyright owner]
1106  *
1107  * CDDL HEADER END
1108  */
1109 
1110 /*
1111  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1112  * Use is subject to license terms.
1113  * Copyright 2016 Joyent, Inc.
1114  */
1115 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h" 2
1116 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio_impl.h"
1117 struct __FILE /* needs to be binary-compatible with old versions */
1118 {
1119 
1120 
1121 
1122 
1123  int _cnt; /* number of available characters in buffer */
1124  unsigned char *_ptr; /* next character from/to here in buffer */
1125 
1126  unsigned char *_base; /* the buffer */
1127  unsigned char _flag; /* the state of the stream */
1128  unsigned char _magic; /* Old home of the file descriptor */
1129     /* Only fileno(3C) can retrieve the value now */
1130  unsigned __orientation:2; /* the orientation of the stream */
1131  unsigned __ionolock:1; /* turn off implicit locking */
1132  unsigned __seekable:1; /* is file seekable? */
1133  unsigned __extendedfd:1; /* enable extended FILE */
1134  unsigned __xf_nocheck:1; /* no extended FILE runtime check */
1135  unsigned __filler:10;
1136 };
1137 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h" 2
1138 
1139 /*
1140  * If feature test macros are set that enable interfaces that use types
1141  * defined in <sys/types.h>, get those types by doing the include.
1142  *
1143  * Note that in asking for the interfaces associated with this feature test
1144  * macro one also asks for definitions of the POSIX types.
1145  */
1146 
1147 
1148 
1149 
1150 
1151 
1152 /*
1153  * The following typedefs are adopted from ones in <sys/types.h> (with leading
1154  * underscores added to avoid polluting the ANSI C name space).  See the
1155  * commentary there for further explanation.
1156  */
1157 
1158 typedef long long __longlong_t;
1159 # 93 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1160 typedef __FILE FILE;
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 typedef unsigned int size_t; /* (historical version) */
1169 
1170 
1171 
1172 
1173 
1174 
1175 typedef __longlong_t fpos_t;
1176 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1177 /*
1178  * The value of _NFILE is defined in the Processor Specific ABI.  The value
1179  * is chosen for historical reasons rather than for truly processor related
1180  * attribute.  Note that the SPARC Processor Specific ABI uses the common
1181  * UNIX historical value of 20 so it is allowed to fall through.
1182  */
1183 # 156 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1184 extern __FILE __iob[60];
1185 # 191 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_iso.h"
1186 extern int remove(const char *);
1187 extern int rename(const char *, const char *);
1188 extern FILE *tmpfile(void);
1189 extern char *tmpnam(char *);
1190 extern int fclose(FILE *);
1191 extern int fflush(FILE *);
1192 extern FILE *fopen(const char *, const char *);
1193 extern FILE *freopen(const char *,
1194    const char *, FILE *);
1195 extern void setbuf(FILE *, char *);
1196 extern int setvbuf(FILE *, char *, int,
1197    size_t);
1198 /* PRINTFLIKE2 */
1199 extern int fprintf(FILE *, const char *, ...);
1200 /* SCANFLIKE2 */
1201 extern int fscanf(FILE *, const char *, ...);
1202 /* PRINTFLIKE1 */
1203 extern int printf(const char *, ...);
1204 /* SCANFLIKE1 */
1205 extern int scanf(const char *, ...);
1206 /* PRINTFLIKE2 */
1207 extern int sprintf(char *, const char *, ...);
1208 /* SCANFLIKE2 */
1209 extern int sscanf(const char *,
1210    const char *, ...);
1211 extern int vfprintf(FILE *, const char *,
1212    __va_list);
1213 extern int vprintf(const char *, __va_list);
1214 extern int vsprintf(char *, const char *,
1215    __va_list);
1216 extern int fgetc(FILE *);
1217 extern char *fgets(char *, int, FILE *);
1218 extern int fputc(int, FILE *);
1219 extern int fputs(const char *, FILE *);
1220 
1221 
1222 extern int getc(FILE *);
1223 extern int putc(int, FILE *);
1224 
1225 
1226 
1227 extern int getchar(void);
1228 extern int putchar(int);
1229 
1230 
1231 /*
1232  * ISO/IEC C11 removed gets from the standard library. Therefore if a strict C11
1233  * environment has been requested, we remove it.
1234  */
1235 
1236 extern char *gets(char *);
1237 
1238 extern int puts(const char *);
1239 extern int ungetc(int, FILE *);
1240 extern size_t fread(void *, size_t, size_t,
1241  FILE *);
1242 extern size_t fwrite(const void *, size_t, size_t,
1243  FILE *);
1244 
1245 extern int fgetpos(FILE *, fpos_t *);
1246 extern int fsetpos(FILE *, const fpos_t *);
1247 
1248 extern int fseek(FILE *, long, int);
1249 extern long ftell(FILE *);
1250 extern void rewind(FILE *);
1251 
1252 
1253 extern void clearerr(FILE *);
1254 extern int feof(FILE *);
1255 extern int ferror(FILE *);
1256 
1257 extern void perror(const char *);
1258 
1259 
1260 extern int __filbuf(FILE *);
1261 extern int __flsbuf(int, FILE *);
1262 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1263 
1264 /*
1265  * If feature test macros are set that enable interfaces that use types
1266  * defined in <sys/types.h>, get those types by doing the include.
1267  *
1268  * Note that in asking for the interfaces associated with this feature test
1269  * macro one also asks for definitions of the POSIX types.
1270  */
1271 
1272 /*
1273  * Allow global visibility for symbols defined in
1274  * C++ "std" namespace in <iso/stdio_iso.h>.
1275  */
1276 # 147 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1277 /*
1278  * This header needs to be included here because it relies on the global
1279  * visibility of FILE and size_t in the C++ environment.
1280  */
1281 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h" 1
1282 /*
1283  * CDDL HEADER START
1284  *
1285  * The contents of this file are subject to the terms of the
1286  * Common Development and Distribution License, Version 1.0 only
1287  * (the "License").  You may not use this file except in compliance
1288  * with the License.
1289  *
1290  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1291  * or http://www.opensolaris.org/os/licensing.
1292  * See the License for the specific language governing permissions
1293  * and limitations under the License.
1294  *
1295  * When distributing Covered Code, include this CDDL HEADER in each
1296  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1297  * If applicable, add the following below this CDDL HEADER, with the
1298  * fields enclosed by brackets "[]" replaced with your own identifying
1299  * information: Portions Copyright [yyyy] [name of copyright owner]
1300  *
1301  * CDDL HEADER END
1302  */
1303 /*
1304  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1305  *
1306  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1307  * Use is subject to license terms.
1308  */
1309 
1310 /*
1311  * An application should not include this header directly.  Instead it
1312  * should be included only through the inclusion of other Sun headers.
1313  *
1314  * The contents of this header is limited to identifiers specified in
1315  * the C99 standard and in conflict with the C++ implementation of the
1316  * standard header.  The C++ standard may adopt the C99 standard at
1317  * which point it is expected that the symbols included here will
1318  * become part of the C++ std namespace.
1319  */
1320 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1321 /*
1322  * The following have been added as a result of the ISO/IEC 9899:1999
1323  * standard. For a strictly conforming C application, visibility is
1324  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
1325  * For non-strictly conforming C applications, there are no restrictions
1326  * on the C namespace.
1327  */
1328 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdio_c99.h"
1329 extern int vfscanf(FILE *, const char *, __va_list);
1330 extern int vscanf(const char *, __va_list);
1331 extern int vsscanf(const char *, const char *,
1332   __va_list);
1333 
1334 
1335 
1336 
1337 extern int snprintf(char *, size_t, const char *,
1338  ...);
1339 extern int vsnprintf(char *, size_t, const char *,
1340  __va_list);
1341 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 2
1342 # 163 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1343 typedef __longlong_t off_t;
1344 
1345 
1346 
1347 
1348 
1349 typedef __longlong_t off64_t;
1350 # 179 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1351 typedef __longlong_t fpos64_t;
1352 
1353 
1354 
1355 /*
1356  * XPG4 requires that va_list be defined in <stdio.h> "as described in
1357  * <stdarg.h>".  ANSI-C and POSIX require that the namespace of <stdio.h>
1358  * not be polluted with this name.
1359  */
1360 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1361 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1362 # 213 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1363 extern unsigned char _sibuf[], _sobuf[];
1364 
1365 
1366 /* large file compilation environment setup */
1367 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1368 extern unsigned char *_bufendtab[];
1369 extern FILE *_lastbuf;
1370 
1371 
1372 /* In the LP64 compilation environment, all APIs are already large file */
1373 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1374 typedef int ssize_t; /* (historical version) */
1375 
1376 
1377 
1378 
1379 
1380 
1381 extern char *tmpnam_r(char *);
1382 
1383 
1384 
1385 
1386 extern int fcloseall(void);
1387 extern void setbuffer(FILE *, char *, size_t);
1388 extern int setlinebuf(FILE *);
1389 /* PRINTFLIKE2 */
1390 extern int asprintf(char **, const char *, ...);
1391 /* PRINTFLIKE2 */
1392 extern int vasprintf(char **, const char *, __va_list);
1393 
1394 
1395 
1396 
1397  /* || defined(_XPG7) */
1398 extern ssize_t getdelim(char **, size_t *,
1399  int, FILE *);
1400 extern ssize_t getline(char **, size_t *,
1401  FILE *);
1402 
1403 
1404 /*
1405  * The following are known to POSIX and XOPEN, but not to ANSI-C.
1406  */
1407 
1408 
1409 
1410 extern FILE *fdopen(int, const char *);
1411 extern char *ctermid(char *);
1412 extern int fileno(FILE *);
1413 
1414 
1415 
1416 /*
1417  * The following are known to POSIX.1c, but not to ANSI-C or XOPEN.
1418  */
1419 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h"
1420 /*
1421  * The following are known to XOPEN, but not to ANSI-C or POSIX.
1422  */
1423 
1424 
1425 extern FILE *popen(const char *, const char *);
1426 extern char *tempnam(const char *, const char *);
1427 extern int pclose(FILE *);
1428 
1429 extern int getsubopt(char **, char *const *, char **);
1430 
1431 
1432 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
1433 
1434 extern char *cuserid(char *);
1435 extern int getopt(int, char *const *, const char *);
1436 extern char *optarg;
1437 extern int optind, opterr, optopt;
1438 extern int getw(FILE *);
1439 extern int putw(int, FILE *);
1440 
1441 
1442 
1443 
1444 /*
1445  * The following are defined as part of the Large File Summit interfaces.
1446  */
1447 
1448 extern int fseeko(FILE *, off_t, int);
1449 extern off_t ftello(FILE *);
1450 
1451 
1452 /*
1453  * The following are defined as part of the transitional Large File Summit
1454  * interfaces.
1455  */
1456 
1457 
1458 extern FILE *fopen64(const char *, const char *);
1459 extern FILE *freopen64(const char *, const char *, FILE *);
1460 extern FILE *tmpfile64(void);
1461 extern int fgetpos64(FILE *, fpos64_t *);
1462 extern int fsetpos64(FILE *, const fpos64_t *);
1463 extern int fseeko64(FILE *, off64_t, int);
1464 extern off64_t ftello64(FILE *);
1465 
1466 
1467 /*
1468  * XPG7 symbols
1469  */
1470 
1471 extern FILE *fmemopen(void *, size_t,
1472       const char *);
1473 extern FILE *open_memstream(char **, size_t *);
1474 # 32 "backup.c" 2
1475 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 1
1476 /*
1477  * CDDL HEADER START
1478  *
1479  * The contents of this file are subject to the terms of the
1480  * Common Development and Distribution License, Version 1.0 only
1481  * (the "License").  You may not use this file except in compliance
1482  * with the License.
1483  *
1484  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1485  * or http://www.opensolaris.org/os/licensing.
1486  * See the License for the specific language governing permissions
1487  * and limitations under the License.
1488  *
1489  * When distributing Covered Code, include this CDDL HEADER in each
1490  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1491  * If applicable, add the following below this CDDL HEADER, with the
1492  * fields enclosed by brackets "[]" replaced with your own identifying
1493  * information: Portions Copyright [yyyy] [name of copyright owner]
1494  *
1495  * CDDL HEADER END
1496  */
1497 /*
1498  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
1499  * Use is subject to license terms.
1500  */
1501 
1502 /*
1503  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1504  *
1505  * Portions of this file developed by Garrett D'Amore are licensed
1506  * under the terms of the Common Development and Distribution License (CDDL)
1507  * version 1.0 only.  The use of subsequent versions of the License are
1508  * is specifically prohibited unless those terms are not in conflict with
1509  * version 1.0 of the License.  You can find this license on-line at
1510  * http://www.illumos.org/license/CDDL
1511  */
1512 
1513 
1514 
1515 
1516 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 1
1517 /*
1518  * CDDL HEADER START
1519  *
1520  * The contents of this file are subject to the terms of the
1521  * Common Development and Distribution License, Version 1.0 only
1522  * (the "License").  You may not use this file except in compliance
1523  * with the License.
1524  *
1525  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1526  * or http://www.opensolaris.org/os/licensing.
1527  * See the License for the specific language governing permissions
1528  * and limitations under the License.
1529  *
1530  * When distributing Covered Code, include this CDDL HEADER in each
1531  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1532  * If applicable, add the following below this CDDL HEADER, with the
1533  * fields enclosed by brackets "[]" replaced with your own identifying
1534  * information: Portions Copyright [yyyy] [name of copyright owner]
1535  *
1536  * CDDL HEADER END
1537  */
1538 /*
1539  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1540  * Copyright 2014 PALO, Richard.
1541  *
1542  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
1543  * Use is subject to license terms.
1544  */
1545 
1546 /*	Copyright (c) 1988 AT&T	*/
1547 /*	  All Rights Reserved  	*/
1548 
1549 
1550 /*
1551  * An application should not include this header directly.  Instead it
1552  * should be included only through the inclusion of other Sun headers.
1553  *
1554  * The contents of this header is limited to identifiers specified in the
1555  * C Standard.  Any new identifiers specified in future amendments to the
1556  * C Standard must be placed in this header.  If these new identifiers
1557  * are required to also be in the C++ Standard "std" namespace, then for
1558  * anything other than macro definitions, corresponding "using" directives
1559  * must also be added to <locale.h>.
1560  */
1561 
1562 
1563 
1564 
1565 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1566 /*
1567  * CDDL HEADER START
1568  *
1569  * The contents of this file are subject to the terms of the
1570  * Common Development and Distribution License (the "License").
1571  * You may not use this file except in compliance with the License.
1572  *
1573  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1574  * or http://www.opensolaris.org/os/licensing.
1575  * See the License for the specific language governing permissions
1576  * and limitations under the License.
1577  *
1578  * When distributing Covered Code, include this CDDL HEADER in each
1579  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1580  * If applicable, add the following below this CDDL HEADER, with the
1581  * fields enclosed by brackets "[]" replaced with your own identifying
1582  * information: Portions Copyright [yyyy] [name of copyright owner]
1583  *
1584  * CDDL HEADER END
1585  */
1586 
1587 /*
1588  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1589  * Copyright 2016 Joyent, Inc.
1590  *
1591  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1592  * Use is subject to license terms.
1593  */
1594 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
1595 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
1596 /*
1597  * This file and its contents are supplied under the terms of the
1598  * Common Development and Distribution License ("CDDL"), version 1.0.
1599  * You may only use this file in accordance with the terms of version
1600  * 1.0 of the CDDL.
1601  *
1602  * A full copy of the text of the CDDL should have accompanied this
1603  * source.  A copy of the CDDL is also available via the Internet at
1604  * http://www.illumos.org/license/CDDL.
1605  */
1606 
1607 /*
1608  * Copyright 2014-2016 PALO, Richard.
1609  */
1610 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h" 2
1611 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
1612 struct lconv {
1613  char *decimal_point;
1614  char *thousands_sep;
1615  char *grouping;
1616  char *int_curr_symbol;
1617  char *currency_symbol;
1618  char *mon_decimal_point;
1619  char *mon_thousands_sep;
1620  char *mon_grouping;
1621  char *positive_sign;
1622  char *negative_sign;
1623  char int_frac_digits;
1624  char frac_digits;
1625  char p_cs_precedes;
1626  char p_sep_by_space;
1627  char n_cs_precedes;
1628  char n_sep_by_space;
1629  char p_sign_posn;
1630  char n_sign_posn;
1631 
1632 /*
1633  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
1634  * standard.  Namespace and binary compatibility dictate that visibility
1635  * of these new members be limited.  Visibility is limited to a strictly
1636  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
1637  */
1638 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
1639 };
1640 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/locale_iso.h"
1641 extern char *setlocale(int, const char *);
1642 extern struct lconv *localeconv(void);
1643 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
1644 
1645 
1646 
1647 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
1648 /*
1649  * CDDL HEADER START
1650  *
1651  * The contents of this file are subject to the terms of the
1652  * Common Development and Distribution License (the "License").
1653  * You may not use this file except in compliance with the License.
1654  *
1655  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1656  * or http://www.opensolaris.org/os/licensing.
1657  * See the License for the specific language governing permissions
1658  * and limitations under the License.
1659  *
1660  * When distributing Covered Code, include this CDDL HEADER in each
1661  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1662  * If applicable, add the following below this CDDL HEADER, with the
1663  * fields enclosed by brackets "[]" replaced with your own identifying
1664  * information: Portions Copyright [yyyy] [name of copyright owner]
1665  *
1666  * CDDL HEADER END
1667  */
1668 /*
1669  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1670  *
1671  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1672  * Use is subject to license terms.
1673  */
1674 
1675 
1676 
1677 
1678 
1679 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1680 /*
1681  * CDDL HEADER START
1682  *
1683  * The contents of this file are subject to the terms of the
1684  * Common Development and Distribution License (the "License").
1685  * You may not use this file except in compliance with the License.
1686  *
1687  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1688  * or http://www.opensolaris.org/os/licensing.
1689  * See the License for the specific language governing permissions
1690  * and limitations under the License.
1691  *
1692  *
1693  * When distributing Covered Code, include this CDDL HEADER in each
1694  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1695  * If applicable, add the following below this CDDL HEADER, with the
1696  * fields enclosed by brackets "[]" replaced with your own identifying
1697  * information: Portions Copyright [yyyy] [name of copyright owner]
1698  *
1699  * CDDL HEADER END
1700  */
1701 
1702 /*
1703  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1704  * Use is subject to license terms.
1705  * Copyright 2016 Joyent, Inc.
1706  */
1707 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 2
1708 
1709 
1710 
1711 
1712 
1713 /*
1714  * wchar_t is a built-in type in standard C++ and as such is not
1715  * defined here when using standard C++. However, the GNU compiler
1716  * fixincludes utility nonetheless creates its own version of this
1717  * header for use by gcc and g++. In that version it adds a redundant
1718  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
1719  * header we need to include the following magic comment:
1720  *
1721  * we must use the C++ compiler's type
1722  *
1723  * The above comment should not be removed or changed until GNU
1724  * gcc/fixinc/inclhack.def is updated to bypass this header.
1725  */
1726 
1727 
1728 
1729 
1730 
1731 
1732 typedef long wchar_t;
1733 # 67 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h"
1734 extern char *dcgettext(const char *, const char *, const int);
1735 extern char *dgettext(const char *, const char *);
1736 extern char *gettext(const char *);
1737 extern char *textdomain(const char *);
1738 extern char *bindtextdomain(const char *, const char *);
1739 
1740 /*
1741  * LI18NUX 2000 Globalization Specification Version 1.0
1742  * with Amendment 2
1743  */
1744 extern char *dcngettext(const char *, const char *,
1745  const char *, unsigned long int, int);
1746 extern char *dngettext(const char *, const char *,
1747  const char *, unsigned long int);
1748 extern char *ngettext(const char *, const char *, unsigned long int);
1749 extern char *bind_textdomain_codeset(const char *, const char *);
1750 
1751 /* Word handling functions --- requires dynamic linking */
1752 /* Warning: these are experimental and subject to change. */
1753 extern int wdinit(void);
1754 extern int wdchkind(wchar_t);
1755 extern int wdbindf(wchar_t, wchar_t, int);
1756 extern wchar_t *wddelim(wchar_t, wchar_t, int);
1757 extern wchar_t mcfiller(void);
1758 extern int mcwrap(void);
1759 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h" 2
1760 
1761 
1762 /*
1763  * Allow global visibility for symbols defined in
1764  * C++ "std" namespace in <iso/locale_iso.h>.
1765  */
1766 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
1767 /*
1768  * These were added in POSIX 2008 as part of the newlocale() specification.
1769  */
1770 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/locale.h"
1771 typedef struct _locale *locale_t;
1772 
1773 
1774 extern locale_t duplocale(locale_t);
1775 extern void freelocale(locale_t);
1776 extern locale_t newlocale(int, const char *, locale_t);
1777 extern locale_t uselocale(locale_t);
1778 
1779 
1780 extern locale_t __global_locale(void);
1781 # 33 "backup.c" 2
1782 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/libintl.h" 1
1783 /*
1784  * CDDL HEADER START
1785  *
1786  * The contents of this file are subject to the terms of the
1787  * Common Development and Distribution License (the "License").
1788  * You may not use this file except in compliance with the License.
1789  *
1790  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1791  * or http://www.opensolaris.org/os/licensing.
1792  * See the License for the specific language governing permissions
1793  * and limitations under the License.
1794  *
1795  * When distributing Covered Code, include this CDDL HEADER in each
1796  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1797  * If applicable, add the following below this CDDL HEADER, with the
1798  * fields enclosed by brackets "[]" replaced with your own identifying
1799  * information: Portions Copyright [yyyy] [name of copyright owner]
1800  *
1801  * CDDL HEADER END
1802  */
1803 /*
1804  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
1805  *
1806  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1807  * Use is subject to license terms.
1808  */
1809 # 34 "backup.c" 2
1810 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 1
1811 /*
1812  * CDDL HEADER START
1813  *
1814  * The contents of this file are subject to the terms of the
1815  * Common Development and Distribution License (the "License").
1816  * You may not use this file except in compliance with the License.
1817  *
1818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1819  * or http://www.opensolaris.org/os/licensing.
1820  * See the License for the specific language governing permissions
1821  * and limitations under the License.
1822  *
1823  * When distributing Covered Code, include this CDDL HEADER in each
1824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1825  * If applicable, add the following below this CDDL HEADER, with the
1826  * fields enclosed by brackets "[]" replaced with your own identifying
1827  * information: Portions Copyright [yyyy] [name of copyright owner]
1828  *
1829  * CDDL HEADER END
1830  */
1831 
1832 /*
1833  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1834  * Use is subject to license terms.
1835  */
1836 
1837 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
1838 /* All Rights Reserved */
1839 # 38 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
1840 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
1841 /*
1842  * CDDL HEADER START
1843  *
1844  * The contents of this file are subject to the terms of the
1845  * Common Development and Distribution License (the "License").
1846  * You may not use this file except in compliance with the License.
1847  *
1848  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1849  * or http://www.opensolaris.org/os/licensing.
1850  * See the License for the specific language governing permissions
1851  * and limitations under the License.
1852  *
1853  * When distributing Covered Code, include this CDDL HEADER in each
1854  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1855  * If applicable, add the following below this CDDL HEADER, with the
1856  * fields enclosed by brackets "[]" replaced with your own identifying
1857  * information: Portions Copyright [yyyy] [name of copyright owner]
1858  *
1859  * CDDL HEADER END
1860  */
1861 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
1862 /*	  All Rights Reserved  	*/
1863 
1864 
1865 /*
1866  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
1867  * Use is subject to license terms.
1868  *
1869  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
1870  * Copyright 2016 Joyent, Inc.
1871  */
1872 
1873 
1874 
1875 
1876 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1877 /*
1878  * CDDL HEADER START
1879  *
1880  * The contents of this file are subject to the terms of the
1881  * Common Development and Distribution License (the "License").
1882  * You may not use this file except in compliance with the License.
1883  *
1884  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1885  * or http://www.opensolaris.org/os/licensing.
1886  * See the License for the specific language governing permissions
1887  * and limitations under the License.
1888  *
1889  * When distributing Covered Code, include this CDDL HEADER in each
1890  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1891  * If applicable, add the following below this CDDL HEADER, with the
1892  * fields enclosed by brackets "[]" replaced with your own identifying
1893  * information: Portions Copyright [yyyy] [name of copyright owner]
1894  *
1895  * CDDL HEADER END
1896  */
1897 
1898 /*
1899  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1900  * Copyright 2016 Joyent, Inc.
1901  *
1902  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1903  * Use is subject to license terms.
1904  */
1905 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1906 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
1907 /*
1908  * CDDL HEADER START
1909  *
1910  * The contents of this file are subject to the terms of the
1911  * Common Development and Distribution License (the "License").
1912  * You may not use this file except in compliance with the License.
1913  *
1914  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1915  * or http://www.opensolaris.org/os/licensing.
1916  * See the License for the specific language governing permissions
1917  * and limitations under the License.
1918  *
1919  *
1920  * When distributing Covered Code, include this CDDL HEADER in each
1921  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1922  * If applicable, add the following below this CDDL HEADER, with the
1923  * fields enclosed by brackets "[]" replaced with your own identifying
1924  * information: Portions Copyright [yyyy] [name of copyright owner]
1925  *
1926  * CDDL HEADER END
1927  */
1928 
1929 /*
1930  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
1931  * Use is subject to license terms.
1932  * Copyright 2016 Joyent, Inc.
1933  */
1934 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
1935 
1936 /*
1937  * Machine dependent definitions moved to <sys/machtypes.h>.
1938  */
1939 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 1
1940 /*
1941  * CDDL HEADER START
1942  *
1943  * The contents of this file are subject to the terms of the
1944  * Common Development and Distribution License, Version 1.0 only
1945  * (the "License").  You may not use this file except in compliance
1946  * with the License.
1947  *
1948  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1949  * or http://www.opensolaris.org/os/licensing.
1950  * See the License for the specific language governing permissions
1951  * and limitations under the License.
1952  *
1953  * When distributing Covered Code, include this CDDL HEADER in each
1954  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1955  * If applicable, add the following below this CDDL HEADER, with the
1956  * fields enclosed by brackets "[]" replaced with your own identifying
1957  * information: Portions Copyright [yyyy] [name of copyright owner]
1958  *
1959  * CDDL HEADER END
1960  */
1961 /*
1962  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
1963  * Use is subject to license terms.
1964  */
1965 
1966 
1967 
1968 
1969 #pragma ident "%Z%%M%	%I%	%E% SMI"
1970 
1971 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
1972 /*
1973  * CDDL HEADER START
1974  *
1975  * The contents of this file are subject to the terms of the
1976  * Common Development and Distribution License (the "License").
1977  * You may not use this file except in compliance with the License.
1978  *
1979  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1980  * or http://www.opensolaris.org/os/licensing.
1981  * See the License for the specific language governing permissions
1982  * and limitations under the License.
1983  *
1984  * When distributing Covered Code, include this CDDL HEADER in each
1985  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1986  * If applicable, add the following below this CDDL HEADER, with the
1987  * fields enclosed by brackets "[]" replaced with your own identifying
1988  * information: Portions Copyright [yyyy] [name of copyright owner]
1989  *
1990  * CDDL HEADER END
1991  */
1992 
1993 /*
1994  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
1995  * Copyright 2016 Joyent, Inc.
1996  *
1997  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
1998  * Use is subject to license terms.
1999  */
2000 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
2001 
2002 
2003 
2004 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h" 1
2005 /*
2006  * CDDL HEADER START
2007  *
2008  * The contents of this file are subject to the terms of the
2009  * Common Development and Distribution License (the "License").
2010  * You may not use this file except in compliance with the License.
2011  *
2012  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2013  * or http://www.opensolaris.org/os/licensing.
2014  * See the License for the specific language governing permissions
2015  * and limitations under the License.
2016  *
2017  * When distributing Covered Code, include this CDDL HEADER in each
2018  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2019  * If applicable, add the following below this CDDL HEADER, with the
2020  * fields enclosed by brackets "[]" replaced with your own identifying
2021  * information: Portions Copyright [yyyy] [name of copyright owner]
2022  *
2023  * CDDL HEADER END
2024  */
2025 /*
2026  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2027  * Use is subject to license terms.
2028  */
2029 
2030 
2031 
2032 
2033 #pragma ident "%Z%%M%	%I%	%E% SMI"
2034 
2035 
2036 
2037 
2038 
2039 /*
2040  * Machine dependent types:
2041  *
2042  *	intel ia32 Version
2043  */
2044 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/ia32/sys/machtypes.h"
2045 typedef struct _label_t { long val[6]; } label_t;
2046 
2047 
2048 
2049 typedef unsigned char lock_t; /* lock work for busy wait */
2050 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machtypes.h" 2
2051 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2052 
2053 /*
2054  * Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
2055  * committee's working draft for the revision of the current ISO C standard,
2056  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
2057  * required by any standard but constitute a useful, general purpose set
2058  * of type definitions which is namespace clean with respect to all standards.
2059  */
2060 
2061 
2062 
2063 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
2064 /*
2065  * CDDL HEADER START
2066  *
2067  * The contents of this file are subject to the terms of the
2068  * Common Development and Distribution License, Version 1.0 only
2069  * (the "License").  You may not use this file except in compliance
2070  * with the License.
2071  *
2072  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2073  * or http://www.opensolaris.org/os/licensing.
2074  * See the License for the specific language governing permissions
2075  * and limitations under the License.
2076  *
2077  * When distributing Covered Code, include this CDDL HEADER in each
2078  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2079  * If applicable, add the following below this CDDL HEADER, with the
2080  * fields enclosed by brackets "[]" replaced with your own identifying
2081  * information: Portions Copyright [yyyy] [name of copyright owner]
2082  *
2083  * CDDL HEADER END
2084  */
2085 /*
2086  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2087  *
2088  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
2089  * Use is subject to license terms.
2090  */
2091 
2092 
2093 
2094 
2095 /*
2096  * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
2097  * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
2098  * Programming language - C.
2099  *
2100  * Programs/Modules should not directly include this file.  Access to the
2101  * types defined in this file should be through the inclusion of one of the
2102  * following files:
2103  *
2104  *	<sys/types.h>		Provides only the "_t" types defined in this
2105  *				file which is a subset of the contents of
2106  *				<inttypes.h>.  (This can be appropriate for
2107  *				all programs/modules except those claiming
2108  *				ANSI-C conformance.)
2109  *
2110  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
2111  *				components of <inttypes.h>.
2112  *
2113  *	<inttypes.h>		For use by applications.
2114  *
2115  * See these files for more details.
2116  */
2117 
2118 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2119 /*
2120  * CDDL HEADER START
2121  *
2122  * The contents of this file are subject to the terms of the
2123  * Common Development and Distribution License (the "License").
2124  * You may not use this file except in compliance with the License.
2125  *
2126  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2127  * or http://www.opensolaris.org/os/licensing.
2128  * See the License for the specific language governing permissions
2129  * and limitations under the License.
2130  *
2131  * When distributing Covered Code, include this CDDL HEADER in each
2132  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2133  * If applicable, add the following below this CDDL HEADER, with the
2134  * fields enclosed by brackets "[]" replaced with your own identifying
2135  * information: Portions Copyright [yyyy] [name of copyright owner]
2136  *
2137  * CDDL HEADER END
2138  */
2139 
2140 /*
2141  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2142  * Copyright 2016 Joyent, Inc.
2143  *
2144  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2145  * Use is subject to license terms.
2146  */
2147 # 56 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 2
2148 
2149 
2150 
2151 
2152 
2153 /*
2154  * Basic / Extended integer types
2155  *
2156  * The following defines the basic fixed-size integer types.
2157  *
2158  * Implementations are free to typedef them to Standard C integer types or
2159  * extensions that they support. If an implementation does not support one
2160  * of the particular integer data types below, then it should not define the
2161  * typedefs and macros corresponding to that data type.  Note that int8_t
2162  * is not defined in -Xs mode on ISAs for which the ABI specifies "char"
2163  * as an unsigned entity because there is no way to define an eight bit
2164  * signed integral.
2165  */
2166 
2167 typedef char int8_t;
2168 
2169 
2170 
2171 typedef short int16_t;
2172 typedef int int32_t;
2173 
2174 
2175 
2176 
2177 
2178 
2179 typedef long long int64_t;
2180 
2181 
2182 
2183 typedef unsigned char uint8_t;
2184 typedef unsigned short uint16_t;
2185 typedef unsigned int uint32_t;
2186 
2187 
2188 
2189 
2190 typedef unsigned long long uint64_t;
2191 
2192 
2193 
2194 /*
2195  * intmax_t and uintmax_t are to be the longest (in number of bits) signed
2196  * and unsigned integer types supported by the implementation.
2197  */
2198 
2199 typedef int64_t intmax_t;
2200 typedef uint64_t uintmax_t;
2201 
2202 
2203 
2204 
2205 
2206 /*
2207  * intptr_t and uintptr_t are signed and unsigned integer types large enough
2208  * to hold any data pointer; that is, data pointers can be assigned into or
2209  * from these integer types without losing precision.
2210  */
2211 
2212 
2213 
2214 
2215 typedef int intptr_t;
2216 typedef unsigned int uintptr_t;
2217 
2218 
2219 /*
2220  * The following define the fastest integer types that can hold the
2221  * specified number of bits.
2222  */
2223 
2224 typedef char int_fast8_t;
2225 
2226 
2227 
2228 typedef int int_fast16_t;
2229 typedef int int_fast32_t;
2230 
2231 
2232 
2233 
2234 typedef long long int_fast64_t;
2235 
2236 
2237 
2238 typedef unsigned char uint_fast8_t;
2239 typedef unsigned int uint_fast16_t;
2240 typedef unsigned int uint_fast32_t;
2241 
2242 
2243 
2244 
2245 typedef unsigned long long uint_fast64_t;
2246 
2247 
2248 
2249 /*
2250  * The following define the smallest integer types that can hold the
2251  * specified number of bits.
2252  */
2253 
2254 typedef char int_least8_t;
2255 
2256 
2257 
2258 typedef short int_least16_t;
2259 typedef int int_least32_t;
2260 
2261 
2262 
2263 
2264 typedef long long int_least64_t;
2265 
2266 
2267 
2268 /*
2269  * If these are changed, please update char16_t and char32_t in head/uchar.h.
2270  */
2271 typedef unsigned char uint_least8_t;
2272 typedef unsigned short uint_least16_t;
2273 typedef unsigned int uint_least32_t;
2274 
2275 
2276 
2277 
2278 typedef unsigned long long uint_least64_t;
2279 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
2280 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2281 /*
2282  * Strictly conforming ANSI C environments prior to the 1999
2283  * revision of the C Standard (ISO/IEC 9899:1999) do not have
2284  * the long long data type.
2285  */
2286 
2287 typedef long long longlong_t;
2288 typedef unsigned long long u_longlong_t;
2289 # 85 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2290 /*
2291  * These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
2292  * to use them instead of int32_t and uint32_t because DEC had
2293  * shipped 64-bit wide.
2294  */
2295 
2296 
2297 
2298 
2299 typedef long t_scalar_t; /* historical versions */
2300 typedef unsigned long t_uscalar_t;
2301 
2302 
2303 /*
2304  * POSIX Extensions
2305  */
2306 typedef unsigned char uchar_t;
2307 typedef unsigned short ushort_t;
2308 typedef unsigned int uint_t;
2309 typedef unsigned long ulong_t;
2310 
2311 typedef char *caddr_t; /* ?<core address> type */
2312 typedef long daddr_t; /* <disk address> type */
2313 typedef short cnt_t; /* ?<count> type */
2314 
2315 
2316 
2317 
2318 
2319 
2320 typedef int ptrdiff_t; /* (historical version) */
2321 
2322 
2323 
2324 /*
2325  * VM-related types
2326  */
2327 typedef ulong_t pfn_t; /* page frame number */
2328 typedef ulong_t pgcnt_t; /* number of pages */
2329 typedef long spgcnt_t; /* signed number of pages */
2330 
2331 typedef uchar_t use_t; /* use count for swap.  */
2332 typedef short sysid_t;
2333 typedef short index_t;
2334 typedef void *timeout_id_t; /* opaque handle from timeout(9F) */
2335 typedef void *bufcall_id_t; /* opaque handle from bufcall(9F) */
2336 
2337 /*
2338  * The size of off_t and related types depends on the setting of
2339  * _FILE_OFFSET_BITS.  (Note that other system headers define other types
2340  * related to those defined here.)
2341  *
2342  * If _LARGEFILE64_SOURCE is defined, variants of these types that are
2343  * explicitly 64 bits wide become available.
2344  */
2345 # 165 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2346 typedef u_longlong_t ino_t; /* expanded inode type	*/
2347 typedef longlong_t blkcnt_t; /* count of file blocks */
2348 typedef u_longlong_t fsblkcnt_t; /* count of file system blocks */
2349 typedef u_longlong_t fsfilcnt_t; /* count of files */
2350 # 178 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2351 typedef u_longlong_t ino64_t; /* expanded inode type	*/
2352 typedef longlong_t blkcnt64_t; /* count of file blocks */
2353 typedef u_longlong_t fsblkcnt64_t; /* count of file system blocks */
2354 typedef u_longlong_t fsfilcnt64_t; /* count of files */
2355 
2356 
2357 
2358 
2359 
2360 
2361 typedef long blksize_t; /* used for block sizes */
2362 
2363 
2364 
2365 
2366 
2367 typedef enum { B_FALSE, B_TRUE } boolean_t;
2368 # 205 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2369 /*
2370  * The {u,}pad64_t types can be used in structures such that those structures
2371  * may be accessed by code produced by compilation environments which don't
2372  * support a 64 bit integral datatype.  The intention is not to allow
2373  * use of these fields in such environments, but to maintain the alignment
2374  * and offsets of the structure.
2375  *
2376  * Similar comments for {u,}pad128_t.
2377  *
2378  * Note that these types do NOT generate any stronger alignment constraints
2379  * than those available in the underlying ABI.  See <sys/isa_defs.h>
2380  */
2381 
2382 typedef int64_t pad64_t;
2383 typedef uint64_t upad64_t;
2384 # 232 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2385 typedef union {
2386  long double _q;
2387  int32_t _l[4];
2388 } pad128_t;
2389 
2390 typedef union {
2391  long double _q;
2392  uint32_t _l[4];
2393 } upad128_t;
2394 
2395 typedef longlong_t offset_t;
2396 typedef u_longlong_t u_offset_t;
2397 typedef u_longlong_t len_t;
2398 typedef u_longlong_t diskaddr_t;
2399 
2400 
2401 
2402 
2403 /*
2404  * Definitions remaining from previous partial support for 64-bit file
2405  * offsets.  This partial support for devices greater than 2gb requires
2406  * compiler support for long long.
2407  */
2408 
2409 typedef union {
2410  offset_t _f; /* Full 64 bit offset value */
2411  struct {
2412   int32_t _l; /* lower 32 bits of offset value */
2413   int32_t _u; /* upper 32 bits of offset value */
2414  } _p;
2415 } lloff_t;
2416 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2417 typedef union {
2418  longlong_t _f; /* Full 64 bit disk address value */
2419  struct {
2420   int32_t _l; /* lower 32 bits of disk address value */
2421   int32_t _u; /* upper 32 bits of disk address value */
2422  } _p;
2423 } lldaddr_t;
2424 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2425 typedef uint_t k_fltset_t; /* kernel fault set type */
2426 
2427 /*
2428  * The following type is for various kinds of identifiers.  The
2429  * actual type must be the same for all since some system calls
2430  * (such as sigsend) take arguments that may be any of these
2431  * types.  The enumeration type idtype_t defined in sys/procset.h
2432  * is used to indicate what type of id is being specified --
2433  * a process id, process group id, session id, scheduling class id,
2434  * user id, group id, project id, task id or zone id.
2435  */
2436 
2437 
2438 
2439 typedef long id_t; /* (historical version) */
2440 
2441 
2442 typedef id_t lgrp_id_t; /* lgroup ID */
2443 
2444 /*
2445  * Type useconds_t is an unsigned integral type capable of storing
2446  * values at least in the range of zero to 1,000,000.
2447  */
2448 typedef uint_t useconds_t; /* Time, in microseconds */
2449 
2450 
2451 
2452 typedef long suseconds_t; /* signed # of microseconds */
2453 
2454 
2455 /*
2456  * Typedefs for dev_t components.
2457  */
2458 
2459 
2460 
2461 
2462 typedef ulong_t major_t; /* (historical version) */
2463 typedef ulong_t minor_t; /* (historical version) */
2464 
2465 
2466 /*
2467  * The data type of a thread priority.
2468  */
2469 typedef short pri_t;
2470 
2471 /*
2472  * The data type for a CPU flags field.  (Can be extended to larger unsigned
2473  * types, if needed, limited by ability to update atomically.)
2474  */
2475 typedef ushort_t cpu_flag_t;
2476 
2477 /*
2478  * For compatibility reasons the following typedefs (prefixed o_)
2479  * can't grow regardless of the EFT definition. Although,
2480  * applications should not explicitly use these typedefs
2481  * they may be included via a system header definition.
2482  * WARNING: These typedefs may be removed in a future
2483  * release.
2484  *		ex. the definitions in s5inode.h (now obsoleted)
2485  *			remained small to preserve compatibility
2486  *			in the S5 file system type.
2487  */
2488 typedef ushort_t o_mode_t; /* old file attribute type */
2489 typedef short o_dev_t; /* old device type	*/
2490 typedef ushort_t o_uid_t; /* old UID type		*/
2491 typedef o_uid_t o_gid_t; /* old GID type		*/
2492 typedef short o_nlink_t; /* old file link type	*/
2493 typedef short o_pid_t; /* old process id type	*/
2494 typedef ushort_t o_ino_t; /* old inode type	*/
2495 
2496 
2497 /*
2498  * POSIX and XOPEN Declarations
2499  */
2500 typedef int key_t; /* IPC key type		*/
2501 
2502 
2503 
2504 typedef ulong_t mode_t; /* (historical version) */
2505 
2506 
2507 
2508 
2509 typedef unsigned int uid_t; /* UID type		*/
2510 
2511 
2512 typedef uid_t gid_t; /* GID type		*/
2513 
2514 typedef uint32_t datalink_id_t;
2515 typedef uint32_t vrid_t;
2516 
2517 typedef id_t taskid_t;
2518 typedef id_t projid_t;
2519 typedef id_t poolid_t;
2520 typedef id_t zoneid_t;
2521 typedef id_t ctid_t;
2522 
2523 /*
2524  * POSIX definitions are same as defined in thread.h and synch.h.
2525  * Any changes made to here should be reflected in corresponding
2526  * files as described in comments.
2527  */
2528 typedef uint_t pthread_t; /* = thread_t in thread.h */
2529 typedef uint_t pthread_key_t; /* = thread_key_t in thread.h */
2530 
2531 /* "Magic numbers" tagging synchronization object types */
2532 
2533 
2534 
2535 
2536 
2537 typedef struct _pthread_mutex { /* = mutex_t in synch.h */
2538  struct {
2539   uint16_t __pthread_mutex_flag1;
2540   uint8_t __pthread_mutex_flag2;
2541   uint8_t __pthread_mutex_ceiling;
2542   uint16_t __pthread_mutex_type;
2543   uint16_t __pthread_mutex_magic;
2544  } __pthread_mutex_flags;
2545  union {
2546   struct {
2547    uint8_t __pthread_mutex_pad[8];
2548   } __pthread_mutex_lock64;
2549   struct {
2550    uint32_t __pthread_ownerpid;
2551    uint32_t __pthread_lockword;
2552   } __pthread_mutex_lock32;
2553   upad64_t __pthread_mutex_owner64;
2554  } __pthread_mutex_lock;
2555  upad64_t __pthread_mutex_data;
2556 } pthread_mutex_t;
2557 
2558 typedef struct _pthread_cond { /* = cond_t in synch.h */
2559  struct {
2560   uint8_t __pthread_cond_flag[4];
2561   uint16_t __pthread_cond_type;
2562   uint16_t __pthread_cond_magic;
2563  } __pthread_cond_flags;
2564  upad64_t __pthread_cond_data;
2565 } pthread_cond_t;
2566 
2567 /*
2568  * UNIX 98 Extension
2569  */
2570 typedef struct _pthread_rwlock { /* = rwlock_t in synch.h */
2571  int32_t __pthread_rwlock_readers;
2572  uint16_t __pthread_rwlock_type;
2573  uint16_t __pthread_rwlock_magic;
2574  pthread_mutex_t __pthread_rwlock_mutex;
2575  pthread_cond_t __pthread_rwlock_readercv;
2576  pthread_cond_t __pthread_rwlock_writercv;
2577 } pthread_rwlock_t;
2578 
2579 /*
2580  * SUSV3
2581  */
2582 typedef struct {
2583  uint32_t __pthread_barrier_count;
2584  uint32_t __pthread_barrier_current;
2585  upad64_t __pthread_barrier_cycle;
2586  upad64_t __pthread_barrier_reserved;
2587  pthread_mutex_t __pthread_barrier_lock;
2588  pthread_cond_t __pthread_barrier_cond;
2589 } pthread_barrier_t;
2590 
2591 typedef pthread_mutex_t pthread_spinlock_t;
2592 
2593 /*
2594  * attributes for threads, dynamically allocated by library
2595  */
2596 typedef struct _pthread_attr {
2597  void *__pthread_attrp;
2598 } pthread_attr_t;
2599 
2600 /*
2601  * attributes for mutex, dynamically allocated by library
2602  */
2603 typedef struct _pthread_mutexattr {
2604  void *__pthread_mutexattrp;
2605 } pthread_mutexattr_t;
2606 
2607 /*
2608  * attributes for cond, dynamically allocated by library
2609  */
2610 typedef struct _pthread_condattr {
2611  void *__pthread_condattrp;
2612 } pthread_condattr_t;
2613 
2614 /*
2615  * pthread_once
2616  */
2617 typedef struct _once {
2618  upad64_t __pthread_once_pad[4];
2619 } pthread_once_t;
2620 
2621 /*
2622  * UNIX 98 Extensions
2623  * attributes for rwlock, dynamically allocated by library
2624  */
2625 typedef struct _pthread_rwlockattr {
2626  void *__pthread_rwlockattrp;
2627 } pthread_rwlockattr_t;
2628 
2629 /*
2630  * SUSV3
2631  * attributes for pthread_barrier_t, dynamically allocated by library
2632  */
2633 typedef struct {
2634  void *__pthread_barrierattrp;
2635 } pthread_barrierattr_t;
2636 
2637 typedef ulong_t dev_t; /* expanded device type */
2638 
2639 
2640 
2641 
2642 
2643 typedef ulong_t nlink_t; /* (historical version) */
2644 typedef long pid_t; /* (historical version) */
2645 # 537 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2646 typedef long time_t; /* time of day in seconds */
2647 
2648 
2649 
2650 
2651 typedef long clock_t; /* relative time in a specified resolution */
2652 
2653 
2654 
2655 
2656 typedef int clockid_t; /* clock identifier type */
2657 
2658 
2659 
2660 
2661 typedef int timer_t; /* timer identifier type */
2662 
2663 
2664 
2665 
2666 /* BEGIN CSTYLED */
2667 typedef unsigned char unchar;
2668 typedef unsigned short ushort;
2669 typedef unsigned int uint;
2670 typedef unsigned long ulong;
2671 /* END CSTYLED */
2672 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2673 /*
2674  * The following is the value of type id_t to use to indicate the
2675  * caller's current id.  See procset.h for the type idtype_t
2676  * which defines which kind of id is being specified.
2677  */
2678 # 620 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h"
2679 /*
2680  * The following value of type pfn_t is used to indicate
2681  * invalid page frame number.
2682  */
2683 
2684 
2685 
2686 /* BEGIN CSTYLED */
2687 typedef unsigned char u_char;
2688 typedef unsigned short u_short;
2689 typedef unsigned int u_int;
2690 typedef unsigned long u_long;
2691 typedef struct _quad { int val[2]; } quad_t; /* used by UFS */
2692 typedef quad_t quad; /* used by UFS */
2693 /* END CSTYLED */
2694 
2695 /*
2696  * Nested include for BSD/sockets source compatibility.
2697  * (The select macros used to be defined here).
2698  */
2699 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
2700 /*
2701  * CDDL HEADER START
2702  *
2703  * The contents of this file are subject to the terms of the
2704  * Common Development and Distribution License (the "License").
2705  * You may not use this file except in compliance with the License.
2706  *
2707  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2708  * or http://www.opensolaris.org/os/licensing.
2709  * See the License for the specific language governing permissions
2710  * and limitations under the License.
2711  *
2712  * When distributing Covered Code, include this CDDL HEADER in each
2713  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2714  * If applicable, add the following below this CDDL HEADER, with the
2715  * fields enclosed by brackets "[]" replaced with your own identifying
2716  * information: Portions Copyright [yyyy] [name of copyright owner]
2717  *
2718  * CDDL HEADER END
2719  */
2720 
2721 /*
2722  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2723  *
2724  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2725  *
2726  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2727  * Use is subject to license terms.
2728  */
2729 
2730 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2731 /*	  All Rights Reserved	*/
2732 
2733 /*
2734  * University Copyright- Copyright (c) 1982, 1986, 1988
2735  * The Regents of the University of California
2736  * All Rights Reserved
2737  *
2738  * University Acknowledgment- Portions of this document are derived from
2739  * software developed by the University of California, Berkeley, and its
2740  * contributors.
2741  */
2742 
2743 
2744 
2745 
2746 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2747 /*
2748  * CDDL HEADER START
2749  *
2750  * The contents of this file are subject to the terms of the
2751  * Common Development and Distribution License (the "License").
2752  * You may not use this file except in compliance with the License.
2753  *
2754  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2755  * or http://www.opensolaris.org/os/licensing.
2756  * See the License for the specific language governing permissions
2757  * and limitations under the License.
2758  *
2759  * When distributing Covered Code, include this CDDL HEADER in each
2760  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2761  * If applicable, add the following below this CDDL HEADER, with the
2762  * fields enclosed by brackets "[]" replaced with your own identifying
2763  * information: Portions Copyright [yyyy] [name of copyright owner]
2764  *
2765  * CDDL HEADER END
2766  */
2767 
2768 /*
2769  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2770  * Copyright 2016 Joyent, Inc.
2771  *
2772  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2773  * Use is subject to license terms.
2774  */
2775 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2776 
2777 
2778 
2779 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
2780 /*
2781  * CDDL HEADER START
2782  *
2783  * The contents of this file are subject to the terms of the
2784  * Common Development and Distribution License, Version 1.0 only
2785  * (the "License").  You may not use this file except in compliance
2786  * with the License.
2787  *
2788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2789  * or http://www.opensolaris.org/os/licensing.
2790  * See the License for the specific language governing permissions
2791  * and limitations under the License.
2792  *
2793  * When distributing Covered Code, include this CDDL HEADER in each
2794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2795  * If applicable, add the following below this CDDL HEADER, with the
2796  * fields enclosed by brackets "[]" replaced with your own identifying
2797  * information: Portions Copyright [yyyy] [name of copyright owner]
2798  *
2799  * CDDL HEADER END
2800  */
2801 /*
2802  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2803  * Use is subject to license terms.
2804  */
2805 
2806 /*
2807  * Implementation-private.  This header should not be included
2808  * directly by an application.  The application should instead
2809  * include <time.h> which includes this header conditionally
2810  * depending on which feature test macros are defined. By default,
2811  * this header is included by <time.h>.  X/Open and POSIX
2812  * standards requirements result in this header being included
2813  * by <time.h> only under a restricted set of conditions.
2814  */
2815 
2816 
2817 
2818 
2819 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2820 /*
2821  * CDDL HEADER START
2822  *
2823  * The contents of this file are subject to the terms of the
2824  * Common Development and Distribution License (the "License").
2825  * You may not use this file except in compliance with the License.
2826  *
2827  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2828  * or http://www.opensolaris.org/os/licensing.
2829  * See the License for the specific language governing permissions
2830  * and limitations under the License.
2831  *
2832  * When distributing Covered Code, include this CDDL HEADER in each
2833  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2834  * If applicable, add the following below this CDDL HEADER, with the
2835  * fields enclosed by brackets "[]" replaced with your own identifying
2836  * information: Portions Copyright [yyyy] [name of copyright owner]
2837  *
2838  * CDDL HEADER END
2839  */
2840 
2841 /*
2842  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2843  * Copyright 2016 Joyent, Inc.
2844  *
2845  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2846  * Use is subject to license terms.
2847  */
2848 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 2
2849 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2850 /*
2851  * Time expressed in seconds and nanoseconds
2852  */
2853 
2854 typedef struct timespec { /* definition per POSIX.4 */
2855  time_t tv_sec; /* seconds */
2856  long tv_nsec; /* and nanoseconds */
2857 } timespec_t;
2858 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h"
2859 typedef struct timespec timestruc_t; /* definition per SVr4 */
2860 
2861 /*
2862  * The following has been left in for backward compatibility. Portable
2863  * applications should not use the structure name timestruc.
2864  */
2865 
2866 
2867 
2868 
2869 
2870 /*
2871  * Timer specification
2872  */
2873 typedef struct itimerspec { /* definition per POSIX.4 */
2874  struct timespec it_interval; /* timer period */
2875  struct timespec it_value; /* timer expiration */
2876 } itimerspec_t;
2877 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
2878 
2879 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
2880 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2881 /*	  All Rights Reserved  	*/
2882 
2883 
2884 /*
2885  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
2886  * All rights reserved.  The Berkeley software License Agreement
2887  * specifies the terms and conditions for redistribution.
2888  */
2889 
2890 /*
2891  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
2892  *
2893  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2894  * Use is subject to license terms.
2895  *
2896  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2897  */
2898 
2899 /*
2900  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
2901  */
2902 
2903 
2904 
2905 
2906 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
2907 /*
2908  * CDDL HEADER START
2909  *
2910  * The contents of this file are subject to the terms of the
2911  * Common Development and Distribution License (the "License").
2912  * You may not use this file except in compliance with the License.
2913  *
2914  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2915  * or http://www.opensolaris.org/os/licensing.
2916  * See the License for the specific language governing permissions
2917  * and limitations under the License.
2918  *
2919  * When distributing Covered Code, include this CDDL HEADER in each
2920  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2921  * If applicable, add the following below this CDDL HEADER, with the
2922  * fields enclosed by brackets "[]" replaced with your own identifying
2923  * information: Portions Copyright [yyyy] [name of copyright owner]
2924  *
2925  * CDDL HEADER END
2926  */
2927 
2928 /*
2929  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
2930  * Copyright 2016 Joyent, Inc.
2931  *
2932  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2933  * Use is subject to license terms.
2934  */
2935 # 28 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2936 
2937 /*
2938  * Structure returned by gettimeofday(2) system call,
2939  * and used in other calls.
2940  */
2941 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2942 struct timeval {
2943  time_t tv_sec; /* seconds */
2944  suseconds_t tv_usec; /* and microseconds */
2945 };
2946 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2947 struct timezone {
2948  int tz_minuteswest; /* minutes west of Greenwich */
2949  int tz_dsttime; /* type of dst correction */
2950 };
2951 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2952 /*
2953  * Needed for longlong_t type.  Placement of this due to <sys/types.h>
2954  * including <sys/select.h> which relies on the presense of the itimerval
2955  * structure.
2956  */
2957 
2958 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
2959 /*
2960  * CDDL HEADER START
2961  *
2962  * The contents of this file are subject to the terms of the
2963  * Common Development and Distribution License (the "License").
2964  * You may not use this file except in compliance with the License.
2965  *
2966  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2967  * or http://www.opensolaris.org/os/licensing.
2968  * See the License for the specific language governing permissions
2969  * and limitations under the License.
2970  *
2971  * When distributing Covered Code, include this CDDL HEADER in each
2972  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2973  * If applicable, add the following below this CDDL HEADER, with the
2974  * fields enclosed by brackets "[]" replaced with your own identifying
2975  * information: Portions Copyright [yyyy] [name of copyright owner]
2976  *
2977  * CDDL HEADER END
2978  */
2979 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
2980 /*	  All Rights Reserved  	*/
2981 
2982 
2983 /*
2984  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2985  * Use is subject to license terms.
2986  *
2987  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
2988  * Copyright 2016 Joyent, Inc.
2989  */
2990 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
2991 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2992 /*
2993  * Operations on timevals.
2994  */
2995 # 193 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
2996 /*
2997  * Names of the interval timers, and structure
2998  * defining a timer setting.
2999  */
3000 
3001 
3002 
3003     /* time and when system is running on */
3004     /* behalf of the process. */
3005 
3006     /* time profiling of multithreaded */
3007     /* programs. */
3008 
3009 
3010 struct itimerval {
3011  struct timeval it_interval; /* timer interval */
3012  struct timeval it_value; /* current value */
3013 };
3014 # 239 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3015 /*
3016  *	Definitions for commonly used resolutions.
3017  */
3018 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3019 /*
3020  * Time expressed as a 64-bit nanosecond counter.
3021  */
3022 typedef longlong_t hrtime_t;
3023 # 386 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3024 int adjtime(struct timeval *, struct timeval *);
3025 
3026 
3027 
3028 
3029 int futimesat(int, const char *, const struct timeval *);
3030 
3031 
3032 
3033 
3034 
3035 int getitimer(int, struct itimerval *);
3036 int utimes(const char *, const struct timeval *);
3037 
3038 
3039 
3040 
3041 int setitimer(int, struct itimerval *,
3042  struct itimerval *);
3043 
3044 
3045 
3046 
3047 /*
3048  * gettimeofday() and settimeofday() were included in SVr4 due to their
3049  * common use in BSD based applications.  They were to be included exactly
3050  * as in BSD, with two parameters.  However, AT&T/USL noted that the second
3051  * parameter was unused and deleted it, thereby making a routine included
3052  * for compatibility, incompatible.
3053  *
3054  * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
3055  * parameters.
3056  *
3057  * This has caused general disagreement in the application community as to
3058  * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
3059  * The flag _SVID_GETTOD may be used to force the SVID version.
3060  */
3061 
3062 
3063 
3064 
3065 
3066 int settimeofday(struct timeval *, void *);
3067 
3068 hrtime_t gethrtime(void);
3069 hrtime_t gethrvtime(void);
3070 # 441 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h"
3071 int gettimeofday(struct timeval *, void *);
3072 
3073 
3074 
3075 
3076 /*
3077  * The inclusion of <time.h> is historical and was added for
3078  * backward compatibility in delta 1.2 when a number of definitions
3079  * were moved out of <sys/time.h>.  More recently, the timespec and
3080  * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
3081  * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
3082  * which is now included by <time.h>.  This change was due to POSIX
3083  * 1003.1b-1993 and X/Open UNIX 98 requirements.  For non-POSIX and
3084  * non-X/Open applications, including this header will still make
3085  * visible these definitions.
3086  */
3087 
3088 
3089 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
3090 /*
3091  * CDDL HEADER START
3092  *
3093  * The contents of this file are subject to the terms of the
3094  * Common Development and Distribution License (the "License").
3095  * You may not use this file except in compliance with the License.
3096  *
3097  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3098  * or http://www.opensolaris.org/os/licensing.
3099  * See the License for the specific language governing permissions
3100  * and limitations under the License.
3101  *
3102  * When distributing Covered Code, include this CDDL HEADER in each
3103  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3104  * If applicable, add the following below this CDDL HEADER, with the
3105  * fields enclosed by brackets "[]" replaced with your own identifying
3106  * information: Portions Copyright [yyyy] [name of copyright owner]
3107  *
3108  * CDDL HEADER END
3109  */
3110 /*	Copyright (c) 1988 AT&T	*/
3111 /*	  All Rights Reserved  	*/
3112 
3113 
3114 /*
3115  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3116  *
3117  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3118  * Use is subject to license terms.
3119  */
3120 /*
3121  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
3122  * Copyright 2016 Joyent, Inc.
3123  */
3124 
3125 
3126 
3127 
3128 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3129 /*
3130  * CDDL HEADER START
3131  *
3132  * The contents of this file are subject to the terms of the
3133  * Common Development and Distribution License (the "License").
3134  * You may not use this file except in compliance with the License.
3135  *
3136  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3137  * or http://www.opensolaris.org/os/licensing.
3138  * See the License for the specific language governing permissions
3139  * and limitations under the License.
3140  *
3141  * When distributing Covered Code, include this CDDL HEADER in each
3142  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3143  * If applicable, add the following below this CDDL HEADER, with the
3144  * fields enclosed by brackets "[]" replaced with your own identifying
3145  * information: Portions Copyright [yyyy] [name of copyright owner]
3146  *
3147  * CDDL HEADER END
3148  */
3149 
3150 /*
3151  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3152  * Copyright 2016 Joyent, Inc.
3153  *
3154  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3155  * Use is subject to license terms.
3156  */
3157 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3158 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 1
3159 /*
3160  * CDDL HEADER START
3161  *
3162  * The contents of this file are subject to the terms of the
3163  * Common Development and Distribution License, Version 1.0 only
3164  * (the "License").  You may not use this file except in compliance
3165  * with the License.
3166  *
3167  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3168  * or http://www.opensolaris.org/os/licensing.
3169  * See the License for the specific language governing permissions
3170  * and limitations under the License.
3171  *
3172  * When distributing Covered Code, include this CDDL HEADER in each
3173  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3174  * If applicable, add the following below this CDDL HEADER, with the
3175  * fields enclosed by brackets "[]" replaced with your own identifying
3176  * information: Portions Copyright [yyyy] [name of copyright owner]
3177  *
3178  * CDDL HEADER END
3179  */
3180 /*	Copyright (c) 1988 AT&T	*/
3181 /*	  All Rights Reserved  	*/
3182 
3183 /*
3184  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3185  * Copyright 2014 PALO, Richard.
3186  *
3187  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3188  * Use is subject to license terms.
3189  */
3190 
3191 /*
3192  * An application should not include this header directly.  Instead it
3193  * should be included only through the inclusion of other Sun headers.
3194  *
3195  * The contents of this header is limited to identifiers specified in the
3196  * C Standard.  Any new identifiers specified in future amendments to the
3197  * C Standard must be placed in this header.  If these new identifiers
3198  * are required to also be in the C++ Standard "std" namespace, then for
3199  * anything other than macro definitions, corresponding "using" directives
3200  * must also be added to <time.h.h>.
3201  */
3202 
3203 
3204 
3205 
3206 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3207 /*
3208  * CDDL HEADER START
3209  *
3210  * The contents of this file are subject to the terms of the
3211  * Common Development and Distribution License (the "License").
3212  * You may not use this file except in compliance with the License.
3213  *
3214  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3215  * or http://www.opensolaris.org/os/licensing.
3216  * See the License for the specific language governing permissions
3217  * and limitations under the License.
3218  *
3219  * When distributing Covered Code, include this CDDL HEADER in each
3220  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3221  * If applicable, add the following below this CDDL HEADER, with the
3222  * fields enclosed by brackets "[]" replaced with your own identifying
3223  * information: Portions Copyright [yyyy] [name of copyright owner]
3224  *
3225  * CDDL HEADER END
3226  */
3227 
3228 /*
3229  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3230  * Copyright 2016 Joyent, Inc.
3231  *
3232  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3233  * Use is subject to license terms.
3234  */
3235 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
3236 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
3237 /*
3238  * This file and its contents are supplied under the terms of the
3239  * Common Development and Distribution License ("CDDL"), version 1.0.
3240  * You may only use this file in accordance with the terms of version
3241  * 1.0 of the CDDL.
3242  *
3243  * A full copy of the text of the CDDL should have accompanied this
3244  * source.  A copy of the CDDL is also available via the Internet at
3245  * http://www.illumos.org/license/CDDL.
3246  */
3247 
3248 /*
3249  * Copyright 2014-2016 PALO, Richard.
3250  */
3251 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h" 2
3252 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/time_iso.h"
3253 struct tm { /* see ctime(3) */
3254  int tm_sec;
3255  int tm_min;
3256  int tm_hour;
3257  int tm_mday;
3258  int tm_mon;
3259  int tm_year;
3260  int tm_wday;
3261  int tm_yday;
3262  int tm_isdst;
3263 };
3264 
3265 
3266 extern char *asctime(const struct tm *);
3267 extern clock_t clock(void);
3268 extern char *ctime(const time_t *);
3269 extern double difftime(time_t, time_t);
3270 extern struct tm *gmtime(const time_t *);
3271 extern struct tm *localtime(const time_t *);
3272 extern time_t mktime(struct tm *);
3273 extern time_t time(time_t *);
3274 extern size_t strftime(char *, size_t, const char *,
3275  const struct tm *);
3276 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3277 /*
3278  * C11 requires sys/time_impl.h for the definition of the struct timespec.
3279  */
3280 
3281 
3282 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3304 /*	  All Rights Reserved  	*/
3305 
3306 
3307 /*
3308  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3309  * Use is subject to license terms.
3310  *
3311  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3312  * Copyright 2016 Joyent, Inc.
3313  */
3314 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3315 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time_impl.h" 1
3316 /*
3317  * CDDL HEADER START
3318  *
3319  * The contents of this file are subject to the terms of the
3320  * Common Development and Distribution License, Version 1.0 only
3321  * (the "License").  You may not use this file except in compliance
3322  * with the License.
3323  *
3324  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3325  * or http://www.opensolaris.org/os/licensing.
3326  * See the License for the specific language governing permissions
3327  * and limitations under the License.
3328  *
3329  * When distributing Covered Code, include this CDDL HEADER in each
3330  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3331  * If applicable, add the following below this CDDL HEADER, with the
3332  * fields enclosed by brackets "[]" replaced with your own identifying
3333  * information: Portions Copyright [yyyy] [name of copyright owner]
3334  *
3335  * CDDL HEADER END
3336  */
3337 /*
3338  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3339  * Use is subject to license terms.
3340  */
3341 
3342 /*
3343  * Implementation-private.  This header should not be included
3344  * directly by an application.  The application should instead
3345  * include <time.h> which includes this header conditionally
3346  * depending on which feature test macros are defined. By default,
3347  * this header is included by <time.h>.  X/Open and POSIX
3348  * standards requirements result in this header being included
3349  * by <time.h> only under a restricted set of conditions.
3350  */
3351 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 2
3352 
3353 
3354 /*
3355  * Allow global visibility for symbols defined in
3356  * C++ "std" namespace in <iso/time_iso.h>.
3357  */
3358 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3359 extern struct tm *gmtime_r(const time_t *,
3360    struct tm *);
3361 extern struct tm *localtime_r(const time_t *,
3362    struct tm *);
3363 # 105 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3364 extern char *strptime(const char *, const char *,
3365   struct tm *);
3366 
3367 
3368 
3369 
3370 
3371 /*
3372  * Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
3373  * definition of the sigevent structure.  Both require the inclusion
3374  * of <signal.h> and <time.h> when using the timer_create() function.
3375  * However, X/Open also specifies that the sigevent structure be defined
3376  * in <time.h> as described in the header <signal.h>.  This prevents
3377  * compiler warnings for applications that only include <time.h> and not
3378  * also <signal.h>.  The sigval union and the sigevent structure is
3379  * therefore defined both here and in <sys/siginfo.h> which gets included
3380  * via inclusion of <signal.h>.
3381  */
3382 
3383 
3384 union sigval {
3385  int sival_int; /* integer value */
3386  void *sival_ptr; /* pointer value */
3387 };
3388 
3389 
3390 
3391 
3392 struct sigevent {
3393  int sigev_notify; /* notification mode */
3394  int sigev_signo; /* signal number */
3395  union sigval sigev_value; /* signal value */
3396  void (*sigev_notify_function)(union sigval);
3397  pthread_attr_t *sigev_notify_attributes;
3398  int __sigev_pad2;
3399 };
3400 
3401 
3402 extern int clock_getres(clockid_t, struct timespec *);
3403 extern int clock_gettime(clockid_t, struct timespec *);
3404 extern int clock_settime(clockid_t, const struct timespec *);
3405 extern int timer_create(clockid_t, struct sigevent *,
3406   timer_t *);
3407 extern int timer_delete(timer_t);
3408 extern int timer_getoverrun(timer_t);
3409 extern int timer_gettime(timer_t, struct itimerspec *);
3410 extern int timer_settime(timer_t, int, const struct itimerspec *,
3411   struct itimerspec *);
3412 
3413 extern int nanosleep(const struct timespec *, struct timespec *);
3414 extern int clock_nanosleep(clockid_t, int,
3415  const struct timespec *, struct timespec *);
3416 
3417 
3418 
3419 
3420 
3421 
3422 extern void tzset(void);
3423 extern char *tzname[2];
3424 
3425 /* CLK_TCK marked as LEGACY in SUSv2 and removed in SUSv3 */
3426 
3427 
3428 extern long _sysconf(int); /* System Private interface to sysconf() */
3429 
3430     /* 3 is _SC_CLK_TCK */
3431 
3432 
3433 
3434 
3435 
3436 extern long timezone;
3437 extern int daylight;
3438 
3439 
3440 
3441 
3442 
3443 
3444 extern time_t timegm(struct tm *);
3445 extern int cftime(char *, char *, const time_t *);
3446 extern int ascftime(char *, const char *, const struct tm *);
3447 extern long altzone;
3448 
3449 
3450 
3451 
3452 extern struct tm *getdate(const char *);
3453 
3454 
3455 
3456 
3457 
3458 extern int getdate_err;
3459 
3460 
3461 
3462 /*
3463  * ctime_r() & asctime_r() prototypes are defined here.
3464  */
3465 
3466 /*
3467  * Previous releases of Solaris, starting at 2.3, provided definitions of
3468  * various functions as specified in POSIX.1c, Draft 6.  For some of these
3469  * functions, the final POSIX 1003.1c standard had a different number of
3470  * arguments and return values.
3471  *
3472  * The following segment of this header provides support for the standard
3473  * interfaces while supporting applications written under earlier
3474  * releases.  The application defines appropriate values of the feature
3475  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
3476  * whether it was written to expect the Draft 6 or standard versions of
3477  * these interfaces, before including this header.  This header then
3478  * provides a mapping from the source version of the interface to an
3479  * appropriate binary interface.  Such mappings permit an application
3480  * to be built from libraries and objects which have mixed expectations
3481  * of the definitions of these functions.
3482  *
3483  * For applications using the Draft 6 definitions, the binary symbol is the
3484  * same as the source symbol, and no explicit mapping is needed.  For the
3485  * standard interface, the function func() is mapped to the binary symbol
3486  * _posix_func().  The preferred mechanism for the remapping is a compiler
3487  * #pragma.  If the compiler does not provide such a #pragma, the header file
3488  * defines a static function func() which calls the _posix_func() version;
3489  * this has to be done instead of #define since POSIX specifies that an
3490  * application can #undef the symbol and still be bound to the correct
3491  * implementation.  Unfortunately, the statics confuse lint so we fallback to
3492  * #define in that case.
3493  *
3494  * NOTE: Support for the Draft 6 definitions is provided for compatibility
3495  * only.  New applications/libraries should use the standard definitions.
3496  */
3497 # 280 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3498 extern char *asctime_r(const struct tm *, char *, int);
3499 extern char *ctime_r(const time_t *, char *, int);
3500 # 295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h"
3501 extern size_t strftime_l(char *, size_t,
3502  const char *, const struct tm *, locale_t);
3503 
3504 
3505 
3506 
3507 
3508 /*
3509  * Note, the C11 standard requires that all the various base values that are
3510  * passed into timespec_get() be non-zero. Hence why TIME_UTC starts at one.
3511  */
3512 
3513 
3514 extern int timespec_get(struct timespec *, int);
3515 # 460 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3516 
3517 
3518 /*
3519  * The inclusion of <sys/select.h> is needed for the FD_CLR,
3520  * FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
3521  * select() prototype defined in the XOpen specifications
3522  * beginning with XSH4v2.  Placement required after definition
3523  * for itimerval.
3524  */
3525 
3526 
3527 
3528 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 1
3529 /*
3530  * CDDL HEADER START
3531  *
3532  * The contents of this file are subject to the terms of the
3533  * Common Development and Distribution License (the "License").
3534  * You may not use this file except in compliance with the License.
3535  *
3536  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3537  * or http://www.opensolaris.org/os/licensing.
3538  * See the License for the specific language governing permissions
3539  * and limitations under the License.
3540  *
3541  * When distributing Covered Code, include this CDDL HEADER in each
3542  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3543  * If applicable, add the following below this CDDL HEADER, with the
3544  * fields enclosed by brackets "[]" replaced with your own identifying
3545  * information: Portions Copyright [yyyy] [name of copyright owner]
3546  *
3547  * CDDL HEADER END
3548  */
3549 
3550 /*
3551  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3552  *
3553  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
3554  *
3555  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
3556  * Use is subject to license terms.
3557  */
3558 
3559 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
3560 /*	  All Rights Reserved	*/
3561 
3562 /*
3563  * University Copyright- Copyright (c) 1982, 1986, 1988
3564  * The Regents of the University of California
3565  * All Rights Reserved
3566  *
3567  * University Acknowledgment- Portions of this document are derived from
3568  * software developed by the University of California, Berkeley, and its
3569  * contributors.
3570  */
3571 # 473 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 2
3572 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h" 2
3573 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3574 /*
3575  * The sigset_t type is defined in <sys/signal.h> and duplicated
3576  * in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
3577  * now allows the visibility of signal.h in this header, however
3578  * an order of inclusion problem occurs as a result of inclusion
3579  * of <sys/select.h> in <signal.h> under certain conditions.
3580  * Rather than include <sys/signal.h> here, we've duplicated
3581  * the sigset_t type instead. This type is required for the XPG6
3582  * introduced pselect() function also declared in this header.
3583  */
3584 
3585 
3586 typedef struct { /* signal set type */
3587  unsigned int __sigbits[4];
3588 } sigset_t;
3589 
3590 
3591 
3592 
3593 /*
3594  * Select uses bit masks of file descriptors in longs.
3595  * These macros manipulate such bit fields.
3596  * FD_SETSIZE may be defined by the user, but the default here
3597  * should be >= NOFILE (param.h).
3598  */
3599 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3600 typedef long fd_mask;
3601 
3602 typedef long fds_mask;
3603 
3604 /*
3605  *  The value of _NBBY needs to be consistant with the value
3606  *  of NBBY in <sys/param.h>.
3607  */
3608 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3609 typedef struct fd_set {
3610 
3611 
3612 
3613  long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
3614 } fd_set;
3615 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/select.h"
3616 extern int select(int, fd_set *, fd_set *,
3617  fd_set *, struct timeval *);
3618 
3619 
3620 extern int pselect(int, fd_set *, fd_set *,
3621  fd_set *, const struct timespec *,
3622  const sigset_t *);
3623 # 641 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 2
3624 
3625 
3626 
3627 /*
3628  * _VOID was defined to be either void or char but this is not
3629  * required because previous SunOS compilers have accepted the void
3630  * type. However, because many system header and source files use the
3631  * void keyword, the volatile keyword, and ANSI C function prototypes,
3632  * non-ANSI compilers cannot compile the system anyway. The _VOID macro
3633  * should therefore not be used and remains for source compatibility
3634  * only.
3635  */
3636 /* CSTYLED */
3637 # 39 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
3638 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1
3639 /*
3640  * CDDL HEADER START
3641  *
3642  * The contents of this file are subject to the terms of the
3643  * Common Development and Distribution License (the "License").
3644  * You may not use this file except in compliance with the License.
3645  *
3646  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3647  * or http://www.opensolaris.org/os/licensing.
3648  * See the License for the specific language governing permissions
3649  * and limitations under the License.
3650  *
3651  * When distributing Covered Code, include this CDDL HEADER in each
3652  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3653  * If applicable, add the following below this CDDL HEADER, with the
3654  * fields enclosed by brackets "[]" replaced with your own identifying
3655  * information: Portions Copyright [yyyy] [name of copyright owner]
3656  *
3657  * CDDL HEADER END
3658  */
3659 
3660 /*
3661  * Copyright (c) 2013 Gary Mills
3662  *
3663  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3664  * Use is subject to license terms.
3665  */
3666 
3667 /*	Copyright (c) 1988 AT&T	*/
3668 /*	  All Rights Reserved  	*/
3669 
3670 
3671 
3672 
3673 
3674 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3675 /*
3676  * CDDL HEADER START
3677  *
3678  * The contents of this file are subject to the terms of the
3679  * Common Development and Distribution License (the "License").
3680  * You may not use this file except in compliance with the License.
3681  *
3682  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3683  * or http://www.opensolaris.org/os/licensing.
3684  * See the License for the specific language governing permissions
3685  * and limitations under the License.
3686  *
3687  * When distributing Covered Code, include this CDDL HEADER in each
3688  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3689  * If applicable, add the following below this CDDL HEADER, with the
3690  * fields enclosed by brackets "[]" replaced with your own identifying
3691  * information: Portions Copyright [yyyy] [name of copyright owner]
3692  *
3693  * CDDL HEADER END
3694  */
3695 
3696 /*
3697  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3698  * Copyright 2016 Joyent, Inc.
3699  *
3700  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3701  * Use is subject to license terms.
3702  */
3703 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3704 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
3705 /*
3706  * CDDL HEADER START
3707  *
3708  * The contents of this file are subject to the terms of the
3709  * Common Development and Distribution License (the "License").
3710  * You may not use this file except in compliance with the License.
3711  *
3712  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3713  * or http://www.opensolaris.org/os/licensing.
3714  * See the License for the specific language governing permissions
3715  * and limitations under the License.
3716  *
3717  *
3718  * When distributing Covered Code, include this CDDL HEADER in each
3719  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3720  * If applicable, add the following below this CDDL HEADER, with the
3721  * fields enclosed by brackets "[]" replaced with your own identifying
3722  * information: Portions Copyright [yyyy] [name of copyright owner]
3723  *
3724  * CDDL HEADER END
3725  */
3726 
3727 /*
3728  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3729  * Use is subject to license terms.
3730  * Copyright 2016 Joyent, Inc.
3731  */
3732 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3733 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h" 1
3734 /*
3735  * CDDL HEADER START
3736  *
3737  * The contents of this file are subject to the terms of the
3738  * Common Development and Distribution License, Version 1.0 only
3739  * (the "License").  You may not use this file except in compliance
3740  * with the License.
3741  *
3742  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3743  * or http://www.opensolaris.org/os/licensing.
3744  * See the License for the specific language governing permissions
3745  * and limitations under the License.
3746  *
3747  * When distributing Covered Code, include this CDDL HEADER in each
3748  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3749  * If applicable, add the following below this CDDL HEADER, with the
3750  * fields enclosed by brackets "[]" replaced with your own identifying
3751  * information: Portions Copyright [yyyy] [name of copyright owner]
3752  *
3753  * CDDL HEADER END
3754  */
3755 /*
3756  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3757  * Use is subject to license terms.
3758  */
3759 
3760 /*	Copyright (c) 1988 AT&T	*/
3761 /*	  All Rights Reserved  	*/
3762 
3763 
3764 /*
3765  * An application should not include this header directly.  Instead it
3766  * should be included only through the inclusion of other Sun headers.
3767  *
3768  * The contents of this header is limited to identifiers specified in the
3769  * C Standard.  Any new identifiers specified in future amendments to the
3770  * C Standard must be placed in this header.  If these new identifiers
3771  * are required to also be in the C++ Standard "std" namespace, then for
3772  * anything other than macro definitions, corresponding "using" directives
3773  * must also be added to <limits.h>.
3774  */
3775 
3776 
3777 
3778 
3779 #pragma ident "%Z%%M%	%I%	%E% SMI"
3780 
3781 
3782 
3783 
3784 
3785 /*
3786  * Sizes of integral types
3787  */
3788 # 87 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/limits_iso.h"
3789      /* min value of a "long int" */
3790 
3791 
3792 
3793 
3794 
3795      /* min value of a long long */
3796 
3797      /* max value of a long long */
3798 
3799      /* max value of "unsigned long long */
3800 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
3801 
3802 /*
3803  * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
3804  * committee's working draft for the revision of the current ISO C standard,
3805  * ISO/IEC 9899:1990 Programming language - C.  These are not currently
3806  * required by any standard but constitute a useful, general purpose set
3807  * of type definitions and limits which is namespace clean with respect to
3808  * all standards.
3809  */
3810 
3811 
3812 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1
3813 /*
3814  * CDDL HEADER START
3815  *
3816  * The contents of this file are subject to the terms of the
3817  * Common Development and Distribution License, Version 1.0 only
3818  * (the "License").  You may not use this file except in compliance
3819  * with the License.
3820  *
3821  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3822  * or http://www.opensolaris.org/os/licensing.
3823  * See the License for the specific language governing permissions
3824  * and limitations under the License.
3825  *
3826  * When distributing Covered Code, include this CDDL HEADER in each
3827  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3828  * If applicable, add the following below this CDDL HEADER, with the
3829  * fields enclosed by brackets "[]" replaced with your own identifying
3830  * information: Portions Copyright [yyyy] [name of copyright owner]
3831  *
3832  * CDDL HEADER END
3833  */
3834 /*
3835  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
3836  *
3837  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3838  * Use is subject to license terms.
3839  */
3840 
3841 
3842 
3843 
3844 /*
3845  * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
3846  * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
3847  * Programming language - C.
3848  *
3849  * Programs/Modules should not directly include this file.  Access to the
3850  * types defined in this file should be through the inclusion of one of the
3851  * following files:
3852  *
3853  *	<limits.h>		This nested inclusion is disabled for strictly
3854  *				ANSI-C conforming compilations.  The *_MIN
3855  *				definitions are not visible to POSIX or XPG
3856  *				conforming applications (due to what may be
3857  *				a bug in the specification - this is under
3858  *				investigation)
3859  *
3860  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
3861  *				components of <inttypes.h>.
3862  *
3863  *	<inttypes.h>		For use by applications.
3864  *
3865  * See these files for more details.
3866  */
3867 
3868 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
3869 /*
3870  * CDDL HEADER START
3871  *
3872  * The contents of this file are subject to the terms of the
3873  * Common Development and Distribution License (the "License").
3874  * You may not use this file except in compliance with the License.
3875  *
3876  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3877  * or http://www.opensolaris.org/os/licensing.
3878  * See the License for the specific language governing permissions
3879  * and limitations under the License.
3880  *
3881  * When distributing Covered Code, include this CDDL HEADER in each
3882  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3883  * If applicable, add the following below this CDDL HEADER, with the
3884  * fields enclosed by brackets "[]" replaced with your own identifying
3885  * information: Portions Copyright [yyyy] [name of copyright owner]
3886  *
3887  * CDDL HEADER END
3888  */
3889 
3890 /*
3891  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
3892  * Copyright 2016 Joyent, Inc.
3893  *
3894  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3895  * Use is subject to license terms.
3896  */
3897 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 2
3898 
3899 
3900 
3901 
3902 
3903 /*
3904  * Limits
3905  *
3906  * The following define the limits for the types defined in <sys/int_types.h>.
3907  *
3908  * INTMAX_MIN (minimum value of the largest supported signed integer type),
3909  * INTMAX_MAX (maximum value of the largest supported signed integer type),
3910  * and UINTMAX_MAX (maximum value of the largest supported unsigned integer
3911  * type) can be set to implementation defined limits.
3912  *
3913  * NOTE : A programmer can test to see whether an implementation supports
3914  * a particular size of integer by testing if the macro that gives the
3915  * maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
3916  * tests false, the implementation does not support unsigned 64 bit integers.
3917  *
3918  * The type of these macros is intentionally unspecified.
3919  *
3920  * The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
3921  * where the ABI specifies "char" as unsigned when the translation mode is
3922  * not ANSI-C.
3923  */
3924 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
3925 /*
3926  * The following 2 macros are provided for testing whether the types
3927  * intptr_t and uintptr_t (integers large enough to hold a void *) are
3928  * defined in this header. They are needed in case the architecture can't
3929  * represent a pointer in any standard integral type.
3930  */
3931 # 155 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
3932 /* Maximum limits of ptrdiff_t defined in <sys/types.h> */
3933 
3934 
3935 
3936 
3937 
3938 
3939 /*
3940  * Maximum value of a "size_t".  SIZE_MAX was previously defined
3941  * in <limits.h>, however, the standards specify it be defined
3942  * in <stdint.h>. The <stdint.h> headers includes this header as
3943  * does <limits.h>. The value of SIZE_MAX should not deviate
3944  * from the value of ULONG_MAX defined <sys/types.h>.
3945  */
3946 
3947 
3948 
3949 
3950 
3951 
3952 /* Maximum limit of sig_atomic_t defined in <sys/types.h> */
3953 
3954 
3955 
3956 
3957 /*
3958  * Maximum limit of wchar_t. The WCHAR_* macros are also
3959  * defined in <iso/wchar_iso.h>, but inclusion of that header
3960  * will break ISO/IEC C namespace.
3961  */
3962 
3963 
3964 
3965 
3966 /* Maximum limit of wint_t */
3967 
3968 
3969 
3970 
3971 /*
3972  * It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
3973  * when including <limits.h> that the suffix _MAX is reserved but not the
3974  * suffix _MIN.  However, until that issue is resolved....
3975  */
3976 # 230 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h"
3977 /* Minimum value of a pointer-holding signed integer type */
3978 
3979 
3980 
3981 
3982 
3983 
3984 /* Minimum limits of ptrdiff_t defined in <sys/types.h> */
3985 
3986 
3987 
3988 
3989 
3990 
3991 /* Minimum limit of sig_atomic_t defined in <sys/types.h> */
3992 
3993 
3994 
3995 
3996 /*
3997  * Minimum limit of wchar_t. The WCHAR_* macros are also
3998  * defined in <iso/wchar_iso.h>, but inclusion of that header
3999  * will break ISO/IEC C namespace.
4000  */
4001 
4002 
4003 
4004 
4005 /* Minimum limit of wint_t */
4006 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 2
4007 # 62 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4008 /*
4009  * ARG_MAX is calculated as follows:
4010  * NCARGS - space for other stuff on initial stack
4011  * like aux vectors, saved registers, etc..
4012  */
4013 # 97 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4014 /*
4015  * POSIX conformant definitions - An implementation may define
4016  * other symbols which reflect the actual implementation. Alternate
4017  * definitions may not be as restrictive as the POSIX definitions.
4018  */
4019 # 140 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4020 /* POSIX.1c conformant */
4021 
4022 
4023 
4024 
4025 
4026 /* UNIX 03 conformant */
4027 
4028 
4029 
4030 
4031 
4032 /*
4033  * POSIX.2 and XPG4-XSH4 conformant definitions
4034  */
4035 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4036 /* UNIX 03 conformant */
4037 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4038 /*
4039  * For dual definitions for PASS_MAX and sysconf.c
4040  */
4041 # 201 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4042     /* NLS printf() and scanf() */
4043 # 216 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4044 /* Marked as LEGACY in SUSv2 and removed in UNIX 03 */
4045 
4046 
4047 
4048        /* of a double */
4049 
4050 
4051        /* of a "float" */
4052 
4053 
4054 /* Marked as LEGACY in SUSv1 and removed in SUSv2 */
4055 
4056 
4057        /* of a double */
4058 
4059        /* of a float */
4060 # 248 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4061 /*
4062  * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
4063  * related text states:
4064  *
4065  * A definition of one of the values from Table 2-5 shall be omitted from the
4066  * <limits.h> on specific implementations where the corresponding value is
4067  * equal to or greater than the stated minimum, but where the value can vary
4068  * depending on the file to which it is applied. The actual value supported for
4069  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
4070  *
4071  * This is clear that any machine supporting multiple file system types
4072  * and/or a network can not include this define, regardless of protection
4073  * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
4074  *
4075  * #define	NAME_MAX	14
4076  */
4077 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h"
4078     /* Increased for illumos */
4079 # 40 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
4080 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.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 (the "License").
4086  * You may not use this file except in compliance with the License.
4087  *
4088  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4089  * or http://www.opensolaris.org/os/licensing.
4090  * See the License for the specific language governing permissions
4091  * and limitations under the License.
4092  *
4093  * When distributing Covered Code, include this CDDL HEADER in each
4094  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4095  * If applicable, add the following below this CDDL HEADER, with the
4096  * fields enclosed by brackets "[]" replaced with your own identifying
4097  * information: Portions Copyright [yyyy] [name of copyright owner]
4098  *
4099  * CDDL HEADER END
4100  */
4101 
4102 /*
4103  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4104  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
4105  */
4106 
4107 /*	Copyright (c) 1988 AT&T	*/
4108 /*	  All Rights Reserved  	*/
4109 
4110 /*
4111  * User-visible pieces of the ANSI C standard I/O package.
4112  */
4113 # 41 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
4114 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 1
4115 /*
4116  * CDDL HEADER START
4117  *
4118  * The contents of this file are subject to the terms of the
4119  * Common Development and Distribution License, Version 1.0 only
4120  * (the "License").  You may not use this file except in compliance
4121  * with the License.
4122  *
4123  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4124  * or http://www.opensolaris.org/os/licensing.
4125  * See the License for the specific language governing permissions
4126  * and limitations under the License.
4127  *
4128  * When distributing Covered Code, include this CDDL HEADER in each
4129  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4130  * If applicable, add the following below this CDDL HEADER, with the
4131  * fields enclosed by brackets "[]" replaced with your own identifying
4132  * information: Portions Copyright [yyyy] [name of copyright owner]
4133  *
4134  * CDDL HEADER END
4135  */
4136 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4137 /*	  All Rights Reserved  	*/
4138 
4139 
4140 
4141 
4142 
4143 #pragma ident "%Z%%M%	%I%	%E% SMI"
4144 
4145 
4146 
4147 
4148 
4149 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
4150 /*
4151  * CDDL HEADER START
4152  *
4153  * The contents of this file are subject to the terms of the
4154  * Common Development and Distribution License (the "License").
4155  * You may not use this file except in compliance with the License.
4156  *
4157  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4158  * or http://www.opensolaris.org/os/licensing.
4159  * See the License for the specific language governing permissions
4160  * and limitations under the License.
4161  *
4162  * When distributing Covered Code, include this CDDL HEADER in each
4163  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4164  * If applicable, add the following below this CDDL HEADER, with the
4165  * fields enclosed by brackets "[]" replaced with your own identifying
4166  * information: Portions Copyright [yyyy] [name of copyright owner]
4167  *
4168  * CDDL HEADER END
4169  */
4170 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4171 /*	  All Rights Reserved  	*/
4172 
4173 
4174 /*
4175  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4176  * Use is subject to license terms.
4177  *
4178  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
4179  * Copyright 2016 Joyent, Inc.
4180  */
4181 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgdev.h" 2
4182 
4183 struct pkgdev {
4184  int rdonly;
4185  int mntflg;
4186  longlong_t capacity; /* number of 512-blocks on device */
4187  char *name;
4188  char *dirname;
4189  char *pathname;
4190  char *mount;
4191  char *fstyp;
4192  char *cdevice;
4193  char *bdevice;
4194  char *norewind;
4195 };
4196 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
4197 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
4198 /*
4199  * CDDL HEADER START
4200  *
4201  * The contents of this file are subject to the terms of the
4202  * Common Development and Distribution License (the "License").
4203  * You may not use this file except in compliance with the License.
4204  *
4205  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4206  * or http://www.opensolaris.org/os/licensing.
4207  * See the License for the specific language governing permissions
4208  * and limitations under the License.
4209  *
4210  * When distributing Covered Code, include this CDDL HEADER in each
4211  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4212  * If applicable, add the following below this CDDL HEADER, with the
4213  * fields enclosed by brackets "[]" replaced with your own identifying
4214  * information: Portions Copyright [yyyy] [name of copyright owner]
4215  *
4216  * CDDL HEADER END
4217  */
4218 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4219 /*	  All Rights Reserved  	*/
4220 
4221 /*
4222  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4223  * Use is subject to license terms.
4224  */
4225 
4226 
4227 
4228 
4229 #pragma ident "%Z%%M%	%I%	%E% SMI"
4230 
4231 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1
4232 /*
4233  * CDDL HEADER START
4234  *
4235  * The contents of this file are subject to the terms of the
4236  * Common Development and Distribution License (the "License").
4237  * You may not use this file except in compliance with the License.
4238  *
4239  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4240  * or http://www.opensolaris.org/os/licensing.
4241  * See the License for the specific language governing permissions
4242  * and limitations under the License.
4243  *
4244  * When distributing Covered Code, include this CDDL HEADER in each
4245  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4246  * If applicable, add the following below this CDDL HEADER, with the
4247  * fields enclosed by brackets "[]" replaced with your own identifying
4248  * information: Portions Copyright [yyyy] [name of copyright owner]
4249  *
4250  * CDDL HEADER END
4251  */
4252 /*	Copyright (c) 1988 AT&T	*/
4253 /*	  All Rights Reserved  	*/
4254 
4255 
4256 /*
4257  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4258  *
4259  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
4260  * Use is subject to license terms.
4261  */
4262 /*
4263  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
4264  * Copyright 2016 Joyent, Inc.
4265  */
4266 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 2
4267 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h"
4268 extern char *errstr;
4269 
4270 struct ainfo {
4271  char *local;
4272  mode_t mode;
4273  char owner[64 +1];
4274  char group[64 +1];
4275  major_t major;
4276  minor_t minor;
4277 };
4278 
4279 struct cinfo {
4280  long cksum;
4281  fsblkcnt_t size;
4282  time_t modtime;
4283 };
4284 
4285 struct pinfo {
4286  char status;
4287  char pkg[64 +1];
4288  char editflag;
4289  char aclass[64 +1];
4290  struct pinfo
4291   *next;
4292 };
4293 
4294 struct cfent {
4295  short volno;
4296  char ftype;
4297  char pkg_class[64 +1];
4298  int pkg_class_idx;
4299  char *path;
4300  struct ainfo ainfo;
4301  struct cinfo cinfo;
4302  short npkgs;
4303  struct pinfo
4304   *pinfo;
4305 };
4306 
4307 /* averify() & cverify() error codes */
4308 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
4309 # 1 "/usr/include/openssl/bio.h" 1 3 4
4310 /* crypto/bio/bio.h */
4311 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
4312  * All rights reserved.
4313  *
4314  * This package is an SSL implementation written
4315  * by Eric Young (eay@cryptsoft.com).
4316  * The implementation was written so as to conform with Netscapes SSL.
4317  *
4318  * This library is free for commercial and non-commercial use as long as
4319  * the following conditions are aheared to.  The following conditions
4320  * apply to all code found in this distribution, be it the RC4, RSA,
4321  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
4322  * included with this distribution is covered by the same copyright terms
4323  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
4324  *
4325  * Copyright remains Eric Young's, and as such any Copyright notices in
4326  * the code are not to be removed.
4327  * If this package is used in a product, Eric Young should be given attribution
4328  * as the author of the parts of the library used.
4329  * This can be in the form of a textual message at program startup or
4330  * in documentation (online or textual) provided with the package.
4331  *
4332  * Redistribution and use in source and binary forms, with or without
4333  * modification, are permitted provided that the following conditions
4334  * are met:
4335  * 1. Redistributions of source code must retain the copyright
4336  *    notice, this list of conditions and the following disclaimer.
4337  * 2. Redistributions in binary form must reproduce the above copyright
4338  *    notice, this list of conditions and the following disclaimer in the
4339  *    documentation and/or other materials provided with the distribution.
4340  * 3. All advertising materials mentioning features or use of this software
4341  *    must display the following acknowledgement:
4342  *    "This product includes cryptographic software written by
4343  *     Eric Young (eay@cryptsoft.com)"
4344  *    The word 'cryptographic' can be left out if the rouines from the library
4345  *    being used are not cryptographic related :-).
4346  * 4. If you include any Windows specific code (or a derivative thereof) from
4347  *    the apps directory (application code) you must include an acknowledgement:
4348  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
4349  *
4350  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
4351  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4352  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4353  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
4354  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4355  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4356  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4357  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4358  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4359  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4360  * SUCH DAMAGE.
4361  *
4362  * The licence and distribution terms for any publically available version or
4363  * derivative of this code cannot be changed.  i.e. this code cannot simply be
4364  * copied and put under another distribution licence
4365  * [including the GNU Public Licence.]
4366  */
4367 
4368 
4369 
4370 
4371 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
4372 /* e_os2.h */
4373 /* ====================================================================
4374  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
4375  *
4376  * Redistribution and use in source and binary forms, with or without
4377  * modification, are permitted provided that the following conditions
4378  * are met:
4379  *
4380  * 1. Redistributions of source code must retain the above copyright
4381  *    notice, this list of conditions and the following disclaimer.
4382  *
4383  * 2. Redistributions in binary form must reproduce the above copyright
4384  *    notice, this list of conditions and the following disclaimer in
4385  *    the documentation and/or other materials provided with the
4386  *    distribution.
4387  *
4388  * 3. All advertising materials mentioning features or use of this
4389  *    software must display the following acknowledgment:
4390  *    "This product includes software developed by the OpenSSL Project
4391  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
4392  *
4393  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
4394  *    endorse or promote products derived from this software without
4395  *    prior written permission. For written permission, please contact
4396  *    openssl-core@openssl.org.
4397  *
4398  * 5. Products derived from this software may not be called "OpenSSL"
4399  *    nor may "OpenSSL" appear in their names without prior written
4400  *    permission of the OpenSSL Project.
4401  *
4402  * 6. Redistributions of any form whatsoever must retain the following
4403  *    acknowledgment:
4404  *    "This product includes software developed by the OpenSSL Project
4405  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
4406  *
4407  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
4408  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4409  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
4410  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
4411  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4412  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4413  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4414  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4415  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4416  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4417  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4418  * OF THE POSSIBILITY OF SUCH DAMAGE.
4419  * ====================================================================
4420  *
4421  * This product includes cryptographic software written by Eric Young
4422  * (eay@cryptsoft.com).  This product includes software written by Tim
4423  * Hudson (tjh@cryptsoft.com).
4424  *
4425  */
4426 
4427 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
4428 /* opensslconf.h */
4429 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
4430 
4431 
4432 
4433 
4434 /* OpenSSL was configured with the following options: */
4435 # 108 "/usr/include/openssl/opensslconf.h" 3 4
4436 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
4437    asks for it.  This is a transient feature that is provided for those
4438    who haven't had the time to do the appropriate changes in their
4439    applications.  */
4440 # 204 "/usr/include/openssl/opensslconf.h" 3 4
4441 /* crypto/opensslconf.h.in */
4442 
4443 /* Generate 80386 code? */
4444 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
4445 # 65 "/usr/include/openssl/e_os2.h" 3 4
4446 /******************************************************************************
4447  * Detect operating systems.  This probably needs completing.
4448  * The result is that at least one OPENSSL_SYS_os macro should be defined.
4449  * However, if none is defined, Unix is assumed.
4450  **/
4451 
4452 
4453 
4454 /* ---------------------- Macintosh, before MacOS X ----------------------- */
4455 
4456 
4457 
4458 
4459 
4460 /* ---------------------- NetWare ----------------------------------------- */
4461 
4462 
4463 
4464 
4465 
4466 /* --------------------- Microsoft operating systems ---------------------- */
4467 
4468 /*
4469  * Note that MSDOS actually denotes 32-bit environments running on top of
4470  * MS-DOS, such as DJGPP one.
4471  */
4472 
4473 
4474 
4475 
4476 
4477 /*
4478  * For 32 bit environment, there seems to be the CygWin environment and then
4479  * all the others that try to do the same thing Microsoft does...
4480  */
4481 # 129 "/usr/include/openssl/e_os2.h" 3 4
4482 /* Anything that tries to look like Microsoft is "Windows" */
4483 # 138 "/usr/include/openssl/e_os2.h" 3 4
4484 /*
4485  * DLL settings.  This part is a bit tough, because it's up to the
4486  * application implementor how he or she will link the application, so it
4487  * requires some macro to be used.
4488  */
4489 # 152 "/usr/include/openssl/e_os2.h" 3 4
4490 /* ------------------------------- OpenVMS -------------------------------- */
4491 # 166 "/usr/include/openssl/e_os2.h" 3 4
4492 /* -------------------------------- OS/2 ---------------------------------- */
4493 
4494 
4495 
4496 
4497 
4498 /* -------------------------------- Unix ---------------------------------- */
4499 # 207 "/usr/include/openssl/e_os2.h" 3 4
4500 /* -------------------------------- VOS ----------------------------------- */
4501 # 218 "/usr/include/openssl/e_os2.h" 3 4
4502 /* ------------------------------ VxWorks --------------------------------- */
4503 
4504 
4505 
4506 
4507 /* -------------------------------- BeOS ---------------------------------- */
4508 # 234 "/usr/include/openssl/e_os2.h" 3 4
4509 /**
4510  * That's it for OS-specific stuff
4511  *****************************************************************************/
4512 
4513 /* Specials for I/O an exit */
4514 # 247 "/usr/include/openssl/e_os2.h" 3 4
4515 /*-
4516  * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare
4517  * certain global symbols that, with some compilers under VMS, have to be
4518  * defined and declared explicitely with globaldef and globalref.
4519  * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare
4520  * DLL exports and imports for compilers under Win32.  These are a little
4521  * more complicated to use.  Basically, for any library that exports some
4522  * global variables, the following code must be present in the header file
4523  * that declares them, before OPENSSL_EXTERN is used:
4524  *
4525  * #ifdef SOME_BUILD_FLAG_MACRO
4526  * # undef OPENSSL_EXTERN
4527  * # define OPENSSL_EXTERN OPENSSL_EXPORT
4528  * #endif
4529  *
4530  * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL
4531  * have some generally sensible values, and for OPENSSL_EXTERN to have the
4532  * value OPENSSL_IMPORT.
4533  */
4534 # 282 "/usr/include/openssl/e_os2.h" 3 4
4535 /*-
4536  * Macros to allow global variables to be reached through function calls when
4537  * required (if a shared library version requires it, for example.
4538  * The way it's done allows definitions like this:
4539  *
4540  *      // in foobar.c
4541  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
4542  *      // in foobar.h
4543  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
4544  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
4545  */
4546 # 63 "/usr/include/openssl/bio.h" 2 3 4
4547 
4548 
4549 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
4550 /*
4551  * CDDL HEADER START
4552  *
4553  * The contents of this file are subject to the terms of the
4554  * Common Development and Distribution License (the "License").
4555  * You may not use this file except in compliance with the License.
4556  *
4557  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4558  * or http://www.opensolaris.org/os/licensing.
4559  * See the License for the specific language governing permissions
4560  * and limitations under the License.
4561  *
4562  * When distributing Covered Code, include this CDDL HEADER in each
4563  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4564  * If applicable, add the following below this CDDL HEADER, with the
4565  * fields enclosed by brackets "[]" replaced with your own identifying
4566  * information: Portions Copyright [yyyy] [name of copyright owner]
4567  *
4568  * CDDL HEADER END
4569  */
4570 
4571 /*
4572  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4573  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
4574  */
4575 
4576 /*	Copyright (c) 1988 AT&T	*/
4577 /*	  All Rights Reserved  	*/
4578 
4579 /*
4580  * User-visible pieces of the ANSI C standard I/O package.
4581  */
4582 # 66 "/usr/include/openssl/bio.h" 2 3 4
4583 
4584 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 1 3 4
4585 /*
4586  * CDDL HEADER START
4587  *
4588  * The contents of this file are subject to the terms of the
4589  * Common Development and Distribution License, Version 1.0 only
4590  * (the "License").  You may not use this file except in compliance
4591  * with the License.
4592  *
4593  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4594  * or http://www.opensolaris.org/os/licensing.
4595  * See the License for the specific language governing permissions
4596  * and limitations under the License.
4597  *
4598  * When distributing Covered Code, include this CDDL HEADER in each
4599  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4600  * If applicable, add the following below this CDDL HEADER, with the
4601  * fields enclosed by brackets "[]" replaced with your own identifying
4602  * information: Portions Copyright [yyyy] [name of copyright owner]
4603  *
4604  * CDDL HEADER END
4605  */
4606 /*	Copyright (c) 1988 AT&T	*/
4607 /*	  All Rights Reserved	*/
4608 
4609 /*
4610  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4611  *
4612  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4613  * Use is subject to license terms.
4614  */
4615 
4616 
4617 
4618 
4619 /*
4620  * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999
4621  * variable argument definitions.  For legacy support, it also defines
4622  * the pre-standard variable argument definitions.
4623  *
4624  * The varargs definitions within this header are defined in terms of
4625  * implementation definitions.  These implementation definitions reside
4626  * in <sys/va_list.h>.  This organization enables protected use of
4627  * the implementation by other standard headers without introducing
4628  * names into the users' namespace.
4629  */
4630 
4631 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 1 3 4
4632 /*
4633  * CDDL HEADER START
4634  *
4635  * The contents of this file are subject to the terms of the
4636  * Common Development and Distribution License, Version 1.0 only
4637  * (the "License").  You may not use this file except in compliance
4638  * with the License.
4639  *
4640  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4641  * or http://www.opensolaris.org/os/licensing.
4642  * See the License for the specific language governing permissions
4643  * and limitations under the License.
4644  *
4645  * When distributing Covered Code, include this CDDL HEADER in each
4646  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4647  * If applicable, add the following below this CDDL HEADER, with the
4648  * fields enclosed by brackets "[]" replaced with your own identifying
4649  * information: Portions Copyright [yyyy] [name of copyright owner]
4650  *
4651  * CDDL HEADER END
4652  */
4653 /*	Copyright (c) 1988 AT&T	*/
4654 /*	  All Rights Reserved  	*/
4655 
4656 
4657 /*
4658  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4659  * Use is subject to license terms.
4660  */
4661 
4662 /*
4663  * An application should not include this header directly.  Instead it
4664  * should be included only through the inclusion of other Sun headers.
4665  *
4666  * The contents of this header is limited to identifiers specified in the
4667  * C Standard.  Any new identifiers specified in future amendments to the
4668  * C Standard must be placed in this header.  If these new identifiers
4669  * are required to also be in the C++ Standard "std" namespace, then for
4670  * anything other than macro definitions, corresponding "using" directives
4671  * must also be added to <stdarg.h>.
4672  */
4673 
4674 
4675 
4676 
4677 #pragma ident "%Z%%M%	%I%	%E% SMI"
4678 
4679 /*
4680  * This header defines the ISO C 1989 and ISO C++ 1998 variable
4681  * argument definitions.
4682  *
4683  * The varargs definitions within this header are defined in terms of
4684  * implementation definitions.  These implementation definitions reside
4685  * in <sys/va_impl.h>.  This organization enables protected use of
4686  * the implementation by other standard headers without introducing
4687  * names into the users' namespace.
4688  */
4689 
4690 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 1 3 4
4691 /*
4692  * CDDL HEADER START
4693  *
4694  * The contents of this file are subject to the terms of the
4695  * Common Development and Distribution License, Version 1.0 only
4696  * (the "License").  You may not use this file except in compliance
4697  * with the License.
4698  *
4699  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4700  * or http://www.opensolaris.org/os/licensing.
4701  * See the License for the specific language governing permissions
4702  * and limitations under the License.
4703  *
4704  * When distributing Covered Code, include this CDDL HEADER in each
4705  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4706  * If applicable, add the following below this CDDL HEADER, with the
4707  * fields enclosed by brackets "[]" replaced with your own identifying
4708  * information: Portions Copyright [yyyy] [name of copyright owner]
4709  *
4710  * CDDL HEADER END
4711  */
4712 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4713 /*	  All Rights Reserved	*/
4714 
4715 
4716 /*
4717  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4718  *
4719  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4720  * Use is subject to license terms.
4721  */
4722 
4723 
4724 
4725 
4726 /*
4727  * An application should not include this header directly.  Instead it
4728  * should be included only through the inclusion of other Sun headers,
4729  * specifically <stdarg.h> and <varargs.h>.
4730  *
4731  * This header serves two purposes.
4732  *
4733  * First, it provides a common set of definitions that implementations
4734  * of the various standards for variable argument lists may use.  These
4735  * various standards are implemented in <varargs.h>, <stdarg.h>,
4736  * <iso/stdarg_iso.h>, <iso/stdarg_c99.h>, and <sys/varargs.h>.
4737  *
4738  * Second, it provides varying implementations of the common definitions,
4739  * depending upon the compiler.
4740  */
4741 
4742 /*
4743  * The common definitions exported by this header or compilers using
4744  * this header are:
4745  *
4746  * the macro __va_start(list, name) starting the list iteration
4747  * the macro __va_arg(list, type) getting the current arg and iterating
4748  * the macro __va_copy(to, from) to bookmark the list iteration
4749  * the macro __va_end(list) to end the iteration
4750  *
4751  * In addition, the following are exported via inclusion of <sys/va_list.h>:
4752  *
4753  * the identifier __builtin_va_alist for the variable list pseudo parameter
4754  * the type __va_alist_type for the variable list pseudo parameter
4755  * the type __va_list defining the type of the variable list iterator
4756  */
4757 
4758 /*
4759  * This header uses feature macros (e.g. __BUILTIN_VA_ARG_INCR and
4760  * __BUILTIN_VA_STRUCT), compiler macros (e.g. __GNUC__), and processor
4761  * macros (e.g. __sparc) to determine the protocol appropriate to the
4762  * current compilation.  It is intended that the compilation system
4763  * define the feature, processor, and compiler macros, not the user of
4764  * the system.
4765  */
4766 
4767 /*
4768  * Many compilation systems depend upon the use of special functions
4769  * built into the the compilation system to handle variable argument
4770  * lists.  These built-in symbols may include one or more of the
4771  * following:
4772  *
4773  *      __builtin_va_alist
4774  *      __builtin_va_start
4775  *      __builtin_va_arg_incr
4776  *      __builtin_stdarg_start
4777  *      __builtin_va_end
4778  *      __builtin_va_arg
4779  *      __builtin_va_copy
4780  */
4781 
4782 /*
4783  * The following are defined in <sys/va_list.h>:
4784  *
4785  *      __va_alist_type
4786  *      __va_void()
4787  *      __va_ptr_base
4788  *      ISA definitions via inclusion of <sys/isa_defs.h>
4789  *
4790  * Inclusion of this header also makes visible the symbols in <sys/va_list.h>.
4791  * This header is included in <varargs.h>, <sys/varargs.h> and in <stdarg.h>
4792  * via inclusion of <iso/stdarg_iso.h>.
4793  */
4794 
4795 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_list.h" 1 3 4
4796 /*
4797  * CDDL HEADER START
4798  *
4799  * The contents of this file are subject to the terms of the
4800  * Common Development and Distribution License, Version 1.0 only
4801  * (the "License").  You may not use this file except in compliance
4802  * with the License.
4803  *
4804  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4805  * or http://www.opensolaris.org/os/licensing.
4806  * See the License for the specific language governing permissions
4807  * and limitations under the License.
4808  *
4809  * When distributing Covered Code, include this CDDL HEADER in each
4810  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4811  * If applicable, add the following below this CDDL HEADER, with the
4812  * fields enclosed by brackets "[]" replaced with your own identifying
4813  * information: Portions Copyright [yyyy] [name of copyright owner]
4814  *
4815  * CDDL HEADER END
4816  */
4817 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
4818 /*	  All Rights Reserved	*/
4819 
4820 
4821 /*
4822  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
4823  *
4824  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4825  * Use is subject to license terms.
4826  */
4827 # 106 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/va_impl.h" 2 3 4
4828 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 2 3 4
4829 # 71 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_iso.h" 3 4
4830 typedef __va_list va_list;
4831 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
4832 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 1 3 4
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, Version 1.0 only
4838  * (the "License").  You may not use this file except in compliance
4839  * with the License.
4840  *
4841  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4842  * or http://www.opensolaris.org/os/licensing.
4843  * See the License for the specific language governing permissions
4844  * and limitations under the License.
4845  *
4846  * When distributing Covered Code, include this CDDL HEADER in each
4847  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4848  * If applicable, add the following below this CDDL HEADER, with the
4849  * fields enclosed by brackets "[]" replaced with your own identifying
4850  * information: Portions Copyright [yyyy] [name of copyright owner]
4851  *
4852  * CDDL HEADER END
4853  */
4854 /*	Copyright (c) 1988 AT&T	*/
4855 /*	  All Rights Reserved	*/
4856 
4857 
4858 /*
4859  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
4860  * Use is subject to license terms.
4861  */
4862 
4863 
4864 
4865 
4866 #pragma ident "%Z%%M%	%I%	%E% SMI"
4867 
4868 /*
4869  * An application should not include this header directly.  Instead it
4870  * should be included only through the inclusion of other Sun headers.
4871  *
4872  * This header defines the va_copy variable argument macro, which is
4873  * new in ISO C 1999, and thus not present in ISO C 1989 and ISO C++
4874  * 1998.  Because this macro is a long-standing Solaris extension, it
4875  * is also permitted in other contexts.
4876  *
4877  * The varargs definitions within this header are defined in terms of
4878  * implementation definitions.  These implementation definitions reside
4879  * in <sys/va_list.h>.  This organization enables protected use of
4880  * the implementation by other standard headers without introducing
4881  * names into the users' namespace.
4882  */
4883 
4884 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
4885 /*
4886  * CDDL HEADER START
4887  *
4888  * The contents of this file are subject to the terms of the
4889  * Common Development and Distribution License (the "License").
4890  * You may not use this file except in compliance with the License.
4891  *
4892  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4893  * or http://www.opensolaris.org/os/licensing.
4894  * See the License for the specific language governing permissions
4895  * and limitations under the License.
4896  *
4897  * When distributing Covered Code, include this CDDL HEADER in each
4898  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4899  * If applicable, add the following below this CDDL HEADER, with the
4900  * fields enclosed by brackets "[]" replaced with your own identifying
4901  * information: Portions Copyright [yyyy] [name of copyright owner]
4902  *
4903  * CDDL HEADER END
4904  */
4905 
4906 /*
4907  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4908  * Copyright 2016 Joyent, Inc.
4909  *
4910  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
4911  * Use is subject to license terms.
4912  */
4913 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdarg_c99.h" 2 3 4
4914 
4915 
4916 
4917 
4918 
4919 /*
4920  * va_copy was initially a Solaris extension to provide a portable
4921  * way to perform a variable argument list ``bookmarking'' function.
4922  * It is now specified in the ISO/IEC 9899:1999 standard.
4923  */
4924 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdarg.h" 2 3 4
4925 
4926 /*
4927  * Allow global visibility for symbols defined in
4928  * C++ "std" namespace in <iso/stdarg_iso.h>.
4929  */
4930 # 68 "/usr/include/openssl/bio.h" 2 3 4
4931 
4932 # 1 "/usr/include/openssl/crypto.h" 1 3 4
4933 /* crypto/crypto.h */
4934 /* ====================================================================
4935  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
4936  *
4937  * Redistribution and use in source and binary forms, with or without
4938  * modification, are permitted provided that the following conditions
4939  * are met:
4940  *
4941  * 1. Redistributions of source code must retain the above copyright
4942  *    notice, this list of conditions and the following disclaimer.
4943  *
4944  * 2. Redistributions in binary form must reproduce the above copyright
4945  *    notice, this list of conditions and the following disclaimer in
4946  *    the documentation and/or other materials provided with the
4947  *    distribution.
4948  *
4949  * 3. All advertising materials mentioning features or use of this
4950  *    software must display the following acknowledgment:
4951  *    "This product includes software developed by the OpenSSL Project
4952  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
4953  *
4954  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
4955  *    endorse or promote products derived from this software without
4956  *    prior written permission. For written permission, please contact
4957  *    openssl-core@openssl.org.
4958  *
4959  * 5. Products derived from this software may not be called "OpenSSL"
4960  *    nor may "OpenSSL" appear in their names without prior written
4961  *    permission of the OpenSSL Project.
4962  *
4963  * 6. Redistributions of any form whatsoever must retain the following
4964  *    acknowledgment:
4965  *    "This product includes software developed by the OpenSSL Project
4966  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
4967  *
4968  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
4969  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4970  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
4971  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
4972  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4973  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4974  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4975  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4976  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4977  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4978  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4979  * OF THE POSSIBILITY OF SUCH DAMAGE.
4980  * ====================================================================
4981  *
4982  * This product includes cryptographic software written by Eric Young
4983  * (eay@cryptsoft.com).  This product includes software written by Tim
4984  * Hudson (tjh@cryptsoft.com).
4985  *
4986  */
4987 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
4988  * All rights reserved.
4989  *
4990  * This package is an SSL implementation written
4991  * by Eric Young (eay@cryptsoft.com).
4992  * The implementation was written so as to conform with Netscapes SSL.
4993  *
4994  * This library is free for commercial and non-commercial use as long as
4995  * the following conditions are aheared to.  The following conditions
4996  * apply to all code found in this distribution, be it the RC4, RSA,
4997  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
4998  * included with this distribution is covered by the same copyright terms
4999  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
5000  *
5001  * Copyright remains Eric Young's, and as such any Copyright notices in
5002  * the code are not to be removed.
5003  * If this package is used in a product, Eric Young should be given attribution
5004  * as the author of the parts of the library used.
5005  * This can be in the form of a textual message at program startup or
5006  * in documentation (online or textual) provided with the package.
5007  *
5008  * Redistribution and use in source and binary forms, with or without
5009  * modification, are permitted provided that the following conditions
5010  * are met:
5011  * 1. Redistributions of source code must retain the copyright
5012  *    notice, this list of conditions and the following disclaimer.
5013  * 2. Redistributions in binary form must reproduce the above copyright
5014  *    notice, this list of conditions and the following disclaimer in the
5015  *    documentation and/or other materials provided with the distribution.
5016  * 3. All advertising materials mentioning features or use of this software
5017  *    must display the following acknowledgement:
5018  *    "This product includes cryptographic software written by
5019  *     Eric Young (eay@cryptsoft.com)"
5020  *    The word 'cryptographic' can be left out if the rouines from the library
5021  *    being used are not cryptographic related :-).
5022  * 4. If you include any Windows specific code (or a derivative thereof) from
5023  *    the apps directory (application code) you must include an acknowledgement:
5024  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
5025  *
5026  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
5027  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5029  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
5030  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5031  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5032  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5033  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5034  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5035  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5036  * SUCH DAMAGE.
5037  *
5038  * The licence and distribution terms for any publically available version or
5039  * derivative of this code cannot be changed.  i.e. this code cannot simply be
5040  * copied and put under another distribution licence
5041  * [including the GNU Public Licence.]
5042  */
5043 /* ====================================================================
5044  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
5045  * ECDH support in OpenSSL originally developed by
5046  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
5047  */
5048 
5049 
5050 
5051 
5052 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 1 3 4
5053 /*
5054  * CDDL HEADER START
5055  *
5056  * The contents of this file are subject to the terms of the
5057  * Common Development and Distribution License (the "License").
5058  * You may not use this file except in compliance with the License.
5059  *
5060  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5061  * or http://www.opensolaris.org/os/licensing.
5062  * See the License for the specific language governing permissions
5063  * and limitations under the License.
5064  *
5065  * When distributing Covered Code, include this CDDL HEADER in each
5066  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5067  * If applicable, add the following below this CDDL HEADER, with the
5068  * fields enclosed by brackets "[]" replaced with your own identifying
5069  * information: Portions Copyright [yyyy] [name of copyright owner]
5070  *
5071  * CDDL HEADER END
5072  */
5073 
5074 /*
5075  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5076  * Copyright (c) 2013 Gary Mills
5077  *
5078  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
5079  */
5080 
5081 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
5082 
5083 /*	Copyright (c) 1988 AT&T	*/
5084 /*	  All Rights Reserved  	*/
5085 
5086 
5087 
5088 
5089 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 1 3 4
5090 /*
5091  * CDDL HEADER START
5092  *
5093  * The contents of this file are subject to the terms of the
5094  * Common Development and Distribution License, Version 1.0 only
5095  * (the "License").  You may not use this file except in compliance
5096  * with the License.
5097  *
5098  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5099  * or http://www.opensolaris.org/os/licensing.
5100  * See the License for the specific language governing permissions
5101  * and limitations under the License.
5102  *
5103  * When distributing Covered Code, include this CDDL HEADER in each
5104  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5105  * If applicable, add the following below this CDDL HEADER, with the
5106  * fields enclosed by brackets "[]" replaced with your own identifying
5107  * information: Portions Copyright [yyyy] [name of copyright owner]
5108  *
5109  * CDDL HEADER END
5110  */
5111 /*
5112  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5113  * Copyright 2014 PALO, Richard.
5114  *
5115  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5116  * Use is subject to license terms.
5117  */
5118 
5119 /*	Copyright (c) 1988 AT&T	*/
5120 /*	  All Rights Reserved  	*/
5121 
5122 
5123 /*
5124  * An application should not include this header directly.  Instead it
5125  * should be included only through the inclusion of other Sun headers.
5126  *
5127  * The contents of this header is limited to identifiers specified in the
5128  * C Standard.  Any new identifiers specified in future amendments to the
5129  * C Standard must be placed in this header.  If these new identifiers
5130  * are required to also be in the C++ Standard "std" namespace, then for
5131  * anything other than macro definitions, corresponding "using" directives
5132  * must also be added to <locale.h>.
5133  */
5134 
5135 
5136 
5137 
5138 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
5139 /*
5140  * CDDL HEADER START
5141  *
5142  * The contents of this file are subject to the terms of the
5143  * Common Development and Distribution License (the "License").
5144  * You may not use this file except in compliance with the License.
5145  *
5146  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5147  * or http://www.opensolaris.org/os/licensing.
5148  * See the License for the specific language governing permissions
5149  * and limitations under the License.
5150  *
5151  * When distributing Covered Code, include this CDDL HEADER in each
5152  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5153  * If applicable, add the following below this CDDL HEADER, with the
5154  * fields enclosed by brackets "[]" replaced with your own identifying
5155  * information: Portions Copyright [yyyy] [name of copyright owner]
5156  *
5157  * CDDL HEADER END
5158  */
5159 
5160 /*
5161  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5162  * Copyright 2016 Joyent, Inc.
5163  *
5164  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5165  * Use is subject to license terms.
5166  */
5167 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2 3 4
5168 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
5169 /*
5170  * This file and its contents are supplied under the terms of the
5171  * Common Development and Distribution License ("CDDL"), version 1.0.
5172  * You may only use this file in accordance with the terms of version
5173  * 1.0 of the CDDL.
5174  *
5175  * A full copy of the text of the CDDL should have accompanied this
5176  * source.  A copy of the CDDL is also available via the Internet at
5177  * http://www.illumos.org/license/CDDL.
5178  */
5179 
5180 /*
5181  * Copyright 2014-2016 PALO, Richard.
5182  */
5183 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 2 3 4
5184 
5185 
5186 
5187 
5188 
5189 unsigned char __mb_cur_max(void);
5190 # 65 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 3 4
5191 typedef struct {
5192  int quot;
5193  int rem;
5194 } div_t;
5195 
5196 typedef struct {
5197  long quot;
5198  long rem;
5199 } ldiv_t;
5200 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 3 4
5201 /*
5202  * wchar_t is a built-in type in standard C++ and as such is not
5203  * defined here when using standard C++. However, the GNU compiler
5204  * fixincludes utility nonetheless creates its own version of this
5205  * header for use by gcc and g++. In that version it adds a redundant
5206  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
5207  * header we need to include the following magic comment:
5208  *
5209  * we must use the C++ compiler's type
5210  *
5211  * The above comment should not be removed or changed until GNU
5212  * gcc/fixinc/inclhack.def is updated to bypass this header.
5213  */
5214 # 120 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_iso.h" 3 4
5215 extern void abort(void) __attribute__((__noreturn__));
5216 extern int abs(int);
5217 extern int atexit(void (*)(void));
5218 extern double atof(const char *);
5219 extern int atoi(const char *);
5220 extern long int atol(const char *);
5221 extern void *bsearch(const void *, const void *, size_t, size_t,
5222  int (*)(const void *, const void *));
5223 
5224 
5225 
5226 
5227 
5228 
5229 extern void *calloc(size_t, size_t);
5230 extern div_t div(int, int);
5231 extern void exit(int)
5232  __attribute__((__noreturn__));
5233 extern void free(void *);
5234 extern char *getenv(const char *);
5235 extern long int labs(long);
5236 extern ldiv_t ldiv(long, long);
5237 extern void *malloc(size_t);
5238 extern int mblen(const char *, size_t);
5239 extern size_t mbstowcs(wchar_t *, const char *,
5240  size_t);
5241 extern int mbtowc(wchar_t *, const char *, size_t);
5242 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
5243 
5244 
5245 
5246 
5247 
5248 extern int rand(void);
5249 extern void *realloc(void *, size_t);
5250 extern void srand(unsigned int);
5251 extern double strtod(const char *, char **);
5252 extern long int strtol(const char *, char **, int);
5253 extern unsigned long int strtoul(const char *,
5254  char **, int);
5255 extern int system(const char *);
5256 extern int wctomb(char *, wchar_t);
5257 extern size_t wcstombs(char *, const wchar_t *,
5258  size_t);
5259 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2 3 4
5260 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 1 3 4
5261 /*
5262  * CDDL HEADER START
5263  *
5264  * The contents of this file are subject to the terms of the
5265  * Common Development and Distribution License, Version 1.0 only
5266  * (the "License").  You may not use this file except in compliance
5267  * with the License.
5268  *
5269  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5270  * or http://www.opensolaris.org/os/licensing.
5271  * See the License for the specific language governing permissions
5272  * and limitations under the License.
5273  *
5274  * When distributing Covered Code, include this CDDL HEADER in each
5275  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5276  * If applicable, add the following below this CDDL HEADER, with the
5277  * fields enclosed by brackets "[]" replaced with your own identifying
5278  * information: Portions Copyright [yyyy] [name of copyright owner]
5279  *
5280  * CDDL HEADER END
5281  */
5282 /*
5283  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5284  *
5285  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5286  * Use is subject to license terms.
5287  */
5288 
5289 /*
5290  * An application should not include this header directly.  Instead it
5291  * should be included only through the inclusion of other Sun headers.
5292  *
5293  * The contents of this header is limited to identifiers specified in
5294  * the C99 standard and in conflict with the C++ implementation of the
5295  * standard header.  The C++ standard may adopt the C99 standard at
5296  * which point it is expected that the symbols included here will
5297  * become part of the C++ std namespace.
5298  */
5299 
5300 
5301 
5302 
5303 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
5304 /*
5305  * CDDL HEADER START
5306  *
5307  * The contents of this file are subject to the terms of the
5308  * Common Development and Distribution License (the "License").
5309  * You may not use this file except in compliance with the License.
5310  *
5311  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5312  * or http://www.opensolaris.org/os/licensing.
5313  * See the License for the specific language governing permissions
5314  * and limitations under the License.
5315  *
5316  * When distributing Covered Code, include this CDDL HEADER in each
5317  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5318  * If applicable, add the following below this CDDL HEADER, with the
5319  * fields enclosed by brackets "[]" replaced with your own identifying
5320  * information: Portions Copyright [yyyy] [name of copyright owner]
5321  *
5322  * CDDL HEADER END
5323  */
5324 
5325 /*
5326  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5327  * Copyright 2016 Joyent, Inc.
5328  *
5329  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5330  * Use is subject to license terms.
5331  */
5332 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 2 3 4
5333 
5334 
5335 
5336 
5337 
5338 /*
5339  * The following have been added as a result of the ISO/IEC 9899:1999
5340  * standard. For a strictly conforming C application, visibility is
5341  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5342  * For non-strictly conforming C applications, there are no restrictions
5343  * on the C namespace.
5344  */
5345 
5346 
5347 typedef struct {
5348  long long quot;
5349  long long rem;
5350 } lldiv_t;
5351 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c99.h" 3 4
5352 extern void _Exit(int);
5353 extern float strtof(const char *, char **);
5354 extern long double strtold(const char *, char **);
5355 
5356 
5357 extern long long atoll(const char *);
5358 extern long long llabs(long long);
5359 extern lldiv_t lldiv(long long, long long);
5360 extern long long strtoll(const char *, char **,
5361  int);
5362 extern unsigned long long strtoull(const char *,
5363  char **, int);
5364 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2 3 4
5365 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 1 3 4
5366 /*
5367  * This file and its contents are supplied under the terms of the
5368  * Common Development and Distribution License ("CDDL"), version 1.0.
5369  * You may only use this file in accordance with the terms of version
5370  * 1.0 of the CDDL.
5371  *
5372  * A full copy of the text of the CDDL should have accompanied this
5373  * source.  A copy of the CDDL is also available via the Internet at
5374  * http://www.illumos.org/license/CDDL.
5375  */
5376 
5377 /*
5378  * Copyright 2016 Joyent, Inc.
5379  */
5380 
5381 /*
5382  * An application should not include this header directly.  Instead it
5383  * should be included only through the inclusion of other illumos headers.
5384  *
5385  * The contents of this header is limited to identifiers specified in
5386  * the C11 standard and in conflict with the C++ implementation of the
5387  * standard header.  The C++ standard may adopt the C11 standard at
5388  * which point it is expected that the symbols included here will
5389  * become part of the C++ std namespace.
5390  */
5391 
5392 
5393 
5394 
5395 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
5396 /*
5397  * CDDL HEADER START
5398  *
5399  * The contents of this file are subject to the terms of the
5400  * Common Development and Distribution License (the "License").
5401  * You may not use this file except in compliance with the License.
5402  *
5403  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5404  * or http://www.opensolaris.org/os/licensing.
5405  * See the License for the specific language governing permissions
5406  * and limitations under the License.
5407  *
5408  * When distributing Covered Code, include this CDDL HEADER in each
5409  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5410  * If applicable, add the following below this CDDL HEADER, with the
5411  * fields enclosed by brackets "[]" replaced with your own identifying
5412  * information: Portions Copyright [yyyy] [name of copyright owner]
5413  *
5414  * CDDL HEADER END
5415  */
5416 
5417 /*
5418  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5419  * Copyright 2016 Joyent, Inc.
5420  *
5421  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5422  * Use is subject to license terms.
5423  */
5424 # 31 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 2 3 4
5425 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 3 4
5426 /*
5427  * The following have been added as a result of the ISO/IEC 9899:2011
5428  * standard. For a strictly conforming C application, visibility is
5429  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
5430  * For non-strictly conforming C applications, there are no restrictions
5431  * on the C namespace.
5432  */
5433 
5434 /*
5435  * Work around fix-includes and other bad actors with using multiple headers.
5436  */
5437 # 60 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stdlib_c11.h" 3 4
5438 extern void *aligned_alloc(size_t, size_t);
5439 extern int at_quick_exit(void (*)(void));
5440 extern void quick_exit(int);
5441 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2 3 4
5442 
5443 
5444 
5445 
5446 
5447 /*
5448  * Allow global visibility for symbols defined in
5449  * C++ "std" namespace in <iso/stdlib_iso.h>.
5450  */
5451 # 83 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5452 /*
5453  * Allow global visibility for symbols defined in
5454  * C++ "std" namespace in <iso/stdlib_c11.h>.
5455  */
5456 # 104 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5457 /* large file compilation environment setup */
5458 
5459 
5460 
5461 
5462 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5463 #pragma redefine_extname mkstemp mkstemp64
5464 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5465 
5466 
5467 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5468 #pragma redefine_extname mkstemps mkstemps64
5469 # 109 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5470 
5471 
5472 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5473 #pragma redefine_extname mkostemp mkostemp64
5474 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5475 
5476 
5477 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5478 #pragma redefine_extname mkostemps mkostemps64
5479 # 111 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5480 # 121 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5481 /* In the LP64 compilation environment, all APIs are already large file */
5482 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5483 extern int rand_r(unsigned int *);
5484 
5485 
5486 extern void _exithandle(void);
5487 
5488 
5489 
5490 
5491 extern double drand48(void);
5492 extern double erand48(unsigned short *);
5493 extern long jrand48(unsigned short *);
5494 extern void lcong48(unsigned short *);
5495 extern long lrand48(void);
5496 extern long mrand48(void);
5497 extern long nrand48(unsigned short *);
5498 extern unsigned short *seed48(unsigned short *);
5499 extern void srand48(long);
5500 extern int putenv(char *);
5501 extern void setkey(const char *);
5502 
5503 
5504 /*
5505  * swab() has historically been in <stdlib.h> as delivered from AT&T
5506  * and continues to be visible in the default compilation environment.
5507  * As of Issue 4 of the X/Open Portability Guides, swab() was declared
5508  * in <unistd.h>. As a result, with respect to X/Open namespace the
5509  * swab() declaration in this header is only visible for the XPG3
5510  * environment.
5511  */
5512 # 182 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5513 extern void swab(const char *, char *, ssize_t);
5514 
5515 
5516 
5517 
5518 
5519 extern int mkstemp(char *);
5520 
5521 extern int mkstemps(char *, int);
5522 
5523 
5524 
5525 
5526 
5527 extern int mkstemp64(char *);
5528 
5529 extern int mkstemps64(char *, int);
5530 
5531 
5532 
5533 
5534 extern char *mkdtemp(char *);
5535 
5536 
5537 
5538 extern int mkostemp(char *, int);
5539 extern int mkostemps(char *, int, int);
5540 
5541 
5542 extern int mkostemp64(char *, int);
5543 extern int mkostemps64(char *, int, int);
5544 
5545 
5546 
5547 
5548 
5549 
5550 extern long a64l(const char *);
5551 extern char *ecvt(double, int, int *, int *);
5552 extern char *fcvt(double, int, int *, int *);
5553 extern char *gcvt(double, int, char *);
5554 extern int getsubopt(char **, char *const *, char **);
5555 extern int grantpt(int);
5556 extern char *initstate(unsigned, char *, size_t);
5557 extern char *l64a(long);
5558 extern char *mktemp(char *);
5559 extern char *ptsname(int);
5560 extern long random(void);
5561 extern char *realpath(const char *, char *);
5562 extern char *setstate(const char *);
5563 extern void srandom(unsigned);
5564 extern int unlockpt(int);
5565 /* Marked LEGACY in SUSv2 and removed in SUSv3 */
5566 
5567 extern int ttyslot(void);
5568 extern void *valloc(size_t);
5569 
5570 
5571 
5572 
5573 
5574 
5575 extern int posix_memalign(void **, size_t, size_t);
5576 extern int posix_openpt(int);
5577 extern int setenv(const char *, const char *, int);
5578 extern int unsetenv(const char *);
5579 
5580 
5581 
5582 
5583 extern char *canonicalize_file_name(const char *);
5584 extern int clearenv(void);
5585 extern void closefrom(int);
5586 extern int daemon(int, int);
5587 extern int dup2(int, int);
5588 extern int dup3(int, int, int);
5589 extern int fdwalk(int (*)(void *, int), void *);
5590 extern char *qecvt(long double, int, int *, int *);
5591 extern char *qfcvt(long double, int, int *, int *);
5592 extern char *qgcvt(long double, int, char *);
5593 extern char *getcwd(char *, size_t);
5594 extern const char *getexecname(void);
5595 
5596 
5597 
5598 
5599 
5600 
5601 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5602 #pragma redefine_extname getlogin getloginx
5603 # 269 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 3 4
5604 
5605 
5606 
5607 
5608 
5609 
5610 extern char *getlogin(void);
5611 
5612 
5613 extern int getopt(int, char *const *, const char *);
5614 extern char *optarg;
5615 extern int optind, opterr, optopt;
5616 extern char *getpass(const char *);
5617 extern char *getpassphrase(const char *);
5618 extern int getpw(uid_t, char *);
5619 extern int isatty(int);
5620 extern void *memalign(size_t, size_t);
5621 extern char *ttyname(int);
5622 extern char *mkdtemp(char *);
5623 extern const char *getprogname(void);
5624 extern void setprogname(const char *);
5625 
5626 
5627 extern char *lltostr(long long, char *);
5628 extern char *ulltostr(unsigned long long, char *);
5629 
5630 
5631 
5632 
5633 /* OpenBSD compatibility functions */
5634 
5635 
5636 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 1 3 4
5637 /*
5638  * CDDL HEADER START
5639  *
5640  * The contents of this file are subject to the terms of the
5641  * Common Development and Distribution License, Version 1.0 only
5642  * (the "License").  You may not use this file except in compliance
5643  * with the License.
5644  *
5645  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5646  * or http://www.opensolaris.org/os/licensing.
5647  * See the License for the specific language governing permissions
5648  * and limitations under the License.
5649  *
5650  * When distributing Covered Code, include this CDDL HEADER in each
5651  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5652  * If applicable, add the following below this CDDL HEADER, with the
5653  * fields enclosed by brackets "[]" replaced with your own identifying
5654  * information: Portions Copyright [yyyy] [name of copyright owner]
5655  *
5656  * CDDL HEADER END
5657  */
5658 /*
5659  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5660  *
5661  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5662  * Use is subject to license terms.
5663  */
5664 
5665 
5666 
5667 
5668 /*
5669  * This file, <inttypes.h>, is specified by the ISO C standard,
5670  * standard, ISO/IEC 9899:1999 Programming language - C and is
5671  * also defined by SUSv3.
5672  *
5673  * ISO	  International Organization for Standardization.
5674  * SUSv3  Single Unix Specification, Version 3
5675  */
5676 
5677 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
5678 /*
5679  * CDDL HEADER START
5680  *
5681  * The contents of this file are subject to the terms of the
5682  * Common Development and Distribution License (the "License").
5683  * You may not use this file except in compliance with the License.
5684  *
5685  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5686  * or http://www.opensolaris.org/os/licensing.
5687  * See the License for the specific language governing permissions
5688  * and limitations under the License.
5689  *
5690  * When distributing Covered Code, include this CDDL HEADER in each
5691  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5692  * If applicable, add the following below this CDDL HEADER, with the
5693  * fields enclosed by brackets "[]" replaced with your own identifying
5694  * information: Portions Copyright [yyyy] [name of copyright owner]
5695  *
5696  * CDDL HEADER END
5697  */
5698 
5699 /*
5700  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5701  * Copyright 2016 Joyent, Inc.
5702  *
5703  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5704  * Use is subject to license terms.
5705  */
5706 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2 3 4
5707 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 1 3 4
5708 /*
5709  * CDDL HEADER START
5710  *
5711  * The contents of this file are subject to the terms of the
5712  * Common Development and Distribution License, Version 1.0 only
5713  * (the "License").  You may not use this file except in compliance
5714  * with the License.
5715  *
5716  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5717  * or http://www.opensolaris.org/os/licensing.
5718  * See the License for the specific language governing permissions
5719  * and limitations under the License.
5720  *
5721  * When distributing Covered Code, include this CDDL HEADER in each
5722  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5723  * If applicable, add the following below this CDDL HEADER, with the
5724  * fields enclosed by brackets "[]" replaced with your own identifying
5725  * information: Portions Copyright [yyyy] [name of copyright owner]
5726  *
5727  * CDDL HEADER END
5728  */
5729 /*
5730  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
5731  * Use is subject to license terms.
5732  */
5733 
5734 
5735 
5736 
5737 #pragma ident "%Z%%M%	%I%	%E% SMI"
5738 
5739 /*
5740  * This header, <sys/inttypes.h>, contains (through nested inclusion) the
5741  * vast majority of the facilities specified for <inttypes.h> as defined
5742  * by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
5743  *
5744  * Kernel/Driver developers are encouraged to include this file to access
5745  * the fixed size types, limits and utility macros. Application developers
5746  * should use the standard defined header <inttypes.h>.
5747  */
5748 
5749 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
5750 /*
5751  * CDDL HEADER START
5752  *
5753  * The contents of this file are subject to the terms of the
5754  * Common Development and Distribution License (the "License").
5755  * You may not use this file except in compliance with the License.
5756  *
5757  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5758  * or http://www.opensolaris.org/os/licensing.
5759  * See the License for the specific language governing permissions
5760  * and limitations under the License.
5761  *
5762  * When distributing Covered Code, include this CDDL HEADER in each
5763  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5764  * If applicable, add the following below this CDDL HEADER, with the
5765  * fields enclosed by brackets "[]" replaced with your own identifying
5766  * information: Portions Copyright [yyyy] [name of copyright owner]
5767  *
5768  * CDDL HEADER END
5769  */
5770 
5771 /*
5772  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5773  * Copyright 2016 Joyent, Inc.
5774  *
5775  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5776  * Use is subject to license terms.
5777  */
5778 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2 3 4
5779 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1 3 4
5780 /*
5781  * CDDL HEADER START
5782  *
5783  * The contents of this file are subject to the terms of the
5784  * Common Development and Distribution License, Version 1.0 only
5785  * (the "License").  You may not use this file except in compliance
5786  * with the License.
5787  *
5788  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5789  * or http://www.opensolaris.org/os/licensing.
5790  * See the License for the specific language governing permissions
5791  * and limitations under the License.
5792  *
5793  * When distributing Covered Code, include this CDDL HEADER in each
5794  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5795  * If applicable, add the following below this CDDL HEADER, with the
5796  * fields enclosed by brackets "[]" replaced with your own identifying
5797  * information: Portions Copyright [yyyy] [name of copyright owner]
5798  *
5799  * CDDL HEADER END
5800  */
5801 /*
5802  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5803  *
5804  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5805  * Use is subject to license terms.
5806  */
5807 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2 3 4
5808 
5809 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1 3 4
5810 /*
5811  * CDDL HEADER START
5812  *
5813  * The contents of this file are subject to the terms of the
5814  * Common Development and Distribution License, Version 1.0 only
5815  * (the "License").  You may not use this file except in compliance
5816  * with the License.
5817  *
5818  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5819  * or http://www.opensolaris.org/os/licensing.
5820  * See the License for the specific language governing permissions
5821  * and limitations under the License.
5822  *
5823  * When distributing Covered Code, include this CDDL HEADER in each
5824  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5825  * If applicable, add the following below this CDDL HEADER, with the
5826  * fields enclosed by brackets "[]" replaced with your own identifying
5827  * information: Portions Copyright [yyyy] [name of copyright owner]
5828  *
5829  * CDDL HEADER END
5830  */
5831 /*
5832  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5833  *
5834  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5835  * Use is subject to license terms.
5836  */
5837 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2 3 4
5838 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1 3 4
5839 /*
5840  * CDDL HEADER START
5841  *
5842  * The contents of this file are subject to the terms of the
5843  * Common Development and Distribution License, Version 1.0 only
5844  * (the "License").  You may not use this file except in compliance
5845  * with the License.
5846  *
5847  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5848  * or http://www.opensolaris.org/os/licensing.
5849  * See the License for the specific language governing permissions
5850  * and limitations under the License.
5851  *
5852  * When distributing Covered Code, include this CDDL HEADER in each
5853  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5854  * If applicable, add the following below this CDDL HEADER, with the
5855  * fields enclosed by brackets "[]" replaced with your own identifying
5856  * information: Portions Copyright [yyyy] [name of copyright owner]
5857  *
5858  * CDDL HEADER END
5859  */
5860 /*
5861  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5862  *
5863  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5864  * Use is subject to license terms.
5865  */
5866 
5867 
5868 
5869 
5870 /*
5871  * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
5872  * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
5873  * draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
5874  * Programming language - C.
5875  *
5876  * Programs/Modules should not directly include this file.  Access to the
5877  * types defined in this file should be through the inclusion of one of the
5878  * following files:
5879  *
5880  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
5881  *				components of <inttypes.h>.
5882  *
5883  *	<inttypes.h>		For use by applications.
5884  *
5885  * See these files for more details.
5886  *
5887  * Use at your own risk.  This file will track the evolution of the revision
5888  * of the current ISO C standard.  As of February 1996, the committee is
5889  * squarely behind the fixed sized types.
5890  */
5891 
5892 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
5893 /*
5894  * CDDL HEADER START
5895  *
5896  * The contents of this file are subject to the terms of the
5897  * Common Development and Distribution License (the "License").
5898  * You may not use this file except in compliance with the License.
5899  *
5900  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5901  * or http://www.opensolaris.org/os/licensing.
5902  * See the License for the specific language governing permissions
5903  * and limitations under the License.
5904  *
5905  * When distributing Covered Code, include this CDDL HEADER in each
5906  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5907  * If applicable, add the following below this CDDL HEADER, with the
5908  * fields enclosed by brackets "[]" replaced with your own identifying
5909  * information: Portions Copyright [yyyy] [name of copyright owner]
5910  *
5911  * CDDL HEADER END
5912  */
5913 
5914 /*
5915  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
5916  * Copyright 2016 Joyent, Inc.
5917  *
5918  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
5919  * Use is subject to license terms.
5920  */
5921 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 2 3 4
5922 
5923 
5924 
5925 
5926 
5927 /*
5928  * Constants
5929  *
5930  * The following macros create constants of the types defined in
5931  * <sys/int_types.h>. The intent is that:
5932  *	Constants defined using these macros have a specific size and
5933  *	signedness. The suffix used for int64_t and uint64_t (ll and ull)
5934  *	are for examples only. Implementations are permitted to use other
5935  *	suffixes.
5936  *
5937  * The "CSTYLED" comments are flags to an internal code style analysis tool
5938  * telling it to silently accept the line which follows.  This internal
5939  * standard requires a space between arguments, but the historical,
5940  * non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
5941  */
5942 /* CSTYLED */
5943 # 86 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 3 4
5944 /* CSTYLED */
5945 
5946 
5947 
5948 
5949 /* CSTYLED */
5950 
5951 /* CSTYLED */
5952 
5953 /* CSTYLED */
5954 
5955 
5956 
5957 
5958 
5959 
5960 /* CSTYLED */
5961 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 3 4
5962 /* CSTYLED */
5963 
5964 /* CSTYLED */
5965 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2 3 4
5966 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 1 3 4
5967 /*
5968  * CDDL HEADER START
5969  *
5970  * The contents of this file are subject to the terms of the
5971  * Common Development and Distribution License, Version 1.0 only
5972  * (the "License").  You may not use this file except in compliance
5973  * with the License.
5974  *
5975  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5976  * or http://www.opensolaris.org/os/licensing.
5977  * See the License for the specific language governing permissions
5978  * and limitations under the License.
5979  *
5980  * When distributing Covered Code, include this CDDL HEADER in each
5981  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5982  * If applicable, add the following below this CDDL HEADER, with the
5983  * fields enclosed by brackets "[]" replaced with your own identifying
5984  * information: Portions Copyright [yyyy] [name of copyright owner]
5985  *
5986  * CDDL HEADER END
5987  */
5988 /*
5989  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
5990  *
5991  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
5992  * Use is subject to license terms.
5993  */
5994 
5995 
5996 
5997 
5998 /*
5999  * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
6000  * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
6001  * Programming language - C.
6002  *
6003  * ISO  International Organization for Standardization.
6004  *
6005  * Programs/Modules should not directly include this file.  Access to the
6006  * types defined in this file should be through the inclusion of one of the
6007  * following files:
6008  *
6009  *	<sys/inttypes.h>	Provides the Kernel and Driver appropriate
6010  *				components of <inttypes.h>.
6011  *
6012  *	<inttypes.h>		For use by applications.
6013  *
6014  * See these files for more details.
6015  */
6016 
6017 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
6018 /*
6019  * CDDL HEADER START
6020  *
6021  * The contents of this file are subject to the terms of the
6022  * Common Development and Distribution License (the "License").
6023  * You may not use this file except in compliance with the License.
6024  *
6025  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6026  * or http://www.opensolaris.org/os/licensing.
6027  * See the License for the specific language governing permissions
6028  * and limitations under the License.
6029  *
6030  * When distributing Covered Code, include this CDDL HEADER in each
6031  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6032  * If applicable, add the following below this CDDL HEADER, with the
6033  * fields enclosed by brackets "[]" replaced with your own identifying
6034  * information: Portions Copyright [yyyy] [name of copyright owner]
6035  *
6036  * CDDL HEADER END
6037  */
6038 
6039 /*
6040  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
6041  * Copyright 2016 Joyent, Inc.
6042  *
6043  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
6044  * Use is subject to license terms.
6045  */
6046 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 2 3 4
6047 
6048 
6049 
6050 
6051 
6052 /*
6053  * Formatted I/O
6054  *
6055  * The following macros can be used even when an implementation has not
6056  * extended the printf/scanf family of functions.
6057  *
6058  * The form of the names of the macros is either "PRI" for printf specifiers
6059  * or "SCN" for scanf specifiers, followed by the conversion specifier letter
6060  * followed by the datatype size. For example, PRId32 is the macro for
6061  * the printf d conversion specifier with the flags for 32 bit datatype.
6062  *
6063  * An example using one of these macros:
6064  *
6065  *	uint64_t u;
6066  *	printf("u = %016" PRIx64 "\n", u);
6067  *
6068  * For the purpose of example, the definitions of the printf/scanf macros
6069  * below have the values appropriate for a machine with 8 bit shorts, 16
6070  * bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
6071  * mode, and 64 bit long longs.
6072  */
6073 
6074 /*
6075  * fprintf macros for signed integers
6076  */
6077 # 139 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 3 4
6078 /*
6079  * fprintf macros for unsigned integers
6080  */
6081 # 227 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 3 4
6082 /*
6083  * fprintf macros for pointers
6084  */
6085 # 247 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 3 4
6086 /*
6087  * fscanf macros for signed integers
6088  */
6089 # 282 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 3 4
6090 /*
6091  * fscanf macros for unsigned integers
6092  */
6093 # 349 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_fmtio.h" 3 4
6094 /*
6095  * The following macros define I/O formats for intmax_t and uintmax_t.
6096  */
6097 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/inttypes.h" 2 3 4
6098 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2 3 4
6099 
6100 
6101 
6102 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 1 3 4
6103 /*
6104  * CDDL HEADER START
6105  *
6106  * The contents of this file are subject to the terms of the
6107  * Common Development and Distribution License, Version 1.0 only
6108  * (the "License").  You may not use this file except in compliance
6109  * with the License.
6110  *
6111  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6112  * or http://www.opensolaris.org/os/licensing.
6113  * See the License for the specific language governing permissions
6114  * and limitations under the License.
6115  *
6116  * When distributing Covered Code, include this CDDL HEADER in each
6117  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6118  * If applicable, add the following below this CDDL HEADER, with the
6119  * fields enclosed by brackets "[]" replaced with your own identifying
6120  * information: Portions Copyright [yyyy] [name of copyright owner]
6121  *
6122  * CDDL HEADER END
6123  */
6124 /*
6125  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
6126  * Use is subject to license terms.
6127  */
6128 
6129 
6130 
6131 
6132 #pragma ident "%Z%%M%	%I%	%E% SMI"
6133 
6134 /*
6135  * This header is included by <stdint.h> which was introduced by
6136  * the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
6137  * The header is a subset of the <inttypes.h> header.
6138  */
6139 
6140 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1 3 4
6141 /*
6142  * CDDL HEADER START
6143  *
6144  * The contents of this file are subject to the terms of the
6145  * Common Development and Distribution License, Version 1.0 only
6146  * (the "License").  You may not use this file except in compliance
6147  * with the License.
6148  *
6149  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6150  * or http://www.opensolaris.org/os/licensing.
6151  * See the License for the specific language governing permissions
6152  * and limitations under the License.
6153  *
6154  * When distributing Covered Code, include this CDDL HEADER in each
6155  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6156  * If applicable, add the following below this CDDL HEADER, with the
6157  * fields enclosed by brackets "[]" replaced with your own identifying
6158  * information: Portions Copyright [yyyy] [name of copyright owner]
6159  *
6160  * CDDL HEADER END
6161  */
6162 /*
6163  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6164  *
6165  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6166  * Use is subject to license terms.
6167  */
6168 # 39 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2 3 4
6169 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_limits.h" 1 3 4
6170 /*
6171  * CDDL HEADER START
6172  *
6173  * The contents of this file are subject to the terms of the
6174  * Common Development and Distribution License, Version 1.0 only
6175  * (the "License").  You may not use this file except in compliance
6176  * with the License.
6177  *
6178  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6179  * or http://www.opensolaris.org/os/licensing.
6180  * See the License for the specific language governing permissions
6181  * and limitations under the License.
6182  *
6183  * When distributing Covered Code, include this CDDL HEADER in each
6184  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6185  * If applicable, add the following below this CDDL HEADER, with the
6186  * fields enclosed by brackets "[]" replaced with your own identifying
6187  * information: Portions Copyright [yyyy] [name of copyright owner]
6188  *
6189  * CDDL HEADER END
6190  */
6191 /*
6192  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6193  *
6194  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6195  * Use is subject to license terms.
6196  */
6197 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2 3 4
6198 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_const.h" 1 3 4
6199 /*
6200  * CDDL HEADER START
6201  *
6202  * The contents of this file are subject to the terms of the
6203  * Common Development and Distribution License, Version 1.0 only
6204  * (the "License").  You may not use this file except in compliance
6205  * with the License.
6206  *
6207  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6208  * or http://www.opensolaris.org/os/licensing.
6209  * See the License for the specific language governing permissions
6210  * and limitations under the License.
6211  *
6212  * When distributing Covered Code, include this CDDL HEADER in each
6213  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6214  * If applicable, add the following below this CDDL HEADER, with the
6215  * fields enclosed by brackets "[]" replaced with your own identifying
6216  * information: Portions Copyright [yyyy] [name of copyright owner]
6217  *
6218  * CDDL HEADER END
6219  */
6220 /*
6221  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6222  *
6223  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
6224  * Use is subject to license terms.
6225  */
6226 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stdint.h" 2 3 4
6227 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 2 3 4
6228 
6229 
6230 
6231 
6232 
6233 
6234 /* Inclusion of <stddef.h> breaks namespace, therefore define wchar_t */
6235 
6236 /*
6237  * wchar_t is a built-in type in standard C++ and as such is not
6238  * defined here when using standard C++. However, the GNU compiler
6239  * fixincludes utility nonetheless creates its own version of this
6240  * header for use by gcc and g++. In that version it adds a redundant
6241  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
6242  * header we need to include the following magic comment:
6243  *
6244  * we must use the C++ compiler's type
6245  *
6246  * The above comment should not be removed or changed until GNU
6247  * gcc/fixinc/inclhack.def is updated to bypass this header.
6248  */
6249 # 81 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 3 4
6250 typedef struct {
6251  intmax_t quot;
6252  intmax_t rem;
6253 } imaxdiv_t;
6254 # 108 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/inttypes.h" 3 4
6255 extern intmax_t imaxabs(intmax_t);
6256 extern imaxdiv_t imaxdiv(intmax_t, intmax_t);
6257 extern intmax_t strtoimax(const char *, char **,
6258  int);
6259 extern uintmax_t strtoumax(const char *, char **,
6260  int);
6261 extern intmax_t wcstoimax(const wchar_t *,
6262  wchar_t **, int);
6263 extern uintmax_t wcstoumax(const wchar_t *,
6264  wchar_t **, int);
6265 # 302 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdlib.h" 2 3 4
6266 extern uint32_t arc4random(void);
6267 extern void arc4random_buf(void *, size_t);
6268 extern uint32_t arc4random_uniform(uint32_t);
6269 extern void freezero(void *, size_t);
6270 extern void *recallocarray(void *, size_t, size_t, size_t);
6271 # 121 "/usr/include/openssl/crypto.h" 2 3 4
6272 
6273 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
6274 /* e_os2.h */
6275 /* ====================================================================
6276  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
6277  *
6278  * Redistribution and use in source and binary forms, with or without
6279  * modification, are permitted provided that the following conditions
6280  * are met:
6281  *
6282  * 1. Redistributions of source code must retain the above copyright
6283  *    notice, this list of conditions and the following disclaimer.
6284  *
6285  * 2. Redistributions in binary form must reproduce the above copyright
6286  *    notice, this list of conditions and the following disclaimer in
6287  *    the documentation and/or other materials provided with the
6288  *    distribution.
6289  *
6290  * 3. All advertising materials mentioning features or use of this
6291  *    software must display the following acknowledgment:
6292  *    "This product includes software developed by the OpenSSL Project
6293  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
6294  *
6295  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
6296  *    endorse or promote products derived from this software without
6297  *    prior written permission. For written permission, please contact
6298  *    openssl-core@openssl.org.
6299  *
6300  * 5. Products derived from this software may not be called "OpenSSL"
6301  *    nor may "OpenSSL" appear in their names without prior written
6302  *    permission of the OpenSSL Project.
6303  *
6304  * 6. Redistributions of any form whatsoever must retain the following
6305  *    acknowledgment:
6306  *    "This product includes software developed by the OpenSSL Project
6307  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
6308  *
6309  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
6310  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6311  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
6312  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
6313  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6314  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
6315  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6316  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6317  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
6318  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6319  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
6320  * OF THE POSSIBILITY OF SUCH DAMAGE.
6321  * ====================================================================
6322  *
6323  * This product includes cryptographic software written by Eric Young
6324  * (eay@cryptsoft.com).  This product includes software written by Tim
6325  * Hudson (tjh@cryptsoft.com).
6326  *
6327  */
6328 
6329 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
6330 /* opensslconf.h */
6331 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
6332 
6333 
6334 
6335 
6336 /* OpenSSL was configured with the following options: */
6337 # 108 "/usr/include/openssl/opensslconf.h" 3 4
6338 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
6339    asks for it.  This is a transient feature that is provided for those
6340    who haven't had the time to do the appropriate changes in their
6341    applications.  */
6342 # 204 "/usr/include/openssl/opensslconf.h" 3 4
6343 /* crypto/opensslconf.h.in */
6344 
6345 /* Generate 80386 code? */
6346 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
6347 # 123 "/usr/include/openssl/crypto.h" 2 3 4
6348 
6349 
6350 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
6351 /*
6352  * CDDL HEADER START
6353  *
6354  * The contents of this file are subject to the terms of the
6355  * Common Development and Distribution License (the "License").
6356  * You may not use this file except in compliance with the License.
6357  *
6358  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6359  * or http://www.opensolaris.org/os/licensing.
6360  * See the License for the specific language governing permissions
6361  * and limitations under the License.
6362  *
6363  * When distributing Covered Code, include this CDDL HEADER in each
6364  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6365  * If applicable, add the following below this CDDL HEADER, with the
6366  * fields enclosed by brackets "[]" replaced with your own identifying
6367  * information: Portions Copyright [yyyy] [name of copyright owner]
6368  *
6369  * CDDL HEADER END
6370  */
6371 
6372 /*
6373  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
6374  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
6375  */
6376 
6377 /*	Copyright (c) 1988 AT&T	*/
6378 /*	  All Rights Reserved  	*/
6379 
6380 /*
6381  * User-visible pieces of the ANSI C standard I/O package.
6382  */
6383 # 126 "/usr/include/openssl/crypto.h" 2 3 4
6384 
6385 
6386 # 1 "/usr/include/openssl/stack.h" 1 3 4
6387 /* crypto/stack/stack.h */
6388 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
6389  * All rights reserved.
6390  *
6391  * This package is an SSL implementation written
6392  * by Eric Young (eay@cryptsoft.com).
6393  * The implementation was written so as to conform with Netscapes SSL.
6394  *
6395  * This library is free for commercial and non-commercial use as long as
6396  * the following conditions are aheared to.  The following conditions
6397  * apply to all code found in this distribution, be it the RC4, RSA,
6398  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
6399  * included with this distribution is covered by the same copyright terms
6400  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
6401  *
6402  * Copyright remains Eric Young's, and as such any Copyright notices in
6403  * the code are not to be removed.
6404  * If this package is used in a product, Eric Young should be given attribution
6405  * as the author of the parts of the library used.
6406  * This can be in the form of a textual message at program startup or
6407  * in documentation (online or textual) provided with the package.
6408  *
6409  * Redistribution and use in source and binary forms, with or without
6410  * modification, are permitted provided that the following conditions
6411  * are met:
6412  * 1. Redistributions of source code must retain the copyright
6413  *    notice, this list of conditions and the following disclaimer.
6414  * 2. Redistributions in binary form must reproduce the above copyright
6415  *    notice, this list of conditions and the following disclaimer in the
6416  *    documentation and/or other materials provided with the distribution.
6417  * 3. All advertising materials mentioning features or use of this software
6418  *    must display the following acknowledgement:
6419  *    "This product includes cryptographic software written by
6420  *     Eric Young (eay@cryptsoft.com)"
6421  *    The word 'cryptographic' can be left out if the rouines from the library
6422  *    being used are not cryptographic related :-).
6423  * 4. If you include any Windows specific code (or a derivative thereof) from
6424  *    the apps directory (application code) you must include an acknowledgement:
6425  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
6426  *
6427  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
6428  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6429  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
6430  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
6431  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6432  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
6433  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6434  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
6435  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
6436  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
6437  * SUCH DAMAGE.
6438  *
6439  * The licence and distribution terms for any publically available version or
6440  * derivative of this code cannot be changed.  i.e. this code cannot simply be
6441  * copied and put under another distribution licence
6442  * [including the GNU Public Licence.]
6443  */
6444 # 66 "/usr/include/openssl/stack.h" 3 4
6445 typedef struct stack_st {
6446     int num;
6447     char **data;
6448     int sorted;
6449     int num_alloc;
6450     int (*comp) (const void *, const void *);
6451 } _STACK; /* Use STACK_OF(...) instead */
6452 
6453 
6454 
6455 
6456 int sk_num(const _STACK *);
6457 void *sk_value(const _STACK *, int);
6458 
6459 void *sk_set(_STACK *, int, void *);
6460 
6461 _STACK *sk_new(int (*cmp) (const void *, const void *));
6462 _STACK *sk_new_null(void);
6463 void sk_free(_STACK *);
6464 void sk_pop_free(_STACK *st, void (*func) (void *));
6465 _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *));
6466 int sk_insert(_STACK *sk, void *data, int where);
6467 void *sk_delete(_STACK *st, int loc);
6468 void *sk_delete_ptr(_STACK *st, void *p);
6469 int sk_find(_STACK *st, void *data);
6470 int sk_find_ex(_STACK *st, void *data);
6471 int sk_push(_STACK *st, void *data);
6472 int sk_unshift(_STACK *st, void *data);
6473 void *sk_shift(_STACK *st);
6474 void *sk_pop(_STACK *st);
6475 void sk_zero(_STACK *st);
6476 int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))
6477  (const void *, const void *);
6478 _STACK *sk_dup(_STACK *st);
6479 void sk_sort(_STACK *st);
6480 int sk_is_sorted(const _STACK *st);
6481 # 129 "/usr/include/openssl/crypto.h" 2 3 4
6482 # 1 "/usr/include/openssl/safestack.h" 1 3 4
6483 /* ====================================================================
6484  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
6485  *
6486  * Redistribution and use in source and binary forms, with or without
6487  * modification, are permitted provided that the following conditions
6488  * are met:
6489  *
6490  * 1. Redistributions of source code must retain the above copyright
6491  *    notice, this list of conditions and the following disclaimer.
6492  *
6493  * 2. Redistributions in binary form must reproduce the above copyright
6494  *    notice, this list of conditions and the following disclaimer in
6495  *    the documentation and/or other materials provided with the
6496  *    distribution.
6497  *
6498  * 3. All advertising materials mentioning features or use of this
6499  *    software must display the following acknowledgment:
6500  *    "This product includes software developed by the OpenSSL Project
6501  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
6502  *
6503  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
6504  *    endorse or promote products derived from this software without
6505  *    prior written permission. For written permission, please contact
6506  *    openssl-core@openssl.org.
6507  *
6508  * 5. Products derived from this software may not be called "OpenSSL"
6509  *    nor may "OpenSSL" appear in their names without prior written
6510  *    permission of the OpenSSL Project.
6511  *
6512  * 6. Redistributions of any form whatsoever must retain the following
6513  *    acknowledgment:
6514  *    "This product includes software developed by the OpenSSL Project
6515  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
6516  *
6517  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
6518  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6519  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
6520  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
6521  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6522  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
6523  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6524  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6525  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
6526  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6527  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
6528  * OF THE POSSIBILITY OF SUCH DAMAGE.
6529  * ====================================================================
6530  *
6531  * This product includes cryptographic software written by Eric Young
6532  * (eay@cryptsoft.com).  This product includes software written by Tim
6533  * Hudson (tjh@cryptsoft.com).
6534  *
6535  */
6536 
6537 
6538 
6539 
6540 # 1 "/usr/include/openssl/stack.h" 1 3 4
6541 /* crypto/stack/stack.h */
6542 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
6543  * All rights reserved.
6544  *
6545  * This package is an SSL implementation written
6546  * by Eric Young (eay@cryptsoft.com).
6547  * The implementation was written so as to conform with Netscapes SSL.
6548  *
6549  * This library is free for commercial and non-commercial use as long as
6550  * the following conditions are aheared to.  The following conditions
6551  * apply to all code found in this distribution, be it the RC4, RSA,
6552  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
6553  * included with this distribution is covered by the same copyright terms
6554  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
6555  *
6556  * Copyright remains Eric Young's, and as such any Copyright notices in
6557  * the code are not to be removed.
6558  * If this package is used in a product, Eric Young should be given attribution
6559  * as the author of the parts of the library used.
6560  * This can be in the form of a textual message at program startup or
6561  * in documentation (online or textual) provided with the package.
6562  *
6563  * Redistribution and use in source and binary forms, with or without
6564  * modification, are permitted provided that the following conditions
6565  * are met:
6566  * 1. Redistributions of source code must retain the copyright
6567  *    notice, this list of conditions and the following disclaimer.
6568  * 2. Redistributions in binary form must reproduce the above copyright
6569  *    notice, this list of conditions and the following disclaimer in the
6570  *    documentation and/or other materials provided with the distribution.
6571  * 3. All advertising materials mentioning features or use of this software
6572  *    must display the following acknowledgement:
6573  *    "This product includes cryptographic software written by
6574  *     Eric Young (eay@cryptsoft.com)"
6575  *    The word 'cryptographic' can be left out if the rouines from the library
6576  *    being used are not cryptographic related :-).
6577  * 4. If you include any Windows specific code (or a derivative thereof) from
6578  *    the apps directory (application code) you must include an acknowledgement:
6579  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
6580  *
6581  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
6582  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6583  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
6584  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
6585  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6586  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
6587  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6588  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
6589  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
6590  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
6591  * SUCH DAMAGE.
6592  *
6593  * The licence and distribution terms for any publically available version or
6594  * derivative of this code cannot be changed.  i.e. this code cannot simply be
6595  * copied and put under another distribution licence
6596  * [including the GNU Public Licence.]
6597  */
6598 # 59 "/usr/include/openssl/safestack.h" 2 3 4
6599 # 69 "/usr/include/openssl/safestack.h" 3 4
6600 /*
6601  * In C++ we get problems because an explicit cast is needed from (void *) we
6602  * use CHECKED_STACK_OF to ensure the correct type is passed in the macros
6603  * below.
6604  */
6605 # 102 "/usr/include/openssl/safestack.h" 3 4
6606 /* nada (obsolete in new safestack approach)*/
6607 
6608 
6609 /*-
6610  * Strings are special: normally an lhash entry will point to a single
6611  * (somewhat) mutable object. In the case of strings:
6612  *
6613  * a) Instead of a single char, there is an array of chars, NUL-terminated.
6614  * b) The string may have be immutable.
6615  *
6616  * So, they need their own declarations. Especially important for
6617  * type-checking tools, such as Deputy.
6618  *
6619  * In practice, however, it appears to be hard to have a const
6620  * string. For now, I'm settling for dealing with the fact it is a
6621  * string at all.
6622  */
6623 typedef char *OPENSSL_STRING;
6624 
6625 typedef const char *OPENSSL_CSTRING;
6626 
6627 /*
6628  * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
6629  * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
6630  * above, instead of a single char each entry is a NUL-terminated array of
6631  * chars. So, we have to implement STRING specially for STACK_OF. This is
6632  * dealt with in the autogenerated macros below.
6633  */
6634 
6635 struct stack_st_OPENSSL_STRING { _STACK stack; };
6636 
6637 /*
6638  * Similarly, we sometimes use a block of characters, NOT nul-terminated.
6639  * These should also be distinguished from "normal" stacks.
6640  */
6641 typedef void *OPENSSL_BLOCK;
6642 struct stack_st_OPENSSL_BLOCK { _STACK stack; };
6643 
6644 /*
6645  * SKM_sk_... stack macros are internal to safestack.h: never use them
6646  * directly, use sk_<type>_... instead
6647  */
6648 # 211 "/usr/include/openssl/safestack.h" 3 4
6649 /*
6650  * This block of defines is updated by util/mkstack.pl, please do not touch!
6651  */
6652 # 130 "/usr/include/openssl/crypto.h" 2 3 4
6653 # 1 "/usr/include/openssl/opensslv.h" 1 3 4
6654 
6655 
6656 
6657 
6658 
6659 
6660 
6661 /*-
6662  * Numeric release version identifier:
6663  * MNNFFPPS: major minor fix patch status
6664  * The status nibble has one of the values 0 for development, 1 to e for betas
6665  * 1 to 14, and f for release.  The patch level is exactly that.
6666  * For example:
6667  * 0.9.3-dev      0x00903000
6668  * 0.9.3-beta1    0x00903001
6669  * 0.9.3-beta2-dev 0x00903002
6670  * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)
6671  * 0.9.3          0x0090300f
6672  * 0.9.3a         0x0090301f
6673  * 0.9.4          0x0090400f
6674  * 1.2.3z         0x102031af
6675  *
6676  * For continuity reasons (because 0.9.5 is already out, and is coded
6677  * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level
6678  * part is slightly different, by setting the highest bit.  This means
6679  * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start
6680  * with 0x0090600S...
6681  *
6682  * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
6683  * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
6684  *  major minor fix final patch/beta)
6685  */
6686 # 41 "/usr/include/openssl/opensslv.h" 3 4
6687 /*-
6688  * The macros below are to be used for shared library (.so, .dll, ...)
6689  * versioning.  That kind of versioning works a bit differently between
6690  * operating systems.  The most usual scheme is to set a major and a minor
6691  * number, and have the runtime loader check that the major number is equal
6692  * to what it was at application link time, while the minor number has to
6693  * be greater or equal to what it was at application link time.  With this
6694  * scheme, the version number is usually part of the file name, like this:
6695  *
6696  *      libcrypto.so.0.9
6697  *
6698  * Some unixen also make a softlink with the major verson number only:
6699  *
6700  *      libcrypto.so.0
6701  *
6702  * On Tru64 and IRIX 6.x it works a little bit differently.  There, the
6703  * shared library version is stored in the file, and is actually a series
6704  * of versions, separated by colons.  The rightmost version present in the
6705  * library when linking an application is stored in the application to be
6706  * matched at run time.  When the application is run, a check is done to
6707  * see if the library version stored in the application matches any of the
6708  * versions in the version string of the library itself.
6709  * This version string can be constructed in any way, depending on what
6710  * kind of matching is desired.  However, to implement the same scheme as
6711  * the one used in the other unixen, all compatible versions, from lowest
6712  * to highest, should be part of the string.  Consecutive builds would
6713  * give the following versions strings:
6714  *
6715  *      3.0
6716  *      3.0:3.1
6717  *      3.0:3.1:3.2
6718  *      4.0
6719  *      4.0:4.1
6720  *
6721  * Notice how version 4 is completely incompatible with version, and
6722  * therefore give the breach you can see.
6723  *
6724  * There may be other schemes as well that I haven't yet discovered.
6725  *
6726  * So, here's the way it works here: first of all, the library version
6727  * number doesn't need at all to match the overall OpenSSL version.
6728  * However, it's nice and more understandable if it actually does.
6729  * The current library version is stored in the macro SHLIB_VERSION_NUMBER,
6730  * which is just a piece of text in the format "M.m.e" (Major, minor, edit).
6731  * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,
6732  * we need to keep a history of version numbers, which is done in the
6733  * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and
6734  * should only keep the versions that are binary compatible with the current.
6735  */
6736 # 131 "/usr/include/openssl/crypto.h" 2 3 4
6737 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
6738 /* ====================================================================
6739  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
6740  *
6741  * Redistribution and use in source and binary forms, with or without
6742  * modification, are permitted provided that the following conditions
6743  * are met:
6744  *
6745  * 1. Redistributions of source code must retain the above copyright
6746  *    notice, this list of conditions and the following disclaimer.
6747  *
6748  * 2. Redistributions in binary form must reproduce the above copyright
6749  *    notice, this list of conditions and the following disclaimer in
6750  *    the documentation and/or other materials provided with the
6751  *    distribution.
6752  *
6753  * 3. All advertising materials mentioning features or use of this
6754  *    software must display the following acknowledgment:
6755  *    "This product includes software developed by the OpenSSL Project
6756  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
6757  *
6758  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
6759  *    endorse or promote products derived from this software without
6760  *    prior written permission. For written permission, please contact
6761  *    openssl-core@openssl.org.
6762  *
6763  * 5. Products derived from this software may not be called "OpenSSL"
6764  *    nor may "OpenSSL" appear in their names without prior written
6765  *    permission of the OpenSSL Project.
6766  *
6767  * 6. Redistributions of any form whatsoever must retain the following
6768  *    acknowledgment:
6769  *    "This product includes software developed by the OpenSSL Project
6770  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
6771  *
6772  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
6773  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6774  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
6775  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
6776  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6777  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
6778  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6779  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6780  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
6781  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6782  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
6783  * OF THE POSSIBILITY OF SUCH DAMAGE.
6784  * ====================================================================
6785  *
6786  * This product includes cryptographic software written by Eric Young
6787  * (eay@cryptsoft.com).  This product includes software written by Tim
6788  * Hudson (tjh@cryptsoft.com).
6789  *
6790  */
6791 # 62 "/usr/include/openssl/ossl_typ.h" 3 4
6792 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
6793 /* e_os2.h */
6794 /* ====================================================================
6795  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
6796  *
6797  * Redistribution and use in source and binary forms, with or without
6798  * modification, are permitted provided that the following conditions
6799  * are met:
6800  *
6801  * 1. Redistributions of source code must retain the above copyright
6802  *    notice, this list of conditions and the following disclaimer.
6803  *
6804  * 2. Redistributions in binary form must reproduce the above copyright
6805  *    notice, this list of conditions and the following disclaimer in
6806  *    the documentation and/or other materials provided with the
6807  *    distribution.
6808  *
6809  * 3. All advertising materials mentioning features or use of this
6810  *    software must display the following acknowledgment:
6811  *    "This product includes software developed by the OpenSSL Project
6812  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
6813  *
6814  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
6815  *    endorse or promote products derived from this software without
6816  *    prior written permission. For written permission, please contact
6817  *    openssl-core@openssl.org.
6818  *
6819  * 5. Products derived from this software may not be called "OpenSSL"
6820  *    nor may "OpenSSL" appear in their names without prior written
6821  *    permission of the OpenSSL Project.
6822  *
6823  * 6. Redistributions of any form whatsoever must retain the following
6824  *    acknowledgment:
6825  *    "This product includes software developed by the OpenSSL Project
6826  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
6827  *
6828  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
6829  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6830  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
6831  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
6832  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
6833  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
6834  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6835  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6836  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
6837  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6838  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
6839  * OF THE POSSIBILITY OF SUCH DAMAGE.
6840  * ====================================================================
6841  *
6842  * This product includes cryptographic software written by Eric Young
6843  * (eay@cryptsoft.com).  This product includes software written by Tim
6844  * Hudson (tjh@cryptsoft.com).
6845  *
6846  */
6847 
6848 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
6849 /* opensslconf.h */
6850 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
6851 
6852 
6853 
6854 
6855 /* OpenSSL was configured with the following options: */
6856 # 108 "/usr/include/openssl/opensslconf.h" 3 4
6857 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
6858    asks for it.  This is a transient feature that is provided for those
6859    who haven't had the time to do the appropriate changes in their
6860    applications.  */
6861 # 204 "/usr/include/openssl/opensslconf.h" 3 4
6862 /* crypto/opensslconf.h.in */
6863 
6864 /* Generate 80386 code? */
6865 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
6866 # 63 "/usr/include/openssl/ossl_typ.h" 2 3 4
6867 # 83 "/usr/include/openssl/ossl_typ.h" 3 4
6868 typedef struct asn1_string_st ASN1_INTEGER;
6869 typedef struct asn1_string_st ASN1_ENUMERATED;
6870 typedef struct asn1_string_st ASN1_BIT_STRING;
6871 typedef struct asn1_string_st ASN1_OCTET_STRING;
6872 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
6873 typedef struct asn1_string_st ASN1_T61STRING;
6874 typedef struct asn1_string_st ASN1_IA5STRING;
6875 typedef struct asn1_string_st ASN1_GENERALSTRING;
6876 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
6877 typedef struct asn1_string_st ASN1_BMPSTRING;
6878 typedef struct asn1_string_st ASN1_UTCTIME;
6879 typedef struct asn1_string_st ASN1_TIME;
6880 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
6881 typedef struct asn1_string_st ASN1_VISIBLESTRING;
6882 typedef struct asn1_string_st ASN1_UTF8STRING;
6883 typedef struct asn1_string_st ASN1_STRING;
6884 typedef int ASN1_BOOLEAN;
6885 typedef int ASN1_NULL;
6886 
6887 
6888 typedef struct asn1_object_st ASN1_OBJECT;
6889 
6890 typedef struct ASN1_ITEM_st ASN1_ITEM;
6891 typedef struct asn1_pctx_st ASN1_PCTX;
6892 # 120 "/usr/include/openssl/ossl_typ.h" 3 4
6893 typedef struct bignum_st BIGNUM;
6894 typedef struct bignum_ctx BN_CTX;
6895 typedef struct bn_blinding_st BN_BLINDING;
6896 typedef struct bn_mont_ctx_st BN_MONT_CTX;
6897 typedef struct bn_recp_ctx_st BN_RECP_CTX;
6898 typedef struct bn_gencb_st BN_GENCB;
6899 
6900 typedef struct buf_mem_st BUF_MEM;
6901 
6902 typedef struct evp_cipher_st EVP_CIPHER;
6903 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
6904 typedef struct env_md_st EVP_MD;
6905 typedef struct env_md_ctx_st EVP_MD_CTX;
6906 typedef struct evp_pkey_st EVP_PKEY;
6907 
6908 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
6909 
6910 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
6911 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
6912 
6913 typedef struct dh_st DH;
6914 typedef struct dh_method DH_METHOD;
6915 
6916 typedef struct dsa_st DSA;
6917 typedef struct dsa_method DSA_METHOD;
6918 
6919 typedef struct rsa_st RSA;
6920 typedef struct rsa_meth_st RSA_METHOD;
6921 
6922 typedef struct rand_meth_st RAND_METHOD;
6923 
6924 typedef struct ecdh_method ECDH_METHOD;
6925 typedef struct ecdsa_method ECDSA_METHOD;
6926 
6927 typedef struct x509_st X509;
6928 typedef struct X509_algor_st X509_ALGOR;
6929 typedef struct X509_crl_st X509_CRL;
6930 typedef struct x509_crl_method_st X509_CRL_METHOD;
6931 typedef struct x509_revoked_st X509_REVOKED;
6932 typedef struct X509_name_st X509_NAME;
6933 typedef struct X509_pubkey_st X509_PUBKEY;
6934 typedef struct x509_store_st X509_STORE;
6935 typedef struct x509_store_ctx_st X509_STORE_CTX;
6936 
6937 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
6938 
6939 typedef struct v3_ext_ctx X509V3_CTX;
6940 typedef struct conf_st CONF;
6941 
6942 typedef struct store_st STORE;
6943 typedef struct store_method_st STORE_METHOD;
6944 
6945 typedef struct ui_st UI;
6946 typedef struct ui_method_st UI_METHOD;
6947 
6948 typedef struct st_ERR_FNS ERR_FNS;
6949 
6950 typedef struct engine_st ENGINE;
6951 typedef struct ssl_st SSL;
6952 typedef struct ssl_ctx_st SSL_CTX;
6953 
6954 typedef struct comp_method_st COMP_METHOD;
6955 
6956 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
6957 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
6958 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
6959 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
6960 
6961 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
6962 typedef struct DIST_POINT_st DIST_POINT;
6963 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
6964 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
6965 
6966   /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */
6967 
6968 
6969 
6970 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
6971 /* Callback types for crypto.h */
6972 typedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
6973                            int idx, long argl, void *argp);
6974 typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
6975                              int idx, long argl, void *argp);
6976 typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,
6977                            void *from_d, int idx, long argl, void *argp);
6978 
6979 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
6980 typedef struct ocsp_response_st OCSP_RESPONSE;
6981 typedef struct ocsp_responder_id_st OCSP_RESPID;
6982 # 132 "/usr/include/openssl/crypto.h" 2 3 4
6983 
6984 
6985 
6986 
6987 
6988 /*
6989  * Resolve problems on some operating systems with symbol names that clash
6990  * one way or another
6991  */
6992 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
6993 /* ====================================================================
6994  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
6995  *
6996  * Redistribution and use in source and binary forms, with or without
6997  * modification, are permitted provided that the following conditions
6998  * are met:
6999  *
7000  * 1. Redistributions of source code must retain the above copyright
7001  *    notice, this list of conditions and the following disclaimer.
7002  *
7003  * 2. Redistributions in binary form must reproduce the above copyright
7004  *    notice, this list of conditions and the following disclaimer in
7005  *    the documentation and/or other materials provided with the
7006  *    distribution.
7007  *
7008  * 3. All advertising materials mentioning features or use of this
7009  *    software must display the following acknowledgment:
7010  *    "This product includes software developed by the OpenSSL Project
7011  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7012  *
7013  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7014  *    endorse or promote products derived from this software without
7015  *    prior written permission. For written permission, please contact
7016  *    openssl-core@openssl.org.
7017  *
7018  * 5. Products derived from this software may not be called "OpenSSL"
7019  *    nor may "OpenSSL" appear in their names without prior written
7020  *    permission of the OpenSSL Project.
7021  *
7022  * 6. Redistributions of any form whatsoever must retain the following
7023  *    acknowledgment:
7024  *    "This product includes software developed by the OpenSSL Project
7025  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7026  *
7027  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7028  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7029  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7030  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7031  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7032  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7033  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7034  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7035  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7036  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7037  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7038  * OF THE POSSIBILITY OF SUCH DAMAGE.
7039  * ====================================================================
7040  *
7041  * This product includes cryptographic software written by Eric Young
7042  * (eay@cryptsoft.com).  This product includes software written by Tim
7043  * Hudson (tjh@cryptsoft.com).
7044  *
7045  */
7046 
7047 
7048 
7049 
7050 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
7051 /* e_os2.h */
7052 /* ====================================================================
7053  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
7054  *
7055  * Redistribution and use in source and binary forms, with or without
7056  * modification, are permitted provided that the following conditions
7057  * are met:
7058  *
7059  * 1. Redistributions of source code must retain the above copyright
7060  *    notice, this list of conditions and the following disclaimer.
7061  *
7062  * 2. Redistributions in binary form must reproduce the above copyright
7063  *    notice, this list of conditions and the following disclaimer in
7064  *    the documentation and/or other materials provided with the
7065  *    distribution.
7066  *
7067  * 3. All advertising materials mentioning features or use of this
7068  *    software must display the following acknowledgment:
7069  *    "This product includes software developed by the OpenSSL Project
7070  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
7071  *
7072  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
7073  *    endorse or promote products derived from this software without
7074  *    prior written permission. For written permission, please contact
7075  *    openssl-core@openssl.org.
7076  *
7077  * 5. Products derived from this software may not be called "OpenSSL"
7078  *    nor may "OpenSSL" appear in their names without prior written
7079  *    permission of the OpenSSL Project.
7080  *
7081  * 6. Redistributions of any form whatsoever must retain the following
7082  *    acknowledgment:
7083  *    "This product includes software developed by the OpenSSL Project
7084  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
7085  *
7086  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
7087  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7088  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7089  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
7090  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7091  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
7092  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7093  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7094  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
7095  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7096  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7097  * OF THE POSSIBILITY OF SUCH DAMAGE.
7098  * ====================================================================
7099  *
7100  * This product includes cryptographic software written by Eric Young
7101  * (eay@cryptsoft.com).  This product includes software written by Tim
7102  * Hudson (tjh@cryptsoft.com).
7103  *
7104  */
7105 
7106 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
7107 /* opensslconf.h */
7108 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
7109 
7110 
7111 
7112 
7113 /* OpenSSL was configured with the following options: */
7114 # 108 "/usr/include/openssl/opensslconf.h" 3 4
7115 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
7116    asks for it.  This is a transient feature that is provided for those
7117    who haven't had the time to do the appropriate changes in their
7118    applications.  */
7119 # 204 "/usr/include/openssl/opensslconf.h" 3 4
7120 /* crypto/opensslconf.h.in */
7121 
7122 /* Generate 80386 code? */
7123 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
7124 # 59 "/usr/include/openssl/symhacks.h" 2 3 4
7125 
7126 /*
7127  * Hacks to solve the problem with linkers incapable of handling very long
7128  * symbol names.  In the case of VMS, the limit is 31 characters on VMS for
7129  * VAX.
7130  */
7131 /*
7132  * Note that this affects util/libeay.num and util/ssleay.num...  you may
7133  * change those manually, but that's not recommended, as those files are
7134  * controlled centrally and updated on Unix, and the central definition may
7135  * disagree with yours, which in turn may come with shareable library
7136  * incompatibilities.
7137  */
7138 # 481 "/usr/include/openssl/symhacks.h" 3 4
7139 /* Case insensitive linking causes problems.... */
7140 # 142 "/usr/include/openssl/crypto.h" 2 3 4
7141 
7142 
7143 
7144 
7145 
7146 /* Backward compatibility to SSLeay */
7147 /*
7148  * This is more to be used to check the correct DLL is being used in the MS
7149  * world.
7150  */
7151 
7152 
7153 /* #define SSLEAY_OPTIONS       1 no longer supported */
7154 
7155 
7156 
7157 
7158 
7159 /* Already declared in ossl_typ.h */
7160 # 174 "/usr/include/openssl/crypto.h" 3 4
7161 /* A generic structure to pass assorted data in a expandable way */
7162 typedef struct openssl_item_st {
7163     int code;
7164     void *value; /* Not used for flag attributes */
7165     size_t value_size; /* Max size of value for output, length for
7166                                  * input */
7167     size_t *value_length; /* Returned length of value for output */
7168 } OPENSSL_ITEM;
7169 
7170 /*
7171  * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
7172  * names in cryptlib.c
7173  */
7174 # 256 "/usr/include/openssl/crypto.h" 3 4
7175 /*
7176  * Some applications as well as some parts of OpenSSL need to allocate and
7177  * deallocate locks in a dynamic fashion.  The following typedef makes this
7178  * possible in a type-safe manner.
7179  */
7180 /* struct CRYPTO_dynlock_value has to be defined by the application. */
7181 typedef struct {
7182     int references;
7183     struct CRYPTO_dynlock_value *data;
7184 } CRYPTO_dynlock;
7185 
7186 /*
7187  * The following can be used to detect memory leaks in the SSLeay library. It
7188  * used, it turns on malloc checking
7189  */
7190 
7191 
7192 
7193 
7194 
7195 
7196 /*
7197  * The following are bit values to turn on or off options connected to the
7198  * malloc checking functionality
7199  */
7200 
7201 /* Adds time to the memory checking information */
7202 
7203 /* Adds thread number to the memory checking information */
7204 
7205 
7206 
7207 
7208 /* predec of the BIO type */
7209 typedef struct bio_st BIO_dummy;
7210 
7211 struct crypto_ex_data_st {
7212     struct stack_st_void *sk;
7213     /* gcc is screwing up this data structure :-( */
7214     int dummy;
7215 };
7216 struct stack_st_void { _STACK stack; };
7217 
7218 /*
7219  * This stuff is basically class callback functions The current classes are
7220  * SSL_CTX, SSL, SSL_SESSION, and a few more
7221  */
7222 
7223 typedef struct crypto_ex_data_func_st {
7224     long argl; /* Arbitary long */
7225     void *argp; /* Arbitary void * */
7226     CRYPTO_EX_new *new_func;
7227     CRYPTO_EX_free *free_func;
7228     CRYPTO_EX_dup *dup_func;
7229 } CRYPTO_EX_DATA_FUNCS;
7230 
7231 struct stack_st_CRYPTO_EX_DATA_FUNCS { _STACK stack; };
7232 
7233 /*
7234  * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
7235  * entry.
7236  */
7237 # 336 "/usr/include/openssl/crypto.h" 3 4
7238 /*
7239  * Dynamically assigned indexes start from this value (don't use directly,
7240  * use via CRYPTO_ex_data_new_class).
7241  */
7242 
7243 
7244 /*
7245  * This is the default callbacks, but we can have others as well: this is
7246  * needed in Win32 where the application malloc and the library malloc may
7247  * not be the same.
7248  */
7249 # 356 "/usr/include/openssl/crypto.h" 3 4
7250 /*
7251  * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG
7252  * is defined)
7253  */
7254 # 369 "/usr/include/openssl/crypto.h" 3 4
7255 int CRYPTO_mem_ctrl(int mode);
7256 int CRYPTO_is_mem_check_on(void);
7257 
7258 /* for applications */
7259 
7260 
7261 
7262 /* for library-internal use */
7263 # 396 "/usr/include/openssl/crypto.h" 3 4
7264 const char *SSLeay_version(int type);
7265 unsigned long SSLeay(void);
7266 
7267 int OPENSSL_issetugid(void);
7268 
7269 /* An opaque type representing an implementation of "ex_data" support */
7270 typedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;
7271 /* Return an opaque pointer to the current "ex_data" implementation */
7272 const CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);
7273 /* Sets the "ex_data" implementation to be used (if it's not too late) */
7274 int CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);
7275 /* Get a new "ex_data" class, and return the corresponding "class_index" */
7276 int CRYPTO_ex_data_new_class(void);
7277 /* Within a given class, get/register a new index */
7278 int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
7279                             CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
7280                             CRYPTO_EX_free *free_func);
7281 /*
7282  * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
7283  * given class (invokes whatever per-class callbacks are applicable)
7284  */
7285 int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
7286 int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
7287                        CRYPTO_EX_DATA *from);
7288 void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
7289 /*
7290  * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
7291  * index (relative to the class type involved)
7292  */
7293 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
7294 void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
7295 /*
7296  * This function cleans up all "ex_data" state. It mustn't be called under
7297  * potential race-conditions.
7298  */
7299 void CRYPTO_cleanup_all_ex_data(void);
7300 
7301 int CRYPTO_get_new_lockid(char *name);
7302 
7303 int CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
7304 void CRYPTO_lock(int mode, int type, const char *file, int line);
7305 void CRYPTO_set_locking_callback(void (*func) (int mode, int type,
7306                                                const char *file, int line));
7307 void (*CRYPTO_get_locking_callback(void)) (int mode, int type,
7308                                            const char *file, int line);
7309 void CRYPTO_set_add_lock_callback(int (*func)
7310                                    (int *num, int mount, int type,
7311                                     const char *file, int line));
7312 int (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,
7313                                            const char *file, int line);
7314 
7315 /* Don't use this structure directly. */
7316 typedef struct crypto_threadid_st {
7317     void *ptr;
7318     unsigned long val;
7319 } CRYPTO_THREADID;
7320 /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
7321 void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);
7322 void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);
7323 int CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));
7324 void (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);
7325 void CRYPTO_THREADID_current(CRYPTO_THREADID *id);
7326 int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);
7327 void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);
7328 unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);
7329 
7330 void CRYPTO_set_id_callback(unsigned long (*func) (void));
7331 unsigned long (*CRYPTO_get_id_callback(void)) (void);
7332 unsigned long CRYPTO_thread_id(void);
7333 
7334 
7335 const char *CRYPTO_get_lock_name(int type);
7336 int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
7337                     int line);
7338 
7339 int CRYPTO_get_new_dynlockid(void);
7340 void CRYPTO_destroy_dynlockid(int i);
7341 struct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
7342 void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value
7343                                         *(*dyn_create_function) (const char
7344                                                                  *file,
7345                                                                  int line));
7346 void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)
7347                                        (int mode,
7348                                         struct CRYPTO_dynlock_value *l,
7349                                         const char *file, int line));
7350 void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)
7351                                           (struct CRYPTO_dynlock_value *l,
7352                                            const char *file, int line));
7353 struct CRYPTO_dynlock_value
7354 *(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);
7355 void (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,
7356                                                 struct CRYPTO_dynlock_value
7357                                                 *l, const char *file,
7358                                                 int line);
7359 void (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value
7360                                                    *l, const char *file,
7361                                                    int line);
7362 
7363 /*
7364  * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call
7365  * the latter last if you need different functions
7366  */
7367 int CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),
7368                              void (*f) (void *));
7369 int CRYPTO_set_locked_mem_functions(void *(*m) (size_t),
7370                                     void (*free_func) (void *));
7371 int CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),
7372                                 void *(*r) (void *, size_t, const char *,
7373                                             int), void (*f) (void *));
7374 int CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),
7375                                        void (*free_func) (void *));
7376 int CRYPTO_set_mem_debug_functions(void (*m)
7377                                     (void *, int, const char *, int, int),
7378                                    void (*r) (void *, void *, int,
7379                                               const char *, int, int),
7380                                    void (*f) (void *, int), void (*so) (long),
7381                                    long (*go) (void));
7382 void CRYPTO_get_mem_functions(void *(**m) (size_t),
7383                               void *(**r) (void *, size_t),
7384                               void (**f) (void *));
7385 void CRYPTO_get_locked_mem_functions(void *(**m) (size_t),
7386                                      void (**f) (void *));
7387 void CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),
7388                                  void *(**r) (void *, size_t, const char *,
7389                                               int), void (**f) (void *));
7390 void CRYPTO_get_locked_mem_ex_functions(void
7391                                         *(**m) (size_t, const char *, int),
7392                                         void (**f) (void *));
7393 void CRYPTO_get_mem_debug_functions(void (**m)
7394                                      (void *, int, const char *, int, int),
7395                                     void (**r) (void *, void *, int,
7396                                                 const char *, int, int),
7397                                     void (**f) (void *, int),
7398                                     void (**so) (long), long (**go) (void));
7399 
7400 void *CRYPTO_malloc_locked(int num, const char *file, int line);
7401 void CRYPTO_free_locked(void *ptr);
7402 void *CRYPTO_malloc(int num, const char *file, int line);
7403 char *CRYPTO_strdup(const char *str, const char *file, int line);
7404 void CRYPTO_free(void *ptr);
7405 void *CRYPTO_realloc(void *addr, int num, const char *file, int line);
7406 void *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,
7407                            int line);
7408 void *CRYPTO_remalloc(void *addr, int num, const char *file, int line);
7409 
7410 void OPENSSL_cleanse(void *ptr, size_t len);
7411 
7412 void CRYPTO_set_mem_debug_options(long bits);
7413 long CRYPTO_get_mem_debug_options(void);
7414 
7415 
7416 
7417 int CRYPTO_push_info_(const char *info, const char *file, int line);
7418 int CRYPTO_pop_info(void);
7419 int CRYPTO_remove_all_info(void);
7420 
7421 /*
7422  * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;
7423  * used as default in CRYPTO_MDEBUG compilations):
7424  */
7425 /*-
7426  * The last argument has the following significance:
7427  *
7428  * 0:   called before the actual memory allocation has taken place
7429  * 1:   called after the actual memory allocation has taken place
7430  */
7431 void CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
7432                        int before_p);
7433 void CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,
7434                         int line, int before_p);
7435 void CRYPTO_dbg_free(void *addr, int before_p);
7436 /*-
7437  * Tell the debugging code about options.  By default, the following values
7438  * apply:
7439  *
7440  * 0:                           Clear all options.
7441  * V_CRYPTO_MDEBUG_TIME (1):    Set the "Show Time" option.
7442  * V_CRYPTO_MDEBUG_THREAD (2):  Set the "Show Thread Number" option.
7443  * V_CRYPTO_MDEBUG_ALL (3):     1 + 2
7444  */
7445 void CRYPTO_dbg_set_options(long bits);
7446 long CRYPTO_dbg_get_options(void);
7447 
7448 
7449 void CRYPTO_mem_leaks_fp(FILE *);
7450 
7451 void CRYPTO_mem_leaks(struct bio_st *bio);
7452 /* unsigned long order, char *file, int line, int num_bytes, char *addr */
7453 typedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,
7454                                   void *);
7455 void CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
7456 
7457 /* die if we have to */
7458 void OpenSSLDie(const char *file, int line, const char *assertion);
7459 
7460 
7461 unsigned long *OPENSSL_ia32cap_loc(void);
7462 
7463 int OPENSSL_isservice(void);
7464 
7465 int FIPS_mode(void);
7466 int FIPS_mode_set(int r);
7467 
7468 void OPENSSL_init(void);
7469 # 624 "/usr/include/openssl/crypto.h" 3 4
7470 /*
7471  * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
7472  * It takes an amount of time dependent on |len|, but independent of the
7473  * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
7474  * into a defined order as the return value when a != b is undefined, other
7475  * than to be non-zero.
7476  */
7477 int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
7478 
7479 /* BEGIN ERROR CODES */
7480 /*
7481  * The following lines are auto generated by the script mkerr.pl. Any changes
7482  * made after this point may be overwritten when the script is next run.
7483  */
7484 void ERR_load_CRYPTO_strings(void);
7485 
7486 /* Error codes for the CRYPTO functions. */
7487 
7488 /* Function codes. */
7489 # 654 "/usr/include/openssl/crypto.h" 3 4
7490 /* Reason codes. */
7491 # 70 "/usr/include/openssl/bio.h" 2 3 4
7492 # 83 "/usr/include/openssl/bio.h" 3 4
7493 /* These are the 'types' of BIOs */
7494 # 116 "/usr/include/openssl/bio.h" 3 4
7495 /*
7496  * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
7497  * BIO_set_fp(in,stdin,BIO_NOCLOSE);
7498  */
7499 
7500 
7501 
7502 /*
7503  * These are used in the following macros and are passed to BIO_ctrl()
7504  */
7505 # 139 "/usr/include/openssl/bio.h" 3 4
7506 /* callback is int cb(BIO *bio,state,ret); */
7507 
7508 
7509 
7510 
7511 
7512 /* dgram BIO stuff */
7513 # 157 "/usr/include/openssl/bio.h" 3 4
7514 /* #ifdef IP_MTU_DISCOVER */
7515 
7516 /* #endif */
7517 # 196 "/usr/include/openssl/bio.h" 3 4
7518 /* modifiers */
7519 # 208 "/usr/include/openssl/bio.h" 3 4
7520 /*
7521  * "UPLINK" flag denotes file descriptors provided by application. It
7522  * defaults to 0, as most platforms don't require UPLINK interface.
7523  */
7524 
7525 
7526 
7527 /* Used in BIO_gethostbyname() */
7528 
7529 
7530 
7531 
7532 
7533 
7534 /* Mostly used in the SSL BIO */
7535 /*-
7536  * Not used anymore
7537  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
7538  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
7539  * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40
7540  */
7541 
7542 
7543 
7544 /*
7545  * This is used with memory BIOs: it means we shouldn't free up or change the
7546  * data in any way.
7547  */
7548 
7549 
7550 typedef struct bio_st BIO;
7551 
7552 void BIO_set_flags(BIO *b, int flags);
7553 int BIO_test_flags(const BIO *b, int flags);
7554 void BIO_clear_flags(BIO *b, int flags);
7555 # 252 "/usr/include/openssl/bio.h" 3 4
7556 /* These are normally used internally in BIOs */
7557 
7558 
7559 
7560 
7561 
7562 /* These should be used by the application to tell why we should retry */
7563 
7564 
7565 
7566 
7567 
7568 
7569 /*
7570  * The next three are used in conjunction with the BIO_should_io_special()
7571  * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
7572  * *reason); will walk the BIO stack and return the 'reason' for the special
7573  * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
7574  * the code.
7575  */
7576 /*
7577  * Returned from the SSL bio when the certificate retrieval code had an error
7578  */
7579 
7580 /* Returned from the connect BIO when a connect would have blocked */
7581 
7582 /* Returned from the accept BIO when an accept would have blocked */
7583 
7584 
7585 /* These are passed by the BIO callback */
7586 
7587 
7588 
7589 
7590 
7591 
7592 
7593 /*
7594  * The callback is called before and after the underling operation, The
7595  * BIO_CB_RETURN flag indicates if it is after the call
7596  */
7597 
7598 
7599 
7600 
7601 
7602 long (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,
7603                                         int, long, long);
7604 void BIO_set_callback(BIO *b,
7605                       long (*callback) (struct bio_st *, int, const char *,
7606                                         int, long, long));
7607 char *BIO_get_callback_arg(const BIO *b);
7608 void BIO_set_callback_arg(BIO *b, char *arg);
7609 
7610 const char *BIO_method_name(const BIO *b);
7611 int BIO_method_type(const BIO *b);
7612 
7613 typedef void bio_info_cb (struct bio_st *, int, const char *, int, long,
7614                           long);
7615 
7616 typedef struct bio_method_st {
7617     int type;
7618     const char *name;
7619     int (*bwrite) (BIO *, const char *, int);
7620     int (*bread) (BIO *, char *, int);
7621     int (*bputs) (BIO *, const char *);
7622     int (*bgets) (BIO *, char *, int);
7623     long (*ctrl) (BIO *, int, long, void *);
7624     int (*create) (BIO *);
7625     int (*destroy) (BIO *);
7626     long (*callback_ctrl) (BIO *, int, bio_info_cb *);
7627 } BIO_METHOD;
7628 
7629 struct bio_st {
7630     BIO_METHOD *method;
7631     /* bio, mode, argp, argi, argl, ret */
7632     long (*callback) (struct bio_st *, int, const char *, int, long, long);
7633     char *cb_arg; /* first argument for the callback */
7634     int init;
7635     int shutdown;
7636     int flags; /* extra storage */
7637     int retry_reason;
7638     int num;
7639     void *ptr;
7640     struct bio_st *next_bio; /* used by filter BIOs */
7641     struct bio_st *prev_bio; /* used by filter BIOs */
7642     int references;
7643     unsigned long num_read;
7644     unsigned long num_write;
7645     CRYPTO_EX_DATA ex_data;
7646 };
7647 
7648 struct stack_st_BIO { _STACK stack; };
7649 
7650 typedef struct bio_f_buffer_ctx_struct {
7651     /*-
7652      * Buffers are setup like this:
7653      *
7654      * <---------------------- size ----------------------->
7655      * +---------------------------------------------------+
7656      * | consumed | remaining          | free space        |
7657      * +---------------------------------------------------+
7658      * <-- off --><------- len ------->
7659      */
7660     /*- BIO *bio; *//*
7661      * this is now in the BIO struct
7662      */
7663     int ibuf_size; /* how big is the input buffer */
7664     int obuf_size; /* how big is the output buffer */
7665     char *ibuf; /* the char array */
7666     int ibuf_len; /* how many bytes are in it */
7667     int ibuf_off; /* write/read offset */
7668     char *obuf; /* the char array */
7669     int obuf_len; /* how many bytes are in it */
7670     int obuf_off; /* write/read offset */
7671 } BIO_F_BUFFER_CTX;
7672 
7673 /* Prefix and suffix callback in ASN1 BIO */
7674 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
7675                           void *parg);
7676 # 398 "/usr/include/openssl/bio.h" 3 4
7677 /* connect BIO stuff */
7678 # 407 "/usr/include/openssl/bio.h" 3 4
7679 /*
7680  * #define BIO_CONN_get_param_hostname BIO_ctrl
7681  */
7682 # 474 "/usr/include/openssl/bio.h" 3 4
7683 /* BIO_s_connect() and BIO_s_socks4a_connect() */
7684 # 486 "/usr/include/openssl/bio.h" 3 4
7685 /* BIO_s_accept() */
7686 
7687 
7688 /* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
7689 # 499 "/usr/include/openssl/bio.h" 3 4
7690 /* BIO_s_accept() and BIO_s_connect() */
7691 
7692 
7693 
7694 
7695 /* BIO_s_proxy_client() */
7696 
7697 
7698 /* BIO_set_nbio(b,n) */
7699 
7700 /* BIO *BIO_get_filter_bio(BIO *bio); */
7701 # 519 "/usr/include/openssl/bio.h" 3 4
7702 /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
7703 
7704 
7705 
7706 /* BIO_s_file() */
7707 
7708 
7709 
7710 /* BIO_s_fd() and BIO_s_file() */
7711 
7712 
7713 
7714 /*
7715  * name is cast to lose const, but might be better to route through a
7716  * function so we can do it safely
7717  */
7718 # 552 "/usr/include/openssl/bio.h" 3 4
7719 /*
7720  * WARNING WARNING, this ups the reference count on the read bio of the SSL
7721  * structure.  This is because the ssl read BIO is now pointed to by the
7722  * next_bio field in the bio.  So when you free the BIO, make sure you are
7723  * doing a BIO_free_all() to catch the underlying BIO.
7724  */
7725 # 568 "/usr/include/openssl/bio.h" 3 4
7726 /* defined in evp.h */
7727 /* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */
7728 
7729 
7730 
7731 
7732 
7733 
7734 
7735 /* For the BIO_f_buffer() type */
7736 
7737 
7738 
7739 
7740 
7741 
7742 /* Don't use the next one unless you know what you are doing :-) */
7743 # 593 "/usr/include/openssl/bio.h" 3 4
7744 /* ...pending macros have inappropriate return type */
7745 size_t BIO_ctrl_pending(BIO *b);
7746 size_t BIO_ctrl_wpending(BIO *b);
7747 
7748 
7749 
7750 
7751 
7752 /* For the BIO_f_buffer() type */
7753 
7754 
7755 /* For BIO_s_bio() */
7756 
7757 
7758 
7759 
7760 
7761 /* macros with inappropriate type -- but ...pending macros use int too: */
7762 
7763 
7764 size_t BIO_ctrl_get_write_guarantee(BIO *b);
7765 size_t BIO_ctrl_get_read_request(BIO *b);
7766 int BIO_ctrl_reset_read_request(BIO *b);
7767 
7768 /* ctrl macros for dgram */
7769 # 633 "/usr/include/openssl/bio.h" 3 4
7770 /* These two aren't currently implemented */
7771 /* int BIO_get_ex_num(BIO *bio); */
7772 /* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */
7773 int BIO_set_ex_data(BIO *bio, int idx, void *data);
7774 void *BIO_get_ex_data(BIO *bio, int idx);
7775 int BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
7776                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
7777 unsigned long BIO_number_read(BIO *bio);
7778 unsigned long BIO_number_written(BIO *bio);
7779 
7780 /* For BIO_f_asn1() */
7781 int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
7782                         asn1_ps_func *prefix_free);
7783 int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
7784                         asn1_ps_func **pprefix_free);
7785 int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
7786                         asn1_ps_func *suffix_free);
7787 int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
7788                         asn1_ps_func **psuffix_free);
7789 
7790 
7791 BIO_METHOD *BIO_s_file(void);
7792 BIO *BIO_new_file(const char *filename, const char *mode);
7793 BIO *BIO_new_fp(FILE *stream, int close_flag);
7794 
7795 
7796 BIO *BIO_new(BIO_METHOD *type);
7797 int BIO_set(BIO *a, BIO_METHOD *type);
7798 int BIO_free(BIO *a);
7799 void BIO_vfree(BIO *a);
7800 int BIO_read(BIO *b, void *data, int len);
7801 int BIO_gets(BIO *bp, char *buf, int size);
7802 int BIO_write(BIO *b, const void *data, int len);
7803 int BIO_puts(BIO *bp, const char *buf);
7804 int BIO_indent(BIO *b, int indent, int max);
7805 long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
7806 long BIO_callback_ctrl(BIO *b, int cmd,
7807                        void (*fp) (struct bio_st *, int, const char *, int,
7808                                    long, long));
7809 char *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
7810 long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
7811 BIO *BIO_push(BIO *b, BIO *append);
7812 BIO *BIO_pop(BIO *b);
7813 void BIO_free_all(BIO *a);
7814 BIO *BIO_find_type(BIO *b, int bio_type);
7815 BIO *BIO_next(BIO *b);
7816 BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
7817 int BIO_get_retry_reason(BIO *bio);
7818 BIO *BIO_dup_chain(BIO *in);
7819 
7820 int BIO_nread0(BIO *bio, char **buf);
7821 int BIO_nread(BIO *bio, char **buf, int num);
7822 int BIO_nwrite0(BIO *bio, char **buf);
7823 int BIO_nwrite(BIO *bio, char **buf, int num);
7824 
7825 long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,
7826                         long argl, long ret);
7827 
7828 BIO_METHOD *BIO_s_mem(void);
7829 BIO *BIO_new_mem_buf(const void *buf, int len);
7830 BIO_METHOD *BIO_s_socket(void);
7831 BIO_METHOD *BIO_s_connect(void);
7832 BIO_METHOD *BIO_s_accept(void);
7833 BIO_METHOD *BIO_s_fd(void);
7834 
7835 BIO_METHOD *BIO_s_log(void);
7836 
7837 BIO_METHOD *BIO_s_bio(void);
7838 BIO_METHOD *BIO_s_null(void);
7839 BIO_METHOD *BIO_f_null(void);
7840 BIO_METHOD *BIO_f_buffer(void);
7841 
7842 
7843 
7844 BIO_METHOD *BIO_f_nbio_test(void);
7845 
7846 BIO_METHOD *BIO_s_datagram(void);
7847 
7848 
7849 
7850 
7851 
7852 /* BIO_METHOD *BIO_f_ber(void); */
7853 
7854 int BIO_sock_should_retry(int i);
7855 int BIO_sock_non_fatal_error(int error);
7856 int BIO_dgram_non_fatal_error(int error);
7857 
7858 int BIO_fd_should_retry(int i);
7859 int BIO_fd_non_fatal_error(int error);
7860 int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
7861                 void *u, const char *s, int len);
7862 int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
7863                        void *u, const char *s, int len, int indent);
7864 int BIO_dump(BIO *b, const char *bytes, int len);
7865 int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);
7866 
7867 int BIO_dump_fp(FILE *fp, const char *s, int len);
7868 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
7869 
7870 int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
7871                    int datalen);
7872 
7873 struct hostent *BIO_gethostbyname(const char *name);
7874 /*-
7875  * We might want a thread-safe interface too:
7876  * struct hostent *BIO_gethostbyname_r(const char *name,
7877  *     struct hostent *result, void *buffer, size_t buflen);
7878  * or something similar (caller allocates a struct hostent,
7879  * pointed to by "result", and additional buffer space for the various
7880  * substructures; if the buffer does not suffice, NULL is returned
7881  * and an appropriate error code is set).
7882  */
7883 int BIO_sock_error(int sock);
7884 int BIO_socket_ioctl(int fd, long type, void *arg);
7885 int BIO_socket_nbio(int fd, int mode);
7886 int BIO_get_port(const char *str, unsigned short *port_ptr);
7887 int BIO_get_host_ip(const char *str, unsigned char *ip);
7888 int BIO_get_accept_socket(char *host_port, int mode);
7889 int BIO_accept(int sock, char **ip_port);
7890 int BIO_sock_init(void);
7891 void BIO_sock_cleanup(void);
7892 int BIO_set_tcp_ndelay(int sock, int turn_on);
7893 
7894 BIO *BIO_new_socket(int sock, int close_flag);
7895 BIO *BIO_new_dgram(int fd, int close_flag);
7896 # 771 "/usr/include/openssl/bio.h" 3 4
7897 BIO *BIO_new_fd(int fd, int close_flag);
7898 BIO *BIO_new_connect(const char *host_port);
7899 BIO *BIO_new_accept(const char *host_port);
7900 
7901 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
7902                      BIO **bio2, size_t writebuf2);
7903 /*
7904  * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
7905  * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
7906  * value.
7907  */
7908 
7909 void BIO_copy_next_retry(BIO *b);
7910 
7911 /*
7912  * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
7913  */
7914 
7915 
7916 
7917 
7918 
7919 
7920 int BIO_printf(BIO *bio, const char *format, ...)
7921 __attribute__((__format__(__printf__, 2, 3)));
7922 int BIO_vprintf(BIO *bio, const char *format, va_list args)
7923 __attribute__((__format__(__printf__, 2, 0)));
7924 int BIO_snprintf(char *buf, size_t n, const char *format, ...)
7925 __attribute__((__format__(__printf__, 3, 4)));
7926 int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
7927 __attribute__((__format__(__printf__, 3, 0)));
7928 
7929 
7930 /* BEGIN ERROR CODES */
7931 /*
7932  * The following lines are auto generated by the script mkerr.pl. Any changes
7933  * made after this point may be overwritten when the script is next run.
7934  */
7935 void ERR_load_BIO_strings(void);
7936 
7937 /* Error codes for the BIO functions. */
7938 
7939 /* Function codes. */
7940 # 849 "/usr/include/openssl/bio.h" 3 4
7941 /* Reason codes. */
7942 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
7943 # 1 "/usr/include/openssl/x509.h" 1 3 4
7944 /* crypto/x509/x509.h */
7945 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7946  * All rights reserved.
7947  *
7948  * This package is an SSL implementation written
7949  * by Eric Young (eay@cryptsoft.com).
7950  * The implementation was written so as to conform with Netscapes SSL.
7951  *
7952  * This library is free for commercial and non-commercial use as long as
7953  * the following conditions are aheared to.  The following conditions
7954  * apply to all code found in this distribution, be it the RC4, RSA,
7955  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
7956  * included with this distribution is covered by the same copyright terms
7957  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
7958  *
7959  * Copyright remains Eric Young's, and as such any Copyright notices in
7960  * the code are not to be removed.
7961  * If this package is used in a product, Eric Young should be given attribution
7962  * as the author of the parts of the library used.
7963  * This can be in the form of a textual message at program startup or
7964  * in documentation (online or textual) provided with the package.
7965  *
7966  * Redistribution and use in source and binary forms, with or without
7967  * modification, are permitted provided that the following conditions
7968  * are met:
7969  * 1. Redistributions of source code must retain the copyright
7970  *    notice, this list of conditions and the following disclaimer.
7971  * 2. Redistributions in binary form must reproduce the above copyright
7972  *    notice, this list of conditions and the following disclaimer in the
7973  *    documentation and/or other materials provided with the distribution.
7974  * 3. All advertising materials mentioning features or use of this software
7975  *    must display the following acknowledgement:
7976  *    "This product includes cryptographic software written by
7977  *     Eric Young (eay@cryptsoft.com)"
7978  *    The word 'cryptographic' can be left out if the rouines from the library
7979  *    being used are not cryptographic related :-).
7980  * 4. If you include any Windows specific code (or a derivative thereof) from
7981  *    the apps directory (application code) you must include an acknowledgement:
7982  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
7983  *
7984  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
7985  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7986  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7987  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7988  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7989  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7990  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7991  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7992  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7993  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7994  * SUCH DAMAGE.
7995  *
7996  * The licence and distribution terms for any publically available version or
7997  * derivative of this code cannot be changed.  i.e. this code cannot simply be
7998  * copied and put under another distribution licence
7999  * [including the GNU Public Licence.]
8000  */
8001 /* ====================================================================
8002  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
8003  * ECDH support in OpenSSL originally developed by
8004  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
8005  */
8006 
8007 
8008 
8009 
8010 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
8011 /* e_os2.h */
8012 /* ====================================================================
8013  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
8014  *
8015  * Redistribution and use in source and binary forms, with or without
8016  * modification, are permitted provided that the following conditions
8017  * are met:
8018  *
8019  * 1. Redistributions of source code must retain the above copyright
8020  *    notice, this list of conditions and the following disclaimer.
8021  *
8022  * 2. Redistributions in binary form must reproduce the above copyright
8023  *    notice, this list of conditions and the following disclaimer in
8024  *    the documentation and/or other materials provided with the
8025  *    distribution.
8026  *
8027  * 3. All advertising materials mentioning features or use of this
8028  *    software must display the following acknowledgment:
8029  *    "This product includes software developed by the OpenSSL Project
8030  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8031  *
8032  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8033  *    endorse or promote products derived from this software without
8034  *    prior written permission. For written permission, please contact
8035  *    openssl-core@openssl.org.
8036  *
8037  * 5. Products derived from this software may not be called "OpenSSL"
8038  *    nor may "OpenSSL" appear in their names without prior written
8039  *    permission of the OpenSSL Project.
8040  *
8041  * 6. Redistributions of any form whatsoever must retain the following
8042  *    acknowledgment:
8043  *    "This product includes software developed by the OpenSSL Project
8044  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8045  *
8046  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8047  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8048  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8049  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8050  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8051  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8052  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8053  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8054  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8055  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8056  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8057  * OF THE POSSIBILITY OF SUCH DAMAGE.
8058  * ====================================================================
8059  *
8060  * This product includes cryptographic software written by Eric Young
8061  * (eay@cryptsoft.com).  This product includes software written by Tim
8062  * Hudson (tjh@cryptsoft.com).
8063  *
8064  */
8065 
8066 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8067 /* opensslconf.h */
8068 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8069 
8070 
8071 
8072 
8073 /* OpenSSL was configured with the following options: */
8074 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8075 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8076    asks for it.  This is a transient feature that is provided for those
8077    who haven't had the time to do the appropriate changes in their
8078    applications.  */
8079 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8080 /* crypto/opensslconf.h.in */
8081 
8082 /* Generate 80386 code? */
8083 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
8084 # 68 "/usr/include/openssl/x509.h" 2 3 4
8085 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
8086 /* ====================================================================
8087  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8088  *
8089  * Redistribution and use in source and binary forms, with or without
8090  * modification, are permitted provided that the following conditions
8091  * are met:
8092  *
8093  * 1. Redistributions of source code must retain the above copyright
8094  *    notice, this list of conditions and the following disclaimer.
8095  *
8096  * 2. Redistributions in binary form must reproduce the above copyright
8097  *    notice, this list of conditions and the following disclaimer in
8098  *    the documentation and/or other materials provided with the
8099  *    distribution.
8100  *
8101  * 3. All advertising materials mentioning features or use of this
8102  *    software must display the following acknowledgment:
8103  *    "This product includes software developed by the OpenSSL Project
8104  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8105  *
8106  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8107  *    endorse or promote products derived from this software without
8108  *    prior written permission. For written permission, please contact
8109  *    openssl-core@openssl.org.
8110  *
8111  * 5. Products derived from this software may not be called "OpenSSL"
8112  *    nor may "OpenSSL" appear in their names without prior written
8113  *    permission of the OpenSSL Project.
8114  *
8115  * 6. Redistributions of any form whatsoever must retain the following
8116  *    acknowledgment:
8117  *    "This product includes software developed by the OpenSSL Project
8118  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8119  *
8120  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8121  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8122  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8123  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8124  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8125  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8126  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8127  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8128  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8129  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8130  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8131  * OF THE POSSIBILITY OF SUCH DAMAGE.
8132  * ====================================================================
8133  *
8134  * This product includes cryptographic software written by Eric Young
8135  * (eay@cryptsoft.com).  This product includes software written by Tim
8136  * Hudson (tjh@cryptsoft.com).
8137  *
8138  */
8139 # 69 "/usr/include/openssl/x509.h" 2 3 4
8140 
8141 # 1 "/usr/include/openssl/buffer.h" 1 3 4
8142 /* crypto/buffer/buffer.h */
8143 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8144  * All rights reserved.
8145  *
8146  * This package is an SSL implementation written
8147  * by Eric Young (eay@cryptsoft.com).
8148  * The implementation was written so as to conform with Netscapes SSL.
8149  *
8150  * This library is free for commercial and non-commercial use as long as
8151  * the following conditions are aheared to.  The following conditions
8152  * apply to all code found in this distribution, be it the RC4, RSA,
8153  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8154  * included with this distribution is covered by the same copyright terms
8155  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8156  *
8157  * Copyright remains Eric Young's, and as such any Copyright notices in
8158  * the code are not to be removed.
8159  * If this package is used in a product, Eric Young should be given attribution
8160  * as the author of the parts of the library used.
8161  * This can be in the form of a textual message at program startup or
8162  * in documentation (online or textual) provided with the package.
8163  *
8164  * Redistribution and use in source and binary forms, with or without
8165  * modification, are permitted provided that the following conditions
8166  * are met:
8167  * 1. Redistributions of source code must retain the copyright
8168  *    notice, this list of conditions and the following disclaimer.
8169  * 2. Redistributions in binary form must reproduce the above copyright
8170  *    notice, this list of conditions and the following disclaimer in the
8171  *    documentation and/or other materials provided with the distribution.
8172  * 3. All advertising materials mentioning features or use of this software
8173  *    must display the following acknowledgement:
8174  *    "This product includes cryptographic software written by
8175  *     Eric Young (eay@cryptsoft.com)"
8176  *    The word 'cryptographic' can be left out if the rouines from the library
8177  *    being used are not cryptographic related :-).
8178  * 4. If you include any Windows specific code (or a derivative thereof) from
8179  *    the apps directory (application code) you must include an acknowledgement:
8180  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8181  *
8182  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8183  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8184  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8185  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8186  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8187  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8188  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8189  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8190  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8191  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8192  * SUCH DAMAGE.
8193  *
8194  * The licence and distribution terms for any publically available version or
8195  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8196  * copied and put under another distribution licence
8197  * [including the GNU Public Licence.]
8198  */
8199 
8200 
8201 
8202 
8203 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
8204 /* ====================================================================
8205  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
8206  *
8207  * Redistribution and use in source and binary forms, with or without
8208  * modification, are permitted provided that the following conditions
8209  * are met:
8210  *
8211  * 1. Redistributions of source code must retain the above copyright
8212  *    notice, this list of conditions and the following disclaimer.
8213  *
8214  * 2. Redistributions in binary form must reproduce the above copyright
8215  *    notice, this list of conditions and the following disclaimer in
8216  *    the documentation and/or other materials provided with the
8217  *    distribution.
8218  *
8219  * 3. All advertising materials mentioning features or use of this
8220  *    software must display the following acknowledgment:
8221  *    "This product includes software developed by the OpenSSL Project
8222  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8223  *
8224  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8225  *    endorse or promote products derived from this software without
8226  *    prior written permission. For written permission, please contact
8227  *    openssl-core@openssl.org.
8228  *
8229  * 5. Products derived from this software may not be called "OpenSSL"
8230  *    nor may "OpenSSL" appear in their names without prior written
8231  *    permission of the OpenSSL Project.
8232  *
8233  * 6. Redistributions of any form whatsoever must retain the following
8234  *    acknowledgment:
8235  *    "This product includes software developed by the OpenSSL Project
8236  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8237  *
8238  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8239  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8240  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8241  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8242  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8243  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8244  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8245  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8246  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8247  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8248  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8249  * OF THE POSSIBILITY OF SUCH DAMAGE.
8250  * ====================================================================
8251  *
8252  * This product includes cryptographic software written by Eric Young
8253  * (eay@cryptsoft.com).  This product includes software written by Tim
8254  * Hudson (tjh@cryptsoft.com).
8255  *
8256  */
8257 # 63 "/usr/include/openssl/buffer.h" 2 3 4
8258 
8259 
8260 
8261 
8262 
8263 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
8264 /*
8265  * CDDL HEADER START
8266  *
8267  * The contents of this file are subject to the terms of the
8268  * Common Development and Distribution License, Version 1.0 only
8269  * (the "License").  You may not use this file except in compliance
8270  * with the License.
8271  *
8272  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8273  * or http://www.opensolaris.org/os/licensing.
8274  * See the License for the specific language governing permissions
8275  * and limitations under the License.
8276  *
8277  * When distributing Covered Code, include this CDDL HEADER in each
8278  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8279  * If applicable, add the following below this CDDL HEADER, with the
8280  * fields enclosed by brackets "[]" replaced with your own identifying
8281  * information: Portions Copyright [yyyy] [name of copyright owner]
8282  *
8283  * CDDL HEADER END
8284  */
8285 /*	Copyright (c) 1988 AT&T	*/
8286 /*	  All Rights Reserved  	*/
8287 
8288 
8289 /*
8290  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
8291  * Use is subject to license terms.
8292  */
8293 
8294 
8295 
8296 
8297 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
8298 /*
8299  * CDDL HEADER START
8300  *
8301  * The contents of this file are subject to the terms of the
8302  * Common Development and Distribution License (the "License").
8303  * You may not use this file except in compliance with the License.
8304  *
8305  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8306  * or http://www.opensolaris.org/os/licensing.
8307  * See the License for the specific language governing permissions
8308  * and limitations under the License.
8309  *
8310  *
8311  * When distributing Covered Code, include this CDDL HEADER in each
8312  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8313  * If applicable, add the following below this CDDL HEADER, with the
8314  * fields enclosed by brackets "[]" replaced with your own identifying
8315  * information: Portions Copyright [yyyy] [name of copyright owner]
8316  *
8317  * CDDL HEADER END
8318  */
8319 
8320 /*
8321  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
8322  * Use is subject to license terms.
8323  * Copyright 2016 Joyent, Inc.
8324  */
8325 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
8326 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 1 3 4
8327 /*
8328  * CDDL HEADER START
8329  *
8330  * The contents of this file are subject to the terms of the
8331  * Common Development and Distribution License, Version 1.0 only
8332  * (the "License").  You may not use this file except in compliance
8333  * with the License.
8334  *
8335  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8336  * or http://www.opensolaris.org/os/licensing.
8337  * See the License for the specific language governing permissions
8338  * and limitations under the License.
8339  *
8340  * When distributing Covered Code, include this CDDL HEADER in each
8341  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8342  * If applicable, add the following below this CDDL HEADER, with the
8343  * fields enclosed by brackets "[]" replaced with your own identifying
8344  * information: Portions Copyright [yyyy] [name of copyright owner]
8345  *
8346  * CDDL HEADER END
8347  */
8348 /*	Copyright (c) 1988 AT&T	*/
8349 /*	  All Rights Reserved  	*/
8350 
8351 
8352 /*
8353  * Copyright 1999-2003 Sun Microsystems, Inc.  All rights reserved.
8354  * Use is subject to license terms.
8355  */
8356 
8357 /*
8358  * Copyright 2014 PALO, Richard.
8359  * Copyright 2016 Joyent, Inc.
8360  */
8361 
8362 /*
8363  * An application should not include this header directly.  Instead it
8364  * should be included only through the inclusion of other Sun headers.
8365  *
8366  * The contents of this header is limited to identifiers specified in the
8367  * C Standard.  Any new identifiers specified in future amendments to the
8368  * C Standard must be placed in this header.  If these new identifiers
8369  * are required to also be in the C++ Standard "std" namespace, then for
8370  * anything other than macro definitions, corresponding "using" directives
8371  * must also be added to <stddef.h.h>.
8372  */
8373 
8374 
8375 
8376 
8377 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1 3 4
8378 /*
8379  * CDDL HEADER START
8380  *
8381  * The contents of this file are subject to the terms of the
8382  * Common Development and Distribution License (the "License").
8383  * You may not use this file except in compliance with the License.
8384  *
8385  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8386  * or http://www.opensolaris.org/os/licensing.
8387  * See the License for the specific language governing permissions
8388  * and limitations under the License.
8389  *
8390  *
8391  * When distributing Covered Code, include this CDDL HEADER in each
8392  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8393  * If applicable, add the following below this CDDL HEADER, with the
8394  * fields enclosed by brackets "[]" replaced with your own identifying
8395  * information: Portions Copyright [yyyy] [name of copyright owner]
8396  *
8397  * CDDL HEADER END
8398  */
8399 
8400 /*
8401  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
8402  * Use is subject to license terms.
8403  * Copyright 2016 Joyent, Inc.
8404  */
8405 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
8406 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1 3 4
8407 /*
8408  * CDDL HEADER START
8409  *
8410  * The contents of this file are subject to the terms of the
8411  * Common Development and Distribution License (the "License").
8412  * You may not use this file except in compliance with the License.
8413  *
8414  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8415  * or http://www.opensolaris.org/os/licensing.
8416  * See the License for the specific language governing permissions
8417  * and limitations under the License.
8418  *
8419  * When distributing Covered Code, include this CDDL HEADER in each
8420  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8421  * If applicable, add the following below this CDDL HEADER, with the
8422  * fields enclosed by brackets "[]" replaced with your own identifying
8423  * information: Portions Copyright [yyyy] [name of copyright owner]
8424  *
8425  * CDDL HEADER END
8426  */
8427 
8428 /*
8429  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
8430  * Copyright 2016 Joyent, Inc.
8431  *
8432  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
8433  * Use is subject to license terms.
8434  */
8435 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
8436 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1 3 4
8437 /*
8438  * This file and its contents are supplied under the terms of the
8439  * Common Development and Distribution License ("CDDL"), version 1.0.
8440  * You may only use this file in accordance with the terms of version
8441  * 1.0 of the CDDL.
8442  *
8443  * A full copy of the text of the CDDL should have accompanied this
8444  * source.  A copy of the CDDL is also available via the Internet at
8445  * http://www.illumos.org/license/CDDL.
8446  */
8447 
8448 /*
8449  * Copyright 2014-2016 PALO, Richard.
8450  */
8451 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 2 3 4
8452 # 88 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/iso/stddef_iso.h" 3 4
8453 typedef long max_align_t;
8454 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
8455 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 1 3 4
8456 /*
8457  * This file and its contents are supplied under the terms of the
8458  * Common Development and Distribution License ("CDDL"), version 1.0.
8459  * You may only use this file in accordance with the terms of version
8460  * 1.0 of the CDDL.
8461  *
8462  * A full copy of the text of the CDDL should have accompanied this
8463  * source.  A copy of the CDDL is also available via the Internet at
8464  * http://www.illumos.org/license/CDDL.
8465  */
8466 
8467 /*
8468  * Copyright 2017 Toomas Soome <tsoome@me.com>
8469  */
8470 
8471 
8472 
8473 
8474 /*
8475  * Commonly used macros and definitions.
8476  */
8477 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stddef.h" 3 4
8478 /*
8479  * We must not expose container_of() to userland, but we want it
8480  * to be available for early boot and for the kernel.
8481  */
8482 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 2 3 4
8483 
8484 /*
8485  * Allow global visibility for symbols defined in
8486  * C++ "std" namespace in <iso/stddef_iso.h>.
8487  */
8488 # 51 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 3 4
8489 /*
8490  * wchar_t is a built-in type in standard C++ and as such is not
8491  * defined here when using standard C++. However, the GNU compiler
8492  * fixincludes utility nonetheless creates its own version of this
8493  * header for use by gcc and g++. In that version it adds a redundant
8494  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
8495  * header we need to include the following magic comment:
8496  *
8497  * we must use the C++ compiler's type
8498  *
8499  * The above comment should not be removed or changed until GNU
8500  * gcc/fixinc/inclhack.def is updated to bypass this header.
8501  */
8502 # 69 "/usr/include/openssl/buffer.h" 2 3 4
8503 
8504 
8505 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1 3 4
8506 /*
8507  * CDDL HEADER START
8508  *
8509  * The contents of this file are subject to the terms of the
8510  * Common Development and Distribution License (the "License").
8511  * You may not use this file except in compliance with the License.
8512  *
8513  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8514  * or http://www.opensolaris.org/os/licensing.
8515  * See the License for the specific language governing permissions
8516  * and limitations under the License.
8517  *
8518  * When distributing Covered Code, include this CDDL HEADER in each
8519  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8520  * If applicable, add the following below this CDDL HEADER, with the
8521  * fields enclosed by brackets "[]" replaced with your own identifying
8522  * information: Portions Copyright [yyyy] [name of copyright owner]
8523  *
8524  * CDDL HEADER END
8525  */
8526 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
8527 /*	  All Rights Reserved  	*/
8528 
8529 
8530 /*
8531  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
8532  * Use is subject to license terms.
8533  *
8534  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
8535  * Copyright 2016 Joyent, Inc.
8536  */
8537 # 72 "/usr/include/openssl/buffer.h" 2 3 4
8538 
8539 
8540 /* Already declared in ossl_typ.h */
8541 /* typedef struct buf_mem_st BUF_MEM; */
8542 
8543 struct buf_mem_st {
8544     size_t length; /* current number of bytes */
8545     char *data;
8546     size_t max; /* size of buffer */
8547 };
8548 
8549 BUF_MEM *BUF_MEM_new(void);
8550 void BUF_MEM_free(BUF_MEM *a);
8551 int BUF_MEM_grow(BUF_MEM *str, size_t len);
8552 int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
8553 size_t BUF_strnlen(const char *str, size_t maxlen);
8554 char *BUF_strdup(const char *str);
8555 
8556 /*
8557  * Like strndup, but in addition, explicitly guarantees to never read past the
8558  * first |siz| bytes of |str|.
8559  */
8560 char *BUF_strndup(const char *str, size_t siz);
8561 
8562 void *BUF_memdup(const void *data, size_t siz);
8563 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
8564 
8565 /* safe string functions */
8566 size_t BUF_strlcpy(char *dst, const char *src, size_t siz);
8567 size_t BUF_strlcat(char *dst, const char *src, size_t siz);
8568 
8569 /* BEGIN ERROR CODES */
8570 /*
8571  * The following lines are auto generated by the script mkerr.pl. Any changes
8572  * made after this point may be overwritten when the script is next run.
8573  */
8574 void ERR_load_BUF_strings(void);
8575 
8576 /* Error codes for the BUF functions. */
8577 
8578 /* Function codes. */
8579 
8580 
8581 
8582 
8583 
8584 
8585 
8586 /* Reason codes. */
8587 # 71 "/usr/include/openssl/x509.h" 2 3 4
8588 
8589 
8590 # 1 "/usr/include/openssl/evp.h" 1 3 4
8591 /* crypto/evp/evp.h */
8592 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8593  * All rights reserved.
8594  *
8595  * This package is an SSL implementation written
8596  * by Eric Young (eay@cryptsoft.com).
8597  * The implementation was written so as to conform with Netscapes SSL.
8598  *
8599  * This library is free for commercial and non-commercial use as long as
8600  * the following conditions are aheared to.  The following conditions
8601  * apply to all code found in this distribution, be it the RC4, RSA,
8602  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8603  * included with this distribution is covered by the same copyright terms
8604  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8605  *
8606  * Copyright remains Eric Young's, and as such any Copyright notices in
8607  * the code are not to be removed.
8608  * If this package is used in a product, Eric Young should be given attribution
8609  * as the author of the parts of the library used.
8610  * This can be in the form of a textual message at program startup or
8611  * in documentation (online or textual) provided with the package.
8612  *
8613  * Redistribution and use in source and binary forms, with or without
8614  * modification, are permitted provided that the following conditions
8615  * are met:
8616  * 1. Redistributions of source code must retain the copyright
8617  *    notice, this list of conditions and the following disclaimer.
8618  * 2. Redistributions in binary form must reproduce the above copyright
8619  *    notice, this list of conditions and the following disclaimer in the
8620  *    documentation and/or other materials provided with the distribution.
8621  * 3. All advertising materials mentioning features or use of this software
8622  *    must display the following acknowledgement:
8623  *    "This product includes cryptographic software written by
8624  *     Eric Young (eay@cryptsoft.com)"
8625  *    The word 'cryptographic' can be left out if the rouines from the library
8626  *    being used are not cryptographic related :-).
8627  * 4. If you include any Windows specific code (or a derivative thereof) from
8628  *    the apps directory (application code) you must include an acknowledgement:
8629  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8630  *
8631  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8632  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8633  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8634  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8635  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8636  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8637  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8638  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8639  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8640  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8641  * SUCH DAMAGE.
8642  *
8643  * The licence and distribution terms for any publically available version or
8644  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8645  * copied and put under another distribution licence
8646  * [including the GNU Public Licence.]
8647  */
8648 # 66 "/usr/include/openssl/evp.h" 3 4
8649 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
8650 /* opensslconf.h */
8651 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
8652 
8653 
8654 
8655 
8656 /* OpenSSL was configured with the following options: */
8657 # 108 "/usr/include/openssl/opensslconf.h" 3 4
8658 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
8659    asks for it.  This is a transient feature that is provided for those
8660    who haven't had the time to do the appropriate changes in their
8661    applications.  */
8662 # 204 "/usr/include/openssl/opensslconf.h" 3 4
8663 /* crypto/opensslconf.h.in */
8664 
8665 /* Generate 80386 code? */
8666 # 67 "/usr/include/openssl/evp.h" 2 3 4
8667 
8668 
8669 
8670 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
8671 /* ====================================================================
8672  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
8673  *
8674  * Redistribution and use in source and binary forms, with or without
8675  * modification, are permitted provided that the following conditions
8676  * are met:
8677  *
8678  * 1. Redistributions of source code must retain the above copyright
8679  *    notice, this list of conditions and the following disclaimer.
8680  *
8681  * 2. Redistributions in binary form must reproduce the above copyright
8682  *    notice, this list of conditions and the following disclaimer in
8683  *    the documentation and/or other materials provided with the
8684  *    distribution.
8685  *
8686  * 3. All advertising materials mentioning features or use of this
8687  *    software must display the following acknowledgment:
8688  *    "This product includes software developed by the OpenSSL Project
8689  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8690  *
8691  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8692  *    endorse or promote products derived from this software without
8693  *    prior written permission. For written permission, please contact
8694  *    openssl-core@openssl.org.
8695  *
8696  * 5. Products derived from this software may not be called "OpenSSL"
8697  *    nor may "OpenSSL" appear in their names without prior written
8698  *    permission of the OpenSSL Project.
8699  *
8700  * 6. Redistributions of any form whatsoever must retain the following
8701  *    acknowledgment:
8702  *    "This product includes software developed by the OpenSSL Project
8703  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8704  *
8705  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8706  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8707  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8708  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8709  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8710  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8711  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8712  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8713  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8714  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8715  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8716  * OF THE POSSIBILITY OF SUCH DAMAGE.
8717  * ====================================================================
8718  *
8719  * This product includes cryptographic software written by Eric Young
8720  * (eay@cryptsoft.com).  This product includes software written by Tim
8721  * Hudson (tjh@cryptsoft.com).
8722  *
8723  */
8724 # 71 "/usr/include/openssl/evp.h" 2 3 4
8725 
8726 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
8727 /* ====================================================================
8728  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
8729  *
8730  * Redistribution and use in source and binary forms, with or without
8731  * modification, are permitted provided that the following conditions
8732  * are met:
8733  *
8734  * 1. Redistributions of source code must retain the above copyright
8735  *    notice, this list of conditions and the following disclaimer.
8736  *
8737  * 2. Redistributions in binary form must reproduce the above copyright
8738  *    notice, this list of conditions and the following disclaimer in
8739  *    the documentation and/or other materials provided with the
8740  *    distribution.
8741  *
8742  * 3. All advertising materials mentioning features or use of this
8743  *    software must display the following acknowledgment:
8744  *    "This product includes software developed by the OpenSSL Project
8745  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
8746  *
8747  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
8748  *    endorse or promote products derived from this software without
8749  *    prior written permission. For written permission, please contact
8750  *    openssl-core@openssl.org.
8751  *
8752  * 5. Products derived from this software may not be called "OpenSSL"
8753  *    nor may "OpenSSL" appear in their names without prior written
8754  *    permission of the OpenSSL Project.
8755  *
8756  * 6. Redistributions of any form whatsoever must retain the following
8757  *    acknowledgment:
8758  *    "This product includes software developed by the OpenSSL Project
8759  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
8760  *
8761  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
8762  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8763  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
8764  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
8765  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8766  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
8767  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8768  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8769  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
8770  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
8771  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
8772  * OF THE POSSIBILITY OF SUCH DAMAGE.
8773  * ====================================================================
8774  *
8775  * This product includes cryptographic software written by Eric Young
8776  * (eay@cryptsoft.com).  This product includes software written by Tim
8777  * Hudson (tjh@cryptsoft.com).
8778  *
8779  */
8780 # 73 "/usr/include/openssl/evp.h" 2 3 4
8781 
8782 
8783 # 1 "/usr/include/openssl/bio.h" 1 3 4
8784 /* crypto/bio/bio.h */
8785 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8786  * All rights reserved.
8787  *
8788  * This package is an SSL implementation written
8789  * by Eric Young (eay@cryptsoft.com).
8790  * The implementation was written so as to conform with Netscapes SSL.
8791  *
8792  * This library is free for commercial and non-commercial use as long as
8793  * the following conditions are aheared to.  The following conditions
8794  * apply to all code found in this distribution, be it the RC4, RSA,
8795  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8796  * included with this distribution is covered by the same copyright terms
8797  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8798  *
8799  * Copyright remains Eric Young's, and as such any Copyright notices in
8800  * the code are not to be removed.
8801  * If this package is used in a product, Eric Young should be given attribution
8802  * as the author of the parts of the library used.
8803  * This can be in the form of a textual message at program startup or
8804  * in documentation (online or textual) provided with the package.
8805  *
8806  * Redistribution and use in source and binary forms, with or without
8807  * modification, are permitted provided that the following conditions
8808  * are met:
8809  * 1. Redistributions of source code must retain the copyright
8810  *    notice, this list of conditions and the following disclaimer.
8811  * 2. Redistributions in binary form must reproduce the above copyright
8812  *    notice, this list of conditions and the following disclaimer in the
8813  *    documentation and/or other materials provided with the distribution.
8814  * 3. All advertising materials mentioning features or use of this software
8815  *    must display the following acknowledgement:
8816  *    "This product includes cryptographic software written by
8817  *     Eric Young (eay@cryptsoft.com)"
8818  *    The word 'cryptographic' can be left out if the rouines from the library
8819  *    being used are not cryptographic related :-).
8820  * 4. If you include any Windows specific code (or a derivative thereof) from
8821  *    the apps directory (application code) you must include an acknowledgement:
8822  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8823  *
8824  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8825  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8826  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8827  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8828  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8829  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8830  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8831  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8832  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8833  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8834  * SUCH DAMAGE.
8835  *
8836  * The licence and distribution terms for any publically available version or
8837  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8838  * copied and put under another distribution licence
8839  * [including the GNU Public Licence.]
8840  */
8841 # 76 "/usr/include/openssl/evp.h" 2 3 4
8842 
8843 
8844 /*-
8845 #define EVP_RC2_KEY_SIZE                16
8846 #define EVP_RC4_KEY_SIZE                16
8847 #define EVP_BLOWFISH_KEY_SIZE           16
8848 #define EVP_CAST5_KEY_SIZE              16
8849 #define EVP_RC5_32_12_16_KEY_SIZE       16
8850 */
8851 
8852 
8853 
8854 
8855 
8856 
8857 /* Default PKCS#5 iteration count */
8858 
8859 
8860 # 1 "/usr/include/openssl/objects.h" 1 3 4
8861 /* crypto/objects/objects.h */
8862 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8863  * All rights reserved.
8864  *
8865  * This package is an SSL implementation written
8866  * by Eric Young (eay@cryptsoft.com).
8867  * The implementation was written so as to conform with Netscapes SSL.
8868  *
8869  * This library is free for commercial and non-commercial use as long as
8870  * the following conditions are aheared to.  The following conditions
8871  * apply to all code found in this distribution, be it the RC4, RSA,
8872  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8873  * included with this distribution is covered by the same copyright terms
8874  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8875  *
8876  * Copyright remains Eric Young's, and as such any Copyright notices in
8877  * the code are not to be removed.
8878  * If this package is used in a product, Eric Young should be given attribution
8879  * as the author of the parts of the library used.
8880  * This can be in the form of a textual message at program startup or
8881  * in documentation (online or textual) provided with the package.
8882  *
8883  * Redistribution and use in source and binary forms, with or without
8884  * modification, are permitted provided that the following conditions
8885  * are met:
8886  * 1. Redistributions of source code must retain the copyright
8887  *    notice, this list of conditions and the following disclaimer.
8888  * 2. Redistributions in binary form must reproduce the above copyright
8889  *    notice, this list of conditions and the following disclaimer in the
8890  *    documentation and/or other materials provided with the distribution.
8891  * 3. All advertising materials mentioning features or use of this software
8892  *    must display the following acknowledgement:
8893  *    "This product includes cryptographic software written by
8894  *     Eric Young (eay@cryptsoft.com)"
8895  *    The word 'cryptographic' can be left out if the rouines from the library
8896  *    being used are not cryptographic related :-).
8897  * 4. If you include any Windows specific code (or a derivative thereof) from
8898  *    the apps directory (application code) you must include an acknowledgement:
8899  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8900  *
8901  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8902  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8903  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8904  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8905  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8906  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8907  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8908  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8909  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8910  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8911  * SUCH DAMAGE.
8912  *
8913  * The licence and distribution terms for any publically available version or
8914  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8915  * copied and put under another distribution licence
8916  * [including the GNU Public Licence.]
8917  */
8918 
8919 
8920 
8921 
8922 
8923 
8924 
8925 # 1 "/usr/include/openssl/obj_mac.h" 1 3 4
8926 /* crypto/objects/obj_mac.h */
8927 
8928 /*
8929  * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following
8930  * command: perl objects.pl objects.txt obj_mac.num obj_mac.h
8931  */
8932 
8933 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
8934  * All rights reserved.
8935  *
8936  * This package is an SSL implementation written
8937  * by Eric Young (eay@cryptsoft.com).
8938  * The implementation was written so as to conform with Netscapes SSL.
8939  *
8940  * This library is free for commercial and non-commercial use as long as
8941  * the following conditions are aheared to.  The following conditions
8942  * apply to all code found in this distribution, be it the RC4, RSA,
8943  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
8944  * included with this distribution is covered by the same copyright terms
8945  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
8946  *
8947  * Copyright remains Eric Young's, and as such any Copyright notices in
8948  * the code are not to be removed.
8949  * If this package is used in a product, Eric Young should be given attribution
8950  * as the author of the parts of the library used.
8951  * This can be in the form of a textual message at program startup or
8952  * in documentation (online or textual) provided with the package.
8953  *
8954  * Redistribution and use in source and binary forms, with or without
8955  * modification, are permitted provided that the following conditions
8956  * are met:
8957  * 1. Redistributions of source code must retain the copyright
8958  *    notice, this list of conditions and the following disclaimer.
8959  * 2. Redistributions in binary form must reproduce the above copyright
8960  *    notice, this list of conditions and the following disclaimer in the
8961  *    documentation and/or other materials provided with the distribution.
8962  * 3. All advertising materials mentioning features or use of this software
8963  *    must display the following acknowledgement:
8964  *    "This product includes cryptographic software written by
8965  *     Eric Young (eay@cryptsoft.com)"
8966  *    The word 'cryptographic' can be left out if the rouines from the library
8967  *    being used are not cryptographic related :-).
8968  * 4. If you include any Windows specific code (or a derivative thereof) from
8969  *    the apps directory (application code) you must include an acknowledgement:
8970  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
8971  *
8972  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
8973  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8974  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8975  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
8976  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8977  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8978  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8979  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8980  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8981  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8982  * SUCH DAMAGE.
8983  *
8984  * The licence and distribution terms for any publically available version or
8985  * derivative of this code cannot be changed.  i.e. this code cannot simply be
8986  * copied and put under another distribution licence
8987  * [including the GNU Public Licence.]
8988  */
8989 # 66 "/usr/include/openssl/objects.h" 2 3 4
8990 # 964 "/usr/include/openssl/objects.h" 3 4
8991 # 1 "/usr/include/openssl/bio.h" 1 3 4
8992 /* crypto/bio/bio.h */
8993 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8994  * All rights reserved.
8995  *
8996  * This package is an SSL implementation written
8997  * by Eric Young (eay@cryptsoft.com).
8998  * The implementation was written so as to conform with Netscapes SSL.
8999  *
9000  * This library is free for commercial and non-commercial use as long as
9001  * the following conditions are aheared to.  The following conditions
9002  * apply to all code found in this distribution, be it the RC4, RSA,
9003  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9004  * included with this distribution is covered by the same copyright terms
9005  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9006  *
9007  * Copyright remains Eric Young's, and as such any Copyright notices in
9008  * the code are not to be removed.
9009  * If this package is used in a product, Eric Young should be given attribution
9010  * as the author of the parts of the library used.
9011  * This can be in the form of a textual message at program startup or
9012  * in documentation (online or textual) provided with the package.
9013  *
9014  * Redistribution and use in source and binary forms, with or without
9015  * modification, are permitted provided that the following conditions
9016  * are met:
9017  * 1. Redistributions of source code must retain the copyright
9018  *    notice, this list of conditions and the following disclaimer.
9019  * 2. Redistributions in binary form must reproduce the above copyright
9020  *    notice, this list of conditions and the following disclaimer in the
9021  *    documentation and/or other materials provided with the distribution.
9022  * 3. All advertising materials mentioning features or use of this software
9023  *    must display the following acknowledgement:
9024  *    "This product includes cryptographic software written by
9025  *     Eric Young (eay@cryptsoft.com)"
9026  *    The word 'cryptographic' can be left out if the rouines from the library
9027  *    being used are not cryptographic related :-).
9028  * 4. If you include any Windows specific code (or a derivative thereof) from
9029  *    the apps directory (application code) you must include an acknowledgement:
9030  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9031  *
9032  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9033  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9034  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9035  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9036  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9037  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9038  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9039  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9040  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9041  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9042  * SUCH DAMAGE.
9043  *
9044  * The licence and distribution terms for any publically available version or
9045  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9046  * copied and put under another distribution licence
9047  * [including the GNU Public Licence.]
9048  */
9049 # 965 "/usr/include/openssl/objects.h" 2 3 4
9050 # 1 "/usr/include/openssl/asn1.h" 1 3 4
9051 /* crypto/asn1/asn1.h */
9052 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9053  * All rights reserved.
9054  *
9055  * This package is an SSL implementation written
9056  * by Eric Young (eay@cryptsoft.com).
9057  * The implementation was written so as to conform with Netscapes SSL.
9058  *
9059  * This library is free for commercial and non-commercial use as long as
9060  * the following conditions are aheared to.  The following conditions
9061  * apply to all code found in this distribution, be it the RC4, RSA,
9062  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9063  * included with this distribution is covered by the same copyright terms
9064  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9065  *
9066  * Copyright remains Eric Young's, and as such any Copyright notices in
9067  * the code are not to be removed.
9068  * If this package is used in a product, Eric Young should be given attribution
9069  * as the author of the parts of the library used.
9070  * This can be in the form of a textual message at program startup or
9071  * in documentation (online or textual) provided with the package.
9072  *
9073  * Redistribution and use in source and binary forms, with or without
9074  * modification, are permitted provided that the following conditions
9075  * are met:
9076  * 1. Redistributions of source code must retain the copyright
9077  *    notice, this list of conditions and the following disclaimer.
9078  * 2. Redistributions in binary form must reproduce the above copyright
9079  *    notice, this list of conditions and the following disclaimer in the
9080  *    documentation and/or other materials provided with the distribution.
9081  * 3. All advertising materials mentioning features or use of this software
9082  *    must display the following acknowledgement:
9083  *    "This product includes cryptographic software written by
9084  *     Eric Young (eay@cryptsoft.com)"
9085  *    The word 'cryptographic' can be left out if the rouines from the library
9086  *    being used are not cryptographic related :-).
9087  * 4. If you include any Windows specific code (or a derivative thereof) from
9088  *    the apps directory (application code) you must include an acknowledgement:
9089  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9090  *
9091  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9092  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9093  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9094  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9095  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9096  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9097  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9098  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9099  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9100  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9101  * SUCH DAMAGE.
9102  *
9103  * The licence and distribution terms for any publically available version or
9104  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9105  * copied and put under another distribution licence
9106  * [including the GNU Public Licence.]
9107  */
9108 
9109 
9110 
9111 
9112 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/time.h" 1 3 4
9113 /*
9114  * CDDL HEADER START
9115  *
9116  * The contents of this file are subject to the terms of the
9117  * Common Development and Distribution License (the "License").
9118  * You may not use this file except in compliance with the License.
9119  *
9120  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9121  * or http://www.opensolaris.org/os/licensing.
9122  * See the License for the specific language governing permissions
9123  * and limitations under the License.
9124  *
9125  * When distributing Covered Code, include this CDDL HEADER in each
9126  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9127  * If applicable, add the following below this CDDL HEADER, with the
9128  * fields enclosed by brackets "[]" replaced with your own identifying
9129  * information: Portions Copyright [yyyy] [name of copyright owner]
9130  *
9131  * CDDL HEADER END
9132  */
9133 /*	Copyright (c) 1988 AT&T	*/
9134 /*	  All Rights Reserved  	*/
9135 
9136 
9137 /*
9138  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9139  *
9140  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9141  * Use is subject to license terms.
9142  */
9143 /*
9144  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
9145  * Copyright 2016 Joyent, Inc.
9146  */
9147 # 63 "/usr/include/openssl/asn1.h" 2 3 4
9148 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9149 /* e_os2.h */
9150 /* ====================================================================
9151  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9152  *
9153  * Redistribution and use in source and binary forms, with or without
9154  * modification, are permitted provided that the following conditions
9155  * are met:
9156  *
9157  * 1. Redistributions of source code must retain the above copyright
9158  *    notice, this list of conditions and the following disclaimer.
9159  *
9160  * 2. Redistributions in binary form must reproduce the above copyright
9161  *    notice, this list of conditions and the following disclaimer in
9162  *    the documentation and/or other materials provided with the
9163  *    distribution.
9164  *
9165  * 3. All advertising materials mentioning features or use of this
9166  *    software must display the following acknowledgment:
9167  *    "This product includes software developed by the OpenSSL Project
9168  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9169  *
9170  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9171  *    endorse or promote products derived from this software without
9172  *    prior written permission. For written permission, please contact
9173  *    openssl-core@openssl.org.
9174  *
9175  * 5. Products derived from this software may not be called "OpenSSL"
9176  *    nor may "OpenSSL" appear in their names without prior written
9177  *    permission of the OpenSSL Project.
9178  *
9179  * 6. Redistributions of any form whatsoever must retain the following
9180  *    acknowledgment:
9181  *    "This product includes software developed by the OpenSSL Project
9182  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9183  *
9184  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9185  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9186  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9187  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9188  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9189  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9190  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9191  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9192  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9193  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9194  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9195  * OF THE POSSIBILITY OF SUCH DAMAGE.
9196  * ====================================================================
9197  *
9198  * This product includes cryptographic software written by Eric Young
9199  * (eay@cryptsoft.com).  This product includes software written by Tim
9200  * Hudson (tjh@cryptsoft.com).
9201  *
9202  */
9203 
9204 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9205 /* opensslconf.h */
9206 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9207 
9208 
9209 
9210 
9211 /* OpenSSL was configured with the following options: */
9212 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9213 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9214    asks for it.  This is a transient feature that is provided for those
9215    who haven't had the time to do the appropriate changes in their
9216    applications.  */
9217 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9218 /* crypto/opensslconf.h.in */
9219 
9220 /* Generate 80386 code? */
9221 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9222 # 64 "/usr/include/openssl/asn1.h" 2 3 4
9223 
9224 # 1 "/usr/include/openssl/bio.h" 1 3 4
9225 /* crypto/bio/bio.h */
9226 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9227  * All rights reserved.
9228  *
9229  * This package is an SSL implementation written
9230  * by Eric Young (eay@cryptsoft.com).
9231  * The implementation was written so as to conform with Netscapes SSL.
9232  *
9233  * This library is free for commercial and non-commercial use as long as
9234  * the following conditions are aheared to.  The following conditions
9235  * apply to all code found in this distribution, be it the RC4, RSA,
9236  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9237  * included with this distribution is covered by the same copyright terms
9238  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9239  *
9240  * Copyright remains Eric Young's, and as such any Copyright notices in
9241  * the code are not to be removed.
9242  * If this package is used in a product, Eric Young should be given attribution
9243  * as the author of the parts of the library used.
9244  * This can be in the form of a textual message at program startup or
9245  * in documentation (online or textual) provided with the package.
9246  *
9247  * Redistribution and use in source and binary forms, with or without
9248  * modification, are permitted provided that the following conditions
9249  * are met:
9250  * 1. Redistributions of source code must retain the copyright
9251  *    notice, this list of conditions and the following disclaimer.
9252  * 2. Redistributions in binary form must reproduce the above copyright
9253  *    notice, this list of conditions and the following disclaimer in the
9254  *    documentation and/or other materials provided with the distribution.
9255  * 3. All advertising materials mentioning features or use of this software
9256  *    must display the following acknowledgement:
9257  *    "This product includes cryptographic software written by
9258  *     Eric Young (eay@cryptsoft.com)"
9259  *    The word 'cryptographic' can be left out if the rouines from the library
9260  *    being used are not cryptographic related :-).
9261  * 4. If you include any Windows specific code (or a derivative thereof) from
9262  *    the apps directory (application code) you must include an acknowledgement:
9263  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9264  *
9265  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9266  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9267  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9268  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9269  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9270  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9271  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9272  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9273  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9274  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9275  * SUCH DAMAGE.
9276  *
9277  * The licence and distribution terms for any publically available version or
9278  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9279  * copied and put under another distribution licence
9280  * [including the GNU Public Licence.]
9281  */
9282 # 66 "/usr/include/openssl/asn1.h" 2 3 4
9283 
9284 # 1 "/usr/include/openssl/stack.h" 1 3 4
9285 /* crypto/stack/stack.h */
9286 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9287  * All rights reserved.
9288  *
9289  * This package is an SSL implementation written
9290  * by Eric Young (eay@cryptsoft.com).
9291  * The implementation was written so as to conform with Netscapes SSL.
9292  *
9293  * This library is free for commercial and non-commercial use as long as
9294  * the following conditions are aheared to.  The following conditions
9295  * apply to all code found in this distribution, be it the RC4, RSA,
9296  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9297  * included with this distribution is covered by the same copyright terms
9298  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9299  *
9300  * Copyright remains Eric Young's, and as such any Copyright notices in
9301  * the code are not to be removed.
9302  * If this package is used in a product, Eric Young should be given attribution
9303  * as the author of the parts of the library used.
9304  * This can be in the form of a textual message at program startup or
9305  * in documentation (online or textual) provided with the package.
9306  *
9307  * Redistribution and use in source and binary forms, with or without
9308  * modification, are permitted provided that the following conditions
9309  * are met:
9310  * 1. Redistributions of source code must retain the copyright
9311  *    notice, this list of conditions and the following disclaimer.
9312  * 2. Redistributions in binary form must reproduce the above copyright
9313  *    notice, this list of conditions and the following disclaimer in the
9314  *    documentation and/or other materials provided with the distribution.
9315  * 3. All advertising materials mentioning features or use of this software
9316  *    must display the following acknowledgement:
9317  *    "This product includes cryptographic software written by
9318  *     Eric Young (eay@cryptsoft.com)"
9319  *    The word 'cryptographic' can be left out if the rouines from the library
9320  *    being used are not cryptographic related :-).
9321  * 4. If you include any Windows specific code (or a derivative thereof) from
9322  *    the apps directory (application code) you must include an acknowledgement:
9323  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9324  *
9325  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9326  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9327  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9328  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9329  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9330  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9331  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9332  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9333  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9334  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9335  * SUCH DAMAGE.
9336  *
9337  * The licence and distribution terms for any publically available version or
9338  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9339  * copied and put under another distribution licence
9340  * [including the GNU Public Licence.]
9341  */
9342 # 68 "/usr/include/openssl/asn1.h" 2 3 4
9343 # 1 "/usr/include/openssl/safestack.h" 1 3 4
9344 /* ====================================================================
9345  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
9346  *
9347  * Redistribution and use in source and binary forms, with or without
9348  * modification, are permitted provided that the following conditions
9349  * are met:
9350  *
9351  * 1. Redistributions of source code must retain the above copyright
9352  *    notice, this list of conditions and the following disclaimer.
9353  *
9354  * 2. Redistributions in binary form must reproduce the above copyright
9355  *    notice, this list of conditions and the following disclaimer in
9356  *    the documentation and/or other materials provided with the
9357  *    distribution.
9358  *
9359  * 3. All advertising materials mentioning features or use of this
9360  *    software must display the following acknowledgment:
9361  *    "This product includes software developed by the OpenSSL Project
9362  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9363  *
9364  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9365  *    endorse or promote products derived from this software without
9366  *    prior written permission. For written permission, please contact
9367  *    openssl-core@openssl.org.
9368  *
9369  * 5. Products derived from this software may not be called "OpenSSL"
9370  *    nor may "OpenSSL" appear in their names without prior written
9371  *    permission of the OpenSSL Project.
9372  *
9373  * 6. Redistributions of any form whatsoever must retain the following
9374  *    acknowledgment:
9375  *    "This product includes software developed by the OpenSSL Project
9376  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9377  *
9378  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9379  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9380  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9381  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9382  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9383  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9384  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9385  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9386  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9387  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9388  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9389  * OF THE POSSIBILITY OF SUCH DAMAGE.
9390  * ====================================================================
9391  *
9392  * This product includes cryptographic software written by Eric Young
9393  * (eay@cryptsoft.com).  This product includes software written by Tim
9394  * Hudson (tjh@cryptsoft.com).
9395  *
9396  */
9397 # 69 "/usr/include/openssl/asn1.h" 2 3 4
9398 
9399 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
9400 /* ====================================================================
9401  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
9402  *
9403  * Redistribution and use in source and binary forms, with or without
9404  * modification, are permitted provided that the following conditions
9405  * are met:
9406  *
9407  * 1. Redistributions of source code must retain the above copyright
9408  *    notice, this list of conditions and the following disclaimer.
9409  *
9410  * 2. Redistributions in binary form must reproduce the above copyright
9411  *    notice, this list of conditions and the following disclaimer in
9412  *    the documentation and/or other materials provided with the
9413  *    distribution.
9414  *
9415  * 3. All advertising materials mentioning features or use of this
9416  *    software must display the following acknowledgment:
9417  *    "This product includes software developed by the OpenSSL Project
9418  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9419  *
9420  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9421  *    endorse or promote products derived from this software without
9422  *    prior written permission. For written permission, please contact
9423  *    openssl-core@openssl.org.
9424  *
9425  * 5. Products derived from this software may not be called "OpenSSL"
9426  *    nor may "OpenSSL" appear in their names without prior written
9427  *    permission of the OpenSSL Project.
9428  *
9429  * 6. Redistributions of any form whatsoever must retain the following
9430  *    acknowledgment:
9431  *    "This product includes software developed by the OpenSSL Project
9432  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9433  *
9434  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9435  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9436  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9437  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9438  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9439  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9440  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9441  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9442  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9443  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9444  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9445  * OF THE POSSIBILITY OF SUCH DAMAGE.
9446  * ====================================================================
9447  *
9448  * This product includes cryptographic software written by Eric Young
9449  * (eay@cryptsoft.com).  This product includes software written by Tim
9450  * Hudson (tjh@cryptsoft.com).
9451  *
9452  */
9453 # 71 "/usr/include/openssl/asn1.h" 2 3 4
9454 
9455 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
9456 /* ====================================================================
9457  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
9458  *
9459  * Redistribution and use in source and binary forms, with or without
9460  * modification, are permitted provided that the following conditions
9461  * are met:
9462  *
9463  * 1. Redistributions of source code must retain the above copyright
9464  *    notice, this list of conditions and the following disclaimer.
9465  *
9466  * 2. Redistributions in binary form must reproduce the above copyright
9467  *    notice, this list of conditions and the following disclaimer in
9468  *    the documentation and/or other materials provided with the
9469  *    distribution.
9470  *
9471  * 3. All advertising materials mentioning features or use of this
9472  *    software must display the following acknowledgment:
9473  *    "This product includes software developed by the OpenSSL Project
9474  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9475  *
9476  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9477  *    endorse or promote products derived from this software without
9478  *    prior written permission. For written permission, please contact
9479  *    openssl-core@openssl.org.
9480  *
9481  * 5. Products derived from this software may not be called "OpenSSL"
9482  *    nor may "OpenSSL" appear in their names without prior written
9483  *    permission of the OpenSSL Project.
9484  *
9485  * 6. Redistributions of any form whatsoever must retain the following
9486  *    acknowledgment:
9487  *    "This product includes software developed by the OpenSSL Project
9488  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9489  *
9490  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9491  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9492  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9493  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9494  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9495  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9496  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9497  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9498  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9499  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9500  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9501  * OF THE POSSIBILITY OF SUCH DAMAGE.
9502  * ====================================================================
9503  *
9504  * This product includes cryptographic software written by Eric Young
9505  * (eay@cryptsoft.com).  This product includes software written by Tim
9506  * Hudson (tjh@cryptsoft.com).
9507  *
9508  */
9509 # 73 "/usr/include/openssl/asn1.h" 2 3 4
9510 
9511 # 1 "/usr/include/openssl/bn.h" 1 3 4
9512 /* crypto/bn/bn.h */
9513 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
9514  * All rights reserved.
9515  *
9516  * This package is an SSL implementation written
9517  * by Eric Young (eay@cryptsoft.com).
9518  * The implementation was written so as to conform with Netscapes SSL.
9519  *
9520  * This library is free for commercial and non-commercial use as long as
9521  * the following conditions are aheared to.  The following conditions
9522  * apply to all code found in this distribution, be it the RC4, RSA,
9523  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9524  * included with this distribution is covered by the same copyright terms
9525  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9526  *
9527  * Copyright remains Eric Young's, and as such any Copyright notices in
9528  * the code are not to be removed.
9529  * If this package is used in a product, Eric Young should be given attribution
9530  * as the author of the parts of the library used.
9531  * This can be in the form of a textual message at program startup or
9532  * in documentation (online or textual) provided with the package.
9533  *
9534  * Redistribution and use in source and binary forms, with or without
9535  * modification, are permitted provided that the following conditions
9536  * are met:
9537  * 1. Redistributions of source code must retain the copyright
9538  *    notice, this list of conditions and the following disclaimer.
9539  * 2. Redistributions in binary form must reproduce the above copyright
9540  *    notice, this list of conditions and the following disclaimer in the
9541  *    documentation and/or other materials provided with the distribution.
9542  * 3. All advertising materials mentioning features or use of this software
9543  *    must display the following acknowledgement:
9544  *    "This product includes cryptographic software written by
9545  *     Eric Young (eay@cryptsoft.com)"
9546  *    The word 'cryptographic' can be left out if the rouines from the library
9547  *    being used are not cryptographic related :-).
9548  * 4. If you include any Windows specific code (or a derivative thereof) from
9549  *    the apps directory (application code) you must include an acknowledgement:
9550  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9551  *
9552  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9553  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9554  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9555  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9556  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9557  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9558  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9559  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9560  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9561  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9562  * SUCH DAMAGE.
9563  *
9564  * The licence and distribution terms for any publically available version or
9565  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9566  * copied and put under another distribution licence
9567  * [including the GNU Public Licence.]
9568  */
9569 /* ====================================================================
9570  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
9571  *
9572  * Redistribution and use in source and binary forms, with or without
9573  * modification, are permitted provided that the following conditions
9574  * are met:
9575  *
9576  * 1. Redistributions of source code must retain the above copyright
9577  *    notice, this list of conditions and the following disclaimer.
9578  *
9579  * 2. Redistributions in binary form must reproduce the above copyright
9580  *    notice, this list of conditions and the following disclaimer in
9581  *    the documentation and/or other materials provided with the
9582  *    distribution.
9583  *
9584  * 3. All advertising materials mentioning features or use of this
9585  *    software must display the following acknowledgment:
9586  *    "This product includes software developed by the OpenSSL Project
9587  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9588  *
9589  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9590  *    endorse or promote products derived from this software without
9591  *    prior written permission. For written permission, please contact
9592  *    openssl-core@openssl.org.
9593  *
9594  * 5. Products derived from this software may not be called "OpenSSL"
9595  *    nor may "OpenSSL" appear in their names without prior written
9596  *    permission of the OpenSSL Project.
9597  *
9598  * 6. Redistributions of any form whatsoever must retain the following
9599  *    acknowledgment:
9600  *    "This product includes software developed by the OpenSSL Project
9601  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9602  *
9603  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9604  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9605  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9606  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9607  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9608  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9609  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9610  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9611  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9612  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9613  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9614  * OF THE POSSIBILITY OF SUCH DAMAGE.
9615  * ====================================================================
9616  *
9617  * This product includes cryptographic software written by Eric Young
9618  * (eay@cryptsoft.com).  This product includes software written by Tim
9619  * Hudson (tjh@cryptsoft.com).
9620  *
9621  */
9622 /* ====================================================================
9623  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
9624  *
9625  * Portions of the attached software ("Contribution") are developed by
9626  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
9627  *
9628  * The Contribution is licensed pursuant to the Eric Young open source
9629  * license provided above.
9630  *
9631  * The binary polynomial arithmetic software is originally written by
9632  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
9633  *
9634  */
9635 
9636 
9637 
9638 
9639 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/limits.h" 1 3 4
9640 /*
9641  * CDDL HEADER START
9642  *
9643  * The contents of this file are subject to the terms of the
9644  * Common Development and Distribution License (the "License").
9645  * You may not use this file except in compliance with the License.
9646  *
9647  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9648  * or http://www.opensolaris.org/os/licensing.
9649  * See the License for the specific language governing permissions
9650  * and limitations under the License.
9651  *
9652  * When distributing Covered Code, include this CDDL HEADER in each
9653  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9654  * If applicable, add the following below this CDDL HEADER, with the
9655  * fields enclosed by brackets "[]" replaced with your own identifying
9656  * information: Portions Copyright [yyyy] [name of copyright owner]
9657  *
9658  * CDDL HEADER END
9659  */
9660 
9661 /*
9662  * Copyright (c) 2013 Gary Mills
9663  *
9664  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
9665  * Use is subject to license terms.
9666  */
9667 
9668 /*	Copyright (c) 1988 AT&T	*/
9669 /*	  All Rights Reserved  	*/
9670 # 129 "/usr/include/openssl/bn.h" 2 3 4
9671 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
9672 /* e_os2.h */
9673 /* ====================================================================
9674  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
9675  *
9676  * Redistribution and use in source and binary forms, with or without
9677  * modification, are permitted provided that the following conditions
9678  * are met:
9679  *
9680  * 1. Redistributions of source code must retain the above copyright
9681  *    notice, this list of conditions and the following disclaimer.
9682  *
9683  * 2. Redistributions in binary form must reproduce the above copyright
9684  *    notice, this list of conditions and the following disclaimer in
9685  *    the documentation and/or other materials provided with the
9686  *    distribution.
9687  *
9688  * 3. All advertising materials mentioning features or use of this
9689  *    software must display the following acknowledgment:
9690  *    "This product includes software developed by the OpenSSL Project
9691  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9692  *
9693  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9694  *    endorse or promote products derived from this software without
9695  *    prior written permission. For written permission, please contact
9696  *    openssl-core@openssl.org.
9697  *
9698  * 5. Products derived from this software may not be called "OpenSSL"
9699  *    nor may "OpenSSL" appear in their names without prior written
9700  *    permission of the OpenSSL Project.
9701  *
9702  * 6. Redistributions of any form whatsoever must retain the following
9703  *    acknowledgment:
9704  *    "This product includes software developed by the OpenSSL Project
9705  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9706  *
9707  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9708  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9709  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9710  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9711  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9712  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9713  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9714  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9715  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9716  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9717  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9718  * OF THE POSSIBILITY OF SUCH DAMAGE.
9719  * ====================================================================
9720  *
9721  * This product includes cryptographic software written by Eric Young
9722  * (eay@cryptsoft.com).  This product includes software written by Tim
9723  * Hudson (tjh@cryptsoft.com).
9724  *
9725  */
9726 
9727 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
9728 /* opensslconf.h */
9729 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
9730 
9731 
9732 
9733 
9734 /* OpenSSL was configured with the following options: */
9735 # 108 "/usr/include/openssl/opensslconf.h" 3 4
9736 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
9737    asks for it.  This is a transient feature that is provided for those
9738    who haven't had the time to do the appropriate changes in their
9739    applications.  */
9740 # 204 "/usr/include/openssl/opensslconf.h" 3 4
9741 /* crypto/opensslconf.h.in */
9742 
9743 /* Generate 80386 code? */
9744 # 272 "/usr/include/openssl/opensslconf.h" 3 4
9745 /*
9746  * OpenSSL revision 1.521 from 2005-12-15 in OpenSSL_1_0_0-stable branch changed
9747  * 64 bit sparcv9 configuration from SIXTY_FOUR_BIT_LONG to BN_LLONG.
9748  */
9749 
9750 
9751 
9752 
9753 
9754 
9755 /* Should we define BN_DIV2W here? */
9756 
9757 /* Only one for the following should be defined */
9758 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
9759 # 130 "/usr/include/openssl/bn.h" 2 3 4
9760 
9761 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
9762 /*
9763  * CDDL HEADER START
9764  *
9765  * The contents of this file are subject to the terms of the
9766  * Common Development and Distribution License (the "License").
9767  * You may not use this file except in compliance with the License.
9768  *
9769  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9770  * or http://www.opensolaris.org/os/licensing.
9771  * See the License for the specific language governing permissions
9772  * and limitations under the License.
9773  *
9774  * When distributing Covered Code, include this CDDL HEADER in each
9775  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9776  * If applicable, add the following below this CDDL HEADER, with the
9777  * fields enclosed by brackets "[]" replaced with your own identifying
9778  * information: Portions Copyright [yyyy] [name of copyright owner]
9779  *
9780  * CDDL HEADER END
9781  */
9782 
9783 /*
9784  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
9785  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
9786  */
9787 
9788 /*	Copyright (c) 1988 AT&T	*/
9789 /*	  All Rights Reserved  	*/
9790 
9791 /*
9792  * User-visible pieces of the ANSI C standard I/O package.
9793  */
9794 # 132 "/usr/include/openssl/bn.h" 2 3 4
9795 
9796 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
9797 /* ====================================================================
9798  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
9799  *
9800  * Redistribution and use in source and binary forms, with or without
9801  * modification, are permitted provided that the following conditions
9802  * are met:
9803  *
9804  * 1. Redistributions of source code must retain the above copyright
9805  *    notice, this list of conditions and the following disclaimer.
9806  *
9807  * 2. Redistributions in binary form must reproduce the above copyright
9808  *    notice, this list of conditions and the following disclaimer in
9809  *    the documentation and/or other materials provided with the
9810  *    distribution.
9811  *
9812  * 3. All advertising materials mentioning features or use of this
9813  *    software must display the following acknowledgment:
9814  *    "This product includes software developed by the OpenSSL Project
9815  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9816  *
9817  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9818  *    endorse or promote products derived from this software without
9819  *    prior written permission. For written permission, please contact
9820  *    openssl-core@openssl.org.
9821  *
9822  * 5. Products derived from this software may not be called "OpenSSL"
9823  *    nor may "OpenSSL" appear in their names without prior written
9824  *    permission of the OpenSSL Project.
9825  *
9826  * 6. Redistributions of any form whatsoever must retain the following
9827  *    acknowledgment:
9828  *    "This product includes software developed by the OpenSSL Project
9829  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9830  *
9831  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9832  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9833  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9834  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9835  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9836  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9837  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9838  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9839  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9840  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9841  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9842  * OF THE POSSIBILITY OF SUCH DAMAGE.
9843  * ====================================================================
9844  *
9845  * This product includes cryptographic software written by Eric Young
9846  * (eay@cryptsoft.com).  This product includes software written by Tim
9847  * Hudson (tjh@cryptsoft.com).
9848  *
9849  */
9850 # 134 "/usr/include/openssl/bn.h" 2 3 4
9851 # 1 "/usr/include/openssl/crypto.h" 1 3 4
9852 /* crypto/crypto.h */
9853 /* ====================================================================
9854  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
9855  *
9856  * Redistribution and use in source and binary forms, with or without
9857  * modification, are permitted provided that the following conditions
9858  * are met:
9859  *
9860  * 1. Redistributions of source code must retain the above copyright
9861  *    notice, this list of conditions and the following disclaimer.
9862  *
9863  * 2. Redistributions in binary form must reproduce the above copyright
9864  *    notice, this list of conditions and the following disclaimer in
9865  *    the documentation and/or other materials provided with the
9866  *    distribution.
9867  *
9868  * 3. All advertising materials mentioning features or use of this
9869  *    software must display the following acknowledgment:
9870  *    "This product includes software developed by the OpenSSL Project
9871  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
9872  *
9873  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
9874  *    endorse or promote products derived from this software without
9875  *    prior written permission. For written permission, please contact
9876  *    openssl-core@openssl.org.
9877  *
9878  * 5. Products derived from this software may not be called "OpenSSL"
9879  *    nor may "OpenSSL" appear in their names without prior written
9880  *    permission of the OpenSSL Project.
9881  *
9882  * 6. Redistributions of any form whatsoever must retain the following
9883  *    acknowledgment:
9884  *    "This product includes software developed by the OpenSSL Project
9885  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
9886  *
9887  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
9888  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9889  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9890  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
9891  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9892  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9893  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9894  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9895  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
9896  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9897  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
9898  * OF THE POSSIBILITY OF SUCH DAMAGE.
9899  * ====================================================================
9900  *
9901  * This product includes cryptographic software written by Eric Young
9902  * (eay@cryptsoft.com).  This product includes software written by Tim
9903  * Hudson (tjh@cryptsoft.com).
9904  *
9905  */
9906 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
9907  * All rights reserved.
9908  *
9909  * This package is an SSL implementation written
9910  * by Eric Young (eay@cryptsoft.com).
9911  * The implementation was written so as to conform with Netscapes SSL.
9912  *
9913  * This library is free for commercial and non-commercial use as long as
9914  * the following conditions are aheared to.  The following conditions
9915  * apply to all code found in this distribution, be it the RC4, RSA,
9916  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
9917  * included with this distribution is covered by the same copyright terms
9918  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
9919  *
9920  * Copyright remains Eric Young's, and as such any Copyright notices in
9921  * the code are not to be removed.
9922  * If this package is used in a product, Eric Young should be given attribution
9923  * as the author of the parts of the library used.
9924  * This can be in the form of a textual message at program startup or
9925  * in documentation (online or textual) provided with the package.
9926  *
9927  * Redistribution and use in source and binary forms, with or without
9928  * modification, are permitted provided that the following conditions
9929  * are met:
9930  * 1. Redistributions of source code must retain the copyright
9931  *    notice, this list of conditions and the following disclaimer.
9932  * 2. Redistributions in binary form must reproduce the above copyright
9933  *    notice, this list of conditions and the following disclaimer in the
9934  *    documentation and/or other materials provided with the distribution.
9935  * 3. All advertising materials mentioning features or use of this software
9936  *    must display the following acknowledgement:
9937  *    "This product includes cryptographic software written by
9938  *     Eric Young (eay@cryptsoft.com)"
9939  *    The word 'cryptographic' can be left out if the rouines from the library
9940  *    being used are not cryptographic related :-).
9941  * 4. If you include any Windows specific code (or a derivative thereof) from
9942  *    the apps directory (application code) you must include an acknowledgement:
9943  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
9944  *
9945  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
9946  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9947  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9948  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9949  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9950  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9951  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9952  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9953  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9954  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9955  * SUCH DAMAGE.
9956  *
9957  * The licence and distribution terms for any publically available version or
9958  * derivative of this code cannot be changed.  i.e. this code cannot simply be
9959  * copied and put under another distribution licence
9960  * [including the GNU Public Licence.]
9961  */
9962 /* ====================================================================
9963  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
9964  * ECDH support in OpenSSL originally developed by
9965  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
9966  */
9967 # 135 "/usr/include/openssl/bn.h" 2 3 4
9968 
9969 
9970 
9971 
9972 
9973 /*
9974  * These preprocessor symbols control various aspects of the bignum headers
9975  * and library code. They're not defined by any "normal" configuration, as
9976  * they are intended for development and testing purposes. NB: defining all
9977  * three can be useful for debugging application code as well as openssl
9978  * itself. BN_DEBUG - turn on various debugging alterations to the bignum
9979  * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up
9980  * mismanagement of bignum internals. You must also define BN_DEBUG.
9981  */
9982 /* #define BN_DEBUG */
9983 /* #define BN_DEBUG_RAND */
9984 
9985 
9986 
9987 
9988 
9989 
9990 
9991 /*
9992  * This next option uses the C libraries (2 word)/(1 word) function. If it is
9993  * not defined, I use my C version (which is slower). The reason for this
9994  * flag is that when the particular C compiler library routine is used, and
9995  * the library is linked with a different compiler, the library is missing.
9996  * This mostly happens when the library is built with gcc and then linked
9997  * using normal cc.  This would be a common occurrence because gcc normally
9998  * produces code that is 2 times faster than system compilers for the big
9999  * number stuff. For machines with only one compiler (or shared libraries),
10000  * this should be on.  Again this in only really a problem on machines using
10001  * "long long's", are 32bit, and are not using my assembler code.
10002  */
10003 
10004 
10005 
10006 
10007 
10008 
10009 
10010 /*
10011  * assuming long is 64bit - this is the DEC Alpha unsigned long long is only
10012  * 64 bits :-(, don't define BN_LLONG for the DEC Alpha
10013  */
10014 # 203 "/usr/include/openssl/bn.h" 3 4
10015 /*
10016  * This is where the long long data type is 64 bits, but long is 32. For
10017  * machines where there are 64bit registers, this is the mode to use. IRIX,
10018  * on R4000 and above should use this mode, along with the relevant assembler
10019  * code :-).  Do NOT define BN_LLONG.
10020  */
10021 # 265 "/usr/include/openssl/bn.h" 3 4
10022 /*
10023  * avoid leaking exponent information through timing,
10024  * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
10025  * BN_div() will call BN_div_no_branch,
10026  * BN_mod_inverse() will call BN_mod_inverse_no_branch.
10027  */
10028 # 284 "/usr/include/openssl/bn.h" 3 4
10029                                        /* used for debuging */
10030 
10031 
10032 
10033 
10034 /*
10035  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
10036  * two BIGNUMs cannot not be used in parallel!)
10037  */
10038 # 302 "/usr/include/openssl/bn.h" 3 4
10039 /* Already declared in ossl_typ.h */
10040 # 313 "/usr/include/openssl/bn.h" 3 4
10041 struct bignum_st {
10042     unsigned int *d; /* Pointer to an array of 'BN_BITS2' bit
10043                                  * chunks. */
10044     int top; /* Index of last used d +1. */
10045     /* The next are internal book keeping for bn_expand. */
10046     int dmax; /* Size of the d array. */
10047     int neg; /* one if the number is negative */
10048     int flags;
10049 };
10050 
10051 /* Used for montgomery multiplication */
10052 struct bn_mont_ctx_st {
10053     int ri; /* number of bits in R */
10054     BIGNUM RR; /* used to convert to montgomery form */
10055     BIGNUM N; /* The modulus */
10056     BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
10057                                  * stored for bignum algorithm) */
10058     unsigned int n0[2]; /* least significant word(s) of Ni; (type
10059                                  * changed with 0.9.9, was "BN_ULONG n0;"
10060                                  * before) */
10061     int flags;
10062 };
10063 
10064 /*
10065  * Used for reciprocal division/mod functions It cannot be shared between
10066  * threads
10067  */
10068 struct bn_recp_ctx_st {
10069     BIGNUM N; /* the divisor */
10070     BIGNUM Nr; /* the reciprocal */
10071     int num_bits;
10072     int shift;
10073     int flags;
10074 };
10075 
10076 /* Used for slow "generation" functions. */
10077 struct bn_gencb_st {
10078     unsigned int ver; /* To handle binary (in)compatibility */
10079     void *arg; /* callback-specific data */
10080     union {
10081         /* if(ver==1) - handles old style callbacks */
10082         void (*cb_1) (int, int, void *);
10083         /* if(ver==2) - new callback style */
10084         int (*cb_2) (int, int, BN_GENCB *);
10085     } cb;
10086 };
10087 /* Wrapper function to make using BN_GENCB easier,  */
10088 int BN_GENCB_call(BN_GENCB *cb, int a, int b);
10089 /* Macro to populate a BN_GENCB structure with an "old"-style callback */
10090 
10091 
10092 
10093 
10094 
10095 /* Macro to populate a BN_GENCB structure with a "new"-style callback */
10096 # 377 "/usr/include/openssl/bn.h" 3 4
10097 /*
10098  * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
10099  * that will be done for checking that a random number is probably prime. The
10100  * error rate for accepting a composite number as prime depends on the size of
10101  * the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
10102  * and so the level is what you would expect for a key of double the size of the
10103  * prime.
10104  *
10105  * This table is generated using the algorithm of FIPS PUB 186-4
10106  * Digital Signature Standard (DSS), section F.1, page 117.
10107  * (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
10108  *
10109  * The following magma script was used to generate the output:
10110  * securitybits:=125;
10111  * k:=1024;
10112  * for t:=1 to 65 do
10113  *   for M:=3 to Floor(2*Sqrt(k-1)-1) do
10114  *     S:=0;
10115  *     // Sum over m
10116  *     for m:=3 to M do
10117  *       s:=0;
10118  *       // Sum over j
10119  *       for j:=2 to m do
10120  *         s+:=(RealField(32)!2)^-(j+(k-1)/j);
10121  *       end for;
10122  *       S+:=2^(m-(m-1)*t)*s;
10123  *     end for;
10124  *     A:=2^(k-2-M*t);
10125  *     B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
10126  *     pkt:=2.00743*Log(2)*k*2^-k*(A+B);
10127  *     seclevel:=Floor(-Log(2,pkt));
10128  *     if seclevel ge securitybits then
10129  *       printf "k: %5o, security: %o bits  (t: %o, M: %o)\n",k,seclevel,t,M;
10130  *       break;
10131  *     end if;
10132  *   end for;
10133  *   if seclevel ge securitybits then break; end if;
10134  * end for;
10135  *
10136  * It can be run online at:
10137  * http://magma.maths.usyd.edu.au/calc
10138  *
10139  * And will output:
10140  * k:  1024, security: 129 bits  (t: 6, M: 23)
10141  *
10142  * k is the number of bits of the prime, securitybits is the level we want to
10143  * reach.
10144  *
10145  * prime length | RSA key size | # MR tests | security level
10146  * -------------+--------------|------------+---------------
10147  *  (b) >= 6394 |     >= 12788 |          3 |        256 bit
10148  *  (b) >= 3747 |     >=  7494 |          3 |        192 bit
10149  *  (b) >= 1345 |     >=  2690 |          4 |        128 bit
10150  *  (b) >= 1080 |     >=  2160 |          5 |        128 bit
10151  *  (b) >=  852 |     >=  1704 |          5 |        112 bit
10152  *  (b) >=  476 |     >=   952 |          5 |         80 bit
10153  *  (b) >=  400 |     >=   800 |          6 |         80 bit
10154  *  (b) >=  347 |     >=   694 |          7 |         80 bit
10155  *  (b) >=  308 |     >=   616 |          8 |         80 bit
10156  *  (b) >=   55 |     >=   110 |         27 |         64 bit
10157  *  (b) >=    6 |     >=    12 |         34 |         64 bit
10158  */
10159 # 451 "/usr/include/openssl/bn.h" 3 4
10160 /* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
10161 # 472 "/usr/include/openssl/bn.h" 3 4
10162 const BIGNUM *BN_value_one(void);
10163 char *BN_options(void);
10164 BN_CTX *BN_CTX_new(void);
10165 
10166 void BN_CTX_init(BN_CTX *c);
10167 
10168 void BN_CTX_free(BN_CTX *c);
10169 void BN_CTX_start(BN_CTX *ctx);
10170 BIGNUM *BN_CTX_get(BN_CTX *ctx);
10171 void BN_CTX_end(BN_CTX *ctx);
10172 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
10173 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
10174 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
10175 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
10176 int BN_num_bits(const BIGNUM *a);
10177 int BN_num_bits_word(unsigned int);
10178 BIGNUM *BN_new(void);
10179 void BN_init(BIGNUM *);
10180 void BN_clear_free(BIGNUM *a);
10181 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
10182 void BN_swap(BIGNUM *a, BIGNUM *b);
10183 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
10184 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
10185 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
10186 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
10187 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
10188 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
10189 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
10190 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
10191 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
10192 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
10193 /** BN_set_negative sets sign of a BIGNUM
10194  * \param  b  pointer to the BIGNUM object
10195  * \param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise
10196  */
10197 void BN_set_negative(BIGNUM *b, int n);
10198 /** BN_is_negative returns 1 if the BIGNUM is negative
10199  * \param  a  pointer to the BIGNUM object
10200  * \return 1 if a < 0 and 0 otherwise
10201  */
10202 
10203 
10204 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
10205            BN_CTX *ctx);
10206 
10207 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
10208 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
10209                BN_CTX *ctx);
10210 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10211                      const BIGNUM *m);
10212 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
10213                BN_CTX *ctx);
10214 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10215                      const BIGNUM *m);
10216 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
10217                BN_CTX *ctx);
10218 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
10219 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
10220 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
10221 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
10222                   BN_CTX *ctx);
10223 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
10224 
10225 unsigned int BN_mod_word(const BIGNUM *a, unsigned int w);
10226 unsigned int BN_div_word(BIGNUM *a, unsigned int w);
10227 int BN_mul_word(BIGNUM *a, unsigned int w);
10228 int BN_add_word(BIGNUM *a, unsigned int w);
10229 int BN_sub_word(BIGNUM *a, unsigned int w);
10230 int BN_set_word(BIGNUM *a, unsigned int w);
10231 unsigned int BN_get_word(const BIGNUM *a);
10232 
10233 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
10234 void BN_free(BIGNUM *a);
10235 int BN_is_bit_set(const BIGNUM *a, int n);
10236 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
10237 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
10238 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10239 
10240 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
10241                const BIGNUM *m, BN_CTX *ctx);
10242 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
10243                     const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
10244 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
10245                               const BIGNUM *m, BN_CTX *ctx,
10246                               BN_MONT_CTX *in_mont);
10247 int BN_mod_exp_mont_word(BIGNUM *r, unsigned int a, const BIGNUM *p,
10248                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
10249 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
10250                      const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
10251                      BN_CTX *ctx, BN_MONT_CTX *m_ctx);
10252 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
10253                       const BIGNUM *m, BN_CTX *ctx);
10254 
10255 int BN_mask_bits(BIGNUM *a, int n);
10256 
10257 int BN_print_fp(FILE *fp, const BIGNUM *a);
10258 
10259 
10260 int BN_print(BIO *fp, const BIGNUM *a);
10261 
10262 
10263 
10264 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
10265 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
10266 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
10267 void BN_clear(BIGNUM *a);
10268 BIGNUM *BN_dup(const BIGNUM *a);
10269 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
10270 int BN_set_bit(BIGNUM *a, int n);
10271 int BN_clear_bit(BIGNUM *a, int n);
10272 char *BN_bn2hex(const BIGNUM *a);
10273 char *BN_bn2dec(const BIGNUM *a);
10274 int BN_hex2bn(BIGNUM **a, const char *str);
10275 int BN_dec2bn(BIGNUM **a, const char *str);
10276 int BN_asc2bn(BIGNUM **a, const char *str);
10277 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
10278 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
10279                                                                   * -2 for
10280                                                                   * error */
10281 BIGNUM *BN_mod_inverse(BIGNUM *ret,
10282                        const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
10283 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
10284                     const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
10285 
10286 void BN_consttime_swap(unsigned int swap, BIGNUM *a, BIGNUM *b, int nwords);
10287 
10288 /* Deprecated versions */
10289 
10290 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
10291                           const BIGNUM *add, const BIGNUM *rem,
10292                           void (*callback) (int, int, void *), void *cb_arg);
10293 int BN_is_prime(const BIGNUM *p, int nchecks,
10294                 void (*callback) (int, int, void *),
10295                 BN_CTX *ctx, void *cb_arg);
10296 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
10297                          void (*callback) (int, int, void *), BN_CTX *ctx,
10298                          void *cb_arg, int do_trial_division);
10299 
10300 
10301 /* Newer versions */
10302 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
10303                          const BIGNUM *rem, BN_GENCB *cb);
10304 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
10305 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
10306                             int do_trial_division, BN_GENCB *cb);
10307 
10308 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
10309 
10310 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
10311                             const BIGNUM *Xp, const BIGNUM *Xp1,
10312                             const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
10313                             BN_GENCB *cb);
10314 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
10315                               BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
10316                               BN_CTX *ctx, BN_GENCB *cb);
10317 
10318 BN_MONT_CTX *BN_MONT_CTX_new(void);
10319 void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
10320 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10321                           BN_MONT_CTX *mont, BN_CTX *ctx);
10322 
10323 
10324 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
10325                        BN_MONT_CTX *mont, BN_CTX *ctx);
10326 void BN_MONT_CTX_free(BN_MONT_CTX *mont);
10327 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
10328 BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
10329 BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
10330                                     const BIGNUM *mod, BN_CTX *ctx);
10331 
10332 /* BN_BLINDING flags */
10333 
10334 
10335 
10336 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
10337 void BN_BLINDING_free(BN_BLINDING *b);
10338 int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
10339 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
10340 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
10341 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
10342 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
10343                           BN_CTX *);
10344 
10345 unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
10346 void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
10347 
10348 CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);
10349 unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
10350 void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
10351 BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
10352                                       const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
10353                                       int (*bn_mod_exp) (BIGNUM *r,
10354                                                          const BIGNUM *a,
10355                                                          const BIGNUM *p,
10356                                                          const BIGNUM *m,
10357                                                          BN_CTX *ctx,
10358                                                          BN_MONT_CTX *m_ctx),
10359                                       BN_MONT_CTX *m_ctx);
10360 
10361 
10362 void BN_set_params(int mul, int high, int low, int mont);
10363 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
10364 
10365 
10366 void BN_RECP_CTX_init(BN_RECP_CTX *recp);
10367 BN_RECP_CTX *BN_RECP_CTX_new(void);
10368 void BN_RECP_CTX_free(BN_RECP_CTX *recp);
10369 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
10370 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
10371                           BN_RECP_CTX *recp, BN_CTX *ctx);
10372 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
10373                     const BIGNUM *m, BN_CTX *ctx);
10374 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
10375                 BN_RECP_CTX *recp, BN_CTX *ctx);
10376 
10377 
10378 
10379 /*
10380  * Functions for arithmetic over binary polynomials represented by BIGNUMs.
10381  * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
10382  * ignored. Note that input arguments are not const so that their bit arrays
10383  * can be expanded to the appropriate size if needed.
10384  */
10385 
10386 /*
10387  * r = a + b
10388  */
10389 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
10390 
10391 /*
10392  * r=a mod p
10393  */
10394 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
10395 /* r = (a * b) mod p */
10396 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10397                     const BIGNUM *p, BN_CTX *ctx);
10398 /* r = (a * a) mod p */
10399 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10400 /* r = (1 / b) mod p */
10401 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
10402 /* r = (a / b) mod p */
10403 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10404                     const BIGNUM *p, BN_CTX *ctx);
10405 /* r = (a ^ b) mod p */
10406 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10407                     const BIGNUM *p, BN_CTX *ctx);
10408 /* r = sqrt(a) mod p */
10409 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
10410                      BN_CTX *ctx);
10411 /* r^2 + r = a mod p */
10412 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
10413                            BN_CTX *ctx);
10414 
10415 /*-
10416  * Some functions allow for representation of the irreducible polynomials
10417  * as an unsigned int[], say p.  The irreducible f(t) is then of the form:
10418  *     t^p[0] + t^p[1] + ... + t^p[k]
10419  * where m = p[0] > p[1] > ... > p[k] = 0.
10420  */
10421 /* r = a mod p */
10422 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
10423 /* r = (a * b) mod p */
10424 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10425                         const int p[], BN_CTX *ctx);
10426 /* r = (a * a) mod p */
10427 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
10428                         BN_CTX *ctx);
10429 /* r = (1 / b) mod p */
10430 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
10431                         BN_CTX *ctx);
10432 /* r = (a / b) mod p */
10433 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10434                         const int p[], BN_CTX *ctx);
10435 /* r = (a ^ b) mod p */
10436 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
10437                         const int p[], BN_CTX *ctx);
10438 /* r = sqrt(a) mod p */
10439 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
10440                          const int p[], BN_CTX *ctx);
10441 /* r^2 + r = a mod p */
10442 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
10443                                const int p[], BN_CTX *ctx);
10444 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
10445 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
10446 
10447 
10448 
10449 /*
10450  * faster mod functions for the 'NIST primes' 0 <= a < p^2
10451  */
10452 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10453 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10454 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10455 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10456 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
10457 
10458 const BIGNUM *BN_get0_nist_prime_192(void);
10459 const BIGNUM *BN_get0_nist_prime_224(void);
10460 const BIGNUM *BN_get0_nist_prime_256(void);
10461 const BIGNUM *BN_get0_nist_prime_384(void);
10462 const BIGNUM *BN_get0_nist_prime_521(void);
10463 
10464 /* library internal functions */
10465 # 788 "/usr/include/openssl/bn.h" 3 4
10466 BIGNUM *bn_expand2(BIGNUM *a, int words);
10467 
10468 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
10469 
10470 
10471 /*-
10472  * Bignum consistency macros
10473  * There is one "API" macro, bn_fix_top(), for stripping leading zeroes from
10474  * bignum data after direct manipulations on the data. There is also an
10475  * "internal" macro, bn_check_top(), for verifying that there are no leading
10476  * zeroes. Unfortunately, some auditing is required due to the fact that
10477  * bn_fix_top() has become an overabused duct-tape because bignum data is
10478  * occasionally passed around in an inconsistent state. So the following
10479  * changes have been made to sort this out;
10480  * - bn_fix_top()s implementation has been moved to bn_correct_top()
10481  * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and
10482  *   bn_check_top() is as before.
10483  * - if BN_DEBUG *is* defined;
10484  *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is
10485  *     consistent. (ed: only if BN_DEBUG_RAND is defined)
10486  *   - bn_fix_top() maps to bn_check_top() rather than "fixing" anything.
10487  * The idea is to have debug builds flag up inconsistent bignums when they
10488  * occur. If that occurs in a bn_fix_top(), we examine the code in question; if
10489  * the use of bn_fix_top() was appropriate (ie. it follows directly after code
10490  * that manipulates the bignum) it is converted to bn_correct_top(), and if it
10491  * was not appropriate, we convert it permanently to bn_check_top() and track
10492  * down the cause of the bug. Eventually, no internal code should be using the
10493  * bn_fix_top() macro. External applications and libraries should try this with
10494  * their own code too, both in terms of building against the openssl headers
10495  * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it
10496  * defined. This not only improves external code, it provides more test
10497  * coverage for openssl's own code.
10498  */
10499 # 914 "/usr/include/openssl/bn.h" 3 4
10500 unsigned int bn_mul_add_words(unsigned int *rp, const unsigned int *ap, int num,
10501                           unsigned int w);
10502 unsigned int bn_mul_words(unsigned int *rp, const unsigned int *ap, int num, unsigned int w);
10503 void bn_sqr_words(unsigned int *rp, const unsigned int *ap, int num);
10504 unsigned int bn_div_words(unsigned int h, unsigned int l, unsigned int d);
10505 unsigned int bn_add_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
10506                       int num);
10507 unsigned int bn_sub_words(unsigned int *rp, const unsigned int *ap, const unsigned int *bp,
10508                       int num);
10509 
10510 /* Primes from RFC 2409 */
10511 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
10512 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
10513 
10514 /* Primes from RFC 3526 */
10515 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
10516 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
10517 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
10518 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
10519 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
10520 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
10521 
10522 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
10523 
10524 /* BEGIN ERROR CODES */
10525 /*
10526  * The following lines are auto generated by the script mkerr.pl. Any changes
10527  * made after this point may be overwritten when the script is next run.
10528  */
10529 void ERR_load_BN_strings(void);
10530 
10531 /* Error codes for the BN functions. */
10532 
10533 /* Function codes. */
10534 # 991 "/usr/include/openssl/bn.h" 3 4
10535 /* Reason codes. */
10536 # 75 "/usr/include/openssl/asn1.h" 2 3 4
10537 # 132 "/usr/include/openssl/asn1.h" 3 4
10538 /* For use with d2i_ASN1_type_bytes() */
10539 # 152 "/usr/include/openssl/asn1.h" 3 4
10540 /* For use with ASN1_mbstring_copy() */
10541 # 161 "/usr/include/openssl/asn1.h" 3 4
10542     struct X509_algor_st;
10543 struct stack_st_X509_ALGOR { _STACK stack; };
10544 
10545 
10546 
10547 
10548 /*
10549  * We MUST make sure that, except for constness, asn1_ctx_st and
10550  * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1
10551  * parsing macros are gone, we can throw this away as well...
10552  */
10553 typedef struct asn1_ctx_st {
10554     unsigned char *p; /* work char pointer */
10555     int eos; /* end of sequence read for indefinite
10556                                  * encoding */
10557     int error; /* error code to use when returning an error */
10558     int inf; /* constructed if 0x20, indefinite is 0x21 */
10559     int tag; /* tag from last 'get object' */
10560     int xclass; /* class from last 'get object' */
10561     long slen; /* length of last 'get object' */
10562     unsigned char *max; /* largest value of p allowed */
10563     unsigned char *q; /* temporary variable */
10564     unsigned char **pp; /* variable */
10565     int line; /* used in error processing */
10566 } ASN1_CTX;
10567 
10568 typedef struct asn1_const_ctx_st {
10569     const unsigned char *p; /* work char pointer */
10570     int eos; /* end of sequence read for indefinite
10571                                  * encoding */
10572     int error; /* error code to use when returning an error */
10573     int inf; /* constructed if 0x20, indefinite is 0x21 */
10574     int tag; /* tag from last 'get object' */
10575     int xclass; /* class from last 'get object' */
10576     long slen; /* length of last 'get object' */
10577     const unsigned char *max; /* largest value of p allowed */
10578     const unsigned char *q; /* temporary variable */
10579     const unsigned char **pp; /* variable */
10580     int line; /* used in error processing */
10581 } ASN1_const_CTX;
10582 
10583 /*
10584  * These are used internally in the ASN1_OBJECT to keep track of whether the
10585  * names and data need to be free()ed
10586  */
10587 
10588 
10589 
10590 
10591 struct asn1_object_st {
10592     const char *sn, *ln;
10593     int nid;
10594     int length;
10595     const unsigned char *data; /* data remains const after init */
10596     int flags; /* Should we free this one */
10597 };
10598 
10599 
10600 /*
10601  * This indicates that the ASN1_STRING is not a real value but just a place
10602  * holder for the location where indefinite length constructed data should be
10603  * inserted in the memory buffer
10604  */
10605 
10606 
10607 /*
10608  * This flag is used by the CMS code to indicate that a string is not
10609  * complete and is a place holder for content when it had all been accessed.
10610  * The flag will be reset when content has been written to it.
10611  */
10612 
10613 
10614 /*
10615  * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
10616  * type.
10617  */
10618 
10619 /* This is the base type that holds just about everything :-) */
10620 struct asn1_string_st {
10621     int length;
10622     int type;
10623     unsigned char *data;
10624     /*
10625      * The value of the following field depends on the type being held.  It
10626      * is mostly being used for BIT_STRING so if the input data has a
10627      * non-zero 'unused bits' value, it will be handled correctly
10628      */
10629     long flags;
10630 };
10631 
10632 /*
10633  * ASN1_ENCODING structure: this is used to save the received encoding of an
10634  * ASN1 type. This is useful to get round problems with invalid encodings
10635  * which can break signatures.
10636  */
10637 
10638 typedef struct ASN1_ENCODING_st {
10639     unsigned char *enc; /* DER encoding */
10640     long len; /* Length of encoding */
10641     int modified; /* set to 1 if 'enc' is invalid */
10642 } ASN1_ENCODING;
10643 
10644 /* Used with ASN1 LONG type: if a long is set to this it is omitted */
10645 # 272 "/usr/include/openssl/asn1.h" 3 4
10646 typedef struct asn1_string_table_st {
10647     int nid;
10648     long minsize;
10649     long maxsize;
10650     unsigned long mask;
10651     unsigned long flags;
10652 } ASN1_STRING_TABLE;
10653 
10654 struct stack_st_ASN1_STRING_TABLE { _STACK stack; };
10655 
10656 /* size limits: this stuff is taken straight from RFC2459 */
10657 # 293 "/usr/include/openssl/asn1.h" 3 4
10658 /*
10659  * Declarations for template structures: for full definitions see asn1t.h
10660  */
10661 typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
10662 typedef struct ASN1_TLC_st ASN1_TLC;
10663 /* This is just an opaque pointer */
10664 typedef struct ASN1_VALUE_st ASN1_VALUE;
10665 
10666 /* Declare ASN1 functions: the implement macro in in asn1t.h */
10667 # 363 "/usr/include/openssl/asn1.h" 3 4
10668 typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
10669 
10670 /*-
10671  * The following macros and typedefs allow an ASN1_ITEM
10672  * to be embedded in a structure and referenced. Since
10673  * the ASN1_ITEM pointers need to be globally accessible
10674  * (possibly from shared libraries) they may exist in
10675  * different forms. On platforms that support it the
10676  * ASN1_ITEM structure itself will be globally exported.
10677  * Other platforms will export a function that returns
10678  * an ASN1_ITEM pointer.
10679  *
10680  * To handle both cases transparently the macros below
10681  * should be used instead of hard coding an ASN1_ITEM
10682  * pointer in a structure.
10683  *
10684  * The structure will look like this:
10685  *
10686  * typedef struct SOMETHING_st {
10687  *      ...
10688  *      ASN1_ITEM_EXP *iptr;
10689  *      ...
10690  * } SOMETHING;
10691  *
10692  * It would be initialised as e.g.:
10693  *
10694  * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
10695  *
10696  * and the actual pointer extracted with:
10697  *
10698  * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
10699  *
10700  * Finally an ASN1_ITEM pointer can be extracted from an
10701  * appropriate reference with: ASN1_ITEM_rptr(X509). This
10702  * would be used when a function takes an ASN1_ITEM * argument.
10703  *
10704  */
10705 
10706 
10707 
10708 /* ASN1_ITEM pointer exported type */
10709 typedef const ASN1_ITEM ASN1_ITEM_EXP;
10710 
10711 /* Macro to obtain ASN1_ITEM pointer from exported type */
10712 
10713 
10714 /* Macro to include ASN1_ITEM pointer from base type */
10715 # 440 "/usr/include/openssl/asn1.h" 3 4
10716 /* Parameters used by ASN1_STRING_print_ex() */
10717 
10718 /*
10719  * These determine which characters to escape: RFC2253 special characters,
10720  * control characters and MSB set characters
10721  */
10722 
10723 
10724 
10725 
10726 
10727 /*
10728  * This flag determines how we do escaping: normally RC2253 backslash only,
10729  * set this to use backslash and quote.
10730  */
10731 
10732 
10733 
10734 /* These three flags are internal use only. */
10735 
10736 /* Character is a valid PrintableString character */
10737 
10738 /* Character needs escaping if it is the first character */
10739 
10740 /* Character needs escaping if it is the last character */
10741 
10742 
10743 /*
10744  * NB the internal flags are safely reused below by flags handled at the top
10745  * level.
10746  */
10747 
10748 /*
10749  * If this is set we convert all character strings to UTF8 first
10750  */
10751 
10752 
10753 
10754 /*
10755  * If this is set we don't attempt to interpret content: just assume all
10756  * strings are 1 byte per character. This will produce some pretty odd
10757  * looking output!
10758  */
10759 
10760 
10761 
10762 /* If this is set we include the string type in the output */
10763 
10764 
10765 /*
10766  * This determines which strings to display and which to 'dump' (hex dump of
10767  * content octets or DER encoding). We can only dump non character strings or
10768  * everything. If we don't dump 'unknown' they are interpreted as character
10769  * strings with 1 octet per character and are subject to the usual escaping
10770  * options.
10771  */
10772 
10773 
10774 
10775 
10776 /*
10777  * These determine what 'dumping' does, we can dump the content octets or the
10778  * DER encoding: both use the RFC2253 #XXXXX notation.
10779  */
10780 
10781 
10782 
10783 /*
10784  * All the string flags consistent with RFC2253, escaping control characters
10785  * isn't essential in RFC2253 but it is advisable anyway.
10786  */
10787 # 519 "/usr/include/openssl/asn1.h" 3 4
10788 struct stack_st_ASN1_INTEGER { _STACK stack; };
10789 
10790 
10791 struct stack_st_ASN1_GENERALSTRING { _STACK stack; };
10792 
10793 typedef struct asn1_type_st {
10794     int type;
10795     union {
10796         char *ptr;
10797         ASN1_BOOLEAN boolean;
10798         ASN1_STRING *asn1_string;
10799         ASN1_OBJECT *object;
10800         ASN1_INTEGER *integer;
10801         ASN1_ENUMERATED *enumerated;
10802         ASN1_BIT_STRING *bit_string;
10803         ASN1_OCTET_STRING *octet_string;
10804         ASN1_PRINTABLESTRING *printablestring;
10805         ASN1_T61STRING *t61string;
10806         ASN1_IA5STRING *ia5string;
10807         ASN1_GENERALSTRING *generalstring;
10808         ASN1_BMPSTRING *bmpstring;
10809         ASN1_UNIVERSALSTRING *universalstring;
10810         ASN1_UTCTIME *utctime;
10811         ASN1_GENERALIZEDTIME *generalizedtime;
10812         ASN1_VISIBLESTRING *visiblestring;
10813         ASN1_UTF8STRING *utf8string;
10814         /*
10815          * set and sequence are left complete and still contain the set or
10816          * sequence bytes
10817          */
10818         ASN1_STRING *set;
10819         ASN1_STRING *sequence;
10820         ASN1_VALUE *asn1_value;
10821     } value;
10822 } ASN1_TYPE;
10823 
10824 struct stack_st_ASN1_TYPE { _STACK stack; };
10825 
10826 
10827 typedef struct stack_st_ASN1_TYPE ASN1_SEQUENCE_ANY;
10828 
10829 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;
10830 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;
10831 
10832 typedef struct NETSCAPE_X509_st {
10833     ASN1_OCTET_STRING *header;
10834     X509 *cert;
10835 } NETSCAPE_X509;
10836 
10837 /* This is used to contain a list of bit names */
10838 typedef struct BIT_STRING_BITNAME_st {
10839     int bitnum;
10840     const char *lname;
10841     const char *sname;
10842 } BIT_STRING_BITNAME;
10843 
10844 
10845 
10846 
10847 
10848 
10849 /* Macros for string operations */
10850 # 772 "/usr/include/openssl/asn1.h" 3 4
10851   /* for the is_set parameter to i2d_ASN1_SET */
10852 
10853 
10854 
10855 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;
10856 
10857 int ASN1_TYPE_get(ASN1_TYPE *a);
10858 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
10859 int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
10860 int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
10861 
10862 ASN1_OBJECT *ASN1_OBJECT_new(void);
10863 void ASN1_OBJECT_free(ASN1_OBJECT *a);
10864 int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);
10865 ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
10866                              long length);
10867 ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
10868                              long length);
10869 
10870 extern const ASN1_ITEM ASN1_OBJECT_it;
10871 
10872 struct stack_st_ASN1_OBJECT { _STACK stack; };
10873 
10874 
10875 ASN1_STRING *ASN1_STRING_new(void);
10876 void ASN1_STRING_free(ASN1_STRING *a);
10877 void ASN1_STRING_clear_free(ASN1_STRING *a);
10878 int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
10879 ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);
10880 ASN1_STRING *ASN1_STRING_type_new(int type);
10881 int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
10882   /*
10883    * Since this is used to store all sorts of things, via macros, for now,
10884    * make its data void *
10885    */
10886 int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
10887 void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
10888 int ASN1_STRING_length(const ASN1_STRING *x);
10889 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
10890 int ASN1_STRING_type(ASN1_STRING *x);
10891 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
10892 
10893 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;
10894 int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
10895 ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
10896                                      const unsigned char **pp, long length);
10897 int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
10898 int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
10899 int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
10900 int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,
10901                           unsigned char *flags, int flags_len);
10902 
10903 
10904 int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
10905                                BIT_STRING_BITNAME *tbl, int indent);
10906 
10907 int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
10908 int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
10909                             BIT_STRING_BITNAME *tbl);
10910 
10911 int i2d_ASN1_BOOLEAN(int a, unsigned char **pp);
10912 int d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);
10913 
10914 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;
10915 int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
10916 ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
10917                                long length);
10918 ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
10919                                 long length);
10920 ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);
10921 int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
10922 
10923 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;
10924 
10925 int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
10926 ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
10927 ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
10928                                int offset_day, long offset_sec);
10929 int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
10930 int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
10931 
10932 
10933 
10934 
10935 int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
10936 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
10937                                                time_t t);
10938 ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
10939                                                time_t t, int offset_day,
10940                                                long offset_sec);
10941 int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
10942 int ASN1_TIME_diff(int *pday, int *psec,
10943                    const ASN1_TIME *from, const ASN1_TIME *to);
10944 
10945 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;
10946 ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);
10947 int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
10948                           const ASN1_OCTET_STRING *b);
10949 int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
10950                           int len);
10951 
10952 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;
10953 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;
10954 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;
10955 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;
10956 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;
10957 
10958 int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
10959 int UTF8_putc(unsigned char *str, int len, unsigned long value);
10960 
10961 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;
10962 
10963 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;
10964 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;
10965 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;
10966 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;
10967 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;
10968 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;
10969 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;
10970 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;
10971 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;
10972 
10973 extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
10974 
10975 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
10976 ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
10977                          int offset_day, long offset_sec);
10978 int ASN1_TIME_check(ASN1_TIME *t);
10979 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME
10980                                                    **out);
10981 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
10982 
10983 int i2d_ASN1_SET(struct stack_st_OPENSSL_BLOCK *a, unsigned char **pp,
10984                  i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);
10985 struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
10986                                       const unsigned char **pp,
10987                                       long length, d2i_of_void *d2i,
10988                                       void (*free_func) (OPENSSL_BLOCK),
10989                                       int ex_tag, int ex_class);
10990 
10991 
10992 int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
10993 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
10994 int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
10995 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
10996 int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
10997 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
10998 int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
10999 
11000 int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
11001 
11002 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
11003 ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
11004                                 const char *sn, const char *ln);
11005 
11006 int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
11007 long ASN1_INTEGER_get(const ASN1_INTEGER *a);
11008 ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
11009 BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
11010 
11011 int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
11012 long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);
11013 ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
11014 BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);
11015 
11016 /* General */
11017 /* given a string, return the correct type, max is the maximum length */
11018 int ASN1_PRINTABLE_type(const unsigned char *s, int max);
11019 
11020 int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
11021 ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
11022                             long length, int Ptag, int Pclass);
11023 unsigned long ASN1_tag2bit(int tag);
11024 /* type is one or more of the B_ASN1_ values. */
11025 ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
11026                                  long length, int type);
11027 
11028 /* PARSING */
11029 int asn1_Finish(ASN1_CTX *c);
11030 int asn1_const_Finish(ASN1_const_CTX *c);
11031 
11032 /* SPECIALS */
11033 int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
11034                     int *pclass, long omax);
11035 int ASN1_check_infinite_end(unsigned char **p, long len);
11036 int ASN1_const_check_infinite_end(const unsigned char **p, long len);
11037 void ASN1_put_object(unsigned char **pp, int constructed, int length,
11038                      int tag, int xclass);
11039 int ASN1_put_eoc(unsigned char **pp);
11040 int ASN1_object_size(int constructed, int length, int tag);
11041 
11042 /* Used to implement other functions */
11043 void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
11044 # 976 "/usr/include/openssl/asn1.h" 3 4
11045 void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
11046 
11047 /* ASN1 alloc/free macros for when a type is only used internally */
11048 
11049 
11050 
11051 
11052 
11053 
11054 void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
11055 
11056 
11057 
11058 
11059 
11060 
11061 
11062 void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
11063 int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);
11064 # 1006 "/usr/include/openssl/asn1.h" 3 4
11065 int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
11066 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
11067 
11068 
11069 int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
11070 
11071 
11072 void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
11073 
11074 
11075 
11076 
11077 
11078 
11079 
11080 void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
11081 int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);
11082 # 1034 "/usr/include/openssl/asn1.h" 3 4
11083 int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
11084 int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
11085 int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
11086 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
11087 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
11088 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
11089 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
11090                   unsigned char *buf, int off);
11091 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
11092 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
11093                     int dump);
11094 
11095 const char *ASN1_tag2str(int tag);
11096 
11097 /* Used to load and write netscape format cert */
11098 
11099 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;
11100 
11101 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
11102 
11103 int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
11104 int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);
11105 int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
11106                                   unsigned char *data, int len);
11107 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,
11108                                   unsigned char *data, int max_len);
11109 
11110 struct stack_st_OPENSSL_BLOCK *ASN1_seq_unpack(const unsigned char *buf, int len,
11111                                          d2i_of_void *d2i,
11112                                          void (*free_func) (OPENSSL_BLOCK));
11113 unsigned char *ASN1_seq_pack(struct stack_st_OPENSSL_BLOCK *safes, i2d_of_void *i2d,
11114                              unsigned char **buf, int *len);
11115 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
11116 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
11117 ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
11118                               ASN1_OCTET_STRING **oct);
11119 
11120 
11121 
11122 
11123 
11124 
11125 ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
11126                             ASN1_OCTET_STRING **oct);
11127 
11128 void ASN1_STRING_set_default_mask(unsigned long mask);
11129 int ASN1_STRING_set_default_mask_asc(const char *p);
11130 unsigned long ASN1_STRING_get_default_mask(void);
11131 int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
11132                        int inform, unsigned long mask);
11133 int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
11134                         int inform, unsigned long mask,
11135                         long minsize, long maxsize);
11136 
11137 ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
11138                                     const unsigned char *in, int inlen,
11139                                     int inform, int nid);
11140 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
11141 int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
11142 void ASN1_STRING_TABLE_cleanup(void);
11143 
11144 /* ASN1 template functions */
11145 
11146 /* Old API compatible functions */
11147 ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
11148 void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
11149 ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
11150                           long len, const ASN1_ITEM *it);
11151 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
11152 int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
11153                        const ASN1_ITEM *it);
11154 
11155 void ASN1_add_oid_module(void);
11156 
11157 ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);
11158 ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
11159 
11160 /* ASN1 Print flags */
11161 
11162 /* Indicate missing OPTIONAL fields */
11163 
11164 /* Mark start and end of SEQUENCE */
11165 
11166 /* Mark start and end of SEQUENCE/SET OF */
11167 
11168 /* Show the ASN1 type of primitives */
11169 
11170 /* Don't show ASN1 type of ANY */
11171 
11172 /* Don't show ASN1 type of MSTRINGs */
11173 
11174 /* Don't show field names in SEQUENCE */
11175 
11176 /* Show structure names of each SEQUENCE field */
11177 
11178 /* Don't show structure name even at top level */
11179 
11180 
11181 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,
11182                     const ASN1_ITEM *it, const ASN1_PCTX *pctx);
11183 ASN1_PCTX *ASN1_PCTX_new(void);
11184 void ASN1_PCTX_free(ASN1_PCTX *p);
11185 unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);
11186 void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
11187 unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);
11188 void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
11189 unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);
11190 void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
11191 unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);
11192 void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
11193 unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);
11194 void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
11195 
11196 BIO_METHOD *BIO_f_asn1(void);
11197 
11198 BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
11199 
11200 int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
11201                         const ASN1_ITEM *it);
11202 int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
11203                               const char *hdr, const ASN1_ITEM *it);
11204 int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
11205                      int ctype_nid, int econt_nid,
11206                      struct stack_st_X509_ALGOR *mdalgs, const ASN1_ITEM *it);
11207 ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
11208 int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
11209 int SMIME_text(BIO *in, BIO *out);
11210 
11211 /* BEGIN ERROR CODES */
11212 /*
11213  * The following lines are auto generated by the script mkerr.pl. Any changes
11214  * made after this point may be overwritten when the script is next run.
11215  */
11216 
11217 void ERR_load_ASN1_strings(void);
11218 
11219 /* Error codes for the ASN1 functions. */
11220 
11221 /* Function codes. */
11222 # 1298 "/usr/include/openssl/asn1.h" 3 4
11223 /* Reason codes. */
11224 # 966 "/usr/include/openssl/objects.h" 2 3 4
11225 # 984 "/usr/include/openssl/objects.h" 3 4
11226 typedef struct obj_name_st {
11227     int type;
11228     int alias;
11229     const char *name;
11230     const char *data;
11231 } OBJ_NAME;
11232 
11233 
11234 
11235 int OBJ_NAME_init(void);
11236 int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
11237                        int (*cmp_func) (const char *, const char *),
11238                        void (*free_func) (const char *, int, const char *));
11239 const char *OBJ_NAME_get(const char *name, int type);
11240 int OBJ_NAME_add(const char *name, int type, const char *data);
11241 int OBJ_NAME_remove(const char *name, int type);
11242 void OBJ_NAME_cleanup(int type); /* -1 for everything */
11243 void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
11244                      void *arg);
11245 void OBJ_NAME_do_all_sorted(int type,
11246                             void (*fn) (const OBJ_NAME *, void *arg),
11247                             void *arg);
11248 
11249 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
11250 ASN1_OBJECT *OBJ_nid2obj(int n);
11251 const char *OBJ_nid2ln(int n);
11252 const char *OBJ_nid2sn(int n);
11253 int OBJ_obj2nid(const ASN1_OBJECT *o);
11254 ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
11255 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
11256 int OBJ_txt2nid(const char *s);
11257 int OBJ_ln2nid(const char *s);
11258 int OBJ_sn2nid(const char *s);
11259 int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
11260 const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
11261                          int (*cmp) (const void *, const void *));
11262 const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
11263                             int size,
11264                             int (*cmp) (const void *, const void *),
11265                             int flags);
11266 # 1035 "/usr/include/openssl/objects.h" 3 4
11267 /*-
11268  * Unsolved problem: if a type is actually a pointer type, like
11269  * nid_triple is, then its impossible to get a const where you need
11270  * it. Consider:
11271  *
11272  * typedef int nid_triple[3];
11273  * const void *a_;
11274  * const nid_triple const *a = a_;
11275  *
11276  * The assignement discards a const because what you really want is:
11277  *
11278  * const int const * const *a = a_;
11279  *
11280  * But if you do that, you lose the fact that a is an array of 3 ints,
11281  * which breaks comparison functions.
11282  *
11283  * Thus we end up having to cast, sadly, or unpack the
11284  * declarations. Or, as I finally did in this case, delcare nid_triple
11285  * to be a struct, which it should have been in the first place.
11286  *
11287  * Ben, August 2008.
11288  *
11289  * Also, strictly speaking not all types need be const, but handling
11290  * the non-constness means a lot of complication, and in practice
11291  * comparison routines do always not touch their arguments.
11292  */
11293 # 1104 "/usr/include/openssl/objects.h" 3 4
11294 int OBJ_new_nid(int num);
11295 int OBJ_add_object(const ASN1_OBJECT *obj);
11296 int OBJ_create(const char *oid, const char *sn, const char *ln);
11297 void OBJ_cleanup(void);
11298 int OBJ_create_objects(BIO *in);
11299 
11300 int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
11301 int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
11302 int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
11303 void OBJ_sigid_free(void);
11304 
11305 extern int obj_cleanup_defer;
11306 void check_defer(int nid);
11307 
11308 /* BEGIN ERROR CODES */
11309 /*
11310  * The following lines are auto generated by the script mkerr.pl. Any changes
11311  * made after this point may be overwritten when the script is next run.
11312  */
11313 void ERR_load_OBJ_strings(void);
11314 
11315 /* Error codes for the OBJ functions. */
11316 
11317 /* Function codes. */
11318 # 1136 "/usr/include/openssl/objects.h" 3 4
11319 /* Reason codes. */
11320 # 95 "/usr/include/openssl/evp.h" 2 3 4
11321 # 125 "/usr/include/openssl/evp.h" 3 4
11322 /*
11323  * Type needs to be a bit field Sub-type needs to be for variations on the
11324  * method, as in, can it do arbitrary encryption....
11325  */
11326 struct evp_pkey_st {
11327     int type;
11328     int save_type;
11329     int references;
11330     const EVP_PKEY_ASN1_METHOD *ameth;
11331     ENGINE *engine;
11332     union {
11333         char *ptr;
11334 
11335         struct rsa_st *rsa; /* RSA */
11336 
11337 
11338         struct dsa_st *dsa; /* DSA */
11339 
11340 
11341         struct dh_st *dh; /* DH */
11342 
11343 
11344         struct ec_key_st *ec; /* ECC */
11345 
11346     } pkey;
11347     int save_parameters;
11348     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
11349 } /* EVP_PKEY */ ;
11350 
11351 
11352 
11353 
11354 
11355 
11356 
11357 struct env_md_st {
11358     int type;
11359     int pkey_type;
11360     int md_size;
11361     unsigned long flags;
11362     int (*init) (EVP_MD_CTX *ctx);
11363     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
11364     int (*final) (EVP_MD_CTX *ctx, unsigned char *md);
11365     int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);
11366     int (*cleanup) (EVP_MD_CTX *ctx);
11367     /* FIXME: prototype these some day */
11368     int (*sign) (int type, const unsigned char *m, unsigned int m_length,
11369                  unsigned char *sigret, unsigned int *siglen, void *key);
11370     int (*verify) (int type, const unsigned char *m, unsigned int m_length,
11371                    const unsigned char *sigbuf, unsigned int siglen,
11372                    void *key);
11373     int required_pkey_type[5]; /* EVP_PKEY_xxx */
11374     int block_size;
11375     int ctx_size; /* how big does the ctx->md_data need to be */
11376     /* control function */
11377     int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
11378 } /* EVP_MD */ ;
11379 
11380 typedef int evp_sign_method(int type, const unsigned char *m,
11381                             unsigned int m_length, unsigned char *sigret,
11382                             unsigned int *siglen, void *key);
11383 typedef int evp_verify_method(int type, const unsigned char *m,
11384                               unsigned int m_length,
11385                               const unsigned char *sigbuf,
11386                               unsigned int siglen, void *key);
11387 
11388 /* digest can only handle a single block */
11389 
11390 
11391 /*
11392  * digest is a "clone" digest used
11393  * which is a copy of an existing
11394  * one for a specific public key type.
11395  * EVP_dss1() etc
11396  */
11397 
11398 
11399 /* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */
11400 
11401 
11402 
11403 /* DigestAlgorithmIdentifier flags... */
11404 
11405 
11406 
11407 /* NULL or absent parameter accepted. Use NULL */
11408 
11409 
11410 
11411 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */
11412 
11413 
11414 
11415 /* Custom handling via ctrl */
11416 
11417 
11418 
11419 /* Note if suitable for use in FIPS mode */
11420 
11421 
11422 /* Digest ctrls */
11423 
11424 
11425 
11426 
11427 /* Minimum Algorithm specific ctrl value */
11428 # 268 "/usr/include/openssl/evp.h" 3 4
11429 struct env_md_ctx_st {
11430     const EVP_MD *digest;
11431     ENGINE *engine; /* functional reference if 'digest' is
11432                                  * ENGINE-provided */
11433     unsigned long flags;
11434     void *md_data;
11435     /* Public key context for sign/verify */
11436     EVP_PKEY_CTX *pctx;
11437     /* Update function: usually copied from EVP_MD */
11438     int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);
11439 } /* EVP_MD_CTX */ ;
11440 
11441 /* values for EVP_MD_CTX flags */
11442 
11443 
11444 
11445 
11446 
11447 
11448 
11449 /*
11450  * FIPS and pad options are ignored in 1.0.0, definitions are here so we
11451  * don't accidentally reuse the values for other purposes.
11452  */
11453 
11454 
11455 
11456 
11457 /*
11458  * The following PAD options are also currently ignored in 1.0.0, digest
11459  * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()
11460  * instead.
11461  */
11462 
11463 
11464 
11465 
11466 
11467 
11468 
11469 struct evp_cipher_st {
11470     int nid;
11471     int block_size;
11472     /* Default value for variable length ciphers */
11473     int key_len;
11474     int iv_len;
11475     /* Various flags */
11476     unsigned long flags;
11477     /* init key */
11478     int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,
11479                  const unsigned char *iv, int enc);
11480     /* encrypt/decrypt data */
11481     int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,
11482                       const unsigned char *in, size_t inl);
11483     /* cleanup ctx */
11484     int (*cleanup) (EVP_CIPHER_CTX *);
11485     /* how big ctx->cipher_data needs to be */
11486     int ctx_size;
11487     /* Populate a ASN1_TYPE with parameters */
11488     int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
11489     /* Get parameters from a ASN1_TYPE */
11490     int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);
11491     /* Miscellaneous operations */
11492     int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);
11493     /* Application data */
11494     void *app_data;
11495 } /* EVP_CIPHER */ ;
11496 
11497 /* Values for cipher flags */
11498 
11499 /* Modes for ciphers */
11500 # 351 "/usr/include/openssl/evp.h" 3 4
11501 /* Set if variable length cipher */
11502 
11503 /* Set if the iv handling should be done by the cipher itself */
11504 
11505 /* Set if the cipher's init() function should be called if key is NULL */
11506 
11507 /* Call ctrl() to init cipher parameters */
11508 
11509 /* Don't use standard key length function */
11510 
11511 /* Don't use standard block padding */
11512 
11513 /* cipher handles random key generation */
11514 
11515 /* cipher has its own additional copying logic */
11516 
11517 /* Allow use default ASN1 get/set iv */
11518 
11519 /* Buffer length in bits not bytes: CFB1 mode only */
11520 
11521 /* Note if suitable for use in FIPS mode */
11522 
11523 /* Allow non FIPS cipher in FIPS mode */
11524 
11525 /*
11526  * Cipher handles any and all padding logic as well as finalisation.
11527  */
11528 
11529 
11530 
11531 
11532 /*
11533  * Cipher context flag to indicate we can handle wrap mode: if allowed in
11534  * older applications it could overflow buffers.
11535  */
11536 
11537 
11538 
11539 /* ctrl() values */
11540 # 410 "/usr/include/openssl/evp.h" 3 4
11541 /*
11542  * AEAD cipher deduces payload length and returns number of bytes required to
11543  * store MAC and eventual padding. Subsequent call to EVP_Cipher even
11544  * appends/verifies MAC.
11545  */
11546 
11547 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */
11548 
11549 /* Set the GCM invocation field, decrypt only */
11550 
11551 
11552 
11553 
11554 
11555 
11556 
11557 /* RFC 5246 defines additional data to be 13 bytes in length */
11558 
11559 
11560 typedef struct {
11561     unsigned char *out;
11562     const unsigned char *inp;
11563     size_t len;
11564     unsigned int interleave;
11565 } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM;
11566 
11567 /* GCM TLS constants */
11568 /* Length of fixed part of IV derived from PRF */
11569 
11570 /* Length of explicit part of IV part of TLS records */
11571 
11572 /* Length of tag for TLS */
11573 
11574 
11575 typedef struct evp_cipher_info_st {
11576     const EVP_CIPHER *cipher;
11577     unsigned char iv[16];
11578 } EVP_CIPHER_INFO;
11579 
11580 struct evp_cipher_ctx_st {
11581     const EVP_CIPHER *cipher;
11582     ENGINE *engine; /* functional reference if 'cipher' is
11583                                  * ENGINE-provided */
11584     int encrypt; /* encrypt or decrypt */
11585     int buf_len; /* number we have left */
11586     unsigned char oiv[16]; /* original iv */
11587     unsigned char iv[16]; /* working iv */
11588     unsigned char buf[32]; /* saved partial block */
11589     int num; /* used by cfb/ofb/ctr mode */
11590     void *app_data; /* application stuff */
11591     int key_len; /* May change for variable length cipher */
11592     unsigned long flags; /* Various flags */
11593     void *cipher_data; /* per EVP data */
11594     int final_used;
11595     int block_mask;
11596     unsigned char final[32]; /* possible final block */
11597 } /* EVP_CIPHER_CTX */ ;
11598 
11599 typedef struct evp_Encode_Ctx_st {
11600     /* number saved in a partial encode/decode */
11601     int num;
11602     /*
11603      * The length is either the output line length (in input bytes) or the
11604      * shortest input line length that is ok.  Once decoding begins, the
11605      * length is adjusted up each time a longer line is decoded
11606      */
11607     int length;
11608     /* data to encode */
11609     unsigned char enc_data[80];
11610     /* number read on current line */
11611     int line_num;
11612     int expect_nl;
11613 } EVP_ENCODE_CTX;
11614 
11615 /* Password based encryption function */
11616 typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
11617                               int passlen, ASN1_TYPE *param,
11618                               const EVP_CIPHER *cipher, const EVP_MD *md,
11619                               int en_de);
11620 # 510 "/usr/include/openssl/evp.h" 3 4
11621 /* Add some extra combinations */
11622 
11623 
11624 
11625 
11626 
11627 int EVP_MD_type(const EVP_MD *md);
11628 
11629 
11630 int EVP_MD_pkey_type(const EVP_MD *md);
11631 int EVP_MD_size(const EVP_MD *md);
11632 int EVP_MD_block_size(const EVP_MD *md);
11633 unsigned long EVP_MD_flags(const EVP_MD *md);
11634 
11635 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
11636 
11637 
11638 
11639 
11640 int EVP_CIPHER_nid(const EVP_CIPHER *cipher);
11641 
11642 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher);
11643 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
11644 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);
11645 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);
11646 
11647 
11648 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
11649 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
11650 int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
11651 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
11652 int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
11653 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
11654 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
11655 void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
11656 
11657 unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
11658 # 574 "/usr/include/openssl/evp.h" 3 4
11659 int EVP_Cipher(EVP_CIPHER_CTX *c,
11660                unsigned char *out, const unsigned char *in, unsigned int inl);
11661 # 586 "/usr/include/openssl/evp.h" 3 4
11662 void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
11663 int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
11664 EVP_MD_CTX *EVP_MD_CTX_create(void);
11665 void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
11666 int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
11667 void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
11668 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
11669 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
11670 int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
11671 int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
11672 int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
11673 int EVP_Digest(const void *data, size_t count,
11674                unsigned char *md, unsigned int *size, const EVP_MD *type,
11675                ENGINE *impl);
11676 
11677 int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
11678 int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
11679 int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
11680 
11681 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
11682 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
11683                            const char *prompt, int verify);
11684 void EVP_set_pw_prompt(const char *prompt);
11685 char *EVP_get_pw_prompt(void);
11686 
11687 int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
11688                    const unsigned char *salt, const unsigned char *data,
11689                    int datal, int count, unsigned char *key,
11690                    unsigned char *iv);
11691 
11692 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
11693 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
11694 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
11695 
11696 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
11697                     const unsigned char *key, const unsigned char *iv);
11698 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
11699                        ENGINE *impl, const unsigned char *key,
11700                        const unsigned char *iv);
11701 int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
11702                       const unsigned char *in, int inl);
11703 int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
11704 int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
11705 
11706 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
11707                     const unsigned char *key, const unsigned char *iv);
11708 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
11709                        ENGINE *impl, const unsigned char *key,
11710                        const unsigned char *iv);
11711 int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
11712                       const unsigned char *in, int inl);
11713 int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
11714 int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
11715 
11716 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
11717                    const unsigned char *key, const unsigned char *iv,
11718                    int enc);
11719 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
11720                       ENGINE *impl, const unsigned char *key,
11721                       const unsigned char *iv, int enc);
11722 int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
11723                      const unsigned char *in, int inl);
11724 int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
11725 int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
11726 
11727 int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
11728                   EVP_PKEY *pkey);
11729 
11730 int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
11731                     unsigned int siglen, EVP_PKEY *pkey);
11732 
11733 int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
11734                        const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
11735 int EVP_DigestSignFinal(EVP_MD_CTX *ctx,
11736                         unsigned char *sigret, size_t *siglen);
11737 
11738 int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
11739                          const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);
11740 int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx,
11741                           const unsigned char *sig, size_t siglen);
11742 
11743 int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
11744                  const unsigned char *ek, int ekl, const unsigned char *iv,
11745                  EVP_PKEY *priv);
11746 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
11747 
11748 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
11749                  unsigned char **ek, int *ekl, unsigned char *iv,
11750                  EVP_PKEY **pubk, int npubk);
11751 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
11752 
11753 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
11754 void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
11755                       const unsigned char *in, int inl);
11756 void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
11757 int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);
11758 
11759 void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
11760 int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
11761                      const unsigned char *in, int inl);
11762 int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
11763                     char *out, int *outl);
11764 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
11765 
11766 void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
11767 int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
11768 EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
11769 void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
11770 int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
11771 int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
11772 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
11773 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
11774 
11775 
11776 BIO_METHOD *BIO_f_md(void);
11777 BIO_METHOD *BIO_f_base64(void);
11778 BIO_METHOD *BIO_f_cipher(void);
11779 BIO_METHOD *BIO_f_reliable(void);
11780 void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
11781                     const unsigned char *i, int enc);
11782 
11783 
11784 const EVP_MD *EVP_md_null(void);
11785 
11786 const EVP_MD *EVP_md2(void);
11787 
11788 
11789 const EVP_MD *EVP_md4(void);
11790 
11791 
11792 const EVP_MD *EVP_md5(void);
11793 
11794 
11795 const EVP_MD *EVP_sha(void);
11796 const EVP_MD *EVP_sha1(void);
11797 const EVP_MD *EVP_dss(void);
11798 const EVP_MD *EVP_dss1(void);
11799 const EVP_MD *EVP_ecdsa(void);
11800 
11801 
11802 const EVP_MD *EVP_sha224(void);
11803 const EVP_MD *EVP_sha256(void);
11804 
11805 
11806 const EVP_MD *EVP_sha384(void);
11807 const EVP_MD *EVP_sha512(void);
11808 
11809 
11810 
11811 
11812 
11813 const EVP_MD *EVP_ripemd160(void);
11814 
11815 
11816 
11817 
11818 const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */
11819 
11820 const EVP_CIPHER *EVP_des_ecb(void);
11821 const EVP_CIPHER *EVP_des_ede(void);
11822 const EVP_CIPHER *EVP_des_ede3(void);
11823 const EVP_CIPHER *EVP_des_ede_ecb(void);
11824 const EVP_CIPHER *EVP_des_ede3_ecb(void);
11825 const EVP_CIPHER *EVP_des_cfb64(void);
11826 
11827 const EVP_CIPHER *EVP_des_cfb1(void);
11828 const EVP_CIPHER *EVP_des_cfb8(void);
11829 const EVP_CIPHER *EVP_des_ede_cfb64(void);
11830 
11831 
11832 
11833 
11834 
11835 const EVP_CIPHER *EVP_des_ede3_cfb64(void);
11836 
11837 const EVP_CIPHER *EVP_des_ede3_cfb1(void);
11838 const EVP_CIPHER *EVP_des_ede3_cfb8(void);
11839 const EVP_CIPHER *EVP_des_ofb(void);
11840 const EVP_CIPHER *EVP_des_ede_ofb(void);
11841 const EVP_CIPHER *EVP_des_ede3_ofb(void);
11842 const EVP_CIPHER *EVP_des_cbc(void);
11843 const EVP_CIPHER *EVP_des_ede_cbc(void);
11844 const EVP_CIPHER *EVP_des_ede3_cbc(void);
11845 const EVP_CIPHER *EVP_desx_cbc(void);
11846 const EVP_CIPHER *EVP_des_ede3_wrap(void);
11847 /*
11848  * This should now be supported through the dev_crypto ENGINE. But also, why
11849  * are rc4 and md5 declarations made here inside a "NO_DES" precompiler
11850  * branch?
11851  */
11852 # 785 "/usr/include/openssl/evp.h" 3 4
11853 const EVP_CIPHER *EVP_rc4(void);
11854 const EVP_CIPHER *EVP_rc4_40(void);
11855 
11856 const EVP_CIPHER *EVP_rc4_hmac_md5(void);
11857 # 799 "/usr/include/openssl/evp.h" 3 4
11858 const EVP_CIPHER *EVP_rc2_ecb(void);
11859 const EVP_CIPHER *EVP_rc2_cbc(void);
11860 const EVP_CIPHER *EVP_rc2_40_cbc(void);
11861 const EVP_CIPHER *EVP_rc2_64_cbc(void);
11862 const EVP_CIPHER *EVP_rc2_cfb64(void);
11863 
11864 const EVP_CIPHER *EVP_rc2_ofb(void);
11865 
11866 
11867 const EVP_CIPHER *EVP_bf_ecb(void);
11868 const EVP_CIPHER *EVP_bf_cbc(void);
11869 const EVP_CIPHER *EVP_bf_cfb64(void);
11870 
11871 const EVP_CIPHER *EVP_bf_ofb(void);
11872 
11873 
11874 const EVP_CIPHER *EVP_cast5_ecb(void);
11875 const EVP_CIPHER *EVP_cast5_cbc(void);
11876 const EVP_CIPHER *EVP_cast5_cfb64(void);
11877 
11878 const EVP_CIPHER *EVP_cast5_ofb(void);
11879 # 829 "/usr/include/openssl/evp.h" 3 4
11880 const EVP_CIPHER *EVP_aes_128_ecb(void);
11881 const EVP_CIPHER *EVP_aes_128_cbc(void);
11882 const EVP_CIPHER *EVP_aes_128_cfb1(void);
11883 const EVP_CIPHER *EVP_aes_128_cfb8(void);
11884 const EVP_CIPHER *EVP_aes_128_cfb128(void);
11885 
11886 const EVP_CIPHER *EVP_aes_128_ofb(void);
11887 const EVP_CIPHER *EVP_aes_128_ctr(void);
11888 const EVP_CIPHER *EVP_aes_128_ccm(void);
11889 const EVP_CIPHER *EVP_aes_128_gcm(void);
11890 const EVP_CIPHER *EVP_aes_128_xts(void);
11891 const EVP_CIPHER *EVP_aes_128_wrap(void);
11892 const EVP_CIPHER *EVP_aes_192_ecb(void);
11893 const EVP_CIPHER *EVP_aes_192_cbc(void);
11894 const EVP_CIPHER *EVP_aes_192_cfb1(void);
11895 const EVP_CIPHER *EVP_aes_192_cfb8(void);
11896 const EVP_CIPHER *EVP_aes_192_cfb128(void);
11897 
11898 const EVP_CIPHER *EVP_aes_192_ofb(void);
11899 const EVP_CIPHER *EVP_aes_192_ctr(void);
11900 const EVP_CIPHER *EVP_aes_192_ccm(void);
11901 const EVP_CIPHER *EVP_aes_192_gcm(void);
11902 const EVP_CIPHER *EVP_aes_192_wrap(void);
11903 const EVP_CIPHER *EVP_aes_256_ecb(void);
11904 const EVP_CIPHER *EVP_aes_256_cbc(void);
11905 const EVP_CIPHER *EVP_aes_256_cfb1(void);
11906 const EVP_CIPHER *EVP_aes_256_cfb8(void);
11907 const EVP_CIPHER *EVP_aes_256_cfb128(void);
11908 
11909 const EVP_CIPHER *EVP_aes_256_ofb(void);
11910 const EVP_CIPHER *EVP_aes_256_ctr(void);
11911 const EVP_CIPHER *EVP_aes_256_ccm(void);
11912 const EVP_CIPHER *EVP_aes_256_gcm(void);
11913 const EVP_CIPHER *EVP_aes_256_xts(void);
11914 const EVP_CIPHER *EVP_aes_256_wrap(void);
11915 
11916 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);
11917 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);
11918 
11919 
11920 const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void);
11921 const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void);
11922 
11923 
11924 
11925 const EVP_CIPHER *EVP_camellia_128_ecb(void);
11926 const EVP_CIPHER *EVP_camellia_128_cbc(void);
11927 const EVP_CIPHER *EVP_camellia_128_cfb1(void);
11928 const EVP_CIPHER *EVP_camellia_128_cfb8(void);
11929 const EVP_CIPHER *EVP_camellia_128_cfb128(void);
11930 
11931 const EVP_CIPHER *EVP_camellia_128_ofb(void);
11932 const EVP_CIPHER *EVP_camellia_192_ecb(void);
11933 const EVP_CIPHER *EVP_camellia_192_cbc(void);
11934 const EVP_CIPHER *EVP_camellia_192_cfb1(void);
11935 const EVP_CIPHER *EVP_camellia_192_cfb8(void);
11936 const EVP_CIPHER *EVP_camellia_192_cfb128(void);
11937 
11938 const EVP_CIPHER *EVP_camellia_192_ofb(void);
11939 const EVP_CIPHER *EVP_camellia_256_ecb(void);
11940 const EVP_CIPHER *EVP_camellia_256_cbc(void);
11941 const EVP_CIPHER *EVP_camellia_256_cfb1(void);
11942 const EVP_CIPHER *EVP_camellia_256_cfb8(void);
11943 const EVP_CIPHER *EVP_camellia_256_cfb128(void);
11944 
11945 const EVP_CIPHER *EVP_camellia_256_ofb(void);
11946 # 905 "/usr/include/openssl/evp.h" 3 4
11947 void OPENSSL_add_all_algorithms_noconf(void);
11948 void OPENSSL_add_all_algorithms_conf(void);
11949 # 916 "/usr/include/openssl/evp.h" 3 4
11950 void OpenSSL_add_all_ciphers(void);
11951 void OpenSSL_add_all_digests(void);
11952 
11953 
11954 
11955 
11956 int EVP_add_cipher(const EVP_CIPHER *cipher);
11957 int EVP_add_digest(const EVP_MD *digest);
11958 
11959 const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
11960 const EVP_MD *EVP_get_digestbyname(const char *name);
11961 void EVP_cleanup(void);
11962 
11963 void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,
11964                                    const char *from, const char *to, void *x),
11965                        void *arg);
11966 void EVP_CIPHER_do_all_sorted(void (*fn)
11967                                (const EVP_CIPHER *ciph, const char *from,
11968                                 const char *to, void *x), void *arg);
11969 
11970 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
11971                                const char *from, const char *to, void *x),
11972                    void *arg);
11973 void EVP_MD_do_all_sorted(void (*fn)
11974                            (const EVP_MD *ciph, const char *from,
11975                             const char *to, void *x), void *arg);
11976 
11977 int EVP_PKEY_decrypt_old(unsigned char *dec_key,
11978                          const unsigned char *enc_key, int enc_key_len,
11979                          EVP_PKEY *private_key);
11980 int EVP_PKEY_encrypt_old(unsigned char *enc_key,
11981                          const unsigned char *key, int key_len,
11982                          EVP_PKEY *pub_key);
11983 int EVP_PKEY_type(int type);
11984 int EVP_PKEY_id(const EVP_PKEY *pkey);
11985 int EVP_PKEY_base_id(const EVP_PKEY *pkey);
11986 int EVP_PKEY_bits(EVP_PKEY *pkey);
11987 int EVP_PKEY_size(EVP_PKEY *pkey);
11988 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
11989 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
11990 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
11991 void *EVP_PKEY_get0(EVP_PKEY *pkey);
11992 
11993 
11994 struct rsa_st;
11995 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
11996 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
11997 
11998 
11999 struct dsa_st;
12000 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
12001 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
12002 
12003 
12004 struct dh_st;
12005 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
12006 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
12007 
12008 
12009 struct ec_key_st;
12010 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);
12011 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
12012 
12013 
12014 EVP_PKEY *EVP_PKEY_new(void);
12015 void EVP_PKEY_free(EVP_PKEY *pkey);
12016 
12017 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
12018                         long length);
12019 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
12020 
12021 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
12022                          long length);
12023 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
12024                              long length);
12025 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
12026 
12027 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
12028 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
12029 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
12030 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
12031 
12032 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
12033 
12034 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
12035                           int indent, ASN1_PCTX *pctx);
12036 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
12037                            int indent, ASN1_PCTX *pctx);
12038 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
12039                           int indent, ASN1_PCTX *pctx);
12040 
12041 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
12042 
12043 int EVP_CIPHER_type(const EVP_CIPHER *ctx);
12044 
12045 /* calls methods */
12046 int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
12047 int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
12048 
12049 /* These are used by EVP_CIPHER methods */
12050 int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
12051 int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
12052 
12053 /* PKCS5 password based encryption */
12054 int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
12055                        ASN1_TYPE *param, const EVP_CIPHER *cipher,
12056                        const EVP_MD *md, int en_de);
12057 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
12058                            const unsigned char *salt, int saltlen, int iter,
12059                            int keylen, unsigned char *out);
12060 int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
12061                       const unsigned char *salt, int saltlen, int iter,
12062                       const EVP_MD *digest, int keylen, unsigned char *out);
12063 int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
12064                           ASN1_TYPE *param, const EVP_CIPHER *cipher,
12065                           const EVP_MD *md, int en_de);
12066 
12067 void PKCS5_PBE_add(void);
12068 
12069 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
12070                        ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
12071 
12072 /* PBE type */
12073 
12074 /* Can appear as the outermost AlgorithmIdentifier */
12075 
12076 /* Is an PRF type OID */
12077 
12078 
12079 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
12080                          int md_nid, EVP_PBE_KEYGEN *keygen);
12081 int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
12082                     EVP_PBE_KEYGEN *keygen);
12083 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
12084                  EVP_PBE_KEYGEN **pkeygen);
12085 void EVP_PBE_cleanup(void);
12086 # 1064 "/usr/include/openssl/evp.h" 3 4
12087 int EVP_PKEY_asn1_get_count(void);
12088 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
12089 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
12090 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
12091                                                    const char *str, int len);
12092 int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
12093 int EVP_PKEY_asn1_add_alias(int to, int from);
12094 int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
12095                             int *ppkey_flags, const char **pinfo,
12096                             const char **ppem_str,
12097                             const EVP_PKEY_ASN1_METHOD *ameth);
12098 
12099 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);
12100 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
12101                                         const char *pem_str,
12102                                         const char *info);
12103 void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
12104                         const EVP_PKEY_ASN1_METHOD *src);
12105 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
12106 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
12107                               int (*pub_decode) (EVP_PKEY *pk,
12108                                                  X509_PUBKEY *pub),
12109                               int (*pub_encode) (X509_PUBKEY *pub,
12110                                                  const EVP_PKEY *pk),
12111                               int (*pub_cmp) (const EVP_PKEY *a,
12112                                               const EVP_PKEY *b),
12113                               int (*pub_print) (BIO *out,
12114                                                 const EVP_PKEY *pkey,
12115                                                 int indent, ASN1_PCTX *pctx),
12116                               int (*pkey_size) (const EVP_PKEY *pk),
12117                               int (*pkey_bits) (const EVP_PKEY *pk));
12118 void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
12119                                int (*priv_decode) (EVP_PKEY *pk,
12120                                                    PKCS8_PRIV_KEY_INFO
12121                                                    *p8inf),
12122                                int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
12123                                                    const EVP_PKEY *pk),
12124                                int (*priv_print) (BIO *out,
12125                                                   const EVP_PKEY *pkey,
12126                                                   int indent,
12127                                                   ASN1_PCTX *pctx));
12128 void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
12129                              int (*param_decode) (EVP_PKEY *pkey,
12130                                                   const unsigned char **pder,
12131                                                   int derlen),
12132                              int (*param_encode) (const EVP_PKEY *pkey,
12133                                                   unsigned char **pder),
12134                              int (*param_missing) (const EVP_PKEY *pk),
12135                              int (*param_copy) (EVP_PKEY *to,
12136                                                 const EVP_PKEY *from),
12137                              int (*param_cmp) (const EVP_PKEY *a,
12138                                                const EVP_PKEY *b),
12139                              int (*param_print) (BIO *out,
12140                                                  const EVP_PKEY *pkey,
12141                                                  int indent,
12142                                                  ASN1_PCTX *pctx));
12143 
12144 void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
12145                             void (*pkey_free) (EVP_PKEY *pkey));
12146 void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
12147                             int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
12148                                               long arg1, void *arg2));
12149 void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
12150                             int (*item_verify) (EVP_MD_CTX *ctx,
12151                                                 const ASN1_ITEM *it,
12152                                                 void *asn,
12153                                                 X509_ALGOR *a,
12154                                                 ASN1_BIT_STRING *sig,
12155                                                 EVP_PKEY *pkey),
12156                             int (*item_sign) (EVP_MD_CTX *ctx,
12157                                               const ASN1_ITEM *it,
12158                                               void *asn,
12159                                               X509_ALGOR *alg1,
12160                                               X509_ALGOR *alg2,
12161                                               ASN1_BIT_STRING *sig));
12162 # 1185 "/usr/include/openssl/evp.h" 3 4
12163 /* Used by GOST key encryption in TLS */
12164 # 1199 "/usr/include/openssl/evp.h" 3 4
12165 /*
12166  * Method handles all operations: don't assume any digest related defaults.
12167  */
12168 
12169 
12170 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
12171 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
12172 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
12173                              const EVP_PKEY_METHOD *meth);
12174 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
12175 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
12176 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
12177 
12178 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
12179 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
12180 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
12181 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
12182 
12183 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
12184                       int cmd, int p1, void *p2);
12185 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
12186                           const char *value);
12187 
12188 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
12189 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
12190 
12191 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
12192                                const unsigned char *key, int keylen);
12193 
12194 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
12195 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
12196 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
12197 
12198 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
12199 
12200 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
12201 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
12202 
12203 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
12204 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
12205                   unsigned char *sig, size_t *siglen,
12206                   const unsigned char *tbs, size_t tbslen);
12207 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
12208 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
12209                     const unsigned char *sig, size_t siglen,
12210                     const unsigned char *tbs, size_t tbslen);
12211 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
12212 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
12213                             unsigned char *rout, size_t *routlen,
12214                             const unsigned char *sig, size_t siglen);
12215 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
12216 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
12217                      unsigned char *out, size_t *outlen,
12218                      const unsigned char *in, size_t inlen);
12219 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
12220 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
12221                      unsigned char *out, size_t *outlen,
12222                      const unsigned char *in, size_t inlen);
12223 
12224 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
12225 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
12226 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
12227 
12228 typedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);
12229 
12230 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
12231 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
12232 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
12233 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
12234 
12235 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
12236 EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
12237 
12238 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
12239 
12240 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
12241                             int (*init) (EVP_PKEY_CTX *ctx));
12242 
12243 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,
12244                             int (*copy) (EVP_PKEY_CTX *dst,
12245                                          EVP_PKEY_CTX *src));
12246 
12247 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,
12248                                void (*cleanup) (EVP_PKEY_CTX *ctx));
12249 
12250 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,
12251                                 int (*paramgen_init) (EVP_PKEY_CTX *ctx),
12252                                 int (*paramgen) (EVP_PKEY_CTX *ctx,
12253                                                  EVP_PKEY *pkey));
12254 
12255 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,
12256                               int (*keygen_init) (EVP_PKEY_CTX *ctx),
12257                               int (*keygen) (EVP_PKEY_CTX *ctx,
12258                                              EVP_PKEY *pkey));
12259 
12260 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,
12261                             int (*sign_init) (EVP_PKEY_CTX *ctx),
12262                             int (*sign) (EVP_PKEY_CTX *ctx,
12263                                          unsigned char *sig, size_t *siglen,
12264                                          const unsigned char *tbs,
12265                                          size_t tbslen));
12266 
12267 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,
12268                               int (*verify_init) (EVP_PKEY_CTX *ctx),
12269                               int (*verify) (EVP_PKEY_CTX *ctx,
12270                                              const unsigned char *sig,
12271                                              size_t siglen,
12272                                              const unsigned char *tbs,
12273                                              size_t tbslen));
12274 
12275 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,
12276                                       int (*verify_recover_init) (EVP_PKEY_CTX
12277                                                                   *ctx),
12278                                       int (*verify_recover) (EVP_PKEY_CTX
12279                                                              *ctx,
12280                                                              unsigned char
12281                                                              *sig,
12282                                                              size_t *siglen,
12283                                                              const unsigned
12284                                                              char *tbs,
12285                                                              size_t tbslen));
12286 
12287 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,
12288                                int (*signctx_init) (EVP_PKEY_CTX *ctx,
12289                                                     EVP_MD_CTX *mctx),
12290                                int (*signctx) (EVP_PKEY_CTX *ctx,
12291                                                unsigned char *sig,
12292                                                size_t *siglen,
12293                                                EVP_MD_CTX *mctx));
12294 
12295 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,
12296                                  int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
12297                                                         EVP_MD_CTX *mctx),
12298                                  int (*verifyctx) (EVP_PKEY_CTX *ctx,
12299                                                    const unsigned char *sig,
12300                                                    int siglen,
12301                                                    EVP_MD_CTX *mctx));
12302 
12303 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,
12304                                int (*encrypt_init) (EVP_PKEY_CTX *ctx),
12305                                int (*encryptfn) (EVP_PKEY_CTX *ctx,
12306                                                  unsigned char *out,
12307                                                  size_t *outlen,
12308                                                  const unsigned char *in,
12309                                                  size_t inlen));
12310 
12311 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,
12312                                int (*decrypt_init) (EVP_PKEY_CTX *ctx),
12313                                int (*decrypt) (EVP_PKEY_CTX *ctx,
12314                                                unsigned char *out,
12315                                                size_t *outlen,
12316                                                const unsigned char *in,
12317                                                size_t inlen));
12318 
12319 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,
12320                               int (*derive_init) (EVP_PKEY_CTX *ctx),
12321                               int (*derive) (EVP_PKEY_CTX *ctx,
12322                                              unsigned char *key,
12323                                              size_t *keylen));
12324 
12325 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
12326                             int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
12327                                          void *p2),
12328                             int (*ctrl_str) (EVP_PKEY_CTX *ctx,
12329                                              const char *type,
12330                                              const char *value));
12331 
12332 void EVP_PKEY_meth_get_init(EVP_PKEY_METHOD *pmeth,
12333                             int (**pinit) (EVP_PKEY_CTX *ctx));
12334 
12335 void EVP_PKEY_meth_get_copy(EVP_PKEY_METHOD *pmeth,
12336                             int (**pcopy) (EVP_PKEY_CTX *dst,
12337                                            EVP_PKEY_CTX *src));
12338 
12339 void EVP_PKEY_meth_get_cleanup(EVP_PKEY_METHOD *pmeth,
12340                                void (**pcleanup) (EVP_PKEY_CTX *ctx));
12341 
12342 void EVP_PKEY_meth_get_paramgen(EVP_PKEY_METHOD *pmeth,
12343                                 int (**pparamgen_init) (EVP_PKEY_CTX *ctx),
12344                                 int (**pparamgen) (EVP_PKEY_CTX *ctx,
12345                                                    EVP_PKEY *pkey));
12346 
12347 void EVP_PKEY_meth_get_keygen(EVP_PKEY_METHOD *pmeth,
12348                               int (**pkeygen_init) (EVP_PKEY_CTX *ctx),
12349                               int (**pkeygen) (EVP_PKEY_CTX *ctx,
12350                                                EVP_PKEY *pkey));
12351 
12352 void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth,
12353                             int (**psign_init) (EVP_PKEY_CTX *ctx),
12354                             int (**psign) (EVP_PKEY_CTX *ctx,
12355                                            unsigned char *sig, size_t *siglen,
12356                                            const unsigned char *tbs,
12357                                            size_t tbslen));
12358 
12359 void EVP_PKEY_meth_get_verify(EVP_PKEY_METHOD *pmeth,
12360                               int (**pverify_init) (EVP_PKEY_CTX *ctx),
12361                               int (**pverify) (EVP_PKEY_CTX *ctx,
12362                                                const unsigned char *sig,
12363                                                size_t siglen,
12364                                                const unsigned char *tbs,
12365                                                size_t tbslen));
12366 
12367 void EVP_PKEY_meth_get_verify_recover(EVP_PKEY_METHOD *pmeth,
12368                                       int (**pverify_recover_init) (EVP_PKEY_CTX
12369                                                                     *ctx),
12370                                       int (**pverify_recover) (EVP_PKEY_CTX
12371                                                                *ctx,
12372                                                                unsigned char
12373                                                                *sig,
12374                                                                size_t *siglen,
12375                                                                const unsigned
12376                                                                char *tbs,
12377                                                                size_t tbslen));
12378 
12379 void EVP_PKEY_meth_get_signctx(EVP_PKEY_METHOD *pmeth,
12380                                int (**psignctx_init) (EVP_PKEY_CTX *ctx,
12381                                                       EVP_MD_CTX *mctx),
12382                                int (**psignctx) (EVP_PKEY_CTX *ctx,
12383                                                  unsigned char *sig,
12384                                                  size_t *siglen,
12385                                                  EVP_MD_CTX *mctx));
12386 
12387 void EVP_PKEY_meth_get_verifyctx(EVP_PKEY_METHOD *pmeth,
12388                                  int (**pverifyctx_init) (EVP_PKEY_CTX *ctx,
12389                                                           EVP_MD_CTX *mctx),
12390                                  int (**pverifyctx) (EVP_PKEY_CTX *ctx,
12391                                                      const unsigned char *sig,
12392                                                      int siglen,
12393                                                      EVP_MD_CTX *mctx));
12394 
12395 void EVP_PKEY_meth_get_encrypt(EVP_PKEY_METHOD *pmeth,
12396                                int (**pencrypt_init) (EVP_PKEY_CTX *ctx),
12397                                int (**pencryptfn) (EVP_PKEY_CTX *ctx,
12398                                                    unsigned char *out,
12399                                                    size_t *outlen,
12400                                                    const unsigned char *in,
12401                                                    size_t inlen));
12402 
12403 void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth,
12404                                int (**pdecrypt_init) (EVP_PKEY_CTX *ctx),
12405                                int (**pdecrypt) (EVP_PKEY_CTX *ctx,
12406                                                  unsigned char *out,
12407                                                  size_t *outlen,
12408                                                  const unsigned char *in,
12409                                                  size_t inlen));
12410 
12411 void EVP_PKEY_meth_get_derive(EVP_PKEY_METHOD *pmeth,
12412                               int (**pderive_init) (EVP_PKEY_CTX *ctx),
12413                               int (**pderive) (EVP_PKEY_CTX *ctx,
12414                                                unsigned char *key,
12415                                                size_t *keylen));
12416 
12417 void EVP_PKEY_meth_get_ctrl(EVP_PKEY_METHOD *pmeth,
12418                             int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1,
12419                                            void *p2),
12420                             int (**pctrl_str) (EVP_PKEY_CTX *ctx,
12421                                                const char *type,
12422                                                const char *value));
12423 
12424 void EVP_add_alg_module(void);
12425 
12426 /* BEGIN ERROR CODES */
12427 /*
12428  * The following lines are auto generated by the script mkerr.pl. Any changes
12429  * made after this point may be overwritten when the script is next run.
12430  */
12431 
12432 void ERR_load_EVP_strings(void);
12433 
12434 /* Error codes for the EVP functions. */
12435 
12436 /* Function codes. */
12437 # 1554 "/usr/include/openssl/evp.h" 3 4
12438 /* Reason codes. */
12439 # 74 "/usr/include/openssl/x509.h" 2 3 4
12440 
12441 
12442 # 1 "/usr/include/openssl/bio.h" 1 3 4
12443 /* crypto/bio/bio.h */
12444 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
12445  * All rights reserved.
12446  *
12447  * This package is an SSL implementation written
12448  * by Eric Young (eay@cryptsoft.com).
12449  * The implementation was written so as to conform with Netscapes SSL.
12450  *
12451  * This library is free for commercial and non-commercial use as long as
12452  * the following conditions are aheared to.  The following conditions
12453  * apply to all code found in this distribution, be it the RC4, RSA,
12454  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12455  * included with this distribution is covered by the same copyright terms
12456  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12457  *
12458  * Copyright remains Eric Young's, and as such any Copyright notices in
12459  * the code are not to be removed.
12460  * If this package is used in a product, Eric Young should be given attribution
12461  * as the author of the parts of the library used.
12462  * This can be in the form of a textual message at program startup or
12463  * in documentation (online or textual) provided with the package.
12464  *
12465  * Redistribution and use in source and binary forms, with or without
12466  * modification, are permitted provided that the following conditions
12467  * are met:
12468  * 1. Redistributions of source code must retain the copyright
12469  *    notice, this list of conditions and the following disclaimer.
12470  * 2. Redistributions in binary form must reproduce the above copyright
12471  *    notice, this list of conditions and the following disclaimer in the
12472  *    documentation and/or other materials provided with the distribution.
12473  * 3. All advertising materials mentioning features or use of this software
12474  *    must display the following acknowledgement:
12475  *    "This product includes cryptographic software written by
12476  *     Eric Young (eay@cryptsoft.com)"
12477  *    The word 'cryptographic' can be left out if the rouines from the library
12478  *    being used are not cryptographic related :-).
12479  * 4. If you include any Windows specific code (or a derivative thereof) from
12480  *    the apps directory (application code) you must include an acknowledgement:
12481  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12482  *
12483  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12484  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12485  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12486  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12487  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12488  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12489  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12490  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12491  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12492  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12493  * SUCH DAMAGE.
12494  *
12495  * The licence and distribution terms for any publically available version or
12496  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12497  * copied and put under another distribution licence
12498  * [including the GNU Public Licence.]
12499  */
12500 # 77 "/usr/include/openssl/x509.h" 2 3 4
12501 
12502 # 1 "/usr/include/openssl/stack.h" 1 3 4
12503 /* crypto/stack/stack.h */
12504 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
12505  * All rights reserved.
12506  *
12507  * This package is an SSL implementation written
12508  * by Eric Young (eay@cryptsoft.com).
12509  * The implementation was written so as to conform with Netscapes SSL.
12510  *
12511  * This library is free for commercial and non-commercial use as long as
12512  * the following conditions are aheared to.  The following conditions
12513  * apply to all code found in this distribution, be it the RC4, RSA,
12514  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12515  * included with this distribution is covered by the same copyright terms
12516  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12517  *
12518  * Copyright remains Eric Young's, and as such any Copyright notices in
12519  * the code are not to be removed.
12520  * If this package is used in a product, Eric Young should be given attribution
12521  * as the author of the parts of the library used.
12522  * This can be in the form of a textual message at program startup or
12523  * in documentation (online or textual) provided with the package.
12524  *
12525  * Redistribution and use in source and binary forms, with or without
12526  * modification, are permitted provided that the following conditions
12527  * are met:
12528  * 1. Redistributions of source code must retain the copyright
12529  *    notice, this list of conditions and the following disclaimer.
12530  * 2. Redistributions in binary form must reproduce the above copyright
12531  *    notice, this list of conditions and the following disclaimer in the
12532  *    documentation and/or other materials provided with the distribution.
12533  * 3. All advertising materials mentioning features or use of this software
12534  *    must display the following acknowledgement:
12535  *    "This product includes cryptographic software written by
12536  *     Eric Young (eay@cryptsoft.com)"
12537  *    The word 'cryptographic' can be left out if the rouines from the library
12538  *    being used are not cryptographic related :-).
12539  * 4. If you include any Windows specific code (or a derivative thereof) from
12540  *    the apps directory (application code) you must include an acknowledgement:
12541  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12542  *
12543  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12544  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12545  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12546  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12547  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12548  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12549  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12550  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12551  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12552  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12553  * SUCH DAMAGE.
12554  *
12555  * The licence and distribution terms for any publically available version or
12556  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12557  * copied and put under another distribution licence
12558  * [including the GNU Public Licence.]
12559  */
12560 # 79 "/usr/include/openssl/x509.h" 2 3 4
12561 # 1 "/usr/include/openssl/asn1.h" 1 3 4
12562 /* crypto/asn1/asn1.h */
12563 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
12564  * All rights reserved.
12565  *
12566  * This package is an SSL implementation written
12567  * by Eric Young (eay@cryptsoft.com).
12568  * The implementation was written so as to conform with Netscapes SSL.
12569  *
12570  * This library is free for commercial and non-commercial use as long as
12571  * the following conditions are aheared to.  The following conditions
12572  * apply to all code found in this distribution, be it the RC4, RSA,
12573  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12574  * included with this distribution is covered by the same copyright terms
12575  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12576  *
12577  * Copyright remains Eric Young's, and as such any Copyright notices in
12578  * the code are not to be removed.
12579  * If this package is used in a product, Eric Young should be given attribution
12580  * as the author of the parts of the library used.
12581  * This can be in the form of a textual message at program startup or
12582  * in documentation (online or textual) provided with the package.
12583  *
12584  * Redistribution and use in source and binary forms, with or without
12585  * modification, are permitted provided that the following conditions
12586  * are met:
12587  * 1. Redistributions of source code must retain the copyright
12588  *    notice, this list of conditions and the following disclaimer.
12589  * 2. Redistributions in binary form must reproduce the above copyright
12590  *    notice, this list of conditions and the following disclaimer in the
12591  *    documentation and/or other materials provided with the distribution.
12592  * 3. All advertising materials mentioning features or use of this software
12593  *    must display the following acknowledgement:
12594  *    "This product includes cryptographic software written by
12595  *     Eric Young (eay@cryptsoft.com)"
12596  *    The word 'cryptographic' can be left out if the rouines from the library
12597  *    being used are not cryptographic related :-).
12598  * 4. If you include any Windows specific code (or a derivative thereof) from
12599  *    the apps directory (application code) you must include an acknowledgement:
12600  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12601  *
12602  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12603  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12604  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12605  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12606  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12607  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12608  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12609  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12610  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12611  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12612  * SUCH DAMAGE.
12613  *
12614  * The licence and distribution terms for any publically available version or
12615  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12616  * copied and put under another distribution licence
12617  * [including the GNU Public Licence.]
12618  */
12619 # 80 "/usr/include/openssl/x509.h" 2 3 4
12620 # 1 "/usr/include/openssl/safestack.h" 1 3 4
12621 /* ====================================================================
12622  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
12623  *
12624  * Redistribution and use in source and binary forms, with or without
12625  * modification, are permitted provided that the following conditions
12626  * are met:
12627  *
12628  * 1. Redistributions of source code must retain the above copyright
12629  *    notice, this list of conditions and the following disclaimer.
12630  *
12631  * 2. Redistributions in binary form must reproduce the above copyright
12632  *    notice, this list of conditions and the following disclaimer in
12633  *    the documentation and/or other materials provided with the
12634  *    distribution.
12635  *
12636  * 3. All advertising materials mentioning features or use of this
12637  *    software must display the following acknowledgment:
12638  *    "This product includes software developed by the OpenSSL Project
12639  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12640  *
12641  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12642  *    endorse or promote products derived from this software without
12643  *    prior written permission. For written permission, please contact
12644  *    openssl-core@openssl.org.
12645  *
12646  * 5. Products derived from this software may not be called "OpenSSL"
12647  *    nor may "OpenSSL" appear in their names without prior written
12648  *    permission of the OpenSSL Project.
12649  *
12650  * 6. Redistributions of any form whatsoever must retain the following
12651  *    acknowledgment:
12652  *    "This product includes software developed by the OpenSSL Project
12653  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12654  *
12655  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12656  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12657  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12658  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12659  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12660  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12661  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12662  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12663  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12664  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12665  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12666  * OF THE POSSIBILITY OF SUCH DAMAGE.
12667  * ====================================================================
12668  *
12669  * This product includes cryptographic software written by Eric Young
12670  * (eay@cryptsoft.com).  This product includes software written by Tim
12671  * Hudson (tjh@cryptsoft.com).
12672  *
12673  */
12674 # 81 "/usr/include/openssl/x509.h" 2 3 4
12675 
12676 
12677 # 1 "/usr/include/openssl/ec.h" 1 3 4
12678 /* crypto/ec/ec.h */
12679 /*
12680  * Originally written by Bodo Moeller for the OpenSSL project.
12681  */
12682 /**
12683  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
12684  * \author Originally written by Bodo Moeller for the OpenSSL project
12685  */
12686 /* ====================================================================
12687  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
12688  *
12689  * Redistribution and use in source and binary forms, with or without
12690  * modification, are permitted provided that the following conditions
12691  * are met:
12692  *
12693  * 1. Redistributions of source code must retain the above copyright
12694  *    notice, this list of conditions and the following disclaimer.
12695  *
12696  * 2. Redistributions in binary form must reproduce the above copyright
12697  *    notice, this list of conditions and the following disclaimer in
12698  *    the documentation and/or other materials provided with the
12699  *    distribution.
12700  *
12701  * 3. All advertising materials mentioning features or use of this
12702  *    software must display the following acknowledgment:
12703  *    "This product includes software developed by the OpenSSL Project
12704  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12705  *
12706  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12707  *    endorse or promote products derived from this software without
12708  *    prior written permission. For written permission, please contact
12709  *    openssl-core@openssl.org.
12710  *
12711  * 5. Products derived from this software may not be called "OpenSSL"
12712  *    nor may "OpenSSL" appear in their names without prior written
12713  *    permission of the OpenSSL Project.
12714  *
12715  * 6. Redistributions of any form whatsoever must retain the following
12716  *    acknowledgment:
12717  *    "This product includes software developed by the OpenSSL Project
12718  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12719  *
12720  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12721  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12722  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12723  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12724  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12725  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12726  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12727  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12728  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12729  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12730  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12731  * OF THE POSSIBILITY OF SUCH DAMAGE.
12732  * ====================================================================
12733  *
12734  * This product includes cryptographic software written by Eric Young
12735  * (eay@cryptsoft.com).  This product includes software written by Tim
12736  * Hudson (tjh@cryptsoft.com).
12737  *
12738  */
12739 /* ====================================================================
12740  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
12741  *
12742  * Portions of the attached software ("Contribution") are developed by
12743  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
12744  *
12745  * The Contribution is licensed pursuant to the OpenSSL open source
12746  * license provided above.
12747  *
12748  * The elliptic curve binary polynomial software is originally written by
12749  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
12750  *
12751  */
12752 
12753 
12754 
12755 
12756 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
12757 /* opensslconf.h */
12758 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
12759 
12760 
12761 
12762 
12763 /* OpenSSL was configured with the following options: */
12764 # 108 "/usr/include/openssl/opensslconf.h" 3 4
12765 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
12766    asks for it.  This is a transient feature that is provided for those
12767    who haven't had the time to do the appropriate changes in their
12768    applications.  */
12769 # 204 "/usr/include/openssl/opensslconf.h" 3 4
12770 /* crypto/opensslconf.h.in */
12771 
12772 /* Generate 80386 code? */
12773 # 80 "/usr/include/openssl/ec.h" 2 3 4
12774 
12775 
12776 
12777 
12778 
12779 # 1 "/usr/include/openssl/asn1.h" 1 3 4
12780 /* crypto/asn1/asn1.h */
12781 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
12782  * All rights reserved.
12783  *
12784  * This package is an SSL implementation written
12785  * by Eric Young (eay@cryptsoft.com).
12786  * The implementation was written so as to conform with Netscapes SSL.
12787  *
12788  * This library is free for commercial and non-commercial use as long as
12789  * the following conditions are aheared to.  The following conditions
12790  * apply to all code found in this distribution, be it the RC4, RSA,
12791  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12792  * included with this distribution is covered by the same copyright terms
12793  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12794  *
12795  * Copyright remains Eric Young's, and as such any Copyright notices in
12796  * the code are not to be removed.
12797  * If this package is used in a product, Eric Young should be given attribution
12798  * as the author of the parts of the library used.
12799  * This can be in the form of a textual message at program startup or
12800  * in documentation (online or textual) provided with the package.
12801  *
12802  * Redistribution and use in source and binary forms, with or without
12803  * modification, are permitted provided that the following conditions
12804  * are met:
12805  * 1. Redistributions of source code must retain the copyright
12806  *    notice, this list of conditions and the following disclaimer.
12807  * 2. Redistributions in binary form must reproduce the above copyright
12808  *    notice, this list of conditions and the following disclaimer in the
12809  *    documentation and/or other materials provided with the distribution.
12810  * 3. All advertising materials mentioning features or use of this software
12811  *    must display the following acknowledgement:
12812  *    "This product includes cryptographic software written by
12813  *     Eric Young (eay@cryptsoft.com)"
12814  *    The word 'cryptographic' can be left out if the rouines from the library
12815  *    being used are not cryptographic related :-).
12816  * 4. If you include any Windows specific code (or a derivative thereof) from
12817  *    the apps directory (application code) you must include an acknowledgement:
12818  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12819  *
12820  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12821  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12822  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12823  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12824  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12825  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12826  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12827  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12828  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12829  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12830  * SUCH DAMAGE.
12831  *
12832  * The licence and distribution terms for any publically available version or
12833  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12834  * copied and put under another distribution licence
12835  * [including the GNU Public Licence.]
12836  */
12837 # 86 "/usr/include/openssl/ec.h" 2 3 4
12838 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
12839 /* ====================================================================
12840  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
12841  *
12842  * Redistribution and use in source and binary forms, with or without
12843  * modification, are permitted provided that the following conditions
12844  * are met:
12845  *
12846  * 1. Redistributions of source code must retain the above copyright
12847  *    notice, this list of conditions and the following disclaimer.
12848  *
12849  * 2. Redistributions in binary form must reproduce the above copyright
12850  *    notice, this list of conditions and the following disclaimer in
12851  *    the documentation and/or other materials provided with the
12852  *    distribution.
12853  *
12854  * 3. All advertising materials mentioning features or use of this
12855  *    software must display the following acknowledgment:
12856  *    "This product includes software developed by the OpenSSL Project
12857  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12858  *
12859  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12860  *    endorse or promote products derived from this software without
12861  *    prior written permission. For written permission, please contact
12862  *    openssl-core@openssl.org.
12863  *
12864  * 5. Products derived from this software may not be called "OpenSSL"
12865  *    nor may "OpenSSL" appear in their names without prior written
12866  *    permission of the OpenSSL Project.
12867  *
12868  * 6. Redistributions of any form whatsoever must retain the following
12869  *    acknowledgment:
12870  *    "This product includes software developed by the OpenSSL Project
12871  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12872  *
12873  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12874  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12875  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12876  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12877  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12878  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12879  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12880  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12881  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12882  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12883  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12884  * OF THE POSSIBILITY OF SUCH DAMAGE.
12885  * ====================================================================
12886  *
12887  * This product includes cryptographic software written by Eric Young
12888  * (eay@cryptsoft.com).  This product includes software written by Tim
12889  * Hudson (tjh@cryptsoft.com).
12890  *
12891  */
12892 # 87 "/usr/include/openssl/ec.h" 2 3 4
12893 
12894 # 1 "/usr/include/openssl/bn.h" 1 3 4
12895 /* crypto/bn/bn.h */
12896 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
12897  * All rights reserved.
12898  *
12899  * This package is an SSL implementation written
12900  * by Eric Young (eay@cryptsoft.com).
12901  * The implementation was written so as to conform with Netscapes SSL.
12902  *
12903  * This library is free for commercial and non-commercial use as long as
12904  * the following conditions are aheared to.  The following conditions
12905  * apply to all code found in this distribution, be it the RC4, RSA,
12906  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
12907  * included with this distribution is covered by the same copyright terms
12908  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
12909  *
12910  * Copyright remains Eric Young's, and as such any Copyright notices in
12911  * the code are not to be removed.
12912  * If this package is used in a product, Eric Young should be given attribution
12913  * as the author of the parts of the library used.
12914  * This can be in the form of a textual message at program startup or
12915  * in documentation (online or textual) provided with the package.
12916  *
12917  * Redistribution and use in source and binary forms, with or without
12918  * modification, are permitted provided that the following conditions
12919  * are met:
12920  * 1. Redistributions of source code must retain the copyright
12921  *    notice, this list of conditions and the following disclaimer.
12922  * 2. Redistributions in binary form must reproduce the above copyright
12923  *    notice, this list of conditions and the following disclaimer in the
12924  *    documentation and/or other materials provided with the distribution.
12925  * 3. All advertising materials mentioning features or use of this software
12926  *    must display the following acknowledgement:
12927  *    "This product includes cryptographic software written by
12928  *     Eric Young (eay@cryptsoft.com)"
12929  *    The word 'cryptographic' can be left out if the rouines from the library
12930  *    being used are not cryptographic related :-).
12931  * 4. If you include any Windows specific code (or a derivative thereof) from
12932  *    the apps directory (application code) you must include an acknowledgement:
12933  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
12934  *
12935  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
12936  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12937  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12938  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12939  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12940  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12941  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12942  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12943  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12944  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12945  * SUCH DAMAGE.
12946  *
12947  * The licence and distribution terms for any publically available version or
12948  * derivative of this code cannot be changed.  i.e. this code cannot simply be
12949  * copied and put under another distribution licence
12950  * [including the GNU Public Licence.]
12951  */
12952 /* ====================================================================
12953  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
12954  *
12955  * Redistribution and use in source and binary forms, with or without
12956  * modification, are permitted provided that the following conditions
12957  * are met:
12958  *
12959  * 1. Redistributions of source code must retain the above copyright
12960  *    notice, this list of conditions and the following disclaimer.
12961  *
12962  * 2. Redistributions in binary form must reproduce the above copyright
12963  *    notice, this list of conditions and the following disclaimer in
12964  *    the documentation and/or other materials provided with the
12965  *    distribution.
12966  *
12967  * 3. All advertising materials mentioning features or use of this
12968  *    software must display the following acknowledgment:
12969  *    "This product includes software developed by the OpenSSL Project
12970  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
12971  *
12972  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
12973  *    endorse or promote products derived from this software without
12974  *    prior written permission. For written permission, please contact
12975  *    openssl-core@openssl.org.
12976  *
12977  * 5. Products derived from this software may not be called "OpenSSL"
12978  *    nor may "OpenSSL" appear in their names without prior written
12979  *    permission of the OpenSSL Project.
12980  *
12981  * 6. Redistributions of any form whatsoever must retain the following
12982  *    acknowledgment:
12983  *    "This product includes software developed by the OpenSSL Project
12984  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
12985  *
12986  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
12987  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12988  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12989  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
12990  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
12991  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
12992  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12993  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12994  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
12995  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
12996  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
12997  * OF THE POSSIBILITY OF SUCH DAMAGE.
12998  * ====================================================================
12999  *
13000  * This product includes cryptographic software written by Eric Young
13001  * (eay@cryptsoft.com).  This product includes software written by Tim
13002  * Hudson (tjh@cryptsoft.com).
13003  *
13004  */
13005 /* ====================================================================
13006  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
13007  *
13008  * Portions of the attached software ("Contribution") are developed by
13009  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
13010  *
13011  * The Contribution is licensed pursuant to the Eric Young open source
13012  * license provided above.
13013  *
13014  * The binary polynomial arithmetic software is originally written by
13015  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
13016  *
13017  */
13018 # 89 "/usr/include/openssl/ec.h" 2 3 4
13019 # 103 "/usr/include/openssl/ec.h" 3 4
13020 /** Enum for the point conversion form as defined in X9.62 (ECDSA)
13021  *  for the encoding of a elliptic curve point (x,y) */
13022 typedef enum {
13023         /** the point is encoded as z||x, where the octet z specifies
13024          *  which solution of the quadratic equation y is  */
13025     POINT_CONVERSION_COMPRESSED = 2,
13026         /** the point is encoded as z||x||y, where z is the octet 0x04  */
13027     POINT_CONVERSION_UNCOMPRESSED = 4,
13028         /** the point is encoded as z||x||y, where the octet z specifies
13029          *  which solution of the quadratic equation y is  */
13030     POINT_CONVERSION_HYBRID = 6
13031 } point_conversion_form_t;
13032 
13033 typedef struct ec_method_st EC_METHOD;
13034 
13035 typedef struct ec_group_st
13036     /*-
13037      EC_METHOD *meth;
13038      -- field definition
13039      -- curve coefficients
13040      -- optional generator with associated information (order, cofactor)
13041      -- optional extra data (precomputed table for fast computation of multiples of generator)
13042      -- ASN1 stuff
13043     */
13044     EC_GROUP;
13045 
13046 typedef struct ec_point_st EC_POINT;
13047 
13048 /********************************************************************/
13049 /*               EC_METHODs for curves over GF(p)                   */
13050 /********************************************************************/
13051 
13052 /** Returns the basic GFp ec methods which provides the basis for the
13053  *  optimized methods.
13054  *  \return  EC_METHOD object
13055  */
13056 const EC_METHOD *EC_GFp_simple_method(void);
13057 
13058 /** Returns GFp methods using montgomery multiplication.
13059  *  \return  EC_METHOD object
13060  */
13061 const EC_METHOD *EC_GFp_mont_method(void);
13062 
13063 /** Returns GFp methods using optimized methods for NIST recommended curves
13064  *  \return  EC_METHOD object
13065  */
13066 const EC_METHOD *EC_GFp_nist_method(void);
13067 # 169 "/usr/include/openssl/ec.h" 3 4
13068 /********************************************************************/
13069 /*           EC_METHOD for curves over GF(2^m)                      */
13070 /********************************************************************/
13071 
13072 /** Returns the basic GF2m ec method
13073  *  \return  EC_METHOD object
13074  */
13075 const EC_METHOD *EC_GF2m_simple_method(void);
13076 
13077 
13078 
13079 /********************************************************************/
13080 /*                   EC_GROUP functions                             */
13081 /********************************************************************/
13082 
13083 /** Creates a new EC_GROUP object
13084  *  \param   meth  EC_METHOD to use
13085  *  \return  newly created EC_GROUP object or NULL in case of an error.
13086  */
13087 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
13088 
13089 /** Frees a EC_GROUP object
13090  *  \param  group  EC_GROUP object to be freed.
13091  */
13092 void EC_GROUP_free(EC_GROUP *group);
13093 
13094 /** Clears and frees a EC_GROUP object
13095  *  \param  group  EC_GROUP object to be cleared and freed.
13096  */
13097 void EC_GROUP_clear_free(EC_GROUP *group);
13098 
13099 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
13100  *  \param  dst  destination EC_GROUP object
13101  *  \param  src  source EC_GROUP object
13102  *  \return 1 on success and 0 if an error occurred.
13103  */
13104 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
13105 
13106 /** Creates a new EC_GROUP object and copies the copies the content
13107  *  form src to the newly created EC_KEY object
13108  *  \param  src  source EC_GROUP object
13109  *  \return newly created EC_GROUP object or NULL in case of an error.
13110  */
13111 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
13112 
13113 /** Returns the EC_METHOD of the EC_GROUP object.
13114  *  \param  group  EC_GROUP object
13115  *  \return EC_METHOD used in this EC_GROUP object.
13116  */
13117 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);
13118 
13119 /** Returns the field type of the EC_METHOD.
13120  *  \param  meth  EC_METHOD object
13121  *  \return NID of the underlying field type OID.
13122  */
13123 int EC_METHOD_get_field_type(const EC_METHOD *meth);
13124 
13125 /** Sets the generator and it's order/cofactor of a EC_GROUP object.
13126  *  \param  group      EC_GROUP object
13127  *  \param  generator  EC_POINT object with the generator.
13128  *  \param  order      the order of the group generated by the generator.
13129  *  \param  cofactor   the index of the sub-group generated by the generator
13130  *                     in the group of all points on the elliptic curve.
13131  *  \return 1 on success and 0 if an error occured
13132  */
13133 int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
13134                            const BIGNUM *order, const BIGNUM *cofactor);
13135 
13136 /** Returns the generator of a EC_GROUP object.
13137  *  \param  group  EC_GROUP object
13138  *  \return the currently used generator (possibly NULL).
13139  */
13140 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
13141 
13142 /** Returns the montgomery data for order(Generator)
13143  *  \param  group  EC_GROUP object
13144  *  \return the currently used generator (possibly NULL).
13145 */
13146 BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
13147 
13148 /** Gets the order of a EC_GROUP
13149  *  \param  group  EC_GROUP object
13150  *  \param  order  BIGNUM to which the order is copied
13151  *  \param  ctx    BN_CTX object (optional)
13152  *  \return 1 on success and 0 if an error occured
13153  */
13154 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
13155 
13156 /** Gets the cofactor of a EC_GROUP
13157  *  \param  group     EC_GROUP object
13158  *  \param  cofactor  BIGNUM to which the cofactor is copied
13159  *  \param  ctx       BN_CTX object (optional)
13160  *  \return 1 on success and 0 if an error occured
13161  */
13162 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
13163                           BN_CTX *ctx);
13164 
13165 /** Sets the name of a EC_GROUP object
13166  *  \param  group  EC_GROUP object
13167  *  \param  nid    NID of the curve name OID
13168  */
13169 void EC_GROUP_set_curve_name(EC_GROUP *group, int nid);
13170 
13171 /** Returns the curve name of a EC_GROUP object
13172  *  \param  group  EC_GROUP object
13173  *  \return NID of the curve name OID or 0 if not set.
13174  */
13175 int EC_GROUP_get_curve_name(const EC_GROUP *group);
13176 
13177 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
13178 int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
13179 
13180 void EC_GROUP_set_point_conversion_form(EC_GROUP *group,
13181                                         point_conversion_form_t form);
13182 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
13183 
13184 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);
13185 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
13186 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
13187 
13188 /** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b
13189  *  \param  group  EC_GROUP object
13190  *  \param  p      BIGNUM with the prime number
13191  *  \param  a      BIGNUM with parameter a of the equation
13192  *  \param  b      BIGNUM with parameter b of the equation
13193  *  \param  ctx    BN_CTX object (optional)
13194  *  \return 1 on success and 0 if an error occured
13195  */
13196 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
13197                            const BIGNUM *b, BN_CTX *ctx);
13198 
13199 /** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b
13200  *  \param  group  EC_GROUP object
13201  *  \param  p      BIGNUM for the prime number
13202  *  \param  a      BIGNUM for parameter a of the equation
13203  *  \param  b      BIGNUM for parameter b of the equation
13204  *  \param  ctx    BN_CTX object (optional)
13205  *  \return 1 on success and 0 if an error occured
13206  */
13207 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
13208                            BIGNUM *b, BN_CTX *ctx);
13209 
13210 
13211 /** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
13212  *  \param  group  EC_GROUP object
13213  *  \param  p      BIGNUM with the polynomial defining the underlying field
13214  *  \param  a      BIGNUM with parameter a of the equation
13215  *  \param  b      BIGNUM with parameter b of the equation
13216  *  \param  ctx    BN_CTX object (optional)
13217  *  \return 1 on success and 0 if an error occured
13218  */
13219 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
13220                             const BIGNUM *b, BN_CTX *ctx);
13221 
13222 /** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b
13223  *  \param  group  EC_GROUP object
13224  *  \param  p      BIGNUM for the polynomial defining the underlying field
13225  *  \param  a      BIGNUM for parameter a of the equation
13226  *  \param  b      BIGNUM for parameter b of the equation
13227  *  \param  ctx    BN_CTX object (optional)
13228  *  \return 1 on success and 0 if an error occured
13229  */
13230 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
13231                             BIGNUM *b, BN_CTX *ctx);
13232 
13233 /** Returns the number of bits needed to represent a field element
13234  *  \param  group  EC_GROUP object
13235  *  \return number of bits needed to represent a field element
13236  */
13237 int EC_GROUP_get_degree(const EC_GROUP *group);
13238 
13239 /** Checks whether the parameter in the EC_GROUP define a valid ec group
13240  *  \param  group  EC_GROUP object
13241  *  \param  ctx    BN_CTX object (optional)
13242  *  \return 1 if group is a valid ec group and 0 otherwise
13243  */
13244 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
13245 
13246 /** Checks whether the discriminant of the elliptic curve is zero or not
13247  *  \param  group  EC_GROUP object
13248  *  \param  ctx    BN_CTX object (optional)
13249  *  \return 1 if the discriminant is not zero and 0 otherwise
13250  */
13251 int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
13252 
13253 /** Compares two EC_GROUP objects
13254  *  \param  a    first EC_GROUP object
13255  *  \param  b    second EC_GROUP object
13256  *  \param  ctx  BN_CTX object (optional)
13257  *  \return 0 if both groups are equal and 1 otherwise
13258  */
13259 int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
13260 
13261 /*
13262  * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after
13263  * choosing an appropriate EC_METHOD
13264  */
13265 
13266 /** Creates a new EC_GROUP object with the specified parameters defined
13267  *  over GFp (defined by the equation y^2 = x^3 + a*x + b)
13268  *  \param  p    BIGNUM with the prime number
13269  *  \param  a    BIGNUM with the parameter a of the equation
13270  *  \param  b    BIGNUM with the parameter b of the equation
13271  *  \param  ctx  BN_CTX object (optional)
13272  *  \return newly created EC_GROUP object with the specified parameters
13273  */
13274 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
13275                                  const BIGNUM *b, BN_CTX *ctx);
13276 
13277 /** Creates a new EC_GROUP object with the specified parameters defined
13278  *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
13279  *  \param  p    BIGNUM with the polynomial defining the underlying field
13280  *  \param  a    BIGNUM with the parameter a of the equation
13281  *  \param  b    BIGNUM with the parameter b of the equation
13282  *  \param  ctx  BN_CTX object (optional)
13283  *  \return newly created EC_GROUP object with the specified parameters
13284  */
13285 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
13286                                   const BIGNUM *b, BN_CTX *ctx);
13287 
13288 /** Creates a EC_GROUP object with a curve specified by a NID
13289  *  \param  nid  NID of the OID of the curve name
13290  *  \return newly created EC_GROUP object with specified curve or NULL
13291  *          if an error occurred
13292  */
13293 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
13294 
13295 /********************************************************************/
13296 /*               handling of internal curves                        */
13297 /********************************************************************/
13298 
13299 typedef struct {
13300     int nid;
13301     const char *comment;
13302 } EC_builtin_curve;
13303 
13304 /*
13305  * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all
13306  * available curves or zero if a error occurred. In case r ist not zero
13307  * nitems EC_builtin_curve structures are filled with the data of the first
13308  * nitems internal groups
13309  */
13310 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
13311 
13312 const char *EC_curve_nid2nist(int nid);
13313 int EC_curve_nist2nid(const char *name);
13314 
13315 /********************************************************************/
13316 /*                    EC_POINT functions                            */
13317 /********************************************************************/
13318 
13319 /** Creates a new EC_POINT object for the specified EC_GROUP
13320  *  \param  group  EC_GROUP the underlying EC_GROUP object
13321  *  \return newly created EC_POINT object or NULL if an error occurred
13322  */
13323 EC_POINT *EC_POINT_new(const EC_GROUP *group);
13324 
13325 /** Frees a EC_POINT object
13326  *  \param  point  EC_POINT object to be freed
13327  */
13328 void EC_POINT_free(EC_POINT *point);
13329 
13330 /** Clears and frees a EC_POINT object
13331  *  \param  point  EC_POINT object to be cleared and freed
13332  */
13333 void EC_POINT_clear_free(EC_POINT *point);
13334 
13335 /** Copies EC_POINT object
13336  *  \param  dst  destination EC_POINT object
13337  *  \param  src  source EC_POINT object
13338  *  \return 1 on success and 0 if an error occured
13339  */
13340 int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
13341 
13342 /** Creates a new EC_POINT object and copies the content of the supplied
13343  *  EC_POINT
13344  *  \param  src    source EC_POINT object
13345  *  \param  group  underlying the EC_GROUP object
13346  *  \return newly created EC_POINT object or NULL if an error occurred
13347  */
13348 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
13349 
13350 /** Returns the EC_METHOD used in EC_POINT object
13351  *  \param  point  EC_POINT object
13352  *  \return the EC_METHOD used
13353  */
13354 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
13355 
13356 /** Sets a point to infinity (neutral element)
13357  *  \param  group  underlying EC_GROUP object
13358  *  \param  point  EC_POINT to set to infinity
13359  *  \return 1 on success and 0 if an error occured
13360  */
13361 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
13362 
13363 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
13364  *  \param  group  underlying EC_GROUP object
13365  *  \param  p      EC_POINT object
13366  *  \param  x      BIGNUM with the x-coordinate
13367  *  \param  y      BIGNUM with the y-coordinate
13368  *  \param  z      BIGNUM with the z-coordinate
13369  *  \param  ctx    BN_CTX object (optional)
13370  *  \return 1 on success and 0 if an error occured
13371  */
13372 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
13373                                              EC_POINT *p, const BIGNUM *x,
13374                                              const BIGNUM *y, const BIGNUM *z,
13375                                              BN_CTX *ctx);
13376 
13377 /** Gets the jacobian projective coordinates of a EC_POINT over GFp
13378  *  \param  group  underlying EC_GROUP object
13379  *  \param  p      EC_POINT object
13380  *  \param  x      BIGNUM for the x-coordinate
13381  *  \param  y      BIGNUM for the y-coordinate
13382  *  \param  z      BIGNUM for the z-coordinate
13383  *  \param  ctx    BN_CTX object (optional)
13384  *  \return 1 on success and 0 if an error occured
13385  */
13386 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
13387                                              const EC_POINT *p, BIGNUM *x,
13388                                              BIGNUM *y, BIGNUM *z,
13389                                              BN_CTX *ctx);
13390 
13391 /** Sets the affine coordinates of a EC_POINT over GFp
13392  *  \param  group  underlying EC_GROUP object
13393  *  \param  p      EC_POINT object
13394  *  \param  x      BIGNUM with the x-coordinate
13395  *  \param  y      BIGNUM with the y-coordinate
13396  *  \param  ctx    BN_CTX object (optional)
13397  *  \return 1 on success and 0 if an error occured
13398  */
13399 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
13400                                         const BIGNUM *x, const BIGNUM *y,
13401                                         BN_CTX *ctx);
13402 
13403 /** Gets the affine coordinates of a EC_POINT over GFp
13404  *  \param  group  underlying EC_GROUP object
13405  *  \param  p      EC_POINT object
13406  *  \param  x      BIGNUM for the x-coordinate
13407  *  \param  y      BIGNUM for the y-coordinate
13408  *  \param  ctx    BN_CTX object (optional)
13409  *  \return 1 on success and 0 if an error occured
13410  */
13411 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
13412                                         const EC_POINT *p, BIGNUM *x,
13413                                         BIGNUM *y, BN_CTX *ctx);
13414 
13415 /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp
13416  *  \param  group  underlying EC_GROUP object
13417  *  \param  p      EC_POINT object
13418  *  \param  x      BIGNUM with x-coordinate
13419  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
13420  *  \param  ctx    BN_CTX object (optional)
13421  *  \return 1 on success and 0 if an error occured
13422  */
13423 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
13424                                             EC_POINT *p, const BIGNUM *x,
13425                                             int y_bit, BN_CTX *ctx);
13426 
13427 /** Sets the affine coordinates of a EC_POINT over GF2m
13428  *  \param  group  underlying EC_GROUP object
13429  *  \param  p      EC_POINT object
13430  *  \param  x      BIGNUM with the x-coordinate
13431  *  \param  y      BIGNUM with the y-coordinate
13432  *  \param  ctx    BN_CTX object (optional)
13433  *  \return 1 on success and 0 if an error occured
13434  */
13435 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
13436                                          const BIGNUM *x, const BIGNUM *y,
13437                                          BN_CTX *ctx);
13438 
13439 /** Gets the affine coordinates of a EC_POINT over GF2m
13440  *  \param  group  underlying EC_GROUP object
13441  *  \param  p      EC_POINT object
13442  *  \param  x      BIGNUM for the x-coordinate
13443  *  \param  y      BIGNUM for the y-coordinate
13444  *  \param  ctx    BN_CTX object (optional)
13445  *  \return 1 on success and 0 if an error occured
13446  */
13447 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
13448                                          const EC_POINT *p, BIGNUM *x,
13449                                          BIGNUM *y, BN_CTX *ctx);
13450 
13451 /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m
13452  *  \param  group  underlying EC_GROUP object
13453  *  \param  p      EC_POINT object
13454  *  \param  x      BIGNUM with x-coordinate
13455  *  \param  y_bit  integer with the y-Bit (either 0 or 1)
13456  *  \param  ctx    BN_CTX object (optional)
13457  *  \return 1 on success and 0 if an error occured
13458  */
13459 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
13460                                              EC_POINT *p, const BIGNUM *x,
13461                                              int y_bit, BN_CTX *ctx);
13462 
13463 /** Encodes a EC_POINT object to a octet string
13464  *  \param  group  underlying EC_GROUP object
13465  *  \param  p      EC_POINT object
13466  *  \param  form   point conversion form
13467  *  \param  buf    memory buffer for the result. If NULL the function returns
13468  *                 required buffer size.
13469  *  \param  len    length of the memory buffer
13470  *  \param  ctx    BN_CTX object (optional)
13471  *  \return the length of the encoded octet string or 0 if an error occurred
13472  */
13473 size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
13474                           point_conversion_form_t form,
13475                           unsigned char *buf, size_t len, BN_CTX *ctx);
13476 
13477 /** Decodes a EC_POINT from a octet string
13478  *  \param  group  underlying EC_GROUP object
13479  *  \param  p      EC_POINT object
13480  *  \param  buf    memory buffer with the encoded ec point
13481  *  \param  len    length of the encoded ec point
13482  *  \param  ctx    BN_CTX object (optional)
13483  *  \return 1 on success and 0 if an error occured
13484  */
13485 int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
13486                        const unsigned char *buf, size_t len, BN_CTX *ctx);
13487 
13488 /* other interfaces to point2oct/oct2point: */
13489 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
13490                           point_conversion_form_t form, BIGNUM *, BN_CTX *);
13491 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
13492                             EC_POINT *, BN_CTX *);
13493 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
13494                          point_conversion_form_t form, BN_CTX *);
13495 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
13496                              EC_POINT *, BN_CTX *);
13497 
13498 /********************************************************************/
13499 /*         functions for doing EC_POINT arithmetic                  */
13500 /********************************************************************/
13501 
13502 /** Computes the sum of two EC_POINT
13503  *  \param  group  underlying EC_GROUP object
13504  *  \param  r      EC_POINT object for the result (r = a + b)
13505  *  \param  a      EC_POINT object with the first summand
13506  *  \param  b      EC_POINT object with the second summand
13507  *  \param  ctx    BN_CTX object (optional)
13508  *  \return 1 on success and 0 if an error occured
13509  */
13510 int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
13511                  const EC_POINT *b, BN_CTX *ctx);
13512 
13513 /** Computes the double of a EC_POINT
13514  *  \param  group  underlying EC_GROUP object
13515  *  \param  r      EC_POINT object for the result (r = 2 * a)
13516  *  \param  a      EC_POINT object
13517  *  \param  ctx    BN_CTX object (optional)
13518  *  \return 1 on success and 0 if an error occured
13519  */
13520 int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
13521                  BN_CTX *ctx);
13522 
13523 /** Computes the inverse of a EC_POINT
13524  *  \param  group  underlying EC_GROUP object
13525  *  \param  a      EC_POINT object to be inverted (it's used for the result as well)
13526  *  \param  ctx    BN_CTX object (optional)
13527  *  \return 1 on success and 0 if an error occured
13528  */
13529 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
13530 
13531 /** Checks whether the point is the neutral element of the group
13532  *  \param  group  the underlying EC_GROUP object
13533  *  \param  p      EC_POINT object
13534  *  \return 1 if the point is the neutral element and 0 otherwise
13535  */
13536 int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);
13537 
13538 /** Checks whether the point is on the curve
13539  *  \param  group  underlying EC_GROUP object
13540  *  \param  point  EC_POINT object to check
13541  *  \param  ctx    BN_CTX object (optional)
13542  *  \return 1 if point if on the curve and 0 otherwise
13543  */
13544 int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
13545                          BN_CTX *ctx);
13546 
13547 /** Compares two EC_POINTs
13548  *  \param  group  underlying EC_GROUP object
13549  *  \param  a      first EC_POINT object
13550  *  \param  b      second EC_POINT object
13551  *  \param  ctx    BN_CTX object (optional)
13552  *  \return 0 if both points are equal and a value != 0 otherwise
13553  */
13554 int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
13555                  BN_CTX *ctx);
13556 
13557 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
13558 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
13559                           EC_POINT *points[], BN_CTX *ctx);
13560 
13561 /** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
13562  *  \param  group  underlying EC_GROUP object
13563  *  \param  r      EC_POINT object for the result
13564  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
13565  *  \param  num    number futher summands
13566  *  \param  p      array of size num of EC_POINT objects
13567  *  \param  m      array of size num of BIGNUM objects
13568  *  \param  ctx    BN_CTX object (optional)
13569  *  \return 1 on success and 0 if an error occured
13570  */
13571 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
13572                   size_t num, const EC_POINT *p[], const BIGNUM *m[],
13573                   BN_CTX *ctx);
13574 
13575 /** Computes r = generator * n + q * m
13576  *  \param  group  underlying EC_GROUP object
13577  *  \param  r      EC_POINT object for the result
13578  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
13579  *  \param  q      EC_POINT object with the first factor of the second summand
13580  *  \param  m      BIGNUM with the second factor of the second summand
13581  *  \param  ctx    BN_CTX object (optional)
13582  *  \return 1 on success and 0 if an error occured
13583  */
13584 int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,
13585                  const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
13586 
13587 /** Stores multiples of generator for faster point multiplication
13588  *  \param  group  EC_GROUP object
13589  *  \param  ctx    BN_CTX object (optional)
13590  *  \return 1 on success and 0 if an error occured
13591  */
13592 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
13593 
13594 /** Reports whether a precomputation has been done
13595  *  \param  group  EC_GROUP object
13596  *  \return 1 if a pre-computation has been done and 0 otherwise
13597  */
13598 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
13599 
13600 /********************************************************************/
13601 /*                       ASN1 stuff                                 */
13602 /********************************************************************/
13603 
13604 /*
13605  * EC_GROUP_get_basis_type() returns the NID of the basis type used to
13606  * represent the field elements
13607  */
13608 int EC_GROUP_get_basis_type(const EC_GROUP *);
13609 
13610 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
13611 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
13612                                    unsigned int *k2, unsigned int *k3);
13613 
13614 
13615 
13616 
13617 typedef struct ecpk_parameters_st ECPKPARAMETERS;
13618 
13619 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
13620 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
13621 # 731 "/usr/include/openssl/ec.h" 3 4
13622 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
13623 
13624 
13625 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
13626 
13627 
13628 /********************************************************************/
13629 /*                      EC_KEY functions                            */
13630 /********************************************************************/
13631 
13632 typedef struct ec_key_st EC_KEY;
13633 
13634 /* some values for the encoding_flag */
13635 
13636 
13637 
13638 /* some values for the flags field */
13639 
13640 
13641 
13642 /** Creates a new EC_KEY object.
13643  *  \return EC_KEY object or NULL if an error occurred.
13644  */
13645 EC_KEY *EC_KEY_new(void);
13646 
13647 int EC_KEY_get_flags(const EC_KEY *key);
13648 
13649 void EC_KEY_set_flags(EC_KEY *key, int flags);
13650 
13651 void EC_KEY_clear_flags(EC_KEY *key, int flags);
13652 
13653 /** Creates a new EC_KEY object using a named curve as underlying
13654  *  EC_GROUP object.
13655  *  \param  nid  NID of the named curve.
13656  *  \return EC_KEY object or NULL if an error occurred.
13657  */
13658 EC_KEY *EC_KEY_new_by_curve_name(int nid);
13659 
13660 /** Frees a EC_KEY object.
13661  *  \param  key  EC_KEY object to be freed.
13662  */
13663 void EC_KEY_free(EC_KEY *key);
13664 
13665 /** Copies a EC_KEY object.
13666  *  \param  dst  destination EC_KEY object
13667  *  \param  src  src EC_KEY object
13668  *  \return dst or NULL if an error occurred.
13669  */
13670 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
13671 
13672 /** Creates a new EC_KEY object and copies the content from src to it.
13673  *  \param  src  the source EC_KEY object
13674  *  \return newly created EC_KEY object or NULL if an error occurred.
13675  */
13676 EC_KEY *EC_KEY_dup(const EC_KEY *src);
13677 
13678 /** Increases the internal reference count of a EC_KEY object.
13679  *  \param  key  EC_KEY object
13680  *  \return 1 on success and 0 if an error occurred.
13681  */
13682 int EC_KEY_up_ref(EC_KEY *key);
13683 
13684 /** Returns the EC_GROUP object of a EC_KEY object
13685  *  \param  key  EC_KEY object
13686  *  \return the EC_GROUP object (possibly NULL).
13687  */
13688 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
13689 
13690 /** Sets the EC_GROUP of a EC_KEY object.
13691  *  \param  key    EC_KEY object
13692  *  \param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY
13693  *                 object will use an own copy of the EC_GROUP).
13694  *  \return 1 on success and 0 if an error occurred.
13695  */
13696 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
13697 
13698 /** Returns the private key of a EC_KEY object.
13699  *  \param  key  EC_KEY object
13700  *  \return a BIGNUM with the private key (possibly NULL).
13701  */
13702 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
13703 
13704 /** Sets the private key of a EC_KEY object.
13705  *  \param  key  EC_KEY object
13706  *  \param  prv  BIGNUM with the private key (note: the EC_KEY object
13707  *               will use an own copy of the BIGNUM).
13708  *  \return 1 on success and 0 if an error occurred.
13709  */
13710 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
13711 
13712 /** Returns the public key of a EC_KEY object.
13713  *  \param  key  the EC_KEY object
13714  *  \return a EC_POINT object with the public key (possibly NULL)
13715  */
13716 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
13717 
13718 /** Sets the public key of a EC_KEY object.
13719  *  \param  key  EC_KEY object
13720  *  \param  pub  EC_POINT object with the public key (note: the EC_KEY object
13721  *               will use an own copy of the EC_POINT object).
13722  *  \return 1 on success and 0 if an error occurred.
13723  */
13724 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
13725 
13726 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
13727 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
13728 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
13729 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);
13730 /* functions to set/get method specific data  */
13731 void *EC_KEY_get_key_method_data(EC_KEY *key,
13732                                  void *(*dup_func) (void *),
13733                                  void (*free_func) (void *),
13734                                  void (*clear_free_func) (void *));
13735 /** Sets the key method data of an EC_KEY object, if none has yet been set.
13736  *  \param  key              EC_KEY object
13737  *  \param  data             opaque data to install.
13738  *  \param  dup_func         a function that duplicates |data|.
13739  *  \param  free_func        a function that frees |data|.
13740  *  \param  clear_free_func  a function that wipes and frees |data|.
13741  *  \return the previously set data pointer, or NULL if |data| was inserted.
13742  */
13743 void *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,
13744                                     void *(*dup_func) (void *),
13745                                     void (*free_func) (void *),
13746                                     void (*clear_free_func) (void *));
13747 /* wrapper functions for the underlying EC_GROUP object */
13748 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
13749 
13750 /** Creates a table of pre-computed multiples of the generator to
13751  *  accelerate further EC_KEY operations.
13752  *  \param  key  EC_KEY object
13753  *  \param  ctx  BN_CTX object (optional)
13754  *  \return 1 on success and 0 if an error occurred.
13755  */
13756 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
13757 
13758 /** Creates a new ec private (and optional a new public) key.
13759  *  \param  key  EC_KEY object
13760  *  \return 1 on success and 0 if an error occurred.
13761  */
13762 int EC_KEY_generate_key(EC_KEY *key);
13763 
13764 /** Verifies that a private and/or public key is valid.
13765  *  \param  key  the EC_KEY object
13766  *  \return 1 on success and 0 otherwise.
13767  */
13768 int EC_KEY_check_key(const EC_KEY *key);
13769 
13770 /** Sets a public key from affine coordindates performing
13771  *  neccessary NIST PKV tests.
13772  *  \param  key  the EC_KEY object
13773  *  \param  x    public key x coordinate
13774  *  \param  y    public key y coordinate
13775  *  \return 1 on success and 0 otherwise.
13776  */
13777 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
13778                                              BIGNUM *y);
13779 
13780 /********************************************************************/
13781 /*        de- and encoding functions for SEC1 ECPrivateKey          */
13782 /********************************************************************/
13783 
13784 /** Decodes a private key from a memory buffer.
13785  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
13786  *  \param  in   pointer to memory with the DER encoded private key
13787  *  \param  len  length of the DER encoded private key
13788  *  \return the decoded private key or NULL if an error occurred.
13789  */
13790 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
13791 
13792 /** Encodes a private key object and stores the result in a buffer.
13793  *  \param  key  the EC_KEY object to encode
13794  *  \param  out  the buffer for the result (if NULL the function returns number
13795  *               of bytes needed).
13796  *  \return 1 on success and 0 if an error occurred.
13797  */
13798 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
13799 
13800 /********************************************************************/
13801 /*        de- and encoding functions for EC parameters              */
13802 /********************************************************************/
13803 
13804 /** Decodes ec parameter from a memory buffer.
13805  *  \param  key  a pointer to a EC_KEY object which should be used (or NULL)
13806  *  \param  in   pointer to memory with the DER encoded ec parameters
13807  *  \param  len  length of the DER encoded ec parameters
13808  *  \return a EC_KEY object with the decoded parameters or NULL if an error
13809  *          occurred.
13810  */
13811 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
13812 
13813 /** Encodes ec parameter and stores the result in a buffer.
13814  *  \param  key  the EC_KEY object with ec paramters to encode
13815  *  \param  out  the buffer for the result (if NULL the function returns number
13816  *               of bytes needed).
13817  *  \return 1 on success and 0 if an error occurred.
13818  */
13819 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
13820 
13821 /********************************************************************/
13822 /*         de- and encoding functions for EC public key             */
13823 /*         (octet string, not DER -- hence 'o2i' and 'i2o')         */
13824 /********************************************************************/
13825 
13826 /** Decodes a ec public key from a octet string.
13827  *  \param  key  a pointer to a EC_KEY object which should be used
13828  *  \param  in   memory buffer with the encoded public key
13829  *  \param  len  length of the encoded public key
13830  *  \return EC_KEY object with decoded public key or NULL if an error
13831  *          occurred.
13832  */
13833 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
13834 
13835 /** Encodes a ec public key in an octet string.
13836  *  \param  key  the EC_KEY object with the public key
13837  *  \param  out  the buffer for the result (if NULL the function returns number
13838  *               of bytes needed).
13839  *  \return 1 on success and 0 if an error occurred
13840  */
13841 int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
13842 
13843 
13844 /** Prints out the ec parameters on human readable form.
13845  *  \param  bp   BIO object to which the information is printed
13846  *  \param  key  EC_KEY object
13847  *  \return 1 on success and 0 if an error occurred
13848  */
13849 int ECParameters_print(BIO *bp, const EC_KEY *key);
13850 
13851 /** Prints out the contents of a EC_KEY object
13852  *  \param  bp   BIO object to which the information is printed
13853  *  \param  key  EC_KEY object
13854  *  \param  off  line offset
13855  *  \return 1 on success and 0 if an error occurred
13856  */
13857 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
13858 
13859 
13860 
13861 /** Prints out the ec parameters on human readable form.
13862  *  \param  fp   file descriptor to which the information is printed
13863  *  \param  key  EC_KEY object
13864  *  \return 1 on success and 0 if an error occurred
13865  */
13866 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
13867 
13868 /** Prints out the contents of a EC_KEY object
13869  *  \param  fp   file descriptor to which the information is printed
13870  *  \param  key  EC_KEY object
13871  *  \param  off  line offset
13872  *  \return 1 on success and 0 if an error occurred
13873  */
13874 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
13875 # 1067 "/usr/include/openssl/ec.h" 3 4
13876 /* KDF types */
13877 
13878 
13879 
13880 /* BEGIN ERROR CODES */
13881 /*
13882  * The following lines are auto generated by the script mkerr.pl. Any changes
13883  * made after this point may be overwritten when the script is next run.
13884  */
13885 
13886 void ERR_load_EC_strings(void);
13887 
13888 /* Error codes for the EC functions. */
13889 
13890 /* Function codes. */
13891 # 1227 "/usr/include/openssl/ec.h" 3 4
13892 /* Reason codes. */
13893 # 84 "/usr/include/openssl/x509.h" 2 3 4
13894 
13895 
13896 
13897 # 1 "/usr/include/openssl/ecdsa.h" 1 3 4
13898 /* crypto/ecdsa/ecdsa.h */
13899 /**
13900  * \file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
13901  * \author Written by Nils Larsch for the OpenSSL project
13902  */
13903 /* ====================================================================
13904  * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.
13905  *
13906  * Redistribution and use in source and binary forms, with or without
13907  * modification, are permitted provided that the following conditions
13908  * are met:
13909  *
13910  * 1. Redistributions of source code must retain the above copyright
13911  *    notice, this list of conditions and the following disclaimer.
13912  *
13913  * 2. Redistributions in binary form must reproduce the above copyright
13914  *    notice, this list of conditions and the following disclaimer in
13915  *    the documentation and/or other materials provided with the
13916  *    distribution.
13917  *
13918  * 3. All advertising materials mentioning features or use of this
13919  *    software must display the following acknowledgment:
13920  *    "This product includes software developed by the OpenSSL Project
13921  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
13922  *
13923  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
13924  *    endorse or promote products derived from this software without
13925  *    prior written permission. For written permission, please contact
13926  *    licensing@OpenSSL.org.
13927  *
13928  * 5. Products derived from this software may not be called "OpenSSL"
13929  *    nor may "OpenSSL" appear in their names without prior written
13930  *    permission of the OpenSSL Project.
13931  *
13932  * 6. Redistributions of any form whatsoever must retain the following
13933  *    acknowledgment:
13934  *    "This product includes software developed by the OpenSSL Project
13935  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
13936  *
13937  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
13938  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
13939  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13940  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
13941  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13942  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13943  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
13944  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13945  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
13946  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
13947  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
13948  * OF THE POSSIBILITY OF SUCH DAMAGE.
13949  * ====================================================================
13950  *
13951  * This product includes cryptographic software written by Eric Young
13952  * (eay@cryptsoft.com).  This product includes software written by Tim
13953  * Hudson (tjh@cryptsoft.com).
13954  *
13955  */
13956 
13957 
13958 
13959 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
13960 /* opensslconf.h */
13961 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
13962 
13963 
13964 
13965 
13966 /* OpenSSL was configured with the following options: */
13967 # 108 "/usr/include/openssl/opensslconf.h" 3 4
13968 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
13969    asks for it.  This is a transient feature that is provided for those
13970    who haven't had the time to do the appropriate changes in their
13971    applications.  */
13972 # 204 "/usr/include/openssl/opensslconf.h" 3 4
13973 /* crypto/opensslconf.h.in */
13974 
13975 /* Generate 80386 code? */
13976 # 63 "/usr/include/openssl/ecdsa.h" 2 3 4
13977 
13978 
13979 
13980 
13981 
13982 # 1 "/usr/include/openssl/ec.h" 1 3 4
13983 /* crypto/ec/ec.h */
13984 /*
13985  * Originally written by Bodo Moeller for the OpenSSL project.
13986  */
13987 /**
13988  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
13989  * \author Originally written by Bodo Moeller for the OpenSSL project
13990  */
13991 /* ====================================================================
13992  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
13993  *
13994  * Redistribution and use in source and binary forms, with or without
13995  * modification, are permitted provided that the following conditions
13996  * are met:
13997  *
13998  * 1. Redistributions of source code must retain the above copyright
13999  *    notice, this list of conditions and the following disclaimer.
14000  *
14001  * 2. Redistributions in binary form must reproduce the above copyright
14002  *    notice, this list of conditions and the following disclaimer in
14003  *    the documentation and/or other materials provided with the
14004  *    distribution.
14005  *
14006  * 3. All advertising materials mentioning features or use of this
14007  *    software must display the following acknowledgment:
14008  *    "This product includes software developed by the OpenSSL Project
14009  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14010  *
14011  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14012  *    endorse or promote products derived from this software without
14013  *    prior written permission. For written permission, please contact
14014  *    openssl-core@openssl.org.
14015  *
14016  * 5. Products derived from this software may not be called "OpenSSL"
14017  *    nor may "OpenSSL" appear in their names without prior written
14018  *    permission of the OpenSSL Project.
14019  *
14020  * 6. Redistributions of any form whatsoever must retain the following
14021  *    acknowledgment:
14022  *    "This product includes software developed by the OpenSSL Project
14023  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14024  *
14025  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14026  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14027  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14028  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14029  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14030  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14031  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14032  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14033  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14034  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14036  * OF THE POSSIBILITY OF SUCH DAMAGE.
14037  * ====================================================================
14038  *
14039  * This product includes cryptographic software written by Eric Young
14040  * (eay@cryptsoft.com).  This product includes software written by Tim
14041  * Hudson (tjh@cryptsoft.com).
14042  *
14043  */
14044 /* ====================================================================
14045  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14046  *
14047  * Portions of the attached software ("Contribution") are developed by
14048  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14049  *
14050  * The Contribution is licensed pursuant to the OpenSSL open source
14051  * license provided above.
14052  *
14053  * The elliptic curve binary polynomial software is originally written by
14054  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14055  *
14056  */
14057 # 69 "/usr/include/openssl/ecdsa.h" 2 3 4
14058 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
14059 /* ====================================================================
14060  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
14061  *
14062  * Redistribution and use in source and binary forms, with or without
14063  * modification, are permitted provided that the following conditions
14064  * are met:
14065  *
14066  * 1. Redistributions of source code must retain the above copyright
14067  *    notice, this list of conditions and the following disclaimer.
14068  *
14069  * 2. Redistributions in binary form must reproduce the above copyright
14070  *    notice, this list of conditions and the following disclaimer in
14071  *    the documentation and/or other materials provided with the
14072  *    distribution.
14073  *
14074  * 3. All advertising materials mentioning features or use of this
14075  *    software must display the following acknowledgment:
14076  *    "This product includes software developed by the OpenSSL Project
14077  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14078  *
14079  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14080  *    endorse or promote products derived from this software without
14081  *    prior written permission. For written permission, please contact
14082  *    openssl-core@openssl.org.
14083  *
14084  * 5. Products derived from this software may not be called "OpenSSL"
14085  *    nor may "OpenSSL" appear in their names without prior written
14086  *    permission of the OpenSSL Project.
14087  *
14088  * 6. Redistributions of any form whatsoever must retain the following
14089  *    acknowledgment:
14090  *    "This product includes software developed by the OpenSSL Project
14091  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14092  *
14093  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14094  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14095  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14096  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14097  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14098  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14099  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14100  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14101  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14102  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14103  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14104  * OF THE POSSIBILITY OF SUCH DAMAGE.
14105  * ====================================================================
14106  *
14107  * This product includes cryptographic software written by Eric Young
14108  * (eay@cryptsoft.com).  This product includes software written by Tim
14109  * Hudson (tjh@cryptsoft.com).
14110  *
14111  */
14112 # 70 "/usr/include/openssl/ecdsa.h" 2 3 4
14113 
14114 # 1 "/usr/include/openssl/bn.h" 1 3 4
14115 /* crypto/bn/bn.h */
14116 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14117  * All rights reserved.
14118  *
14119  * This package is an SSL implementation written
14120  * by Eric Young (eay@cryptsoft.com).
14121  * The implementation was written so as to conform with Netscapes SSL.
14122  *
14123  * This library is free for commercial and non-commercial use as long as
14124  * the following conditions are aheared to.  The following conditions
14125  * apply to all code found in this distribution, be it the RC4, RSA,
14126  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14127  * included with this distribution is covered by the same copyright terms
14128  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14129  *
14130  * Copyright remains Eric Young's, and as such any Copyright notices in
14131  * the code are not to be removed.
14132  * If this package is used in a product, Eric Young should be given attribution
14133  * as the author of the parts of the library used.
14134  * This can be in the form of a textual message at program startup or
14135  * in documentation (online or textual) provided with the package.
14136  *
14137  * Redistribution and use in source and binary forms, with or without
14138  * modification, are permitted provided that the following conditions
14139  * are met:
14140  * 1. Redistributions of source code must retain the copyright
14141  *    notice, this list of conditions and the following disclaimer.
14142  * 2. Redistributions in binary form must reproduce the above copyright
14143  *    notice, this list of conditions and the following disclaimer in the
14144  *    documentation and/or other materials provided with the distribution.
14145  * 3. All advertising materials mentioning features or use of this software
14146  *    must display the following acknowledgement:
14147  *    "This product includes cryptographic software written by
14148  *     Eric Young (eay@cryptsoft.com)"
14149  *    The word 'cryptographic' can be left out if the rouines from the library
14150  *    being used are not cryptographic related :-).
14151  * 4. If you include any Windows specific code (or a derivative thereof) from
14152  *    the apps directory (application code) you must include an acknowledgement:
14153  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14154  *
14155  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14156  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14157  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14158  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14159  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14160  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14161  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14162  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14163  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14164  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14165  * SUCH DAMAGE.
14166  *
14167  * The licence and distribution terms for any publically available version or
14168  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14169  * copied and put under another distribution licence
14170  * [including the GNU Public Licence.]
14171  */
14172 /* ====================================================================
14173  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
14174  *
14175  * Redistribution and use in source and binary forms, with or without
14176  * modification, are permitted provided that the following conditions
14177  * are met:
14178  *
14179  * 1. Redistributions of source code must retain the above copyright
14180  *    notice, this list of conditions and the following disclaimer.
14181  *
14182  * 2. Redistributions in binary form must reproduce the above copyright
14183  *    notice, this list of conditions and the following disclaimer in
14184  *    the documentation and/or other materials provided with the
14185  *    distribution.
14186  *
14187  * 3. All advertising materials mentioning features or use of this
14188  *    software must display the following acknowledgment:
14189  *    "This product includes software developed by the OpenSSL Project
14190  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14191  *
14192  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14193  *    endorse or promote products derived from this software without
14194  *    prior written permission. For written permission, please contact
14195  *    openssl-core@openssl.org.
14196  *
14197  * 5. Products derived from this software may not be called "OpenSSL"
14198  *    nor may "OpenSSL" appear in their names without prior written
14199  *    permission of the OpenSSL Project.
14200  *
14201  * 6. Redistributions of any form whatsoever must retain the following
14202  *    acknowledgment:
14203  *    "This product includes software developed by the OpenSSL Project
14204  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14205  *
14206  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14207  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14208  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14209  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14210  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14211  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14212  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14213  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14214  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14215  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14216  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14217  * OF THE POSSIBILITY OF SUCH DAMAGE.
14218  * ====================================================================
14219  *
14220  * This product includes cryptographic software written by Eric Young
14221  * (eay@cryptsoft.com).  This product includes software written by Tim
14222  * Hudson (tjh@cryptsoft.com).
14223  *
14224  */
14225 /* ====================================================================
14226  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14227  *
14228  * Portions of the attached software ("Contribution") are developed by
14229  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14230  *
14231  * The Contribution is licensed pursuant to the Eric Young open source
14232  * license provided above.
14233  *
14234  * The binary polynomial arithmetic software is originally written by
14235  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14236  *
14237  */
14238 # 72 "/usr/include/openssl/ecdsa.h" 2 3 4
14239 
14240 
14241 
14242 
14243 
14244 
14245 typedef struct ECDSA_SIG_st {
14246     BIGNUM *r;
14247     BIGNUM *s;
14248 } ECDSA_SIG;
14249 
14250 /** Allocates and initialize a ECDSA_SIG structure
14251  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
14252  */
14253 ECDSA_SIG *ECDSA_SIG_new(void);
14254 
14255 /** frees a ECDSA_SIG structure
14256  *  \param  sig  pointer to the ECDSA_SIG structure
14257  */
14258 void ECDSA_SIG_free(ECDSA_SIG *sig);
14259 
14260 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
14261  *  (*pp += length of the DER encoded signature)).
14262  *  \param  sig  pointer to the ECDSA_SIG object
14263  *  \param  pp   pointer to a unsigned char pointer for the output or NULL
14264  *  \return the length of the DER encoded ECDSA_SIG object or 0
14265  */
14266 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
14267 
14268 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
14269  *  (*pp += len)).
14270  *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
14271  *  \param  pp   memory buffer with the DER encoded signature
14272  *  \param  len  length of the buffer
14273  *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
14274  */
14275 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
14276 
14277 /** Computes the ECDSA signature of the given hash value using
14278  *  the supplied private key and returns the created signature.
14279  *  \param  dgst      pointer to the hash value
14280  *  \param  dgst_len  length of the hash value
14281  *  \param  eckey     EC_KEY object containing a private EC key
14282  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
14283  */
14284 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
14285                          EC_KEY *eckey);
14286 
14287 /** Computes ECDSA signature of a given hash value using the supplied
14288  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
14289  *  \param  dgst     pointer to the hash value to sign
14290  *  \param  dgstlen  length of the hash value
14291  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
14292  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
14293  *                   see ECDSA_sign_setup
14294  *  \param  eckey    EC_KEY object containing a private EC key
14295  *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
14296  */
14297 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
14298                             const BIGNUM *kinv, const BIGNUM *rp,
14299                             EC_KEY *eckey);
14300 
14301 /** Verifies that the supplied signature is a valid ECDSA
14302  *  signature of the supplied hash value using the supplied public key.
14303  *  \param  dgst      pointer to the hash value
14304  *  \param  dgst_len  length of the hash value
14305  *  \param  sig       ECDSA_SIG structure
14306  *  \param  eckey     EC_KEY object containing a public EC key
14307  *  \return 1 if the signature is valid, 0 if the signature is invalid
14308  *          and -1 on error
14309  */
14310 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
14311                     const ECDSA_SIG *sig, EC_KEY *eckey);
14312 
14313 const ECDSA_METHOD *ECDSA_OpenSSL(void);
14314 
14315 /** Sets the default ECDSA method
14316  *  \param  meth  new default ECDSA_METHOD
14317  */
14318 void ECDSA_set_default_method(const ECDSA_METHOD *meth);
14319 
14320 /** Returns the default ECDSA method
14321  *  \return pointer to ECDSA_METHOD structure containing the default method
14322  */
14323 const ECDSA_METHOD *ECDSA_get_default_method(void);
14324 
14325 /** Sets method to be used for the ECDSA operations
14326  *  \param  eckey  EC_KEY object
14327  *  \param  meth   new method
14328  *  \return 1 on success and 0 otherwise
14329  */
14330 int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);
14331 
14332 /** Returns the maximum length of the DER encoded signature
14333  *  \param  eckey  EC_KEY object
14334  *  \return numbers of bytes required for the DER encoded signature
14335  */
14336 int ECDSA_size(const EC_KEY *eckey);
14337 
14338 /** Precompute parts of the signing operation
14339  *  \param  eckey  EC_KEY object containing a private EC key
14340  *  \param  ctx    BN_CTX object (optional)
14341  *  \param  kinv   BIGNUM pointer for the inverse of k
14342  *  \param  rp     BIGNUM pointer for x coordinate of k * generator
14343  *  \return 1 on success and 0 otherwise
14344  */
14345 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
14346 
14347 /** Computes ECDSA signature of a given hash value using the supplied
14348  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
14349  *  \param  type     this parameter is ignored
14350  *  \param  dgst     pointer to the hash value to sign
14351  *  \param  dgstlen  length of the hash value
14352  *  \param  sig      memory for the DER encoded created signature
14353  *  \param  siglen   pointer to the length of the returned signature
14354  *  \param  eckey    EC_KEY object containing a private EC key
14355  *  \return 1 on success and 0 otherwise
14356  */
14357 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
14358                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
14359 
14360 /** Computes ECDSA signature of a given hash value using the supplied
14361  *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
14362  *  \param  type     this parameter is ignored
14363  *  \param  dgst     pointer to the hash value to sign
14364  *  \param  dgstlen  length of the hash value
14365  *  \param  sig      buffer to hold the DER encoded signature
14366  *  \param  siglen   pointer to the length of the returned signature
14367  *  \param  kinv     BIGNUM with a pre-computed inverse k (optional)
14368  *  \param  rp       BIGNUM with a pre-computed rp value (optioanl),
14369  *                   see ECDSA_sign_setup
14370  *  \param  eckey    EC_KEY object containing a private EC key
14371  *  \return 1 on success and 0 otherwise
14372  */
14373 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,
14374                   unsigned char *sig, unsigned int *siglen,
14375                   const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);
14376 
14377 /** Verifies that the given signature is valid ECDSA signature
14378  *  of the supplied hash value using the specified public key.
14379  *  \param  type     this parameter is ignored
14380  *  \param  dgst     pointer to the hash value
14381  *  \param  dgstlen  length of the hash value
14382  *  \param  sig      pointer to the DER encoded signature
14383  *  \param  siglen   length of the DER encoded signature
14384  *  \param  eckey    EC_KEY object containing a public EC key
14385  *  \return 1 if the signature is valid, 0 if the signature is invalid
14386  *          and -1 on error
14387  */
14388 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
14389                  const unsigned char *sig, int siglen, EC_KEY *eckey);
14390 
14391 /* the standard ex_data functions */
14392 int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
14393                            *new_func, CRYPTO_EX_dup *dup_func,
14394                            CRYPTO_EX_free *free_func);
14395 int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);
14396 void *ECDSA_get_ex_data(EC_KEY *d, int idx);
14397 
14398 /** Allocates and initialize a ECDSA_METHOD structure
14399  *  \param ecdsa_method pointer to ECDSA_METHOD to copy.  (May be NULL)
14400  *  \return pointer to a ECDSA_METHOD structure or NULL if an error occurred
14401  */
14402 
14403 ECDSA_METHOD *ECDSA_METHOD_new(const ECDSA_METHOD *ecdsa_method);
14404 
14405 /** frees a ECDSA_METHOD structure
14406  *  \param  ecdsa_method  pointer to the ECDSA_METHOD structure
14407  */
14408 void ECDSA_METHOD_free(ECDSA_METHOD *ecdsa_method);
14409 
14410 /**  Sets application specific data in the ECDSA_METHOD
14411  *   \param  ecdsa_method pointer to existing ECDSA_METHOD
14412  *   \param  app application specific data to set
14413  */
14414 
14415 void ECDSA_METHOD_set_app_data(ECDSA_METHOD *ecdsa_method, void *app);
14416 
14417 /** Returns application specific data from a ECDSA_METHOD structure
14418  *  \param ecdsa_method pointer to ECDSA_METHOD structure
14419  *  \return pointer to application specific data.
14420  */
14421 
14422 void *ECDSA_METHOD_get_app_data(ECDSA_METHOD *ecdsa_method);
14423 
14424 /**  Set the ECDSA_do_sign function in the ECDSA_METHOD
14425  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
14426  *   \param  ecdsa_do_sign a funtion of type ECDSA_do_sign
14427  */
14428 
14429 void ECDSA_METHOD_set_sign(ECDSA_METHOD *ecdsa_method,
14430                            ECDSA_SIG *(*ecdsa_do_sign) (const unsigned char
14431                                                         *dgst, int dgst_len,
14432                                                         const BIGNUM *inv,
14433                                                         const BIGNUM *rp,
14434                                                         EC_KEY *eckey));
14435 
14436 /**  Set the  ECDSA_sign_setup function in the ECDSA_METHOD
14437  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
14438  *   \param  ecdsa_sign_setup a funtion of type ECDSA_sign_setup
14439  */
14440 
14441 void ECDSA_METHOD_set_sign_setup(ECDSA_METHOD *ecdsa_method,
14442                                  int (*ecdsa_sign_setup) (EC_KEY *eckey,
14443                                                           BN_CTX *ctx,
14444                                                           BIGNUM **kinv,
14445                                                           BIGNUM **r));
14446 
14447 /**  Set the ECDSA_do_verify function in the ECDSA_METHOD
14448  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
14449  *   \param  ecdsa_do_verify a funtion of type ECDSA_do_verify
14450  */
14451 
14452 void ECDSA_METHOD_set_verify(ECDSA_METHOD *ecdsa_method,
14453                              int (*ecdsa_do_verify) (const unsigned char
14454                                                      *dgst, int dgst_len,
14455                                                      const ECDSA_SIG *sig,
14456                                                      EC_KEY *eckey));
14457 
14458 void ECDSA_METHOD_set_flags(ECDSA_METHOD *ecdsa_method, int flags);
14459 
14460 /**  Set the flags field in the ECDSA_METHOD
14461  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
14462  *   \param  flags flags value to set
14463  */
14464 
14465 void ECDSA_METHOD_set_name(ECDSA_METHOD *ecdsa_method, char *name);
14466 
14467 /**  Set the name field in the ECDSA_METHOD
14468  *   \param  ecdsa_method  pointer to existing ECDSA_METHOD
14469  *   \param  name name to set
14470  */
14471 
14472 /* BEGIN ERROR CODES */
14473 /*
14474  * The following lines are auto generated by the script mkerr.pl. Any changes
14475  * made after this point may be overwritten when the script is next run.
14476  */
14477 void ERR_load_ECDSA_strings(void);
14478 
14479 /* Error codes for the ECDSA functions. */
14480 
14481 /* Function codes. */
14482 
14483 
14484 
14485 
14486 
14487 
14488 
14489 /* Reason codes. */
14490 # 88 "/usr/include/openssl/x509.h" 2 3 4
14491 
14492 
14493 
14494 # 1 "/usr/include/openssl/ecdh.h" 1 3 4
14495 /* crypto/ecdh/ecdh.h */
14496 /* ====================================================================
14497  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14498  *
14499  * The Elliptic Curve Public-Key Crypto Library (ECC Code) included
14500  * herein is developed by SUN MICROSYSTEMS, INC., and is contributed
14501  * to the OpenSSL project.
14502  *
14503  * The ECC Code is licensed pursuant to the OpenSSL open source
14504  * license provided below.
14505  *
14506  * The ECDH software is originally written by Douglas Stebila of
14507  * Sun Microsystems Laboratories.
14508  *
14509  */
14510 /* ====================================================================
14511  * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.
14512  *
14513  * Redistribution and use in source and binary forms, with or without
14514  * modification, are permitted provided that the following conditions
14515  * are met:
14516  *
14517  * 1. Redistributions of source code must retain the above copyright
14518  *    notice, this list of conditions and the following disclaimer.
14519  *
14520  * 2. Redistributions in binary form must reproduce the above copyright
14521  *    notice, this list of conditions and the following disclaimer in
14522  *    the documentation and/or other materials provided with the
14523  *    distribution.
14524  *
14525  * 3. All advertising materials mentioning features or use of this
14526  *    software must display the following acknowledgment:
14527  *    "This product includes software developed by the OpenSSL Project
14528  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
14529  *
14530  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14531  *    endorse or promote products derived from this software without
14532  *    prior written permission. For written permission, please contact
14533  *    licensing@OpenSSL.org.
14534  *
14535  * 5. Products derived from this software may not be called "OpenSSL"
14536  *    nor may "OpenSSL" appear in their names without prior written
14537  *    permission of the OpenSSL Project.
14538  *
14539  * 6. Redistributions of any form whatsoever must retain the following
14540  *    acknowledgment:
14541  *    "This product includes software developed by the OpenSSL Project
14542  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
14543  *
14544  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14545  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14546  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14547  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14548  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14549  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14550  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14551  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14552  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14553  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14554  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14555  * OF THE POSSIBILITY OF SUCH DAMAGE.
14556  * ====================================================================
14557  *
14558  * This product includes cryptographic software written by Eric Young
14559  * (eay@cryptsoft.com).  This product includes software written by Tim
14560  * Hudson (tjh@cryptsoft.com).
14561  *
14562  */
14563 
14564 
14565 
14566 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
14567 /* opensslconf.h */
14568 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
14569 
14570 
14571 
14572 
14573 /* OpenSSL was configured with the following options: */
14574 # 108 "/usr/include/openssl/opensslconf.h" 3 4
14575 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
14576    asks for it.  This is a transient feature that is provided for those
14577    who haven't had the time to do the appropriate changes in their
14578    applications.  */
14579 # 204 "/usr/include/openssl/opensslconf.h" 3 4
14580 /* crypto/opensslconf.h.in */
14581 
14582 /* Generate 80386 code? */
14583 # 73 "/usr/include/openssl/ecdh.h" 2 3 4
14584 
14585 
14586 
14587 
14588 
14589 # 1 "/usr/include/openssl/ec.h" 1 3 4
14590 /* crypto/ec/ec.h */
14591 /*
14592  * Originally written by Bodo Moeller for the OpenSSL project.
14593  */
14594 /**
14595  * \file crypto/ec/ec.h Include file for the OpenSSL EC functions
14596  * \author Originally written by Bodo Moeller for the OpenSSL project
14597  */
14598 /* ====================================================================
14599  * Copyright (c) 1998-2019 The OpenSSL Project.  All rights reserved.
14600  *
14601  * Redistribution and use in source and binary forms, with or without
14602  * modification, are permitted provided that the following conditions
14603  * are met:
14604  *
14605  * 1. Redistributions of source code must retain the above copyright
14606  *    notice, this list of conditions and the following disclaimer.
14607  *
14608  * 2. Redistributions in binary form must reproduce the above copyright
14609  *    notice, this list of conditions and the following disclaimer in
14610  *    the documentation and/or other materials provided with the
14611  *    distribution.
14612  *
14613  * 3. All advertising materials mentioning features or use of this
14614  *    software must display the following acknowledgment:
14615  *    "This product includes software developed by the OpenSSL Project
14616  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14617  *
14618  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14619  *    endorse or promote products derived from this software without
14620  *    prior written permission. For written permission, please contact
14621  *    openssl-core@openssl.org.
14622  *
14623  * 5. Products derived from this software may not be called "OpenSSL"
14624  *    nor may "OpenSSL" appear in their names without prior written
14625  *    permission of the OpenSSL Project.
14626  *
14627  * 6. Redistributions of any form whatsoever must retain the following
14628  *    acknowledgment:
14629  *    "This product includes software developed by the OpenSSL Project
14630  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14631  *
14632  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14633  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14634  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14635  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14636  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14637  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14638  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14639  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14640  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14641  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14642  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14643  * OF THE POSSIBILITY OF SUCH DAMAGE.
14644  * ====================================================================
14645  *
14646  * This product includes cryptographic software written by Eric Young
14647  * (eay@cryptsoft.com).  This product includes software written by Tim
14648  * Hudson (tjh@cryptsoft.com).
14649  *
14650  */
14651 /* ====================================================================
14652  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14653  *
14654  * Portions of the attached software ("Contribution") are developed by
14655  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14656  *
14657  * The Contribution is licensed pursuant to the OpenSSL open source
14658  * license provided above.
14659  *
14660  * The elliptic curve binary polynomial software is originally written by
14661  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14662  *
14663  */
14664 # 79 "/usr/include/openssl/ecdh.h" 2 3 4
14665 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
14666 /* ====================================================================
14667  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
14668  *
14669  * Redistribution and use in source and binary forms, with or without
14670  * modification, are permitted provided that the following conditions
14671  * are met:
14672  *
14673  * 1. Redistributions of source code must retain the above copyright
14674  *    notice, this list of conditions and the following disclaimer.
14675  *
14676  * 2. Redistributions in binary form must reproduce the above copyright
14677  *    notice, this list of conditions and the following disclaimer in
14678  *    the documentation and/or other materials provided with the
14679  *    distribution.
14680  *
14681  * 3. All advertising materials mentioning features or use of this
14682  *    software must display the following acknowledgment:
14683  *    "This product includes software developed by the OpenSSL Project
14684  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14685  *
14686  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14687  *    endorse or promote products derived from this software without
14688  *    prior written permission. For written permission, please contact
14689  *    openssl-core@openssl.org.
14690  *
14691  * 5. Products derived from this software may not be called "OpenSSL"
14692  *    nor may "OpenSSL" appear in their names without prior written
14693  *    permission of the OpenSSL Project.
14694  *
14695  * 6. Redistributions of any form whatsoever must retain the following
14696  *    acknowledgment:
14697  *    "This product includes software developed by the OpenSSL Project
14698  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14699  *
14700  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14701  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14702  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14703  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14704  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14705  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14706  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14707  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14708  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14709  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14710  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14711  * OF THE POSSIBILITY OF SUCH DAMAGE.
14712  * ====================================================================
14713  *
14714  * This product includes cryptographic software written by Eric Young
14715  * (eay@cryptsoft.com).  This product includes software written by Tim
14716  * Hudson (tjh@cryptsoft.com).
14717  *
14718  */
14719 # 80 "/usr/include/openssl/ecdh.h" 2 3 4
14720 
14721 # 1 "/usr/include/openssl/bn.h" 1 3 4
14722 /* crypto/bn/bn.h */
14723 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
14724  * All rights reserved.
14725  *
14726  * This package is an SSL implementation written
14727  * by Eric Young (eay@cryptsoft.com).
14728  * The implementation was written so as to conform with Netscapes SSL.
14729  *
14730  * This library is free for commercial and non-commercial use as long as
14731  * the following conditions are aheared to.  The following conditions
14732  * apply to all code found in this distribution, be it the RC4, RSA,
14733  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14734  * included with this distribution is covered by the same copyright terms
14735  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14736  *
14737  * Copyright remains Eric Young's, and as such any Copyright notices in
14738  * the code are not to be removed.
14739  * If this package is used in a product, Eric Young should be given attribution
14740  * as the author of the parts of the library used.
14741  * This can be in the form of a textual message at program startup or
14742  * in documentation (online or textual) provided with the package.
14743  *
14744  * Redistribution and use in source and binary forms, with or without
14745  * modification, are permitted provided that the following conditions
14746  * are met:
14747  * 1. Redistributions of source code must retain the copyright
14748  *    notice, this list of conditions and the following disclaimer.
14749  * 2. Redistributions in binary form must reproduce the above copyright
14750  *    notice, this list of conditions and the following disclaimer in the
14751  *    documentation and/or other materials provided with the distribution.
14752  * 3. All advertising materials mentioning features or use of this software
14753  *    must display the following acknowledgement:
14754  *    "This product includes cryptographic software written by
14755  *     Eric Young (eay@cryptsoft.com)"
14756  *    The word 'cryptographic' can be left out if the rouines from the library
14757  *    being used are not cryptographic related :-).
14758  * 4. If you include any Windows specific code (or a derivative thereof) from
14759  *    the apps directory (application code) you must include an acknowledgement:
14760  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14761  *
14762  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14763  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14764  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14765  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14766  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14767  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14768  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14769  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14770  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14771  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14772  * SUCH DAMAGE.
14773  *
14774  * The licence and distribution terms for any publically available version or
14775  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14776  * copied and put under another distribution licence
14777  * [including the GNU Public Licence.]
14778  */
14779 /* ====================================================================
14780  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
14781  *
14782  * Redistribution and use in source and binary forms, with or without
14783  * modification, are permitted provided that the following conditions
14784  * are met:
14785  *
14786  * 1. Redistributions of source code must retain the above copyright
14787  *    notice, this list of conditions and the following disclaimer.
14788  *
14789  * 2. Redistributions in binary form must reproduce the above copyright
14790  *    notice, this list of conditions and the following disclaimer in
14791  *    the documentation and/or other materials provided with the
14792  *    distribution.
14793  *
14794  * 3. All advertising materials mentioning features or use of this
14795  *    software must display the following acknowledgment:
14796  *    "This product includes software developed by the OpenSSL Project
14797  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
14798  *
14799  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
14800  *    endorse or promote products derived from this software without
14801  *    prior written permission. For written permission, please contact
14802  *    openssl-core@openssl.org.
14803  *
14804  * 5. Products derived from this software may not be called "OpenSSL"
14805  *    nor may "OpenSSL" appear in their names without prior written
14806  *    permission of the OpenSSL Project.
14807  *
14808  * 6. Redistributions of any form whatsoever must retain the following
14809  *    acknowledgment:
14810  *    "This product includes software developed by the OpenSSL Project
14811  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
14812  *
14813  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
14814  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14815  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14816  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
14817  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
14818  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
14819  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14820  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14821  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14822  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
14823  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
14824  * OF THE POSSIBILITY OF SUCH DAMAGE.
14825  * ====================================================================
14826  *
14827  * This product includes cryptographic software written by Eric Young
14828  * (eay@cryptsoft.com).  This product includes software written by Tim
14829  * Hudson (tjh@cryptsoft.com).
14830  *
14831  */
14832 /* ====================================================================
14833  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
14834  *
14835  * Portions of the attached software ("Contribution") are developed by
14836  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
14837  *
14838  * The Contribution is licensed pursuant to the Eric Young open source
14839  * license provided above.
14840  *
14841  * The binary polynomial arithmetic software is originally written by
14842  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
14843  *
14844  */
14845 # 82 "/usr/include/openssl/ecdh.h" 2 3 4
14846 # 90 "/usr/include/openssl/ecdh.h" 3 4
14847 const ECDH_METHOD *ECDH_OpenSSL(void);
14848 
14849 void ECDH_set_default_method(const ECDH_METHOD *);
14850 const ECDH_METHOD *ECDH_get_default_method(void);
14851 int ECDH_set_method(EC_KEY *, const ECDH_METHOD *);
14852 
14853 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
14854                      EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,
14855                                                  void *out, size_t *outlen));
14856 
14857 int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new
14858                           *new_func, CRYPTO_EX_dup *dup_func,
14859                           CRYPTO_EX_free *free_func);
14860 int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);
14861 void *ECDH_get_ex_data(EC_KEY *d, int idx);
14862 
14863 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
14864                    const unsigned char *Z, size_t Zlen,
14865                    const unsigned char *sinfo, size_t sinfolen,
14866                    const EVP_MD *md);
14867 
14868 /* BEGIN ERROR CODES */
14869 /*
14870  * The following lines are auto generated by the script mkerr.pl. Any changes
14871  * made after this point may be overwritten when the script is next run.
14872  */
14873 void ERR_load_ECDH_strings(void);
14874 
14875 /* Error codes for the ECDH functions. */
14876 
14877 /* Function codes. */
14878 
14879 
14880 
14881 
14882 /* Reason codes. */
14883 # 92 "/usr/include/openssl/x509.h" 2 3 4
14884 
14885 
14886 
14887 
14888 # 1 "/usr/include/openssl/rsa.h" 1 3 4
14889 /* crypto/rsa/rsa.h */
14890 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14891  * All rights reserved.
14892  *
14893  * This package is an SSL implementation written
14894  * by Eric Young (eay@cryptsoft.com).
14895  * The implementation was written so as to conform with Netscapes SSL.
14896  *
14897  * This library is free for commercial and non-commercial use as long as
14898  * the following conditions are aheared to.  The following conditions
14899  * apply to all code found in this distribution, be it the RC4, RSA,
14900  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14901  * included with this distribution is covered by the same copyright terms
14902  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14903  *
14904  * Copyright remains Eric Young's, and as such any Copyright notices in
14905  * the code are not to be removed.
14906  * If this package is used in a product, Eric Young should be given attribution
14907  * as the author of the parts of the library used.
14908  * This can be in the form of a textual message at program startup or
14909  * in documentation (online or textual) provided with the package.
14910  *
14911  * Redistribution and use in source and binary forms, with or without
14912  * modification, are permitted provided that the following conditions
14913  * are met:
14914  * 1. Redistributions of source code must retain the copyright
14915  *    notice, this list of conditions and the following disclaimer.
14916  * 2. Redistributions in binary form must reproduce the above copyright
14917  *    notice, this list of conditions and the following disclaimer in the
14918  *    documentation and/or other materials provided with the distribution.
14919  * 3. All advertising materials mentioning features or use of this software
14920  *    must display the following acknowledgement:
14921  *    "This product includes cryptographic software written by
14922  *     Eric Young (eay@cryptsoft.com)"
14923  *    The word 'cryptographic' can be left out if the rouines from the library
14924  *    being used are not cryptographic related :-).
14925  * 4. If you include any Windows specific code (or a derivative thereof) from
14926  *    the apps directory (application code) you must include an acknowledgement:
14927  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14928  *
14929  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14930  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14931  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14932  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14933  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14934  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14935  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14936  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14937  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14938  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14939  * SUCH DAMAGE.
14940  *
14941  * The licence and distribution terms for any publically available version or
14942  * derivative of this code cannot be changed.  i.e. this code cannot simply be
14943  * copied and put under another distribution licence
14944  * [including the GNU Public Licence.]
14945  */
14946 
14947 
14948 
14949 
14950 # 1 "/usr/include/openssl/asn1.h" 1 3 4
14951 /* crypto/asn1/asn1.h */
14952 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
14953  * All rights reserved.
14954  *
14955  * This package is an SSL implementation written
14956  * by Eric Young (eay@cryptsoft.com).
14957  * The implementation was written so as to conform with Netscapes SSL.
14958  *
14959  * This library is free for commercial and non-commercial use as long as
14960  * the following conditions are aheared to.  The following conditions
14961  * apply to all code found in this distribution, be it the RC4, RSA,
14962  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
14963  * included with this distribution is covered by the same copyright terms
14964  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14965  *
14966  * Copyright remains Eric Young's, and as such any Copyright notices in
14967  * the code are not to be removed.
14968  * If this package is used in a product, Eric Young should be given attribution
14969  * as the author of the parts of the library used.
14970  * This can be in the form of a textual message at program startup or
14971  * in documentation (online or textual) provided with the package.
14972  *
14973  * Redistribution and use in source and binary forms, with or without
14974  * modification, are permitted provided that the following conditions
14975  * are met:
14976  * 1. Redistributions of source code must retain the copyright
14977  *    notice, this list of conditions and the following disclaimer.
14978  * 2. Redistributions in binary form must reproduce the above copyright
14979  *    notice, this list of conditions and the following disclaimer in the
14980  *    documentation and/or other materials provided with the distribution.
14981  * 3. All advertising materials mentioning features or use of this software
14982  *    must display the following acknowledgement:
14983  *    "This product includes cryptographic software written by
14984  *     Eric Young (eay@cryptsoft.com)"
14985  *    The word 'cryptographic' can be left out if the rouines from the library
14986  *    being used are not cryptographic related :-).
14987  * 4. If you include any Windows specific code (or a derivative thereof) from
14988  *    the apps directory (application code) you must include an acknowledgement:
14989  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
14990  *
14991  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
14992  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14993  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14994  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
14995  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14996  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14997  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14998  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14999  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15000  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15001  * SUCH DAMAGE.
15002  *
15003  * The licence and distribution terms for any publically available version or
15004  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15005  * copied and put under another distribution licence
15006  * [including the GNU Public Licence.]
15007  */
15008 # 63 "/usr/include/openssl/rsa.h" 2 3 4
15009 
15010 
15011 # 1 "/usr/include/openssl/bio.h" 1 3 4
15012 /* crypto/bio/bio.h */
15013 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15014  * All rights reserved.
15015  *
15016  * This package is an SSL implementation written
15017  * by Eric Young (eay@cryptsoft.com).
15018  * The implementation was written so as to conform with Netscapes SSL.
15019  *
15020  * This library is free for commercial and non-commercial use as long as
15021  * the following conditions are aheared to.  The following conditions
15022  * apply to all code found in this distribution, be it the RC4, RSA,
15023  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15024  * included with this distribution is covered by the same copyright terms
15025  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15026  *
15027  * Copyright remains Eric Young's, and as such any Copyright notices in
15028  * the code are not to be removed.
15029  * If this package is used in a product, Eric Young should be given attribution
15030  * as the author of the parts of the library used.
15031  * This can be in the form of a textual message at program startup or
15032  * in documentation (online or textual) provided with the package.
15033  *
15034  * Redistribution and use in source and binary forms, with or without
15035  * modification, are permitted provided that the following conditions
15036  * are met:
15037  * 1. Redistributions of source code must retain the copyright
15038  *    notice, this list of conditions and the following disclaimer.
15039  * 2. Redistributions in binary form must reproduce the above copyright
15040  *    notice, this list of conditions and the following disclaimer in the
15041  *    documentation and/or other materials provided with the distribution.
15042  * 3. All advertising materials mentioning features or use of this software
15043  *    must display the following acknowledgement:
15044  *    "This product includes cryptographic software written by
15045  *     Eric Young (eay@cryptsoft.com)"
15046  *    The word 'cryptographic' can be left out if the rouines from the library
15047  *    being used are not cryptographic related :-).
15048  * 4. If you include any Windows specific code (or a derivative thereof) from
15049  *    the apps directory (application code) you must include an acknowledgement:
15050  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15051  *
15052  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15053  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15054  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15055  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15056  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15057  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15058  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15059  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15060  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15061  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15062  * SUCH DAMAGE.
15063  *
15064  * The licence and distribution terms for any publically available version or
15065  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15066  * copied and put under another distribution licence
15067  * [including the GNU Public Licence.]
15068  */
15069 # 66 "/usr/include/openssl/rsa.h" 2 3 4
15070 
15071 # 1 "/usr/include/openssl/crypto.h" 1 3 4
15072 /* crypto/crypto.h */
15073 /* ====================================================================
15074  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
15075  *
15076  * Redistribution and use in source and binary forms, with or without
15077  * modification, are permitted provided that the following conditions
15078  * are met:
15079  *
15080  * 1. Redistributions of source code must retain the above copyright
15081  *    notice, this list of conditions and the following disclaimer.
15082  *
15083  * 2. Redistributions in binary form must reproduce the above copyright
15084  *    notice, this list of conditions and the following disclaimer in
15085  *    the documentation and/or other materials provided with the
15086  *    distribution.
15087  *
15088  * 3. All advertising materials mentioning features or use of this
15089  *    software must display the following acknowledgment:
15090  *    "This product includes software developed by the OpenSSL Project
15091  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15092  *
15093  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15094  *    endorse or promote products derived from this software without
15095  *    prior written permission. For written permission, please contact
15096  *    openssl-core@openssl.org.
15097  *
15098  * 5. Products derived from this software may not be called "OpenSSL"
15099  *    nor may "OpenSSL" appear in their names without prior written
15100  *    permission of the OpenSSL Project.
15101  *
15102  * 6. Redistributions of any form whatsoever must retain the following
15103  *    acknowledgment:
15104  *    "This product includes software developed by the OpenSSL Project
15105  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15106  *
15107  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15108  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15109  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15110  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15111  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15112  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15113  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15114  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15115  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15116  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15117  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15118  * OF THE POSSIBILITY OF SUCH DAMAGE.
15119  * ====================================================================
15120  *
15121  * This product includes cryptographic software written by Eric Young
15122  * (eay@cryptsoft.com).  This product includes software written by Tim
15123  * Hudson (tjh@cryptsoft.com).
15124  *
15125  */
15126 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15127  * All rights reserved.
15128  *
15129  * This package is an SSL implementation written
15130  * by Eric Young (eay@cryptsoft.com).
15131  * The implementation was written so as to conform with Netscapes SSL.
15132  *
15133  * This library is free for commercial and non-commercial use as long as
15134  * the following conditions are aheared to.  The following conditions
15135  * apply to all code found in this distribution, be it the RC4, RSA,
15136  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15137  * included with this distribution is covered by the same copyright terms
15138  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15139  *
15140  * Copyright remains Eric Young's, and as such any Copyright notices in
15141  * the code are not to be removed.
15142  * If this package is used in a product, Eric Young should be given attribution
15143  * as the author of the parts of the library used.
15144  * This can be in the form of a textual message at program startup or
15145  * in documentation (online or textual) provided with the package.
15146  *
15147  * Redistribution and use in source and binary forms, with or without
15148  * modification, are permitted provided that the following conditions
15149  * are met:
15150  * 1. Redistributions of source code must retain the copyright
15151  *    notice, this list of conditions and the following disclaimer.
15152  * 2. Redistributions in binary form must reproduce the above copyright
15153  *    notice, this list of conditions and the following disclaimer in the
15154  *    documentation and/or other materials provided with the distribution.
15155  * 3. All advertising materials mentioning features or use of this software
15156  *    must display the following acknowledgement:
15157  *    "This product includes cryptographic software written by
15158  *     Eric Young (eay@cryptsoft.com)"
15159  *    The word 'cryptographic' can be left out if the rouines from the library
15160  *    being used are not cryptographic related :-).
15161  * 4. If you include any Windows specific code (or a derivative thereof) from
15162  *    the apps directory (application code) you must include an acknowledgement:
15163  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15164  *
15165  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15166  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15167  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15168  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15169  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15170  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15171  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15172  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15173  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15174  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15175  * SUCH DAMAGE.
15176  *
15177  * The licence and distribution terms for any publically available version or
15178  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15179  * copied and put under another distribution licence
15180  * [including the GNU Public Licence.]
15181  */
15182 /* ====================================================================
15183  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15184  * ECDH support in OpenSSL originally developed by
15185  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
15186  */
15187 # 68 "/usr/include/openssl/rsa.h" 2 3 4
15188 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
15189 /* ====================================================================
15190  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
15191  *
15192  * Redistribution and use in source and binary forms, with or without
15193  * modification, are permitted provided that the following conditions
15194  * are met:
15195  *
15196  * 1. Redistributions of source code must retain the above copyright
15197  *    notice, this list of conditions and the following disclaimer.
15198  *
15199  * 2. Redistributions in binary form must reproduce the above copyright
15200  *    notice, this list of conditions and the following disclaimer in
15201  *    the documentation and/or other materials provided with the
15202  *    distribution.
15203  *
15204  * 3. All advertising materials mentioning features or use of this
15205  *    software must display the following acknowledgment:
15206  *    "This product includes software developed by the OpenSSL Project
15207  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15208  *
15209  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15210  *    endorse or promote products derived from this software without
15211  *    prior written permission. For written permission, please contact
15212  *    openssl-core@openssl.org.
15213  *
15214  * 5. Products derived from this software may not be called "OpenSSL"
15215  *    nor may "OpenSSL" appear in their names without prior written
15216  *    permission of the OpenSSL Project.
15217  *
15218  * 6. Redistributions of any form whatsoever must retain the following
15219  *    acknowledgment:
15220  *    "This product includes software developed by the OpenSSL Project
15221  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15222  *
15223  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15224  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15225  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15226  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15227  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15228  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15229  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15230  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15231  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15232  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15233  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15234  * OF THE POSSIBILITY OF SUCH DAMAGE.
15235  * ====================================================================
15236  *
15237  * This product includes cryptographic software written by Eric Young
15238  * (eay@cryptsoft.com).  This product includes software written by Tim
15239  * Hudson (tjh@cryptsoft.com).
15240  *
15241  */
15242 # 69 "/usr/include/openssl/rsa.h" 2 3 4
15243 
15244 # 1 "/usr/include/openssl/bn.h" 1 3 4
15245 /* crypto/bn/bn.h */
15246 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
15247  * All rights reserved.
15248  *
15249  * This package is an SSL implementation written
15250  * by Eric Young (eay@cryptsoft.com).
15251  * The implementation was written so as to conform with Netscapes SSL.
15252  *
15253  * This library is free for commercial and non-commercial use as long as
15254  * the following conditions are aheared to.  The following conditions
15255  * apply to all code found in this distribution, be it the RC4, RSA,
15256  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15257  * included with this distribution is covered by the same copyright terms
15258  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15259  *
15260  * Copyright remains Eric Young's, and as such any Copyright notices in
15261  * the code are not to be removed.
15262  * If this package is used in a product, Eric Young should be given attribution
15263  * as the author of the parts of the library used.
15264  * This can be in the form of a textual message at program startup or
15265  * in documentation (online or textual) provided with the package.
15266  *
15267  * Redistribution and use in source and binary forms, with or without
15268  * modification, are permitted provided that the following conditions
15269  * are met:
15270  * 1. Redistributions of source code must retain the copyright
15271  *    notice, this list of conditions and the following disclaimer.
15272  * 2. Redistributions in binary form must reproduce the above copyright
15273  *    notice, this list of conditions and the following disclaimer in the
15274  *    documentation and/or other materials provided with the distribution.
15275  * 3. All advertising materials mentioning features or use of this software
15276  *    must display the following acknowledgement:
15277  *    "This product includes cryptographic software written by
15278  *     Eric Young (eay@cryptsoft.com)"
15279  *    The word 'cryptographic' can be left out if the rouines from the library
15280  *    being used are not cryptographic related :-).
15281  * 4. If you include any Windows specific code (or a derivative thereof) from
15282  *    the apps directory (application code) you must include an acknowledgement:
15283  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15284  *
15285  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15286  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15287  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15288  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15289  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15290  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15291  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15292  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15293  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15294  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15295  * SUCH DAMAGE.
15296  *
15297  * The licence and distribution terms for any publically available version or
15298  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15299  * copied and put under another distribution licence
15300  * [including the GNU Public Licence.]
15301  */
15302 /* ====================================================================
15303  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
15304  *
15305  * Redistribution and use in source and binary forms, with or without
15306  * modification, are permitted provided that the following conditions
15307  * are met:
15308  *
15309  * 1. Redistributions of source code must retain the above copyright
15310  *    notice, this list of conditions and the following disclaimer.
15311  *
15312  * 2. Redistributions in binary form must reproduce the above copyright
15313  *    notice, this list of conditions and the following disclaimer in
15314  *    the documentation and/or other materials provided with the
15315  *    distribution.
15316  *
15317  * 3. All advertising materials mentioning features or use of this
15318  *    software must display the following acknowledgment:
15319  *    "This product includes software developed by the OpenSSL Project
15320  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15321  *
15322  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15323  *    endorse or promote products derived from this software without
15324  *    prior written permission. For written permission, please contact
15325  *    openssl-core@openssl.org.
15326  *
15327  * 5. Products derived from this software may not be called "OpenSSL"
15328  *    nor may "OpenSSL" appear in their names without prior written
15329  *    permission of the OpenSSL Project.
15330  *
15331  * 6. Redistributions of any form whatsoever must retain the following
15332  *    acknowledgment:
15333  *    "This product includes software developed by the OpenSSL Project
15334  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15335  *
15336  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15337  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15338  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15339  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15340  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15341  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15342  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15343  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15344  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15345  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15346  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15347  * OF THE POSSIBILITY OF SUCH DAMAGE.
15348  * ====================================================================
15349  *
15350  * This product includes cryptographic software written by Eric Young
15351  * (eay@cryptsoft.com).  This product includes software written by Tim
15352  * Hudson (tjh@cryptsoft.com).
15353  *
15354  */
15355 /* ====================================================================
15356  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
15357  *
15358  * Portions of the attached software ("Contribution") are developed by
15359  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
15360  *
15361  * The Contribution is licensed pursuant to the Eric Young open source
15362  * license provided above.
15363  *
15364  * The binary polynomial arithmetic software is originally written by
15365  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
15366  *
15367  */
15368 # 71 "/usr/include/openssl/rsa.h" 2 3 4
15369 # 81 "/usr/include/openssl/rsa.h" 3 4
15370 /* Declared already in ossl_typ.h */
15371 /* typedef struct rsa_st RSA; */
15372 /* typedef struct rsa_meth_st RSA_METHOD; */
15373 
15374 struct rsa_meth_st {
15375     const char *name;
15376     int (*rsa_pub_enc) (int flen, const unsigned char *from,
15377                         unsigned char *to, RSA *rsa, int padding);
15378     int (*rsa_pub_dec) (int flen, const unsigned char *from,
15379                         unsigned char *to, RSA *rsa, int padding);
15380     int (*rsa_priv_enc) (int flen, const unsigned char *from,
15381                          unsigned char *to, RSA *rsa, int padding);
15382     int (*rsa_priv_dec) (int flen, const unsigned char *from,
15383                          unsigned char *to, RSA *rsa, int padding);
15384     /* Can be null */
15385     int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
15386     /* Can be null */
15387     int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
15388                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
15389     /* called at new */
15390     int (*init) (RSA *rsa);
15391     /* called at free */
15392     int (*finish) (RSA *rsa);
15393     /* RSA_METHOD_FLAG_* things */
15394     int flags;
15395     /* may be needed! */
15396     char *app_data;
15397     /*
15398      * New sign and verify functions: some libraries don't allow arbitrary
15399      * data to be signed/verified: this allows them to be used. Note: for
15400      * this to work the RSA_public_decrypt() and RSA_private_encrypt() should
15401      * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:
15402      * for backwards compatibility this functionality is only enabled if the
15403      * RSA_FLAG_SIGN_VER option is set in 'flags'.
15404      */
15405     int (*rsa_sign) (int type,
15406                      const unsigned char *m, unsigned int m_length,
15407                      unsigned char *sigret, unsigned int *siglen,
15408                      const RSA *rsa);
15409     int (*rsa_verify) (int dtype, const unsigned char *m,
15410                        unsigned int m_length, const unsigned char *sigbuf,
15411                        unsigned int siglen, const RSA *rsa);
15412     /*
15413      * If this callback is NULL, the builtin software RSA key-gen will be
15414      * used. This is for behavioural compatibility whilst the code gets
15415      * rewired, but one day it would be nice to assume there are no such
15416      * things as "builtin software" implementations.
15417      */
15418     int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
15419 };
15420 
15421 struct rsa_st {
15422     /*
15423      * The first parameter is used to pickup errors where this is passed
15424      * instead of aEVP_PKEY, it is set to 0
15425      */
15426     int pad;
15427     long version;
15428     const RSA_METHOD *meth;
15429     /* functional reference if 'meth' is ENGINE-provided */
15430     ENGINE *engine;
15431     BIGNUM *n;
15432     BIGNUM *e;
15433     BIGNUM *d;
15434     BIGNUM *p;
15435     BIGNUM *q;
15436     BIGNUM *dmp1;
15437     BIGNUM *dmq1;
15438     BIGNUM *iqmp;
15439     /* be careful using this if the RSA structure is shared */
15440     CRYPTO_EX_DATA ex_data;
15441     int references;
15442     int flags;
15443     /* Used to cache montgomery values */
15444     BN_MONT_CTX *_method_mod_n;
15445     BN_MONT_CTX *_method_mod_p;
15446     BN_MONT_CTX *_method_mod_q;
15447     /*
15448      * all BIGNUM values are actually in the following data, if it is not
15449      * NULL
15450      */
15451     char *bignum_data;
15452     BN_BLINDING *blinding;
15453     BN_BLINDING *mt_blinding;
15454 };
15455 # 176 "/usr/include/openssl/rsa.h" 3 4
15456 /* exponent limit enforced for "large" modulus only */
15457 # 190 "/usr/include/openssl/rsa.h" 3 4
15458 /*
15459  * This flag means the private key operations will be handled by rsa_mod_exp
15460  * and that they do not depend on the private key components being present:
15461  * for example a key stored in external hardware. Without this flag
15462  * bn_mod_exp gets called when private key components are absent.
15463  */
15464 
15465 
15466 /*
15467  * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify
15468  * functions.
15469  */
15470 
15471 
15472 /*
15473  * new with 0.9.6j and 0.9.7b; the built-in
15474  * RSA implementation now uses blinding by
15475  * default (ignoring RSA_FLAG_BLINDING),
15476  * but other engines might not need it
15477  */
15478 
15479 /*
15480  * new with 0.9.8f; the built-in RSA
15481  * implementation now uses constant time
15482  * operations by default in private key operations,
15483  * e.g., constant time modular exponentiation,
15484  * modular inverse without leaking branches,
15485  * division without leaking branches. This
15486  * flag disables these constant time
15487  * operations and results in faster RSA
15488  * private key operations.
15489  */
15490 # 312 "/usr/include/openssl/rsa.h" 3 4
15491 /* EVP_PKEY_ only */
15492 
15493 
15494 
15495 
15496 
15497 
15498 
15499 RSA *RSA_new(void);
15500 RSA *RSA_new_method(ENGINE *engine);
15501 int RSA_size(const RSA *rsa);
15502 
15503 /* Deprecated version */
15504 
15505 RSA *RSA_generate_key(int bits, unsigned long e, void
15506                        (*callback) (int, int, void *), void *cb_arg);
15507 
15508 
15509 /* New version */
15510 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
15511 
15512 int RSA_check_key(const RSA *);
15513         /* next 4 return -1 on error */
15514 int RSA_public_encrypt(int flen, const unsigned char *from,
15515                        unsigned char *to, RSA *rsa, int padding);
15516 int RSA_private_encrypt(int flen, const unsigned char *from,
15517                         unsigned char *to, RSA *rsa, int padding);
15518 int RSA_public_decrypt(int flen, const unsigned char *from,
15519                        unsigned char *to, RSA *rsa, int padding);
15520 int RSA_private_decrypt(int flen, const unsigned char *from,
15521                         unsigned char *to, RSA *rsa, int padding);
15522 void RSA_free(RSA *r);
15523 /* "up" the RSA object's reference count */
15524 int RSA_up_ref(RSA *r);
15525 
15526 int RSA_flags(const RSA *r);
15527 
15528 void RSA_set_default_method(const RSA_METHOD *meth);
15529 const RSA_METHOD *RSA_get_default_method(void);
15530 const RSA_METHOD *RSA_get_method(const RSA *rsa);
15531 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
15532 
15533 /* This function needs the memory locking malloc callbacks to be installed */
15534 int RSA_memory_lock(RSA *r);
15535 
15536 /* these are the actual SSLeay RSA functions */
15537 const RSA_METHOD *RSA_PKCS1_SSLeay(void);
15538 
15539 const RSA_METHOD *RSA_null_method(void);
15540 
15541 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;
15542 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;
15543 
15544 typedef struct rsa_pss_params_st {
15545     X509_ALGOR *hashAlgorithm;
15546     X509_ALGOR *maskGenAlgorithm;
15547     ASN1_INTEGER *saltLength;
15548     ASN1_INTEGER *trailerField;
15549 } RSA_PSS_PARAMS;
15550 
15551 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;
15552 
15553 typedef struct rsa_oaep_params_st {
15554     X509_ALGOR *hashFunc;
15555     X509_ALGOR *maskGenFunc;
15556     X509_ALGOR *pSourceFunc;
15557 } RSA_OAEP_PARAMS;
15558 
15559 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;
15560 
15561 
15562 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
15563 
15564 
15565 
15566 int RSA_print(BIO *bp, const RSA *r, int offset);
15567 
15568 
15569 
15570 int i2d_RSA_NET(const RSA *a, unsigned char **pp,
15571                 int (*cb) (char *buf, int len, const char *prompt,
15572                            int verify), int sgckey);
15573 RSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,
15574                  int (*cb) (char *buf, int len, const char *prompt,
15575                             int verify), int sgckey);
15576 
15577 int i2d_Netscape_RSA(const RSA *a, unsigned char **pp,
15578                      int (*cb) (char *buf, int len, const char *prompt,
15579                                 int verify));
15580 RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
15581                       int (*cb) (char *buf, int len, const char *prompt,
15582                                  int verify));
15583 
15584 
15585 /*
15586  * The following 2 functions sign and verify a X509_SIG ASN1 object inside
15587  * PKCS#1 padded RSA encryption
15588  */
15589 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
15590              unsigned char *sigret, unsigned int *siglen, RSA *rsa);
15591 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
15592                const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
15593 
15594 /*
15595  * The following 2 function sign and verify a ASN1_OCTET_STRING object inside
15596  * PKCS#1 padded RSA encryption
15597  */
15598 int RSA_sign_ASN1_OCTET_STRING(int type,
15599                                const unsigned char *m, unsigned int m_length,
15600                                unsigned char *sigret, unsigned int *siglen,
15601                                RSA *rsa);
15602 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,
15603                                  unsigned int m_length, unsigned char *sigbuf,
15604                                  unsigned int siglen, RSA *rsa);
15605 
15606 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
15607 void RSA_blinding_off(RSA *rsa);
15608 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
15609 
15610 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
15611                                  const unsigned char *f, int fl);
15612 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
15613                                    const unsigned char *f, int fl,
15614                                    int rsa_len);
15615 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
15616                                  const unsigned char *f, int fl);
15617 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
15618                                    const unsigned char *f, int fl,
15619                                    int rsa_len);
15620 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
15621                long seedlen, const EVP_MD *dgst);
15622 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
15623                                const unsigned char *f, int fl,
15624                                const unsigned char *p, int pl);
15625 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
15626                                  const unsigned char *f, int fl, int rsa_len,
15627                                  const unsigned char *p, int pl);
15628 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
15629                                     const unsigned char *from, int flen,
15630                                     const unsigned char *param, int plen,
15631                                     const EVP_MD *md, const EVP_MD *mgf1md);
15632 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
15633                                       const unsigned char *from, int flen,
15634                                       int num, const unsigned char *param,
15635                                       int plen, const EVP_MD *md,
15636                                       const EVP_MD *mgf1md);
15637 int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
15638                            const unsigned char *f, int fl);
15639 int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
15640                              const unsigned char *f, int fl, int rsa_len);
15641 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,
15642                          int fl);
15643 int RSA_padding_check_none(unsigned char *to, int tlen,
15644                            const unsigned char *f, int fl, int rsa_len);
15645 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,
15646                          int fl);
15647 int RSA_padding_check_X931(unsigned char *to, int tlen,
15648                            const unsigned char *f, int fl, int rsa_len);
15649 int RSA_X931_hash_id(int nid);
15650 
15651 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
15652                          const EVP_MD *Hash, const unsigned char *EM,
15653                          int sLen);
15654 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
15655                               const unsigned char *mHash, const EVP_MD *Hash,
15656                               int sLen);
15657 
15658 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
15659                               const EVP_MD *Hash, const EVP_MD *mgf1Hash,
15660                               const unsigned char *EM, int sLen);
15661 
15662 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
15663                                    const unsigned char *mHash,
15664                                    const EVP_MD *Hash, const EVP_MD *mgf1Hash,
15665                                    int sLen);
15666 
15667 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
15668                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
15669 int RSA_set_ex_data(RSA *r, int idx, void *arg);
15670 void *RSA_get_ex_data(const RSA *r, int idx);
15671 
15672 RSA *RSAPublicKey_dup(RSA *rsa);
15673 RSA *RSAPrivateKey_dup(RSA *rsa);
15674 
15675 /*
15676  * If this flag is set the RSA method is FIPS compliant and can be used in
15677  * FIPS mode. This is set in the validated module method. If an application
15678  * sets this flag in its own methods it is its responsibility to ensure the
15679  * result is compliant.
15680  */
15681 
15682 
15683 
15684 /*
15685  * If this flag is set the operations normally disabled in FIPS mode are
15686  * permitted it is then the applications responsibility to ensure that the
15687  * usage is compliant.
15688  */
15689 
15690 
15691 /*
15692  * Application has decided PRNG is good enough to generate a key: don't
15693  * check.
15694  */
15695 
15696 
15697 /* BEGIN ERROR CODES */
15698 /*
15699  * The following lines are auto generated by the script mkerr.pl. Any changes
15700  * made after this point may be overwritten when the script is next run.
15701  */
15702 void ERR_load_RSA_strings(void);
15703 
15704 /* Error codes for the RSA functions. */
15705 
15706 /* Function codes. */
15707 # 592 "/usr/include/openssl/rsa.h" 3 4
15708 /* Reason codes. */
15709 # 97 "/usr/include/openssl/x509.h" 2 3 4
15710 
15711 
15712 # 1 "/usr/include/openssl/dsa.h" 1 3 4
15713 /* crypto/dsa/dsa.h */
15714 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15715  * All rights reserved.
15716  *
15717  * This package is an SSL implementation written
15718  * by Eric Young (eay@cryptsoft.com).
15719  * The implementation was written so as to conform with Netscapes SSL.
15720  *
15721  * This library is free for commercial and non-commercial use as long as
15722  * the following conditions are aheared to.  The following conditions
15723  * apply to all code found in this distribution, be it the RC4, RSA,
15724  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15725  * included with this distribution is covered by the same copyright terms
15726  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15727  *
15728  * Copyright remains Eric Young's, and as such any Copyright notices in
15729  * the code are not to be removed.
15730  * If this package is used in a product, Eric Young should be given attribution
15731  * as the author of the parts of the library used.
15732  * This can be in the form of a textual message at program startup or
15733  * in documentation (online or textual) provided with the package.
15734  *
15735  * Redistribution and use in source and binary forms, with or without
15736  * modification, are permitted provided that the following conditions
15737  * are met:
15738  * 1. Redistributions of source code must retain the copyright
15739  *    notice, this list of conditions and the following disclaimer.
15740  * 2. Redistributions in binary form must reproduce the above copyright
15741  *    notice, this list of conditions and the following disclaimer in the
15742  *    documentation and/or other materials provided with the distribution.
15743  * 3. All advertising materials mentioning features or use of this software
15744  *    must display the following acknowledgement:
15745  *    "This product includes cryptographic software written by
15746  *     Eric Young (eay@cryptsoft.com)"
15747  *    The word 'cryptographic' can be left out if the rouines from the library
15748  *    being used are not cryptographic related :-).
15749  * 4. If you include any Windows specific code (or a derivative thereof) from
15750  *    the apps directory (application code) you must include an acknowledgement:
15751  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15752  *
15753  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15754  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15755  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15756  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15757  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15758  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15759  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15760  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15761  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15762  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15763  * SUCH DAMAGE.
15764  *
15765  * The licence and distribution terms for any publically available version or
15766  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15767  * copied and put under another distribution licence
15768  * [including the GNU Public Licence.]
15769  */
15770 
15771 /*
15772  * The DSS routines are based on patches supplied by
15773  * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the
15774  * work and I have just tweaked them a little to fit into my
15775  * stylistic vision for SSLeay :-) */
15776 
15777 
15778 
15779 
15780 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
15781 /* e_os2.h */
15782 /* ====================================================================
15783  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
15784  *
15785  * Redistribution and use in source and binary forms, with or without
15786  * modification, are permitted provided that the following conditions
15787  * are met:
15788  *
15789  * 1. Redistributions of source code must retain the above copyright
15790  *    notice, this list of conditions and the following disclaimer.
15791  *
15792  * 2. Redistributions in binary form must reproduce the above copyright
15793  *    notice, this list of conditions and the following disclaimer in
15794  *    the documentation and/or other materials provided with the
15795  *    distribution.
15796  *
15797  * 3. All advertising materials mentioning features or use of this
15798  *    software must display the following acknowledgment:
15799  *    "This product includes software developed by the OpenSSL Project
15800  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15801  *
15802  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15803  *    endorse or promote products derived from this software without
15804  *    prior written permission. For written permission, please contact
15805  *    openssl-core@openssl.org.
15806  *
15807  * 5. Products derived from this software may not be called "OpenSSL"
15808  *    nor may "OpenSSL" appear in their names without prior written
15809  *    permission of the OpenSSL Project.
15810  *
15811  * 6. Redistributions of any form whatsoever must retain the following
15812  *    acknowledgment:
15813  *    "This product includes software developed by the OpenSSL Project
15814  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15815  *
15816  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15817  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15818  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15819  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15820  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15821  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15822  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15823  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15824  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15825  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15826  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15827  * OF THE POSSIBILITY OF SUCH DAMAGE.
15828  * ====================================================================
15829  *
15830  * This product includes cryptographic software written by Eric Young
15831  * (eay@cryptsoft.com).  This product includes software written by Tim
15832  * Hudson (tjh@cryptsoft.com).
15833  *
15834  */
15835 
15836 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
15837 /* opensslconf.h */
15838 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
15839 
15840 
15841 
15842 
15843 /* OpenSSL was configured with the following options: */
15844 # 108 "/usr/include/openssl/opensslconf.h" 3 4
15845 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
15846    asks for it.  This is a transient feature that is provided for those
15847    who haven't had the time to do the appropriate changes in their
15848    applications.  */
15849 # 204 "/usr/include/openssl/opensslconf.h" 3 4
15850 /* crypto/opensslconf.h.in */
15851 
15852 /* Generate 80386 code? */
15853 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
15854 # 69 "/usr/include/openssl/dsa.h" 2 3 4
15855 
15856 
15857 
15858 
15859 
15860 
15861 # 1 "/usr/include/openssl/bio.h" 1 3 4
15862 /* crypto/bio/bio.h */
15863 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15864  * All rights reserved.
15865  *
15866  * This package is an SSL implementation written
15867  * by Eric Young (eay@cryptsoft.com).
15868  * The implementation was written so as to conform with Netscapes SSL.
15869  *
15870  * This library is free for commercial and non-commercial use as long as
15871  * the following conditions are aheared to.  The following conditions
15872  * apply to all code found in this distribution, be it the RC4, RSA,
15873  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15874  * included with this distribution is covered by the same copyright terms
15875  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15876  *
15877  * Copyright remains Eric Young's, and as such any Copyright notices in
15878  * the code are not to be removed.
15879  * If this package is used in a product, Eric Young should be given attribution
15880  * as the author of the parts of the library used.
15881  * This can be in the form of a textual message at program startup or
15882  * in documentation (online or textual) provided with the package.
15883  *
15884  * Redistribution and use in source and binary forms, with or without
15885  * modification, are permitted provided that the following conditions
15886  * are met:
15887  * 1. Redistributions of source code must retain the copyright
15888  *    notice, this list of conditions and the following disclaimer.
15889  * 2. Redistributions in binary form must reproduce the above copyright
15890  *    notice, this list of conditions and the following disclaimer in the
15891  *    documentation and/or other materials provided with the distribution.
15892  * 3. All advertising materials mentioning features or use of this software
15893  *    must display the following acknowledgement:
15894  *    "This product includes cryptographic software written by
15895  *     Eric Young (eay@cryptsoft.com)"
15896  *    The word 'cryptographic' can be left out if the rouines from the library
15897  *    being used are not cryptographic related :-).
15898  * 4. If you include any Windows specific code (or a derivative thereof) from
15899  *    the apps directory (application code) you must include an acknowledgement:
15900  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
15901  *
15902  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
15903  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15904  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15905  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15906  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15907  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15908  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15909  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15910  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15911  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15912  * SUCH DAMAGE.
15913  *
15914  * The licence and distribution terms for any publically available version or
15915  * derivative of this code cannot be changed.  i.e. this code cannot simply be
15916  * copied and put under another distribution licence
15917  * [including the GNU Public Licence.]
15918  */
15919 # 76 "/usr/include/openssl/dsa.h" 2 3 4
15920 
15921 # 1 "/usr/include/openssl/crypto.h" 1 3 4
15922 /* crypto/crypto.h */
15923 /* ====================================================================
15924  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
15925  *
15926  * Redistribution and use in source and binary forms, with or without
15927  * modification, are permitted provided that the following conditions
15928  * are met:
15929  *
15930  * 1. Redistributions of source code must retain the above copyright
15931  *    notice, this list of conditions and the following disclaimer.
15932  *
15933  * 2. Redistributions in binary form must reproduce the above copyright
15934  *    notice, this list of conditions and the following disclaimer in
15935  *    the documentation and/or other materials provided with the
15936  *    distribution.
15937  *
15938  * 3. All advertising materials mentioning features or use of this
15939  *    software must display the following acknowledgment:
15940  *    "This product includes software developed by the OpenSSL Project
15941  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
15942  *
15943  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
15944  *    endorse or promote products derived from this software without
15945  *    prior written permission. For written permission, please contact
15946  *    openssl-core@openssl.org.
15947  *
15948  * 5. Products derived from this software may not be called "OpenSSL"
15949  *    nor may "OpenSSL" appear in their names without prior written
15950  *    permission of the OpenSSL Project.
15951  *
15952  * 6. Redistributions of any form whatsoever must retain the following
15953  *    acknowledgment:
15954  *    "This product includes software developed by the OpenSSL Project
15955  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
15956  *
15957  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
15958  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15959  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15960  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
15961  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15962  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
15963  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
15964  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15965  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
15966  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
15967  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
15968  * OF THE POSSIBILITY OF SUCH DAMAGE.
15969  * ====================================================================
15970  *
15971  * This product includes cryptographic software written by Eric Young
15972  * (eay@cryptsoft.com).  This product includes software written by Tim
15973  * Hudson (tjh@cryptsoft.com).
15974  *
15975  */
15976 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
15977  * All rights reserved.
15978  *
15979  * This package is an SSL implementation written
15980  * by Eric Young (eay@cryptsoft.com).
15981  * The implementation was written so as to conform with Netscapes SSL.
15982  *
15983  * This library is free for commercial and non-commercial use as long as
15984  * the following conditions are aheared to.  The following conditions
15985  * apply to all code found in this distribution, be it the RC4, RSA,
15986  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15987  * included with this distribution is covered by the same copyright terms
15988  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15989  *
15990  * Copyright remains Eric Young's, and as such any Copyright notices in
15991  * the code are not to be removed.
15992  * If this package is used in a product, Eric Young should be given attribution
15993  * as the author of the parts of the library used.
15994  * This can be in the form of a textual message at program startup or
15995  * in documentation (online or textual) provided with the package.
15996  *
15997  * Redistribution and use in source and binary forms, with or without
15998  * modification, are permitted provided that the following conditions
15999  * are met:
16000  * 1. Redistributions of source code must retain the copyright
16001  *    notice, this list of conditions and the following disclaimer.
16002  * 2. Redistributions in binary form must reproduce the above copyright
16003  *    notice, this list of conditions and the following disclaimer in the
16004  *    documentation and/or other materials provided with the distribution.
16005  * 3. All advertising materials mentioning features or use of this software
16006  *    must display the following acknowledgement:
16007  *    "This product includes cryptographic software written by
16008  *     Eric Young (eay@cryptsoft.com)"
16009  *    The word 'cryptographic' can be left out if the rouines from the library
16010  *    being used are not cryptographic related :-).
16011  * 4. If you include any Windows specific code (or a derivative thereof) from
16012  *    the apps directory (application code) you must include an acknowledgement:
16013  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16014  *
16015  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16016  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16018  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16019  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16020  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16021  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16022  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16023  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16024  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16025  * SUCH DAMAGE.
16026  *
16027  * The licence and distribution terms for any publically available version or
16028  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16029  * copied and put under another distribution licence
16030  * [including the GNU Public Licence.]
16031  */
16032 /* ====================================================================
16033  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16034  * ECDH support in OpenSSL originally developed by
16035  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
16036  */
16037 # 78 "/usr/include/openssl/dsa.h" 2 3 4
16038 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16039 /* ====================================================================
16040  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16041  *
16042  * Redistribution and use in source and binary forms, with or without
16043  * modification, are permitted provided that the following conditions
16044  * are met:
16045  *
16046  * 1. Redistributions of source code must retain the above copyright
16047  *    notice, this list of conditions and the following disclaimer.
16048  *
16049  * 2. Redistributions in binary form must reproduce the above copyright
16050  *    notice, this list of conditions and the following disclaimer in
16051  *    the documentation and/or other materials provided with the
16052  *    distribution.
16053  *
16054  * 3. All advertising materials mentioning features or use of this
16055  *    software must display the following acknowledgment:
16056  *    "This product includes software developed by the OpenSSL Project
16057  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16058  *
16059  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16060  *    endorse or promote products derived from this software without
16061  *    prior written permission. For written permission, please contact
16062  *    openssl-core@openssl.org.
16063  *
16064  * 5. Products derived from this software may not be called "OpenSSL"
16065  *    nor may "OpenSSL" appear in their names without prior written
16066  *    permission of the OpenSSL Project.
16067  *
16068  * 6. Redistributions of any form whatsoever must retain the following
16069  *    acknowledgment:
16070  *    "This product includes software developed by the OpenSSL Project
16071  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16072  *
16073  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16074  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16075  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16076  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16077  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16078  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16079  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16080  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16081  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16082  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16083  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16084  * OF THE POSSIBILITY OF SUCH DAMAGE.
16085  * ====================================================================
16086  *
16087  * This product includes cryptographic software written by Eric Young
16088  * (eay@cryptsoft.com).  This product includes software written by Tim
16089  * Hudson (tjh@cryptsoft.com).
16090  *
16091  */
16092 # 79 "/usr/include/openssl/dsa.h" 2 3 4
16093 
16094 
16095 # 1 "/usr/include/openssl/bn.h" 1 3 4
16096 /* crypto/bn/bn.h */
16097 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16098  * All rights reserved.
16099  *
16100  * This package is an SSL implementation written
16101  * by Eric Young (eay@cryptsoft.com).
16102  * The implementation was written so as to conform with Netscapes SSL.
16103  *
16104  * This library is free for commercial and non-commercial use as long as
16105  * the following conditions are aheared to.  The following conditions
16106  * apply to all code found in this distribution, be it the RC4, RSA,
16107  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16108  * included with this distribution is covered by the same copyright terms
16109  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16110  *
16111  * Copyright remains Eric Young's, and as such any Copyright notices in
16112  * the code are not to be removed.
16113  * If this package is used in a product, Eric Young should be given attribution
16114  * as the author of the parts of the library used.
16115  * This can be in the form of a textual message at program startup or
16116  * in documentation (online or textual) provided with the package.
16117  *
16118  * Redistribution and use in source and binary forms, with or without
16119  * modification, are permitted provided that the following conditions
16120  * are met:
16121  * 1. Redistributions of source code must retain the copyright
16122  *    notice, this list of conditions and the following disclaimer.
16123  * 2. Redistributions in binary form must reproduce the above copyright
16124  *    notice, this list of conditions and the following disclaimer in the
16125  *    documentation and/or other materials provided with the distribution.
16126  * 3. All advertising materials mentioning features or use of this software
16127  *    must display the following acknowledgement:
16128  *    "This product includes cryptographic software written by
16129  *     Eric Young (eay@cryptsoft.com)"
16130  *    The word 'cryptographic' can be left out if the rouines from the library
16131  *    being used are not cryptographic related :-).
16132  * 4. If you include any Windows specific code (or a derivative thereof) from
16133  *    the apps directory (application code) you must include an acknowledgement:
16134  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16135  *
16136  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16137  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16138  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16139  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16140  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16141  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16142  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16143  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16144  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16145  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16146  * SUCH DAMAGE.
16147  *
16148  * The licence and distribution terms for any publically available version or
16149  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16150  * copied and put under another distribution licence
16151  * [including the GNU Public Licence.]
16152  */
16153 /* ====================================================================
16154  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16155  *
16156  * Redistribution and use in source and binary forms, with or without
16157  * modification, are permitted provided that the following conditions
16158  * are met:
16159  *
16160  * 1. Redistributions of source code must retain the above copyright
16161  *    notice, this list of conditions and the following disclaimer.
16162  *
16163  * 2. Redistributions in binary form must reproduce the above copyright
16164  *    notice, this list of conditions and the following disclaimer in
16165  *    the documentation and/or other materials provided with the
16166  *    distribution.
16167  *
16168  * 3. All advertising materials mentioning features or use of this
16169  *    software must display the following acknowledgment:
16170  *    "This product includes software developed by the OpenSSL Project
16171  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16172  *
16173  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16174  *    endorse or promote products derived from this software without
16175  *    prior written permission. For written permission, please contact
16176  *    openssl-core@openssl.org.
16177  *
16178  * 5. Products derived from this software may not be called "OpenSSL"
16179  *    nor may "OpenSSL" appear in their names without prior written
16180  *    permission of the OpenSSL Project.
16181  *
16182  * 6. Redistributions of any form whatsoever must retain the following
16183  *    acknowledgment:
16184  *    "This product includes software developed by the OpenSSL Project
16185  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16186  *
16187  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16188  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16189  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16190  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16191  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16192  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16193  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16194  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16195  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16196  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16197  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16198  * OF THE POSSIBILITY OF SUCH DAMAGE.
16199  * ====================================================================
16200  *
16201  * This product includes cryptographic software written by Eric Young
16202  * (eay@cryptsoft.com).  This product includes software written by Tim
16203  * Hudson (tjh@cryptsoft.com).
16204  *
16205  */
16206 /* ====================================================================
16207  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16208  *
16209  * Portions of the attached software ("Contribution") are developed by
16210  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16211  *
16212  * The Contribution is licensed pursuant to the Eric Young open source
16213  * license provided above.
16214  *
16215  * The binary polynomial arithmetic software is originally written by
16216  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16217  *
16218  */
16219 # 82 "/usr/include/openssl/dsa.h" 2 3 4
16220 
16221 # 1 "/usr/include/openssl/dh.h" 1 3 4
16222 /* crypto/dh/dh.h */
16223 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16224  * All rights reserved.
16225  *
16226  * This package is an SSL implementation written
16227  * by Eric Young (eay@cryptsoft.com).
16228  * The implementation was written so as to conform with Netscapes SSL.
16229  *
16230  * This library is free for commercial and non-commercial use as long as
16231  * the following conditions are aheared to.  The following conditions
16232  * apply to all code found in this distribution, be it the RC4, RSA,
16233  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16234  * included with this distribution is covered by the same copyright terms
16235  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16236  *
16237  * Copyright remains Eric Young's, and as such any Copyright notices in
16238  * the code are not to be removed.
16239  * If this package is used in a product, Eric Young should be given attribution
16240  * as the author of the parts of the library used.
16241  * This can be in the form of a textual message at program startup or
16242  * in documentation (online or textual) provided with the package.
16243  *
16244  * Redistribution and use in source and binary forms, with or without
16245  * modification, are permitted provided that the following conditions
16246  * are met:
16247  * 1. Redistributions of source code must retain the copyright
16248  *    notice, this list of conditions and the following disclaimer.
16249  * 2. Redistributions in binary form must reproduce the above copyright
16250  *    notice, this list of conditions and the following disclaimer in the
16251  *    documentation and/or other materials provided with the distribution.
16252  * 3. All advertising materials mentioning features or use of this software
16253  *    must display the following acknowledgement:
16254  *    "This product includes cryptographic software written by
16255  *     Eric Young (eay@cryptsoft.com)"
16256  *    The word 'cryptographic' can be left out if the rouines from the library
16257  *    being used are not cryptographic related :-).
16258  * 4. If you include any Windows specific code (or a derivative thereof) from
16259  *    the apps directory (application code) you must include an acknowledgement:
16260  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16261  *
16262  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16263  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16264  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16265  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16266  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16267  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16268  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16269  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16270  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16271  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16272  * SUCH DAMAGE.
16273  *
16274  * The licence and distribution terms for any publically available version or
16275  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16276  * copied and put under another distribution licence
16277  * [including the GNU Public Licence.]
16278  */
16279 
16280 
16281 
16282 
16283 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
16284 /* e_os2.h */
16285 /* ====================================================================
16286  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
16287  *
16288  * Redistribution and use in source and binary forms, with or without
16289  * modification, are permitted provided that the following conditions
16290  * are met:
16291  *
16292  * 1. Redistributions of source code must retain the above copyright
16293  *    notice, this list of conditions and the following disclaimer.
16294  *
16295  * 2. Redistributions in binary form must reproduce the above copyright
16296  *    notice, this list of conditions and the following disclaimer in
16297  *    the documentation and/or other materials provided with the
16298  *    distribution.
16299  *
16300  * 3. All advertising materials mentioning features or use of this
16301  *    software must display the following acknowledgment:
16302  *    "This product includes software developed by the OpenSSL Project
16303  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16304  *
16305  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16306  *    endorse or promote products derived from this software without
16307  *    prior written permission. For written permission, please contact
16308  *    openssl-core@openssl.org.
16309  *
16310  * 5. Products derived from this software may not be called "OpenSSL"
16311  *    nor may "OpenSSL" appear in their names without prior written
16312  *    permission of the OpenSSL Project.
16313  *
16314  * 6. Redistributions of any form whatsoever must retain the following
16315  *    acknowledgment:
16316  *    "This product includes software developed by the OpenSSL Project
16317  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16318  *
16319  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16320  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16321  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16322  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16323  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16324  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16325  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16326  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16327  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16328  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16329  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16330  * OF THE POSSIBILITY OF SUCH DAMAGE.
16331  * ====================================================================
16332  *
16333  * This product includes cryptographic software written by Eric Young
16334  * (eay@cryptsoft.com).  This product includes software written by Tim
16335  * Hudson (tjh@cryptsoft.com).
16336  *
16337  */
16338 
16339 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
16340 /* opensslconf.h */
16341 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
16342 
16343 
16344 
16345 
16346 /* OpenSSL was configured with the following options: */
16347 # 108 "/usr/include/openssl/opensslconf.h" 3 4
16348 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
16349    asks for it.  This is a transient feature that is provided for those
16350    who haven't had the time to do the appropriate changes in their
16351    applications.  */
16352 # 204 "/usr/include/openssl/opensslconf.h" 3 4
16353 /* crypto/opensslconf.h.in */
16354 
16355 /* Generate 80386 code? */
16356 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
16357 # 63 "/usr/include/openssl/dh.h" 2 3 4
16358 
16359 
16360 
16361 
16362 
16363 
16364 # 1 "/usr/include/openssl/bio.h" 1 3 4
16365 /* crypto/bio/bio.h */
16366 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16367  * All rights reserved.
16368  *
16369  * This package is an SSL implementation written
16370  * by Eric Young (eay@cryptsoft.com).
16371  * The implementation was written so as to conform with Netscapes SSL.
16372  *
16373  * This library is free for commercial and non-commercial use as long as
16374  * the following conditions are aheared to.  The following conditions
16375  * apply to all code found in this distribution, be it the RC4, RSA,
16376  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16377  * included with this distribution is covered by the same copyright terms
16378  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16379  *
16380  * Copyright remains Eric Young's, and as such any Copyright notices in
16381  * the code are not to be removed.
16382  * If this package is used in a product, Eric Young should be given attribution
16383  * as the author of the parts of the library used.
16384  * This can be in the form of a textual message at program startup or
16385  * in documentation (online or textual) provided with the package.
16386  *
16387  * Redistribution and use in source and binary forms, with or without
16388  * modification, are permitted provided that the following conditions
16389  * are met:
16390  * 1. Redistributions of source code must retain the copyright
16391  *    notice, this list of conditions and the following disclaimer.
16392  * 2. Redistributions in binary form must reproduce the above copyright
16393  *    notice, this list of conditions and the following disclaimer in the
16394  *    documentation and/or other materials provided with the distribution.
16395  * 3. All advertising materials mentioning features or use of this software
16396  *    must display the following acknowledgement:
16397  *    "This product includes cryptographic software written by
16398  *     Eric Young (eay@cryptsoft.com)"
16399  *    The word 'cryptographic' can be left out if the rouines from the library
16400  *    being used are not cryptographic related :-).
16401  * 4. If you include any Windows specific code (or a derivative thereof) from
16402  *    the apps directory (application code) you must include an acknowledgement:
16403  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16404  *
16405  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16406  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16407  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16408  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16409  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16410  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16411  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16412  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16413  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16414  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16415  * SUCH DAMAGE.
16416  *
16417  * The licence and distribution terms for any publically available version or
16418  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16419  * copied and put under another distribution licence
16420  * [including the GNU Public Licence.]
16421  */
16422 # 70 "/usr/include/openssl/dh.h" 2 3 4
16423 
16424 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
16425 /* ====================================================================
16426  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
16427  *
16428  * Redistribution and use in source and binary forms, with or without
16429  * modification, are permitted provided that the following conditions
16430  * are met:
16431  *
16432  * 1. Redistributions of source code must retain the above copyright
16433  *    notice, this list of conditions and the following disclaimer.
16434  *
16435  * 2. Redistributions in binary form must reproduce the above copyright
16436  *    notice, this list of conditions and the following disclaimer in
16437  *    the documentation and/or other materials provided with the
16438  *    distribution.
16439  *
16440  * 3. All advertising materials mentioning features or use of this
16441  *    software must display the following acknowledgment:
16442  *    "This product includes software developed by the OpenSSL Project
16443  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16444  *
16445  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16446  *    endorse or promote products derived from this software without
16447  *    prior written permission. For written permission, please contact
16448  *    openssl-core@openssl.org.
16449  *
16450  * 5. Products derived from this software may not be called "OpenSSL"
16451  *    nor may "OpenSSL" appear in their names without prior written
16452  *    permission of the OpenSSL Project.
16453  *
16454  * 6. Redistributions of any form whatsoever must retain the following
16455  *    acknowledgment:
16456  *    "This product includes software developed by the OpenSSL Project
16457  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16458  *
16459  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16460  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16461  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16462  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16463  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16464  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16465  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16466  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16467  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16468  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16469  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16470  * OF THE POSSIBILITY OF SUCH DAMAGE.
16471  * ====================================================================
16472  *
16473  * This product includes cryptographic software written by Eric Young
16474  * (eay@cryptsoft.com).  This product includes software written by Tim
16475  * Hudson (tjh@cryptsoft.com).
16476  *
16477  */
16478 # 72 "/usr/include/openssl/dh.h" 2 3 4
16479 
16480 # 1 "/usr/include/openssl/bn.h" 1 3 4
16481 /* crypto/bn/bn.h */
16482 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
16483  * All rights reserved.
16484  *
16485  * This package is an SSL implementation written
16486  * by Eric Young (eay@cryptsoft.com).
16487  * The implementation was written so as to conform with Netscapes SSL.
16488  *
16489  * This library is free for commercial and non-commercial use as long as
16490  * the following conditions are aheared to.  The following conditions
16491  * apply to all code found in this distribution, be it the RC4, RSA,
16492  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16493  * included with this distribution is covered by the same copyright terms
16494  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16495  *
16496  * Copyright remains Eric Young's, and as such any Copyright notices in
16497  * the code are not to be removed.
16498  * If this package is used in a product, Eric Young should be given attribution
16499  * as the author of the parts of the library used.
16500  * This can be in the form of a textual message at program startup or
16501  * in documentation (online or textual) provided with the package.
16502  *
16503  * Redistribution and use in source and binary forms, with or without
16504  * modification, are permitted provided that the following conditions
16505  * are met:
16506  * 1. Redistributions of source code must retain the copyright
16507  *    notice, this list of conditions and the following disclaimer.
16508  * 2. Redistributions in binary form must reproduce the above copyright
16509  *    notice, this list of conditions and the following disclaimer in the
16510  *    documentation and/or other materials provided with the distribution.
16511  * 3. All advertising materials mentioning features or use of this software
16512  *    must display the following acknowledgement:
16513  *    "This product includes cryptographic software written by
16514  *     Eric Young (eay@cryptsoft.com)"
16515  *    The word 'cryptographic' can be left out if the rouines from the library
16516  *    being used are not cryptographic related :-).
16517  * 4. If you include any Windows specific code (or a derivative thereof) from
16518  *    the apps directory (application code) you must include an acknowledgement:
16519  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
16520  *
16521  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
16522  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16523  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16524  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16525  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
16526  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
16527  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16528  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
16529  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16530  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16531  * SUCH DAMAGE.
16532  *
16533  * The licence and distribution terms for any publically available version or
16534  * derivative of this code cannot be changed.  i.e. this code cannot simply be
16535  * copied and put under another distribution licence
16536  * [including the GNU Public Licence.]
16537  */
16538 /* ====================================================================
16539  * Copyright (c) 1998-2018 The OpenSSL Project.  All rights reserved.
16540  *
16541  * Redistribution and use in source and binary forms, with or without
16542  * modification, are permitted provided that the following conditions
16543  * are met:
16544  *
16545  * 1. Redistributions of source code must retain the above copyright
16546  *    notice, this list of conditions and the following disclaimer.
16547  *
16548  * 2. Redistributions in binary form must reproduce the above copyright
16549  *    notice, this list of conditions and the following disclaimer in
16550  *    the documentation and/or other materials provided with the
16551  *    distribution.
16552  *
16553  * 3. All advertising materials mentioning features or use of this
16554  *    software must display the following acknowledgment:
16555  *    "This product includes software developed by the OpenSSL Project
16556  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
16557  *
16558  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
16559  *    endorse or promote products derived from this software without
16560  *    prior written permission. For written permission, please contact
16561  *    openssl-core@openssl.org.
16562  *
16563  * 5. Products derived from this software may not be called "OpenSSL"
16564  *    nor may "OpenSSL" appear in their names without prior written
16565  *    permission of the OpenSSL Project.
16566  *
16567  * 6. Redistributions of any form whatsoever must retain the following
16568  *    acknowledgment:
16569  *    "This product includes software developed by the OpenSSL Project
16570  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
16571  *
16572  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
16573  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16574  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16575  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
16576  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16577  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16578  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16579  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
16580  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
16581  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
16582  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
16583  * OF THE POSSIBILITY OF SUCH DAMAGE.
16584  * ====================================================================
16585  *
16586  * This product includes cryptographic software written by Eric Young
16587  * (eay@cryptsoft.com).  This product includes software written by Tim
16588  * Hudson (tjh@cryptsoft.com).
16589  *
16590  */
16591 /* ====================================================================
16592  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
16593  *
16594  * Portions of the attached software ("Contribution") are developed by
16595  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
16596  *
16597  * The Contribution is licensed pursuant to the Eric Young open source
16598  * license provided above.
16599  *
16600  * The binary polynomial arithmetic software is originally written by
16601  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
16602  *
16603  */
16604 # 74 "/usr/include/openssl/dh.h" 2 3 4
16605 # 82 "/usr/include/openssl/dh.h" 3 4
16606 /*
16607  * new with 0.9.7h; the built-in DH
16608  * implementation now uses constant time
16609  * modular exponentiation for secret exponents
16610  * by default. This flag causes the
16611  * faster variable sliding window method to
16612  * be used for all exponents.
16613  */
16614 
16615 
16616 /*
16617  * If this flag is set the DH method is FIPS compliant and can be used in
16618  * FIPS mode. This is set in the validated module method. If an application
16619  * sets this flag in its own methods it is its reposibility to ensure the
16620  * result is compliant.
16621  */
16622 
16623 
16624 
16625 /*
16626  * If this flag is set the operations normally disabled in FIPS mode are
16627  * permitted it is then the applications responsibility to ensure that the
16628  * usage is compliant.
16629  */
16630 
16631 
16632 
16633 
16634 
16635 
16636 
16637 /* Already defined in ossl_typ.h */
16638 /* typedef struct dh_st DH; */
16639 /* typedef struct dh_method DH_METHOD; */
16640 
16641 struct dh_method {
16642     const char *name;
16643     /* Methods here */
16644     int (*generate_key) (DH *dh);
16645     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
16646     /* Can be null */
16647     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
16648                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
16649                        BN_MONT_CTX *m_ctx);
16650     int (*init) (DH *dh);
16651     int (*finish) (DH *dh);
16652     int flags;
16653     char *app_data;
16654     /* If this is non-NULL, it will be used to generate parameters */
16655     int (*generate_params) (DH *dh, int prime_len, int generator,
16656                             BN_GENCB *cb);
16657 };
16658 
16659 struct dh_st {
16660     /*
16661      * This first argument is used to pick up errors when a DH is passed
16662      * instead of a EVP_PKEY
16663      */
16664     int pad;
16665     int version;
16666     BIGNUM *p;
16667     BIGNUM *g;
16668     long length; /* optional */
16669     BIGNUM *pub_key; /* g^x % p */
16670     BIGNUM *priv_key; /* x */
16671     int flags;
16672     BN_MONT_CTX *method_mont_p;
16673     /* Place holders if we want to do X9.42 DH */
16674     BIGNUM *q;
16675     BIGNUM *j;
16676     unsigned char *seed;
16677     int seedlen;
16678     BIGNUM *counter;
16679     int references;
16680     CRYPTO_EX_DATA ex_data;
16681     const DH_METHOD *meth;
16682     ENGINE *engine;
16683 };
16684 
16685 
16686 /* #define DH_GENERATOR_3       3 */
16687 
16688 
16689 /* DH_check error codes */
16690 # 174 "/usr/include/openssl/dh.h" 3 4
16691 /* DH_check_pub_key error codes */
16692 
16693 
16694 
16695 
16696 /*
16697  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
16698  * backward compatibility:
16699  */
16700 # 209 "/usr/include/openssl/dh.h" 3 4
16701 DH *DHparams_dup(DH *);
16702 
16703 const DH_METHOD *DH_OpenSSL(void);
16704 
16705 void DH_set_default_method(const DH_METHOD *meth);
16706 const DH_METHOD *DH_get_default_method(void);
16707 int DH_set_method(DH *dh, const DH_METHOD *meth);
16708 DH *DH_new_method(ENGINE *engine);
16709 
16710 DH *DH_new(void);
16711 void DH_free(DH *dh);
16712 int DH_up_ref(DH *dh);
16713 int DH_size(const DH *dh);
16714 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
16715                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
16716 int DH_set_ex_data(DH *d, int idx, void *arg);
16717 void *DH_get_ex_data(DH *d, int idx);
16718 
16719 /* Deprecated version */
16720 
16721 DH *DH_generate_parameters(int prime_len, int generator,
16722                            void (*callback) (int, int, void *), void *cb_arg);
16723 
16724 
16725 /* New version */
16726 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
16727                               BN_GENCB *cb);
16728 
16729 int DH_check(const DH *dh, int *codes);
16730 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
16731 int DH_generate_key(DH *dh);
16732 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
16733 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
16734 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
16735 int i2d_DHparams(const DH *a, unsigned char **pp);
16736 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
16737 int i2d_DHxparams(const DH *a, unsigned char **pp);
16738 
16739 int DHparams_print_fp(FILE *fp, const DH *x);
16740 
16741 
16742 int DHparams_print(BIO *bp, const DH *x);
16743 
16744 
16745 
16746 
16747 /* RFC 5114 parameters */
16748 DH *DH_get_1024_160(void);
16749 DH *DH_get_2048_224(void);
16750 DH *DH_get_2048_256(void);
16751 
16752 
16753 /* RFC2631 KDF */
16754 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
16755                  const unsigned char *Z, size_t Zlen,
16756                  ASN1_OBJECT *key_oid,
16757                  const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
16758 # 357 "/usr/include/openssl/dh.h" 3 4
16759 /* KDF types */
16760 
16761 
16762 
16763 /* BEGIN ERROR CODES */
16764 /*
16765  * The following lines are auto generated by the script mkerr.pl. Any changes
16766  * made after this point may be overwritten when the script is next run.
16767  */
16768 void ERR_load_DH_strings(void);
16769 
16770 /* Error codes for the DH functions. */
16771 
16772 /* Function codes. */
16773 # 392 "/usr/include/openssl/dh.h" 3 4
16774 /* Reason codes. */
16775 # 84 "/usr/include/openssl/dsa.h" 2 3 4
16776 # 92 "/usr/include/openssl/dsa.h" 3 4
16777 /*
16778  * new with 0.9.7h; the built-in DSA implementation now uses constant time
16779  * modular exponentiation for secret exponents by default. This flag causes
16780  * the faster variable sliding window method to be used for all exponents.
16781  */
16782 
16783 
16784 /*
16785  * If this flag is set the DSA method is FIPS compliant and can be used in
16786  * FIPS mode. This is set in the validated module method. If an application
16787  * sets this flag in its own methods it is its reposibility to ensure the
16788  * result is compliant.
16789  */
16790 
16791 
16792 
16793 /*
16794  * If this flag is set the operations normally disabled in FIPS mode are
16795  * permitted it is then the applications responsibility to ensure that the
16796  * usage is compliant.
16797  */
16798 
16799 
16800 
16801 
16802 
16803 
16804 
16805 /* Already defined in ossl_typ.h */
16806 /* typedef struct dsa_st DSA; */
16807 /* typedef struct dsa_method DSA_METHOD; */
16808 
16809 typedef struct DSA_SIG_st {
16810     BIGNUM *r;
16811     BIGNUM *s;
16812 } DSA_SIG;
16813 
16814 struct dsa_method {
16815     const char *name;
16816     DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
16817     int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
16818                            BIGNUM **rp);
16819     int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
16820                           DSA_SIG *sig, DSA *dsa);
16821     int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
16822                         BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
16823                         BN_MONT_CTX *in_mont);
16824     /* Can be null */
16825     int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
16826                        const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
16827     int (*init) (DSA *dsa);
16828     int (*finish) (DSA *dsa);
16829     int flags;
16830     char *app_data;
16831     /* If this is non-NULL, it is used to generate DSA parameters */
16832     int (*dsa_paramgen) (DSA *dsa, int bits,
16833                          const unsigned char *seed, int seed_len,
16834                          int *counter_ret, unsigned long *h_ret,
16835                          BN_GENCB *cb);
16836     /* If this is non-NULL, it is used to generate DSA keys */
16837     int (*dsa_keygen) (DSA *dsa);
16838 };
16839 
16840 struct dsa_st {
16841     /*
16842      * This first variable is used to pick up errors where a DSA is passed
16843      * instead of of a EVP_PKEY
16844      */
16845     int pad;
16846     long version;
16847     int write_params;
16848     BIGNUM *p;
16849     BIGNUM *q; /* == 20 */
16850     BIGNUM *g;
16851     BIGNUM *pub_key; /* y public key */
16852     BIGNUM *priv_key; /* x private key */
16853     BIGNUM *kinv; /* Signing pre-calc */
16854     BIGNUM *r; /* Signing pre-calc */
16855     int flags;
16856     /* Normally used to cache montgomery values */
16857     BN_MONT_CTX *method_mont_p;
16858     int references;
16859     CRYPTO_EX_DATA ex_data;
16860     const DSA_METHOD *meth;
16861     /* functional reference if 'meth' is ENGINE-provided */
16862     ENGINE *engine;
16863 };
16864 # 187 "/usr/include/openssl/dsa.h" 3 4
16865 DSA *DSAparams_dup(DSA *x);
16866 DSA_SIG *DSA_SIG_new(void);
16867 void DSA_SIG_free(DSA_SIG *a);
16868 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
16869 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);
16870 
16871 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
16872 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
16873                   DSA_SIG *sig, DSA *dsa);
16874 
16875 const DSA_METHOD *DSA_OpenSSL(void);
16876 
16877 void DSA_set_default_method(const DSA_METHOD *);
16878 const DSA_METHOD *DSA_get_default_method(void);
16879 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
16880 
16881 DSA *DSA_new(void);
16882 DSA *DSA_new_method(ENGINE *engine);
16883 void DSA_free(DSA *r);
16884 /* "up" the DSA object's reference count */
16885 int DSA_up_ref(DSA *r);
16886 int DSA_size(const DSA *);
16887         /* next 4 return -1 on error */
16888 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);
16889 int DSA_sign(int type, const unsigned char *dgst, int dlen,
16890              unsigned char *sig, unsigned int *siglen, DSA *dsa);
16891 int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
16892                const unsigned char *sigbuf, int siglen, DSA *dsa);
16893 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
16894                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
16895 int DSA_set_ex_data(DSA *d, int idx, void *arg);
16896 void *DSA_get_ex_data(DSA *d, int idx);
16897 
16898 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
16899 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
16900 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
16901 
16902 /* Deprecated version */
16903 
16904 DSA *DSA_generate_parameters(int bits,
16905                              unsigned char *seed, int seed_len,
16906                              int *counter_ret, unsigned long *h_ret, void
16907                               (*callback) (int, int, void *), void *cb_arg);
16908 
16909 
16910 /* New version */
16911 int DSA_generate_parameters_ex(DSA *dsa, int bits,
16912                                const unsigned char *seed, int seed_len,
16913                                int *counter_ret, unsigned long *h_ret,
16914                                BN_GENCB *cb);
16915 
16916 int DSA_generate_key(DSA *a);
16917 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
16918 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
16919 int i2d_DSAparams(const DSA *a, unsigned char **pp);
16920 
16921 
16922 int DSAparams_print(BIO *bp, const DSA *x);
16923 int DSA_print(BIO *bp, const DSA *x, int off);
16924 
16925 
16926 int DSAparams_print_fp(FILE *fp, const DSA *x);
16927 int DSA_print_fp(FILE *bp, const DSA *x, int off);
16928 
16929 
16930 
16931 /*
16932  * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
16933  * have one value here we set the number of checks to 64 which is the 128 bit
16934  * security level that is the highest level and valid for creating a 3072 bit
16935  * DSA key.
16936  */
16937 
16938 
16939 
16940 
16941 /*
16942  * Convert DSA structure (key or just parameters) into DH structure (be
16943  * careful to avoid small subgroup attacks when using this!)
16944  */
16945 DH *DSA_dup_DH(const DSA *r);
16946 # 278 "/usr/include/openssl/dsa.h" 3 4
16947 /* BEGIN ERROR CODES */
16948 /*
16949  * The following lines are auto generated by the script mkerr.pl. Any changes
16950  * made after this point may be overwritten when the script is next run.
16951  */
16952 void ERR_load_DSA_strings(void);
16953 
16954 /* Error codes for the DSA functions. */
16955 
16956 /* Function codes. */
16957 # 316 "/usr/include/openssl/dsa.h" 3 4
16958 /* Reason codes. */
16959 # 100 "/usr/include/openssl/x509.h" 2 3 4
16960 
16961 
16962 # 1 "/usr/include/openssl/dh.h" 1 3 4
16963 /* crypto/dh/dh.h */
16964 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
16965  * All rights reserved.
16966  *
16967  * This package is an SSL implementation written
16968  * by Eric Young (eay@cryptsoft.com).
16969  * The implementation was written so as to conform with Netscapes SSL.
16970  *
16971  * This library is free for commercial and non-commercial use as long as
16972  * the following conditions are aheared to.  The following conditions
16973  * apply to all code found in this distribution, be it the RC4, RSA,
16974  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
16975  * included with this distribution is covered by the same copyright terms
16976  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16977  *
16978  * Copyright remains Eric Young's, and as such any Copyright notices in
16979  * the code are not to be removed.
16980  * If this package is used in a product, Eric Young should be given attribution
16981  * as the author of the parts of the library used.
16982  * This can be in the form of a textual message at program startup or
16983  * in documentation (online or textual) provided with the package.
16984  *
16985  * Redistribution and use in source and binary forms, with or without
16986  * modification, are permitted provided that the following conditions
16987  * are met:
16988  * 1. Redistributions of source code must retain the copyright
16989  *    notice, this list of conditions and the following disclaimer.
16990  * 2. Redistributions in binary form must reproduce the above copyright
16991  *    notice, this list of conditions and the following disclaimer in the
16992  *    documentation and/or other materials provided with the distribution.
16993  * 3. All advertising materials mentioning features or use of this software
16994  *    must display the following acknowledgement:
16995  *    "This product includes cryptographic software written by
16996  *     Eric Young (eay@cryptsoft.com)"
16997  *    The word 'cryptographic' can be left out if the rouines from the library
16998  *    being used are not cryptographic related :-).
16999  * 4. If you include any Windows specific code (or a derivative thereof) from
17000  *    the apps directory (application code) you must include an acknowledgement:
17001  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17002  *
17003  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17004  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17005  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17006  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17007  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17008  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17009  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17010  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17011  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17012  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17013  * SUCH DAMAGE.
17014  *
17015  * The licence and distribution terms for any publically available version or
17016  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17017  * copied and put under another distribution licence
17018  * [including the GNU Public Licence.]
17019  */
17020 # 103 "/usr/include/openssl/x509.h" 2 3 4
17021 
17022 
17023 
17024 
17025 # 1 "/usr/include/openssl/sha.h" 1 3 4
17026 /* crypto/sha/sha.h */
17027 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17028  * All rights reserved.
17029  *
17030  * This package is an SSL implementation written
17031  * by Eric Young (eay@cryptsoft.com).
17032  * The implementation was written so as to conform with Netscapes SSL.
17033  *
17034  * This library is free for commercial and non-commercial use as long as
17035  * the following conditions are aheared to.  The following conditions
17036  * apply to all code found in this distribution, be it the RC4, RSA,
17037  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17038  * included with this distribution is covered by the same copyright terms
17039  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17040  *
17041  * Copyright remains Eric Young's, and as such any Copyright notices in
17042  * the code are not to be removed.
17043  * If this package is used in a product, Eric Young should be given attribution
17044  * as the author of the parts of the library used.
17045  * This can be in the form of a textual message at program startup or
17046  * in documentation (online or textual) provided with the package.
17047  *
17048  * Redistribution and use in source and binary forms, with or without
17049  * modification, are permitted provided that the following conditions
17050  * are met:
17051  * 1. Redistributions of source code must retain the copyright
17052  *    notice, this list of conditions and the following disclaimer.
17053  * 2. Redistributions in binary form must reproduce the above copyright
17054  *    notice, this list of conditions and the following disclaimer in the
17055  *    documentation and/or other materials provided with the distribution.
17056  * 3. All advertising materials mentioning features or use of this software
17057  *    must display the following acknowledgement:
17058  *    "This product includes cryptographic software written by
17059  *     Eric Young (eay@cryptsoft.com)"
17060  *    The word 'cryptographic' can be left out if the rouines from the library
17061  *    being used are not cryptographic related :-).
17062  * 4. If you include any Windows specific code (or a derivative thereof) from
17063  *    the apps directory (application code) you must include an acknowledgement:
17064  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17065  *
17066  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17067  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17068  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17069  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17070  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17071  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17072  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17073  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17074  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17075  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17076  * SUCH DAMAGE.
17077  *
17078  * The licence and distribution terms for any publically available version or
17079  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17080  * copied and put under another distribution licence
17081  * [including the GNU Public Licence.]
17082  */
17083 
17084 
17085 
17086 
17087 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
17088 /* e_os2.h */
17089 /* ====================================================================
17090  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
17091  *
17092  * Redistribution and use in source and binary forms, with or without
17093  * modification, are permitted provided that the following conditions
17094  * are met:
17095  *
17096  * 1. Redistributions of source code must retain the above copyright
17097  *    notice, this list of conditions and the following disclaimer.
17098  *
17099  * 2. Redistributions in binary form must reproduce the above copyright
17100  *    notice, this list of conditions and the following disclaimer in
17101  *    the documentation and/or other materials provided with the
17102  *    distribution.
17103  *
17104  * 3. All advertising materials mentioning features or use of this
17105  *    software must display the following acknowledgment:
17106  *    "This product includes software developed by the OpenSSL Project
17107  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17108  *
17109  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17110  *    endorse or promote products derived from this software without
17111  *    prior written permission. For written permission, please contact
17112  *    openssl-core@openssl.org.
17113  *
17114  * 5. Products derived from this software may not be called "OpenSSL"
17115  *    nor may "OpenSSL" appear in their names without prior written
17116  *    permission of the OpenSSL Project.
17117  *
17118  * 6. Redistributions of any form whatsoever must retain the following
17119  *    acknowledgment:
17120  *    "This product includes software developed by the OpenSSL Project
17121  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17122  *
17123  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17124  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17125  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17126  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17127  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17128  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17129  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17130  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17131  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17132  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17133  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17134  * OF THE POSSIBILITY OF SUCH DAMAGE.
17135  * ====================================================================
17136  *
17137  * This product includes cryptographic software written by Eric Young
17138  * (eay@cryptsoft.com).  This product includes software written by Tim
17139  * Hudson (tjh@cryptsoft.com).
17140  *
17141  */
17142 
17143 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17144 /* opensslconf.h */
17145 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17146 
17147 
17148 
17149 
17150 /* OpenSSL was configured with the following options: */
17151 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17152 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17153    asks for it.  This is a transient feature that is provided for those
17154    who haven't had the time to do the appropriate changes in their
17155    applications.  */
17156 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17157 /* crypto/opensslconf.h.in */
17158 
17159 /* Generate 80386 code? */
17160 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
17161 # 63 "/usr/include/openssl/sha.h" 2 3 4
17162 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stddef.h" 1 3 4
17163 /*
17164  * CDDL HEADER START
17165  *
17166  * The contents of this file are subject to the terms of the
17167  * Common Development and Distribution License, Version 1.0 only
17168  * (the "License").  You may not use this file except in compliance
17169  * with the License.
17170  *
17171  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17172  * or http://www.opensolaris.org/os/licensing.
17173  * See the License for the specific language governing permissions
17174  * and limitations under the License.
17175  *
17176  * When distributing Covered Code, include this CDDL HEADER in each
17177  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17178  * If applicable, add the following below this CDDL HEADER, with the
17179  * fields enclosed by brackets "[]" replaced with your own identifying
17180  * information: Portions Copyright [yyyy] [name of copyright owner]
17181  *
17182  * CDDL HEADER END
17183  */
17184 /*	Copyright (c) 1988 AT&T	*/
17185 /*	  All Rights Reserved  	*/
17186 
17187 
17188 /*
17189  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
17190  * Use is subject to license terms.
17191  */
17192 # 64 "/usr/include/openssl/sha.h" 2 3 4
17193 # 77 "/usr/include/openssl/sha.h" 3 4
17194 /*-
17195  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17196  * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !
17197  * ! SHA_LONG_LOG2 has to be defined along.                        !
17198  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17199  */
17200 # 100 "/usr/include/openssl/sha.h" 3 4
17201 typedef struct SHAstate_st {
17202     unsigned int h0, h1, h2, h3, h4;
17203     unsigned int Nl, Nh;
17204     unsigned int data[16];
17205     unsigned int num;
17206 } SHA_CTX;
17207 
17208 
17209 
17210 
17211 
17212 int SHA_Init(SHA_CTX *c);
17213 int SHA_Update(SHA_CTX *c, const void *data, size_t len);
17214 int SHA_Final(unsigned char *md, SHA_CTX *c);
17215 unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);
17216 void SHA_Transform(SHA_CTX *c, const unsigned char *data);
17217 
17218 
17219 
17220 
17221 
17222 int SHA1_Init(SHA_CTX *c);
17223 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
17224 int SHA1_Final(unsigned char *md, SHA_CTX *c);
17225 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
17226 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
17227 # 134 "/usr/include/openssl/sha.h" 3 4
17228 typedef struct SHA256state_st {
17229     unsigned int h[8];
17230     unsigned int Nl, Nh;
17231     unsigned int data[16];
17232     unsigned int num, md_len;
17233 } SHA256_CTX;
17234 
17235 
17236 
17237 
17238 
17239 
17240 int SHA224_Init(SHA256_CTX *c);
17241 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);
17242 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
17243 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);
17244 int SHA256_Init(SHA256_CTX *c);
17245 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);
17246 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
17247 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
17248 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
17249 
17250 
17251 
17252 
17253 
17254 
17255 /*
17256  * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
17257  * being exactly 64-bit wide. See Implementation Notes in sha512.c
17258  * for further details.
17259  */
17260 /*
17261  * SHA-512 treats input data as a
17262  * contiguous array of 64 bit
17263  * wide big-endian values.
17264  */
17265 # 183 "/usr/include/openssl/sha.h" 3 4
17266 typedef struct SHA512state_st {
17267     unsigned long long h[8];
17268     unsigned long long Nl, Nh;
17269     union {
17270         unsigned long long d[16];
17271         unsigned char p[(16*8)];
17272     } u;
17273     unsigned int num, md_len;
17274 } SHA512_CTX;
17275 
17276 
17277 
17278 
17279 
17280 
17281 
17282 int SHA384_Init(SHA512_CTX *c);
17283 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
17284 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
17285 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);
17286 int SHA512_Init(SHA512_CTX *c);
17287 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
17288 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
17289 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
17290 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
17291 # 108 "/usr/include/openssl/x509.h" 2 3 4
17292 
17293 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
17294 /* ====================================================================
17295  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
17296  *
17297  * Redistribution and use in source and binary forms, with or without
17298  * modification, are permitted provided that the following conditions
17299  * are met:
17300  *
17301  * 1. Redistributions of source code must retain the above copyright
17302  *    notice, this list of conditions and the following disclaimer.
17303  *
17304  * 2. Redistributions in binary form must reproduce the above copyright
17305  *    notice, this list of conditions and the following disclaimer in
17306  *    the documentation and/or other materials provided with the
17307  *    distribution.
17308  *
17309  * 3. All advertising materials mentioning features or use of this
17310  *    software must display the following acknowledgment:
17311  *    "This product includes software developed by the OpenSSL Project
17312  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17313  *
17314  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17315  *    endorse or promote products derived from this software without
17316  *    prior written permission. For written permission, please contact
17317  *    openssl-core@openssl.org.
17318  *
17319  * 5. Products derived from this software may not be called "OpenSSL"
17320  *    nor may "OpenSSL" appear in their names without prior written
17321  *    permission of the OpenSSL Project.
17322  *
17323  * 6. Redistributions of any form whatsoever must retain the following
17324  *    acknowledgment:
17325  *    "This product includes software developed by the OpenSSL Project
17326  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17327  *
17328  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17329  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17330  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17331  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17332  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17333  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17334  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17335  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17336  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17337  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17338  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17339  * OF THE POSSIBILITY OF SUCH DAMAGE.
17340  * ====================================================================
17341  *
17342  * This product includes cryptographic software written by Eric Young
17343  * (eay@cryptsoft.com).  This product includes software written by Tim
17344  * Hudson (tjh@cryptsoft.com).
17345  *
17346  */
17347 # 110 "/usr/include/openssl/x509.h" 2 3 4
17348 # 137 "/usr/include/openssl/x509.h" 3 4
17349 typedef struct X509_objects_st {
17350     int nid;
17351     int (*a2i) (void);
17352     int (*i2a) (void);
17353 } X509_OBJECTS;
17354 
17355 struct X509_algor_st {
17356     ASN1_OBJECT *algorithm;
17357     ASN1_TYPE *parameter;
17358 } /* X509_ALGOR */ ;
17359 
17360 
17361 
17362 typedef struct stack_st_X509_ALGOR X509_ALGORS;
17363 
17364 typedef struct X509_val_st {
17365     ASN1_TIME *notBefore;
17366     ASN1_TIME *notAfter;
17367 } X509_VAL;
17368 
17369 struct X509_pubkey_st {
17370     X509_ALGOR *algor;
17371     ASN1_BIT_STRING *public_key;
17372     EVP_PKEY *pkey;
17373 };
17374 
17375 typedef struct X509_sig_st {
17376     X509_ALGOR *algor;
17377     ASN1_OCTET_STRING *digest;
17378 } X509_SIG;
17379 
17380 typedef struct X509_name_entry_st {
17381     ASN1_OBJECT *object;
17382     ASN1_STRING *value;
17383     int set;
17384     int size; /* temp variable */
17385 } X509_NAME_ENTRY;
17386 
17387 struct stack_st_X509_NAME_ENTRY { _STACK stack; };
17388 
17389 
17390 /* we always keep X509_NAMEs in 2 forms. */
17391 struct X509_name_st {
17392     struct stack_st_X509_NAME_ENTRY *entries;
17393     int modified; /* true if 'bytes' needs to be built */
17394 
17395     BUF_MEM *bytes;
17396 
17397 
17398 
17399 /*      unsigned long hash; Keep the hash around for lookups */
17400     unsigned char *canon_enc;
17401     int canon_enclen;
17402 } /* X509_NAME */ ;
17403 
17404 struct stack_st_X509_NAME { _STACK stack; };
17405 
17406 
17407 
17408 typedef struct X509_extension_st {
17409     ASN1_OBJECT *object;
17410     ASN1_BOOLEAN critical;
17411     ASN1_OCTET_STRING *value;
17412 } X509_EXTENSION;
17413 
17414 typedef struct stack_st_X509_EXTENSION X509_EXTENSIONS;
17415 
17416 struct stack_st_X509_EXTENSION { _STACK stack; };
17417 
17418 
17419 /* a sequence of these are used */
17420 typedef struct x509_attributes_st {
17421     ASN1_OBJECT *object;
17422     int single; /* 0 for a set, 1 for a single item (which is
17423                                  * wrong) */
17424     union {
17425         char *ptr;
17426         /*
17427          * 0
17428          */ struct stack_st_ASN1_TYPE *set;
17429         /*
17430          * 1
17431          */ ASN1_TYPE *single;
17432     } value;
17433 } X509_ATTRIBUTE;
17434 
17435 struct stack_st_X509_ATTRIBUTE { _STACK stack; };
17436 
17437 
17438 typedef struct X509_req_info_st {
17439     ASN1_ENCODING enc;
17440     ASN1_INTEGER *version;
17441     X509_NAME *subject;
17442     X509_PUBKEY *pubkey;
17443     /*  d=2 hl=2 l=  0 cons: cont: 00 */
17444     struct stack_st_X509_ATTRIBUTE *attributes; /* [ 0 ] */
17445 } X509_REQ_INFO;
17446 
17447 typedef struct X509_req_st {
17448     X509_REQ_INFO *req_info;
17449     X509_ALGOR *sig_alg;
17450     ASN1_BIT_STRING *signature;
17451     int references;
17452 } X509_REQ;
17453 
17454 typedef struct x509_cinf_st {
17455     ASN1_INTEGER *version; /* [ 0 ] default of v1 */
17456     ASN1_INTEGER *serialNumber;
17457     X509_ALGOR *signature;
17458     X509_NAME *issuer;
17459     X509_VAL *validity;
17460     X509_NAME *subject;
17461     X509_PUBKEY *key;
17462     ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
17463     ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
17464     struct stack_st_X509_EXTENSION *extensions; /* [ 3 ] optional in v3 */
17465     ASN1_ENCODING enc;
17466 } X509_CINF;
17467 
17468 /*
17469  * This stuff is certificate "auxiliary info" it contains details which are
17470  * useful in certificate stores and databases. When used this is tagged onto
17471  * the end of the certificate itself
17472  */
17473 
17474 typedef struct x509_cert_aux_st {
17475     struct stack_st_ASN1_OBJECT *trust; /* trusted uses */
17476     struct stack_st_ASN1_OBJECT *reject; /* rejected uses */
17477     ASN1_UTF8STRING *alias; /* "friendly name" */
17478     ASN1_OCTET_STRING *keyid; /* key id of private key */
17479     struct stack_st_X509_ALGOR *other; /* other unspecified info */
17480 } X509_CERT_AUX;
17481 
17482 struct x509_st {
17483     X509_CINF *cert_info;
17484     X509_ALGOR *sig_alg;
17485     ASN1_BIT_STRING *signature;
17486     int valid;
17487     int references;
17488     char *name;
17489     CRYPTO_EX_DATA ex_data;
17490     /* These contain copies of various extension values */
17491     long ex_pathlen;
17492     long ex_pcpathlen;
17493     unsigned long ex_flags;
17494     unsigned long ex_kusage;
17495     unsigned long ex_xkusage;
17496     unsigned long ex_nscert;
17497     ASN1_OCTET_STRING *skid;
17498     AUTHORITY_KEYID *akid;
17499     X509_POLICY_CACHE *policy_cache;
17500     struct stack_st_DIST_POINT *crldp;
17501     struct stack_st_GENERAL_NAME *altname;
17502     NAME_CONSTRAINTS *nc;
17503 
17504 
17505 
17506 
17507 
17508     unsigned char sha1_hash[20];
17509 
17510     X509_CERT_AUX *aux;
17511 } /* X509 */ ;
17512 
17513 struct stack_st_X509 { _STACK stack; };
17514 
17515 
17516 /* This is used for a table of trust checking functions */
17517 
17518 typedef struct x509_trust_st {
17519     int trust;
17520     int flags;
17521     int (*check_trust) (struct x509_trust_st *, X509 *, int);
17522     char *name;
17523     int arg1;
17524     void *arg2;
17525 } X509_TRUST;
17526 
17527 struct stack_st_X509_TRUST { _STACK stack; };
17528 
17529 typedef struct x509_cert_pair_st {
17530     X509 *forward;
17531     X509 *reverse;
17532 } X509_CERT_PAIR;
17533 
17534 /* standard trust ids */
17535 # 335 "/usr/include/openssl/x509.h" 3 4
17536 /* Keep these up to date! */
17537 
17538 
17539 
17540 /* trust_flags values */
17541 
17542 
17543 
17544 /* check_trust return codes */
17545 
17546 
17547 
17548 
17549 
17550 /* Flags for X509_print_ex() */
17551 # 366 "/usr/include/openssl/x509.h" 3 4
17552 /* Flags specific to X509_NAME_print_ex() */
17553 
17554 /* The field separator information */
17555 # 381 "/usr/include/openssl/x509.h" 3 4
17556 /* How the field name is shown */
17557 # 392 "/usr/include/openssl/x509.h" 3 4
17558 /*
17559  * This determines if we dump fields we don't recognise: RFC2253 requires
17560  * this.
17561  */
17562 
17563 
17564 
17565 
17566 
17567 
17568 /* Complete set of RFC2253 flags */
17569 
17570 
17571 
17572 
17573 
17574 
17575 
17576 /* readable oneline form */
17577 
17578 
17579 
17580 
17581 
17582 
17583 
17584 /* readable multiline form */
17585 # 427 "/usr/include/openssl/x509.h" 3 4
17586 struct x509_revoked_st {
17587     ASN1_INTEGER *serialNumber;
17588     ASN1_TIME *revocationDate;
17589     struct stack_st_X509_EXTENSION /* optional */ *extensions;
17590     /* Set up if indirect CRL */
17591     struct stack_st_GENERAL_NAME *issuer;
17592     /* Revocation reason */
17593     int reason;
17594     int sequence; /* load sequence */
17595 };
17596 
17597 struct stack_st_X509_REVOKED { _STACK stack; };
17598 
17599 
17600 typedef struct X509_crl_info_st {
17601     ASN1_INTEGER *version;
17602     X509_ALGOR *sig_alg;
17603     X509_NAME *issuer;
17604     ASN1_TIME *lastUpdate;
17605     ASN1_TIME *nextUpdate;
17606     struct stack_st_X509_REVOKED *revoked;
17607     struct stack_st_X509_EXTENSION /* [0] */ *extensions;
17608     ASN1_ENCODING enc;
17609 } X509_CRL_INFO;
17610 
17611 struct X509_crl_st {
17612     /* actual signature */
17613     X509_CRL_INFO *crl;
17614     X509_ALGOR *sig_alg;
17615     ASN1_BIT_STRING *signature;
17616     int references;
17617     int flags;
17618     /* Copies of various extensions */
17619     AUTHORITY_KEYID *akid;
17620     ISSUING_DIST_POINT *idp;
17621     /* Convenient breakdown of IDP */
17622     int idp_flags;
17623     int idp_reasons;
17624     /* CRL and base CRL numbers for delta processing */
17625     ASN1_INTEGER *crl_number;
17626     ASN1_INTEGER *base_crl_number;
17627 
17628     unsigned char sha1_hash[20];
17629 
17630     struct stack_st_GENERAL_NAMES *issuers;
17631     const X509_CRL_METHOD *meth;
17632     void *meth_data;
17633 } /* X509_CRL */ ;
17634 
17635 struct stack_st_X509_CRL { _STACK stack; };
17636 
17637 
17638 typedef struct private_key_st {
17639     int version;
17640     /* The PKCS#8 data types */
17641     X509_ALGOR *enc_algor;
17642     ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */
17643     /* When decrypted, the following will not be NULL */
17644     EVP_PKEY *dec_pkey;
17645     /* used to encrypt and decrypt */
17646     int key_length;
17647     char *key_data;
17648     int key_free; /* true if we should auto free key_data */
17649     /* expanded version of 'enc_algor' */
17650     EVP_CIPHER_INFO cipher;
17651     int references;
17652 } X509_PKEY;
17653 
17654 
17655 typedef struct X509_info_st {
17656     X509 *x509;
17657     X509_CRL *crl;
17658     X509_PKEY *x_pkey;
17659     EVP_CIPHER_INFO enc_cipher;
17660     int enc_len;
17661     char *enc_data;
17662     int references;
17663 } X509_INFO;
17664 
17665 struct stack_st_X509_INFO { _STACK stack; };
17666 
17667 
17668 /*
17669  * The next 2 structures and their 8 routines were sent to me by Pat Richard
17670  * <patr@x509.com> and are used to manipulate Netscapes spki structures -
17671  * useful if you are writing a CA web page
17672  */
17673 typedef struct Netscape_spkac_st {
17674     X509_PUBKEY *pubkey;
17675     ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */
17676 } NETSCAPE_SPKAC;
17677 
17678 typedef struct Netscape_spki_st {
17679     NETSCAPE_SPKAC *spkac; /* signed public key and challenge */
17680     X509_ALGOR *sig_algor;
17681     ASN1_BIT_STRING *signature;
17682 } NETSCAPE_SPKI;
17683 
17684 /* Netscape certificate sequence structure */
17685 typedef struct Netscape_certificate_sequence {
17686     ASN1_OBJECT *type;
17687     struct stack_st_X509 *certs;
17688 } NETSCAPE_CERT_SEQUENCE;
17689 
17690 /*- Unused (and iv length is wrong)
17691 typedef struct CBCParameter_st
17692         {
17693         unsigned char iv[8];
17694         } CBC_PARAM;
17695 */
17696 
17697 /* Password based encryption structure */
17698 
17699 typedef struct PBEPARAM_st {
17700     ASN1_OCTET_STRING *salt;
17701     ASN1_INTEGER *iter;
17702 } PBEPARAM;
17703 
17704 /* Password based encryption V2 structures */
17705 
17706 typedef struct PBE2PARAM_st {
17707     X509_ALGOR *keyfunc;
17708     X509_ALGOR *encryption;
17709 } PBE2PARAM;
17710 
17711 typedef struct PBKDF2PARAM_st {
17712 /* Usually OCTET STRING but could be anything */
17713     ASN1_TYPE *salt;
17714     ASN1_INTEGER *iter;
17715     ASN1_INTEGER *keylength;
17716     X509_ALGOR *prf;
17717 } PBKDF2PARAM;
17718 
17719 /* PKCS#8 private key info structure */
17720 
17721 struct pkcs8_priv_key_info_st {
17722     /* Flag for various broken formats */
17723     int broken;
17724 
17725 
17726 
17727 
17728 
17729     ASN1_INTEGER *version;
17730     X509_ALGOR *pkeyalg;
17731     /* Should be OCTET STRING but some are broken */
17732     ASN1_TYPE *pkey;
17733     struct stack_st_X509_ATTRIBUTE *attributes;
17734 };
17735 
17736 
17737 
17738 
17739 
17740 # 1 "/usr/include/openssl/x509_vfy.h" 1 3 4
17741 /* crypto/x509/x509_vfy.h */
17742 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17743  * All rights reserved.
17744  *
17745  * This package is an SSL implementation written
17746  * by Eric Young (eay@cryptsoft.com).
17747  * The implementation was written so as to conform with Netscapes SSL.
17748  *
17749  * This library is free for commercial and non-commercial use as long as
17750  * the following conditions are aheared to.  The following conditions
17751  * apply to all code found in this distribution, be it the RC4, RSA,
17752  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17753  * included with this distribution is covered by the same copyright terms
17754  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17755  *
17756  * Copyright remains Eric Young's, and as such any Copyright notices in
17757  * the code are not to be removed.
17758  * If this package is used in a product, Eric Young should be given attribution
17759  * as the author of the parts of the library used.
17760  * This can be in the form of a textual message at program startup or
17761  * in documentation (online or textual) provided with the package.
17762  *
17763  * Redistribution and use in source and binary forms, with or without
17764  * modification, are permitted provided that the following conditions
17765  * are met:
17766  * 1. Redistributions of source code must retain the copyright
17767  *    notice, this list of conditions and the following disclaimer.
17768  * 2. Redistributions in binary form must reproduce the above copyright
17769  *    notice, this list of conditions and the following disclaimer in the
17770  *    documentation and/or other materials provided with the distribution.
17771  * 3. All advertising materials mentioning features or use of this software
17772  *    must display the following acknowledgement:
17773  *    "This product includes cryptographic software written by
17774  *     Eric Young (eay@cryptsoft.com)"
17775  *    The word 'cryptographic' can be left out if the rouines from the library
17776  *    being used are not cryptographic related :-).
17777  * 4. If you include any Windows specific code (or a derivative thereof) from
17778  *    the apps directory (application code) you must include an acknowledgement:
17779  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17780  *
17781  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17782  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17783  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17784  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17785  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17786  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17787  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17788  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17789  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17790  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17791  * SUCH DAMAGE.
17792  *
17793  * The licence and distribution terms for any publically available version or
17794  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17795  * copied and put under another distribution licence
17796  * [including the GNU Public Licence.]
17797  */
17798 # 70 "/usr/include/openssl/x509_vfy.h" 3 4
17799 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17800 /* opensslconf.h */
17801 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17802 
17803 
17804 
17805 
17806 /* OpenSSL was configured with the following options: */
17807 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17808 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17809    asks for it.  This is a transient feature that is provided for those
17810    who haven't had the time to do the appropriate changes in their
17811    applications.  */
17812 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17813 /* crypto/opensslconf.h.in */
17814 
17815 /* Generate 80386 code? */
17816 # 71 "/usr/include/openssl/x509_vfy.h" 2 3 4
17817 
17818 # 1 "/usr/include/openssl/lhash.h" 1 3 4
17819 /* crypto/lhash/lhash.h */
17820 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
17821  * All rights reserved.
17822  *
17823  * This package is an SSL implementation written
17824  * by Eric Young (eay@cryptsoft.com).
17825  * The implementation was written so as to conform with Netscapes SSL.
17826  *
17827  * This library is free for commercial and non-commercial use as long as
17828  * the following conditions are aheared to.  The following conditions
17829  * apply to all code found in this distribution, be it the RC4, RSA,
17830  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
17831  * included with this distribution is covered by the same copyright terms
17832  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17833  *
17834  * Copyright remains Eric Young's, and as such any Copyright notices in
17835  * the code are not to be removed.
17836  * If this package is used in a product, Eric Young should be given attribution
17837  * as the author of the parts of the library used.
17838  * This can be in the form of a textual message at program startup or
17839  * in documentation (online or textual) provided with the package.
17840  *
17841  * Redistribution and use in source and binary forms, with or without
17842  * modification, are permitted provided that the following conditions
17843  * are met:
17844  * 1. Redistributions of source code must retain the copyright
17845  *    notice, this list of conditions and the following disclaimer.
17846  * 2. Redistributions in binary form must reproduce the above copyright
17847  *    notice, this list of conditions and the following disclaimer in the
17848  *    documentation and/or other materials provided with the distribution.
17849  * 3. All advertising materials mentioning features or use of this software
17850  *    must display the following acknowledgement:
17851  *    "This product includes cryptographic software written by
17852  *     Eric Young (eay@cryptsoft.com)"
17853  *    The word 'cryptographic' can be left out if the rouines from the library
17854  *    being used are not cryptographic related :-).
17855  * 4. If you include any Windows specific code (or a derivative thereof) from
17856  *    the apps directory (application code) you must include an acknowledgement:
17857  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
17858  *
17859  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
17860  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17861  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17862  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17863  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17864  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
17865  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17866  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
17867  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
17868  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17869  * SUCH DAMAGE.
17870  *
17871  * The licence and distribution terms for any publically available version or
17872  * derivative of this code cannot be changed.  i.e. this code cannot simply be
17873  * copied and put under another distribution licence
17874  * [including the GNU Public Licence.]
17875  */
17876 
17877 /*
17878  * Header for dynamic hash table routines Author - Eric Young
17879  */
17880 
17881 
17882 
17883 
17884 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
17885 /* e_os2.h */
17886 /* ====================================================================
17887  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
17888  *
17889  * Redistribution and use in source and binary forms, with or without
17890  * modification, are permitted provided that the following conditions
17891  * are met:
17892  *
17893  * 1. Redistributions of source code must retain the above copyright
17894  *    notice, this list of conditions and the following disclaimer.
17895  *
17896  * 2. Redistributions in binary form must reproduce the above copyright
17897  *    notice, this list of conditions and the following disclaimer in
17898  *    the documentation and/or other materials provided with the
17899  *    distribution.
17900  *
17901  * 3. All advertising materials mentioning features or use of this
17902  *    software must display the following acknowledgment:
17903  *    "This product includes software developed by the OpenSSL Project
17904  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
17905  *
17906  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
17907  *    endorse or promote products derived from this software without
17908  *    prior written permission. For written permission, please contact
17909  *    openssl-core@openssl.org.
17910  *
17911  * 5. Products derived from this software may not be called "OpenSSL"
17912  *    nor may "OpenSSL" appear in their names without prior written
17913  *    permission of the OpenSSL Project.
17914  *
17915  * 6. Redistributions of any form whatsoever must retain the following
17916  *    acknowledgment:
17917  *    "This product includes software developed by the OpenSSL Project
17918  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
17919  *
17920  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
17921  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17922  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17923  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
17924  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17925  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17926  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
17927  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
17928  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
17929  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
17930  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
17931  * OF THE POSSIBILITY OF SUCH DAMAGE.
17932  * ====================================================================
17933  *
17934  * This product includes cryptographic software written by Eric Young
17935  * (eay@cryptsoft.com).  This product includes software written by Tim
17936  * Hudson (tjh@cryptsoft.com).
17937  *
17938  */
17939 
17940 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
17941 /* opensslconf.h */
17942 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
17943 
17944 
17945 
17946 
17947 /* OpenSSL was configured with the following options: */
17948 # 108 "/usr/include/openssl/opensslconf.h" 3 4
17949 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
17950    asks for it.  This is a transient feature that is provided for those
17951    who haven't had the time to do the appropriate changes in their
17952    applications.  */
17953 # 204 "/usr/include/openssl/opensslconf.h" 3 4
17954 /* crypto/opensslconf.h.in */
17955 
17956 /* Generate 80386 code? */
17957 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
17958 # 67 "/usr/include/openssl/lhash.h" 2 3 4
17959 
17960 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1 3 4
17961 /*
17962  * CDDL HEADER START
17963  *
17964  * The contents of this file are subject to the terms of the
17965  * Common Development and Distribution License (the "License").
17966  * You may not use this file except in compliance with the License.
17967  *
17968  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
17969  * or http://www.opensolaris.org/os/licensing.
17970  * See the License for the specific language governing permissions
17971  * and limitations under the License.
17972  *
17973  * When distributing Covered Code, include this CDDL HEADER in each
17974  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17975  * If applicable, add the following below this CDDL HEADER, with the
17976  * fields enclosed by brackets "[]" replaced with your own identifying
17977  * information: Portions Copyright [yyyy] [name of copyright owner]
17978  *
17979  * CDDL HEADER END
17980  */
17981 
17982 /*
17983  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
17984  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
17985  */
17986 
17987 /*	Copyright (c) 1988 AT&T	*/
17988 /*	  All Rights Reserved  	*/
17989 
17990 /*
17991  * User-visible pieces of the ANSI C standard I/O package.
17992  */
17993 # 69 "/usr/include/openssl/lhash.h" 2 3 4
17994 
17995 
17996 
17997 # 1 "/usr/include/openssl/bio.h" 1 3 4
17998 /* crypto/bio/bio.h */
17999 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18000  * All rights reserved.
18001  *
18002  * This package is an SSL implementation written
18003  * by Eric Young (eay@cryptsoft.com).
18004  * The implementation was written so as to conform with Netscapes SSL.
18005  *
18006  * This library is free for commercial and non-commercial use as long as
18007  * the following conditions are aheared to.  The following conditions
18008  * apply to all code found in this distribution, be it the RC4, RSA,
18009  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18010  * included with this distribution is covered by the same copyright terms
18011  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18012  *
18013  * Copyright remains Eric Young's, and as such any Copyright notices in
18014  * the code are not to be removed.
18015  * If this package is used in a product, Eric Young should be given attribution
18016  * as the author of the parts of the library used.
18017  * This can be in the form of a textual message at program startup or
18018  * in documentation (online or textual) provided with the package.
18019  *
18020  * Redistribution and use in source and binary forms, with or without
18021  * modification, are permitted provided that the following conditions
18022  * are met:
18023  * 1. Redistributions of source code must retain the copyright
18024  *    notice, this list of conditions and the following disclaimer.
18025  * 2. Redistributions in binary form must reproduce the above copyright
18026  *    notice, this list of conditions and the following disclaimer in the
18027  *    documentation and/or other materials provided with the distribution.
18028  * 3. All advertising materials mentioning features or use of this software
18029  *    must display the following acknowledgement:
18030  *    "This product includes cryptographic software written by
18031  *     Eric Young (eay@cryptsoft.com)"
18032  *    The word 'cryptographic' can be left out if the rouines from the library
18033  *    being used are not cryptographic related :-).
18034  * 4. If you include any Windows specific code (or a derivative thereof) from
18035  *    the apps directory (application code) you must include an acknowledgement:
18036  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18037  *
18038  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18039  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18040  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18041  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18042  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18043  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18044  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18045  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18046  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18047  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18048  * SUCH DAMAGE.
18049  *
18050  * The licence and distribution terms for any publically available version or
18051  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18052  * copied and put under another distribution licence
18053  * [including the GNU Public Licence.]
18054  */
18055 # 73 "/usr/include/openssl/lhash.h" 2 3 4
18056 
18057 
18058 
18059 
18060 
18061 
18062 typedef struct lhash_node_st {
18063     void *data;
18064     struct lhash_node_st *next;
18065 
18066     unsigned long hash;
18067 
18068 } LHASH_NODE;
18069 
18070 typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
18071 typedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);
18072 typedef void (*LHASH_DOALL_FN_TYPE) (void *);
18073 typedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);
18074 
18075 /*
18076  * Macros for declaring and implementing type-safe wrappers for LHASH
18077  * callbacks. This way, callbacks can be provided to LHASH structures without
18078  * function pointer casting and the macro-defined callbacks provide
18079  * per-variable casting before deferring to the underlying type-specific
18080  * callbacks. NB: It is possible to place a "static" in front of both the
18081  * DECLARE and IMPLEMENT macros if the functions are strictly internal.
18082  */
18083 
18084 /* First: "hash" functions */
18085 # 110 "/usr/include/openssl/lhash.h" 3 4
18086 /* Second: "compare" functions */
18087 # 120 "/usr/include/openssl/lhash.h" 3 4
18088 /* Third: "doall" functions */
18089 # 129 "/usr/include/openssl/lhash.h" 3 4
18090 /* Fourth: "doall_arg" functions */
18091 # 139 "/usr/include/openssl/lhash.h" 3 4
18092 typedef struct lhash_st {
18093     LHASH_NODE **b;
18094     LHASH_COMP_FN_TYPE comp;
18095     LHASH_HASH_FN_TYPE hash;
18096     unsigned int num_nodes;
18097     unsigned int num_alloc_nodes;
18098     unsigned int p;
18099     unsigned int pmax;
18100     unsigned long up_load; /* load times 256 */
18101     unsigned long down_load; /* load times 256 */
18102     unsigned long num_items;
18103     unsigned long num_expands;
18104     unsigned long num_expand_reallocs;
18105     unsigned long num_contracts;
18106     unsigned long num_contract_reallocs;
18107     unsigned long num_hash_calls;
18108     unsigned long num_comp_calls;
18109     unsigned long num_insert;
18110     unsigned long num_replace;
18111     unsigned long num_delete;
18112     unsigned long num_no_delete;
18113     unsigned long num_retrieve;
18114     unsigned long num_retrieve_miss;
18115     unsigned long num_hash_comps;
18116     int error;
18117 } _LHASH; /* Do not use _LHASH directly, use LHASH_OF
18118                                  * and friends */
18119 
18120 
18121 
18122 /*
18123  * Indicates a malloc() error in the last call, this is only bad in
18124  * lh_insert().
18125  */
18126 
18127 
18128 _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);
18129 void lh_free(_LHASH *lh);
18130 void *lh_insert(_LHASH *lh, void *data);
18131 void *lh_delete(_LHASH *lh, const void *data);
18132 void *lh_retrieve(_LHASH *lh, const void *data);
18133 void lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);
18134 void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
18135 unsigned long lh_strhash(const char *c);
18136 unsigned long lh_num_items(const _LHASH *lh);
18137 
18138 
18139 void lh_stats(const _LHASH *lh, FILE *out);
18140 void lh_node_stats(const _LHASH *lh, FILE *out);
18141 void lh_node_usage_stats(const _LHASH *lh, FILE *out);
18142 
18143 
18144 
18145 void lh_stats_bio(const _LHASH *lh, BIO *out);
18146 void lh_node_stats_bio(const _LHASH *lh, BIO *out);
18147 void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
18148 
18149 
18150 /* Type checking... */
18151 # 206 "/usr/include/openssl/lhash.h" 3 4
18152 /* Define wrapper functions. */
18153 # 233 "/usr/include/openssl/lhash.h" 3 4
18154 struct lhash_st_OPENSSL_STRING { int dummy; };
18155 struct lhash_st_OPENSSL_CSTRING { int dummy; };
18156 # 73 "/usr/include/openssl/x509_vfy.h" 2 3 4
18157 
18158 # 1 "/usr/include/openssl/bio.h" 1 3 4
18159 /* crypto/bio/bio.h */
18160 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18161  * All rights reserved.
18162  *
18163  * This package is an SSL implementation written
18164  * by Eric Young (eay@cryptsoft.com).
18165  * The implementation was written so as to conform with Netscapes SSL.
18166  *
18167  * This library is free for commercial and non-commercial use as long as
18168  * the following conditions are aheared to.  The following conditions
18169  * apply to all code found in this distribution, be it the RC4, RSA,
18170  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18171  * included with this distribution is covered by the same copyright terms
18172  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18173  *
18174  * Copyright remains Eric Young's, and as such any Copyright notices in
18175  * the code are not to be removed.
18176  * If this package is used in a product, Eric Young should be given attribution
18177  * as the author of the parts of the library used.
18178  * This can be in the form of a textual message at program startup or
18179  * in documentation (online or textual) provided with the package.
18180  *
18181  * Redistribution and use in source and binary forms, with or without
18182  * modification, are permitted provided that the following conditions
18183  * are met:
18184  * 1. Redistributions of source code must retain the copyright
18185  *    notice, this list of conditions and the following disclaimer.
18186  * 2. Redistributions in binary form must reproduce the above copyright
18187  *    notice, this list of conditions and the following disclaimer in the
18188  *    documentation and/or other materials provided with the distribution.
18189  * 3. All advertising materials mentioning features or use of this software
18190  *    must display the following acknowledgement:
18191  *    "This product includes cryptographic software written by
18192  *     Eric Young (eay@cryptsoft.com)"
18193  *    The word 'cryptographic' can be left out if the rouines from the library
18194  *    being used are not cryptographic related :-).
18195  * 4. If you include any Windows specific code (or a derivative thereof) from
18196  *    the apps directory (application code) you must include an acknowledgement:
18197  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18198  *
18199  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18200  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18201  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18202  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18203  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18204  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18205  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18206  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18207  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18208  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18209  * SUCH DAMAGE.
18210  *
18211  * The licence and distribution terms for any publically available version or
18212  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18213  * copied and put under another distribution licence
18214  * [including the GNU Public Licence.]
18215  */
18216 # 75 "/usr/include/openssl/x509_vfy.h" 2 3 4
18217 # 1 "/usr/include/openssl/crypto.h" 1 3 4
18218 /* crypto/crypto.h */
18219 /* ====================================================================
18220  * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
18221  *
18222  * Redistribution and use in source and binary forms, with or without
18223  * modification, are permitted provided that the following conditions
18224  * are met:
18225  *
18226  * 1. Redistributions of source code must retain the above copyright
18227  *    notice, this list of conditions and the following disclaimer.
18228  *
18229  * 2. Redistributions in binary form must reproduce the above copyright
18230  *    notice, this list of conditions and the following disclaimer in
18231  *    the documentation and/or other materials provided with the
18232  *    distribution.
18233  *
18234  * 3. All advertising materials mentioning features or use of this
18235  *    software must display the following acknowledgment:
18236  *    "This product includes software developed by the OpenSSL Project
18237  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18238  *
18239  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18240  *    endorse or promote products derived from this software without
18241  *    prior written permission. For written permission, please contact
18242  *    openssl-core@openssl.org.
18243  *
18244  * 5. Products derived from this software may not be called "OpenSSL"
18245  *    nor may "OpenSSL" appear in their names without prior written
18246  *    permission of the OpenSSL Project.
18247  *
18248  * 6. Redistributions of any form whatsoever must retain the following
18249  *    acknowledgment:
18250  *    "This product includes software developed by the OpenSSL Project
18251  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18252  *
18253  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18254  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18255  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18256  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18257  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18258  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18259  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18260  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18261  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18262  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18263  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18264  * OF THE POSSIBILITY OF SUCH DAMAGE.
18265  * ====================================================================
18266  *
18267  * This product includes cryptographic software written by Eric Young
18268  * (eay@cryptsoft.com).  This product includes software written by Tim
18269  * Hudson (tjh@cryptsoft.com).
18270  *
18271  */
18272 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18273  * All rights reserved.
18274  *
18275  * This package is an SSL implementation written
18276  * by Eric Young (eay@cryptsoft.com).
18277  * The implementation was written so as to conform with Netscapes SSL.
18278  *
18279  * This library is free for commercial and non-commercial use as long as
18280  * the following conditions are aheared to.  The following conditions
18281  * apply to all code found in this distribution, be it the RC4, RSA,
18282  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18283  * included with this distribution is covered by the same copyright terms
18284  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18285  *
18286  * Copyright remains Eric Young's, and as such any Copyright notices in
18287  * the code are not to be removed.
18288  * If this package is used in a product, Eric Young should be given attribution
18289  * as the author of the parts of the library used.
18290  * This can be in the form of a textual message at program startup or
18291  * in documentation (online or textual) provided with the package.
18292  *
18293  * Redistribution and use in source and binary forms, with or without
18294  * modification, are permitted provided that the following conditions
18295  * are met:
18296  * 1. Redistributions of source code must retain the copyright
18297  *    notice, this list of conditions and the following disclaimer.
18298  * 2. Redistributions in binary form must reproduce the above copyright
18299  *    notice, this list of conditions and the following disclaimer in the
18300  *    documentation and/or other materials provided with the distribution.
18301  * 3. All advertising materials mentioning features or use of this software
18302  *    must display the following acknowledgement:
18303  *    "This product includes cryptographic software written by
18304  *     Eric Young (eay@cryptsoft.com)"
18305  *    The word 'cryptographic' can be left out if the rouines from the library
18306  *    being used are not cryptographic related :-).
18307  * 4. If you include any Windows specific code (or a derivative thereof) from
18308  *    the apps directory (application code) you must include an acknowledgement:
18309  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18310  *
18311  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18312  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18313  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18314  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18315  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18316  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18317  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18318  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18319  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18320  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18321  * SUCH DAMAGE.
18322  *
18323  * The licence and distribution terms for any publically available version or
18324  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18325  * copied and put under another distribution licence
18326  * [including the GNU Public Licence.]
18327  */
18328 /* ====================================================================
18329  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
18330  * ECDH support in OpenSSL originally developed by
18331  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
18332  */
18333 # 76 "/usr/include/openssl/x509_vfy.h" 2 3 4
18334 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
18335 /* ====================================================================
18336  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
18337  *
18338  * Redistribution and use in source and binary forms, with or without
18339  * modification, are permitted provided that the following conditions
18340  * are met:
18341  *
18342  * 1. Redistributions of source code must retain the above copyright
18343  *    notice, this list of conditions and the following disclaimer.
18344  *
18345  * 2. Redistributions in binary form must reproduce the above copyright
18346  *    notice, this list of conditions and the following disclaimer in
18347  *    the documentation and/or other materials provided with the
18348  *    distribution.
18349  *
18350  * 3. All advertising materials mentioning features or use of this
18351  *    software must display the following acknowledgment:
18352  *    "This product includes software developed by the OpenSSL Project
18353  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
18354  *
18355  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
18356  *    endorse or promote products derived from this software without
18357  *    prior written permission. For written permission, please contact
18358  *    openssl-core@openssl.org.
18359  *
18360  * 5. Products derived from this software may not be called "OpenSSL"
18361  *    nor may "OpenSSL" appear in their names without prior written
18362  *    permission of the OpenSSL Project.
18363  *
18364  * 6. Redistributions of any form whatsoever must retain the following
18365  *    acknowledgment:
18366  *    "This product includes software developed by the OpenSSL Project
18367  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
18368  *
18369  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
18370  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18371  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18372  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
18373  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18374  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18375  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18376  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18377  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
18378  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18379  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
18380  * OF THE POSSIBILITY OF SUCH DAMAGE.
18381  * ====================================================================
18382  *
18383  * This product includes cryptographic software written by Eric Young
18384  * (eay@cryptsoft.com).  This product includes software written by Tim
18385  * Hudson (tjh@cryptsoft.com).
18386  *
18387  */
18388 # 77 "/usr/include/openssl/x509_vfy.h" 2 3 4
18389 # 92 "/usr/include/openssl/x509_vfy.h" 3 4
18390 typedef struct x509_file_st {
18391     int num_paths; /* number of paths to files or directories */
18392     int num_alloced;
18393     char **paths; /* the list of paths or directories */
18394     int *path_type;
18395 } X509_CERT_FILE_CTX;
18396 
18397 /*******************************/
18398 /*-
18399 SSL_CTX -> X509_STORE
18400                 -> X509_LOOKUP
18401                         ->X509_LOOKUP_METHOD
18402                 -> X509_LOOKUP
18403                         ->X509_LOOKUP_METHOD
18404 
18405 SSL     -> X509_STORE_CTX
18406                 ->X509_STORE
18407 
18408 The X509_STORE holds the tables etc for verification stuff.
18409 A X509_STORE_CTX is used while validating a single certificate.
18410 The X509_STORE has X509_LOOKUPs for looking up certs.
18411 The X509_STORE then calls a function to actually verify the
18412 certificate chain.
18413 */
18414 
18415 
18416 
18417 
18418 
18419 
18420 
18421 typedef struct x509_object_st {
18422     /* one of the above types */
18423     int type;
18424     union {
18425         char *ptr;
18426         X509 *x509;
18427         X509_CRL *crl;
18428         EVP_PKEY *pkey;
18429     } data;
18430 } X509_OBJECT;
18431 
18432 typedef struct x509_lookup_st X509_LOOKUP;
18433 
18434 struct stack_st_X509_LOOKUP { _STACK stack; };
18435 struct stack_st_X509_OBJECT { _STACK stack; };
18436 
18437 /* This is a static that defines the function interface */
18438 typedef struct x509_lookup_method_st {
18439     const char *name;
18440     int (*new_item) (X509_LOOKUP *ctx);
18441     void (*free) (X509_LOOKUP *ctx);
18442     int (*init) (X509_LOOKUP *ctx);
18443     int (*shutdown) (X509_LOOKUP *ctx);
18444     int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
18445                  char **ret);
18446     int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,
18447                            X509_OBJECT *ret);
18448     int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,
18449                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
18450     int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,
18451                                unsigned char *bytes, int len,
18452                                X509_OBJECT *ret);
18453     int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,
18454                          X509_OBJECT *ret);
18455 } X509_LOOKUP_METHOD;
18456 
18457 typedef struct X509_VERIFY_PARAM_ID_st X509_VERIFY_PARAM_ID;
18458 
18459 /*
18460  * This structure hold all parameters associated with a verify operation by
18461  * including an X509_VERIFY_PARAM structure in related structures the
18462  * parameters used can be customized
18463  */
18464 
18465 typedef struct X509_VERIFY_PARAM_st {
18466     char *name;
18467     time_t check_time; /* Time to use */
18468     unsigned long inh_flags; /* Inheritance flags */
18469     unsigned long flags; /* Various verify flags */
18470     int purpose; /* purpose to check untrusted certificates */
18471     int trust; /* trust setting to check */
18472     int depth; /* Verify depth */
18473     struct stack_st_ASN1_OBJECT *policies; /* Permissible policies */
18474     X509_VERIFY_PARAM_ID *id; /* opaque ID data */
18475 } X509_VERIFY_PARAM;
18476 
18477 struct stack_st_X509_VERIFY_PARAM { _STACK stack; };
18478 
18479 /*
18480  * This is used to hold everything.  It is used for all certificate
18481  * validation.  Once we have a certificate chain, the 'verify' function is
18482  * then called to actually check the cert chain.
18483  */
18484 struct x509_store_st {
18485     /* The following is a cache of trusted certs */
18486     int cache; /* if true, stash any hits */
18487     struct stack_st_X509_OBJECT *objs; /* Cache of all objects */
18488     /* These are external lookup methods */
18489     struct stack_st_X509_LOOKUP *get_cert_methods;
18490     X509_VERIFY_PARAM *param;
18491     /* Callbacks for various operations */
18492     /* called to verify a certificate */
18493     int (*verify) (X509_STORE_CTX *ctx);
18494     /* error callback */
18495     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
18496     /* get issuers cert from ctx */
18497     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
18498     /* check issued */
18499     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
18500     /* Check revocation status of chain */
18501     int (*check_revocation) (X509_STORE_CTX *ctx);
18502     /* retrieve CRL */
18503     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
18504     /* Check CRL validity */
18505     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
18506     /* Check certificate against CRL */
18507     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
18508     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
18509     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
18510     int (*cleanup) (X509_STORE_CTX *ctx);
18511     CRYPTO_EX_DATA ex_data;
18512     int references;
18513 } /* X509_STORE */ ;
18514 
18515 int X509_STORE_set_depth(X509_STORE *store, int depth);
18516 
18517 
18518 
18519 
18520 /* This is the functions plus an instance of the local variables. */
18521 struct x509_lookup_st {
18522     int init; /* have we been started */
18523     int skip; /* don't use us. */
18524     X509_LOOKUP_METHOD *method; /* the functions */
18525     char *method_data; /* method data */
18526     X509_STORE *store_ctx; /* who owns us */
18527 } /* X509_LOOKUP */ ;
18528 
18529 /*
18530  * This is a used when verifying cert chains.  Since the gathering of the
18531  * cert chain can take some time (and have to be 'retried', this needs to be
18532  * kept and passed around.
18533  */
18534 struct x509_store_ctx_st { /* X509_STORE_CTX */
18535     X509_STORE *ctx;
18536     /* used when looking up certs */
18537     int current_method;
18538     /* The following are set by the caller */
18539     /* The cert to check */
18540     X509 *cert;
18541     /* chain of X509s - untrusted - passed in */
18542     struct stack_st_X509 *untrusted;
18543     /* set of CRLs passed in */
18544     struct stack_st_X509_CRL *crls;
18545     X509_VERIFY_PARAM *param;
18546     /* Other info for use with get_issuer() */
18547     void *other_ctx;
18548     /* Callbacks for various operations */
18549     /* called to verify a certificate */
18550     int (*verify) (X509_STORE_CTX *ctx);
18551     /* error callback */
18552     int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
18553     /* get issuers cert from ctx */
18554     int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
18555     /* check issued */
18556     int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
18557     /* Check revocation status of chain */
18558     int (*check_revocation) (X509_STORE_CTX *ctx);
18559     /* retrieve CRL */
18560     int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
18561     /* Check CRL validity */
18562     int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
18563     /* Check certificate against CRL */
18564     int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
18565     int (*check_policy) (X509_STORE_CTX *ctx);
18566     struct stack_st_X509 *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
18567     struct stack_st_X509_CRL *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
18568     int (*cleanup) (X509_STORE_CTX *ctx);
18569     /* The following is built up */
18570     /* if 0, rebuild chain */
18571     int valid;
18572     /* index of last untrusted cert */
18573     int last_untrusted;
18574     /* chain of X509s - built up and trusted */
18575     struct stack_st_X509 *chain;
18576     /* Valid policy tree */
18577     X509_POLICY_TREE *tree;
18578     /* Require explicit policy value */
18579     int explicit_policy;
18580     /* When something goes wrong, this is why */
18581     int error_depth;
18582     int error;
18583     X509 *current_cert;
18584     /* cert currently being tested as valid issuer */
18585     X509 *current_issuer;
18586     /* current CRL */
18587     X509_CRL *current_crl;
18588     /* score of current CRL */
18589     int current_crl_score;
18590     /* Reason mask */
18591     unsigned int current_reasons;
18592     /* For CRL path validation: parent context */
18593     X509_STORE_CTX *parent;
18594     CRYPTO_EX_DATA ex_data;
18595 } /* X509_STORE_CTX */ ;
18596 
18597 void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
18598 # 345 "/usr/include/openssl/x509_vfy.h" 3 4
18599 /* These are 'informational' when looking for issuer cert */
18600 # 377 "/usr/include/openssl/x509_vfy.h" 3 4
18601 /* Suite B mode algorithm violation */
18602 
18603 
18604 
18605 
18606 
18607 
18608 
18609 /* Host, email and IP check errors */
18610 
18611 
18612 
18613 
18614 /* Caller error */
18615 
18616 /* Issuer lookup error */
18617 
18618 
18619 
18620 
18621 /* Certificate verify flags */
18622 
18623 /* Send issuer+subject checks to verify_cb */
18624 
18625 /* Use check time instead of current time */
18626 
18627 /* Lookup CRLs */
18628 
18629 /* Lookup CRLs for whole chain */
18630 
18631 /* Ignore unhandled critical extensions */
18632 
18633 /* Disable workarounds for broken certificates */
18634 
18635 /* Enable proxy certificate validation */
18636 
18637 /* Enable policy checking */
18638 
18639 /* Policy variable require-explicit-policy */
18640 
18641 /* Policy variable inhibit-any-policy */
18642 
18643 /* Policy variable inhibit-policy-mapping */
18644 
18645 /* Notify callback that policy is OK */
18646 
18647 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */
18648 
18649 /* Delta CRL support */
18650 
18651 /* Check selfsigned CA signature */
18652 
18653 /* Use trusted store first */
18654 
18655 /* Suite B 128 bit only mode: not normally used */
18656 
18657 /* Suite B 192 bit only mode */
18658 
18659 /* Suite B 128 bit mode allowing 192 bit algorithms */
18660 
18661 
18662 /* Allow partial chains if at least one certificate is in trusted store */
18663 
18664 /*
18665  * If the initial chain is not trusted, do not attempt to build an alternative
18666  * chain. Alternate chain checking was introduced in 1.0.2b. Setting this flag
18667  * will force the behaviour to match that of previous versions.
18668  */
18669 # 453 "/usr/include/openssl/x509_vfy.h" 3 4
18670 /* Internal use: mask of policy related options */
18671 
18672 
18673 
18674 
18675 
18676 int X509_OBJECT_idx_by_subject(struct stack_st_X509_OBJECT *h, int type,
18677                                X509_NAME *name);
18678 X509_OBJECT *X509_OBJECT_retrieve_by_subject(struct stack_st_X509_OBJECT *h,
18679                                              int type, X509_NAME *name);
18680 X509_OBJECT *X509_OBJECT_retrieve_match(struct stack_st_X509_OBJECT *h,
18681                                         X509_OBJECT *x);
18682 void X509_OBJECT_up_ref_count(X509_OBJECT *a);
18683 void X509_OBJECT_free_contents(X509_OBJECT *a);
18684 X509_STORE *X509_STORE_new(void);
18685 void X509_STORE_free(X509_STORE *v);
18686 
18687 struct stack_st_X509 *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
18688 struct stack_st_X509_CRL *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
18689 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
18690 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
18691 int X509_STORE_set_trust(X509_STORE *ctx, int trust);
18692 int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
18693 
18694 void X509_STORE_set_verify_cb(X509_STORE *ctx,
18695                               int (*verify_cb) (int, X509_STORE_CTX *));
18696 
18697 void X509_STORE_set_lookup_crls_cb(X509_STORE *ctx,
18698                                    struct stack_st_X509_CRL *(*cb) (X509_STORE_CTX
18699                                                               *ctx,
18700                                                               X509_NAME *nm));
18701 
18702 X509_STORE_CTX *X509_STORE_CTX_new(void);
18703 
18704 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
18705 
18706 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
18707 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
18708                         X509 *x509, struct stack_st_X509 *chain);
18709 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, struct stack_st_X509 *sk);
18710 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
18711 
18712 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
18713 
18714 X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
18715 
18716 X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);
18717 X509_LOOKUP_METHOD *X509_LOOKUP_file(void);
18718 
18719 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
18720 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
18721 
18722 int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,
18723                               X509_OBJECT *ret);
18724 
18725 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
18726                      long argl, char **ret);
18727 
18728 
18729 int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
18730 int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
18731 int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
18732 
18733 
18734 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
18735 void X509_LOOKUP_free(X509_LOOKUP *ctx);
18736 int X509_LOOKUP_init(X509_LOOKUP *ctx);
18737 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,
18738                            X509_OBJECT *ret);
18739 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,
18740                                  ASN1_INTEGER *serial, X509_OBJECT *ret);
18741 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,
18742                                unsigned char *bytes, int len,
18743                                X509_OBJECT *ret);
18744 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,
18745                          X509_OBJECT *ret);
18746 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
18747 
18748 
18749 int X509_STORE_load_locations(X509_STORE *ctx,
18750                               const char *file, const char *dir);
18751 int X509_STORE_set_default_paths(X509_STORE *ctx);
18752 
18753 
18754 int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
18755                                     CRYPTO_EX_new *new_func,
18756                                     CRYPTO_EX_dup *dup_func,
18757                                     CRYPTO_EX_free *free_func);
18758 int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
18759 void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
18760 int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
18761 void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
18762 int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
18763 X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
18764 X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
18765 X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
18766 X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
18767 struct stack_st_X509 *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
18768 struct stack_st_X509 *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
18769 void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
18770 void X509_STORE_CTX_set_chain(X509_STORE_CTX *c, struct stack_st_X509 *sk);
18771 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, struct stack_st_X509_CRL *sk);
18772 int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
18773 int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
18774 int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
18775                                    int purpose, int trust);
18776 void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
18777 void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
18778                              time_t t);
18779 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
18780                                   int (*verify_cb) (int, X509_STORE_CTX *));
18781 
18782 X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
18783 int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
18784 
18785 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
18786 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
18787 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
18788 
18789 /* X509_VERIFY_PARAM functions */
18790 
18791 X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);
18792 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);
18793 int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,
18794                               const X509_VERIFY_PARAM *from);
18795 int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
18796                            const X509_VERIFY_PARAM *from);
18797 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
18798 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
18799                                 unsigned long flags);
18800 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
18801                                   unsigned long flags);
18802 unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
18803 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
18804 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
18805 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
18806 void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);
18807 int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,
18808                                   ASN1_OBJECT *policy);
18809 int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,
18810                                     struct stack_st_ASN1_OBJECT *policies);
18811 
18812 int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param,
18813                                 const char *name, size_t namelen);
18814 int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
18815                                 const char *name, size_t namelen);
18816 void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
18817                                      unsigned int flags);
18818 char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
18819 int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
18820                                  const char *email, size_t emaillen);
18821 int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
18822                               const unsigned char *ip, size_t iplen);
18823 int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param,
18824                                   const char *ipasc);
18825 
18826 int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
18827 const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
18828 
18829 int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
18830 int X509_VERIFY_PARAM_get_count(void);
18831 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
18832 const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
18833 void X509_VERIFY_PARAM_table_cleanup(void);
18834 
18835 int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
18836                       struct stack_st_X509 *certs,
18837                       struct stack_st_ASN1_OBJECT *policy_oids, unsigned int flags);
18838 
18839 void X509_policy_tree_free(X509_POLICY_TREE *tree);
18840 
18841 int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
18842 X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
18843                                                int i);
18844 
18845 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_policies(const
18846                                                            X509_POLICY_TREE
18847                                                            *tree);
18848 
18849 struct stack_st_X509_POLICY_NODE *X509_policy_tree_get0_user_policies(const
18850                                                                 X509_POLICY_TREE
18851                                                                 *tree);
18852 
18853 int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
18854 
18855 X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
18856                                               int i);
18857 
18858 const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
18859 
18860 struct stack_st_POLICYQUALINFO *X509_policy_node_get0_qualifiers(const
18861                                                            X509_POLICY_NODE
18862                                                            *node);
18863 const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
18864                                                      *node);
18865 # 582 "/usr/include/openssl/x509.h" 2 3 4
18866 # 1 "/usr/include/openssl/pkcs7.h" 1 3 4
18867 /* crypto/pkcs7/pkcs7.h */
18868 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18869  * All rights reserved.
18870  *
18871  * This package is an SSL implementation written
18872  * by Eric Young (eay@cryptsoft.com).
18873  * The implementation was written so as to conform with Netscapes SSL.
18874  *
18875  * This library is free for commercial and non-commercial use as long as
18876  * the following conditions are aheared to.  The following conditions
18877  * apply to all code found in this distribution, be it the RC4, RSA,
18878  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18879  * included with this distribution is covered by the same copyright terms
18880  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18881  *
18882  * Copyright remains Eric Young's, and as such any Copyright notices in
18883  * the code are not to be removed.
18884  * If this package is used in a product, Eric Young should be given attribution
18885  * as the author of the parts of the library used.
18886  * This can be in the form of a textual message at program startup or
18887  * in documentation (online or textual) provided with the package.
18888  *
18889  * Redistribution and use in source and binary forms, with or without
18890  * modification, are permitted provided that the following conditions
18891  * are met:
18892  * 1. Redistributions of source code must retain the copyright
18893  *    notice, this list of conditions and the following disclaimer.
18894  * 2. Redistributions in binary form must reproduce the above copyright
18895  *    notice, this list of conditions and the following disclaimer in the
18896  *    documentation and/or other materials provided with the distribution.
18897  * 3. All advertising materials mentioning features or use of this software
18898  *    must display the following acknowledgement:
18899  *    "This product includes cryptographic software written by
18900  *     Eric Young (eay@cryptsoft.com)"
18901  *    The word 'cryptographic' can be left out if the rouines from the library
18902  *    being used are not cryptographic related :-).
18903  * 4. If you include any Windows specific code (or a derivative thereof) from
18904  *    the apps directory (application code) you must include an acknowledgement:
18905  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18906  *
18907  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18908  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18909  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18910  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18911  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18912  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18913  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18914  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18915  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18916  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18917  * SUCH DAMAGE.
18918  *
18919  * The licence and distribution terms for any publically available version or
18920  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18921  * copied and put under another distribution licence
18922  * [including the GNU Public Licence.]
18923  */
18924 
18925 
18926 
18927 
18928 # 1 "/usr/include/openssl/asn1.h" 1 3 4
18929 /* crypto/asn1/asn1.h */
18930 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18931  * All rights reserved.
18932  *
18933  * This package is an SSL implementation written
18934  * by Eric Young (eay@cryptsoft.com).
18935  * The implementation was written so as to conform with Netscapes SSL.
18936  *
18937  * This library is free for commercial and non-commercial use as long as
18938  * the following conditions are aheared to.  The following conditions
18939  * apply to all code found in this distribution, be it the RC4, RSA,
18940  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
18941  * included with this distribution is covered by the same copyright terms
18942  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18943  *
18944  * Copyright remains Eric Young's, and as such any Copyright notices in
18945  * the code are not to be removed.
18946  * If this package is used in a product, Eric Young should be given attribution
18947  * as the author of the parts of the library used.
18948  * This can be in the form of a textual message at program startup or
18949  * in documentation (online or textual) provided with the package.
18950  *
18951  * Redistribution and use in source and binary forms, with or without
18952  * modification, are permitted provided that the following conditions
18953  * are met:
18954  * 1. Redistributions of source code must retain the copyright
18955  *    notice, this list of conditions and the following disclaimer.
18956  * 2. Redistributions in binary form must reproduce the above copyright
18957  *    notice, this list of conditions and the following disclaimer in the
18958  *    documentation and/or other materials provided with the distribution.
18959  * 3. All advertising materials mentioning features or use of this software
18960  *    must display the following acknowledgement:
18961  *    "This product includes cryptographic software written by
18962  *     Eric Young (eay@cryptsoft.com)"
18963  *    The word 'cryptographic' can be left out if the rouines from the library
18964  *    being used are not cryptographic related :-).
18965  * 4. If you include any Windows specific code (or a derivative thereof) from
18966  *    the apps directory (application code) you must include an acknowledgement:
18967  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
18968  *
18969  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
18970  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18971  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18972  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18973  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18974  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18975  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18976  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18977  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
18978  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
18979  * SUCH DAMAGE.
18980  *
18981  * The licence and distribution terms for any publically available version or
18982  * derivative of this code cannot be changed.  i.e. this code cannot simply be
18983  * copied and put under another distribution licence
18984  * [including the GNU Public Licence.]
18985  */
18986 # 63 "/usr/include/openssl/pkcs7.h" 2 3 4
18987 # 1 "/usr/include/openssl/bio.h" 1 3 4
18988 /* crypto/bio/bio.h */
18989 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
18990  * All rights reserved.
18991  *
18992  * This package is an SSL implementation written
18993  * by Eric Young (eay@cryptsoft.com).
18994  * The implementation was written so as to conform with Netscapes SSL.
18995  *
18996  * This library is free for commercial and non-commercial use as long as
18997  * the following conditions are aheared to.  The following conditions
18998  * apply to all code found in this distribution, be it the RC4, RSA,
18999  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
19000  * included with this distribution is covered by the same copyright terms
19001  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
19002  *
19003  * Copyright remains Eric Young's, and as such any Copyright notices in
19004  * the code are not to be removed.
19005  * If this package is used in a product, Eric Young should be given attribution
19006  * as the author of the parts of the library used.
19007  * This can be in the form of a textual message at program startup or
19008  * in documentation (online or textual) provided with the package.
19009  *
19010  * Redistribution and use in source and binary forms, with or without
19011  * modification, are permitted provided that the following conditions
19012  * are met:
19013  * 1. Redistributions of source code must retain the copyright
19014  *    notice, this list of conditions and the following disclaimer.
19015  * 2. Redistributions in binary form must reproduce the above copyright
19016  *    notice, this list of conditions and the following disclaimer in the
19017  *    documentation and/or other materials provided with the distribution.
19018  * 3. All advertising materials mentioning features or use of this software
19019  *    must display the following acknowledgement:
19020  *    "This product includes cryptographic software written by
19021  *     Eric Young (eay@cryptsoft.com)"
19022  *    The word 'cryptographic' can be left out if the rouines from the library
19023  *    being used are not cryptographic related :-).
19024  * 4. If you include any Windows specific code (or a derivative thereof) from
19025  *    the apps directory (application code) you must include an acknowledgement:
19026  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
19027  *
19028  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
19029  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19030  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19031  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19032  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19033  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19034  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19035  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
19036  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
19037  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
19038  * SUCH DAMAGE.
19039  *
19040  * The licence and distribution terms for any publically available version or
19041  * derivative of this code cannot be changed.  i.e. this code cannot simply be
19042  * copied and put under another distribution licence
19043  * [including the GNU Public Licence.]
19044  */
19045 # 64 "/usr/include/openssl/pkcs7.h" 2 3 4
19046 # 1 "/usr/include/openssl/e_os2.h" 1 3 4
19047 /* e_os2.h */
19048 /* ====================================================================
19049  * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
19050  *
19051  * Redistribution and use in source and binary forms, with or without
19052  * modification, are permitted provided that the following conditions
19053  * are met:
19054  *
19055  * 1. Redistributions of source code must retain the above copyright
19056  *    notice, this list of conditions and the following disclaimer.
19057  *
19058  * 2. Redistributions in binary form must reproduce the above copyright
19059  *    notice, this list of conditions and the following disclaimer in
19060  *    the documentation and/or other materials provided with the
19061  *    distribution.
19062  *
19063  * 3. All advertising materials mentioning features or use of this
19064  *    software must display the following acknowledgment:
19065  *    "This product includes software developed by the OpenSSL Project
19066  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19067  *
19068  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19069  *    endorse or promote products derived from this software without
19070  *    prior written permission. For written permission, please contact
19071  *    openssl-core@openssl.org.
19072  *
19073  * 5. Products derived from this software may not be called "OpenSSL"
19074  *    nor may "OpenSSL" appear in their names without prior written
19075  *    permission of the OpenSSL Project.
19076  *
19077  * 6. Redistributions of any form whatsoever must retain the following
19078  *    acknowledgment:
19079  *    "This product includes software developed by the OpenSSL Project
19080  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19081  *
19082  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19083  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19084  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19085  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19086  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19087  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19088  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19089  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19090  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19091  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19092  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19093  * OF THE POSSIBILITY OF SUCH DAMAGE.
19094  * ====================================================================
19095  *
19096  * This product includes cryptographic software written by Eric Young
19097  * (eay@cryptsoft.com).  This product includes software written by Tim
19098  * Hudson (tjh@cryptsoft.com).
19099  *
19100  */
19101 
19102 # 1 "/usr/include/openssl/opensslconf.h" 1 3 4
19103 /* opensslconf.h */
19104 /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
19105 
19106 
19107 
19108 
19109 /* OpenSSL was configured with the following options: */
19110 # 108 "/usr/include/openssl/opensslconf.h" 3 4
19111 /* The OPENSSL_NO_* macros are also defined as NO_* if the application
19112    asks for it.  This is a transient feature that is provided for those
19113    who haven't had the time to do the appropriate changes in their
19114    applications.  */
19115 # 204 "/usr/include/openssl/opensslconf.h" 3 4
19116 /* crypto/opensslconf.h.in */
19117 
19118 /* Generate 80386 code? */
19119 # 57 "/usr/include/openssl/e_os2.h" 2 3 4
19120 # 65 "/usr/include/openssl/pkcs7.h" 2 3 4
19121 
19122 # 1 "/usr/include/openssl/symhacks.h" 1 3 4
19123 /* ====================================================================
19124  * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.
19125  *
19126  * Redistribution and use in source and binary forms, with or without
19127  * modification, are permitted provided that the following conditions
19128  * are met:
19129  *
19130  * 1. Redistributions of source code must retain the above copyright
19131  *    notice, this list of conditions and the following disclaimer.
19132  *
19133  * 2. Redistributions in binary form must reproduce the above copyright
19134  *    notice, this list of conditions and the following disclaimer in
19135  *    the documentation and/or other materials provided with the
19136  *    distribution.
19137  *
19138  * 3. All advertising materials mentioning features or use of this
19139  *    software must display the following acknowledgment:
19140  *    "This product includes software developed by the OpenSSL Project
19141  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19142  *
19143  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19144  *    endorse or promote products derived from this software without
19145  *    prior written permission. For written permission, please contact
19146  *    openssl-core@openssl.org.
19147  *
19148  * 5. Products derived from this software may not be called "OpenSSL"
19149  *    nor may "OpenSSL" appear in their names without prior written
19150  *    permission of the OpenSSL Project.
19151  *
19152  * 6. Redistributions of any form whatsoever must retain the following
19153  *    acknowledgment:
19154  *    "This product includes software developed by the OpenSSL Project
19155  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19156  *
19157  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19158  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19159  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19160  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19161  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19162  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19163  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19164  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19165  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19166  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19167  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19168  * OF THE POSSIBILITY OF SUCH DAMAGE.
19169  * ====================================================================
19170  *
19171  * This product includes cryptographic software written by Eric Young
19172  * (eay@cryptsoft.com).  This product includes software written by Tim
19173  * Hudson (tjh@cryptsoft.com).
19174  *
19175  */
19176 # 67 "/usr/include/openssl/pkcs7.h" 2 3 4
19177 # 1 "/usr/include/openssl/ossl_typ.h" 1 3 4
19178 /* ====================================================================
19179  * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
19180  *
19181  * Redistribution and use in source and binary forms, with or without
19182  * modification, are permitted provided that the following conditions
19183  * are met:
19184  *
19185  * 1. Redistributions of source code must retain the above copyright
19186  *    notice, this list of conditions and the following disclaimer.
19187  *
19188  * 2. Redistributions in binary form must reproduce the above copyright
19189  *    notice, this list of conditions and the following disclaimer in
19190  *    the documentation and/or other materials provided with the
19191  *    distribution.
19192  *
19193  * 3. All advertising materials mentioning features or use of this
19194  *    software must display the following acknowledgment:
19195  *    "This product includes software developed by the OpenSSL Project
19196  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
19197  *
19198  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
19199  *    endorse or promote products derived from this software without
19200  *    prior written permission. For written permission, please contact
19201  *    openssl-core@openssl.org.
19202  *
19203  * 5. Products derived from this software may not be called "OpenSSL"
19204  *    nor may "OpenSSL" appear in their names without prior written
19205  *    permission of the OpenSSL Project.
19206  *
19207  * 6. Redistributions of any form whatsoever must retain the following
19208  *    acknowledgment:
19209  *    "This product includes software developed by the OpenSSL Project
19210  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
19211  *
19212  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
19213  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19214  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19215  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
19216  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19217  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19218  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19219  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19220  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
19221  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19222  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
19223  * OF THE POSSIBILITY OF SUCH DAMAGE.
19224  * ====================================================================
19225  *
19226  * This product includes cryptographic software written by Eric Young
19227  * (eay@cryptsoft.com).  This product includes software written by Tim
19228  * Hudson (tjh@cryptsoft.com).
19229  *
19230  */
19231 # 68 "/usr/include/openssl/pkcs7.h" 2 3 4
19232 # 79 "/usr/include/openssl/pkcs7.h" 3 4
19233 /*-
19234 Encryption_ID           DES-CBC
19235 Digest_ID               MD5
19236 Digest_Encryption_ID    rsaEncryption
19237 Key_Encryption_ID       rsaEncryption
19238 */
19239 
19240 typedef struct pkcs7_issuer_and_serial_st {
19241     X509_NAME *issuer;
19242     ASN1_INTEGER *serial;
19243 } PKCS7_ISSUER_AND_SERIAL;
19244 
19245 typedef struct pkcs7_signer_info_st {
19246     ASN1_INTEGER *version; /* version 1 */
19247     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
19248     X509_ALGOR *digest_alg;
19249     struct stack_st_X509_ATTRIBUTE *auth_attr; /* [ 0 ] */
19250     X509_ALGOR *digest_enc_alg;
19251     ASN1_OCTET_STRING *enc_digest;
19252     struct stack_st_X509_ATTRIBUTE *unauth_attr; /* [ 1 ] */
19253     /* The private key to sign with */
19254     EVP_PKEY *pkey;
19255 } PKCS7_SIGNER_INFO;
19256 
19257 struct stack_st_PKCS7_SIGNER_INFO { _STACK stack; };
19258 
19259 
19260 typedef struct pkcs7_recip_info_st {
19261     ASN1_INTEGER *version; /* version 0 */
19262     PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
19263     X509_ALGOR *key_enc_algor;
19264     ASN1_OCTET_STRING *enc_key;
19265     X509 *cert; /* get the pub-key from this */
19266 } PKCS7_RECIP_INFO;
19267 
19268 struct stack_st_PKCS7_RECIP_INFO { _STACK stack; };
19269 
19270 
19271 typedef struct pkcs7_signed_st {
19272     ASN1_INTEGER *version; /* version 1 */
19273     struct stack_st_X509_ALGOR *md_algs; /* md used */
19274     struct stack_st_X509 *cert; /* [ 0 ] */
19275     struct stack_st_X509_CRL *crl; /* [ 1 ] */
19276     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
19277     struct pkcs7_st *contents;
19278 } PKCS7_SIGNED;
19279 /*
19280  * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about
19281  * merging the two
19282  */
19283 
19284 typedef struct pkcs7_enc_content_st {
19285     ASN1_OBJECT *content_type;
19286     X509_ALGOR *algorithm;
19287     ASN1_OCTET_STRING *enc_data; /* [ 0 ] */
19288     const EVP_CIPHER *cipher;
19289 } PKCS7_ENC_CONTENT;
19290 
19291 typedef struct pkcs7_enveloped_st {
19292     ASN1_INTEGER *version; /* version 0 */
19293     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
19294     PKCS7_ENC_CONTENT *enc_data;
19295 } PKCS7_ENVELOPE;
19296 
19297 typedef struct pkcs7_signedandenveloped_st {
19298     ASN1_INTEGER *version; /* version 1 */
19299     struct stack_st_X509_ALGOR *md_algs; /* md used */
19300     struct stack_st_X509 *cert; /* [ 0 ] */
19301     struct stack_st_X509_CRL *crl; /* [ 1 ] */
19302     struct stack_st_PKCS7_SIGNER_INFO *signer_info;
19303     PKCS7_ENC_CONTENT *enc_data;
19304     struct stack_st_PKCS7_RECIP_INFO *recipientinfo;
19305 } PKCS7_SIGN_ENVELOPE;
19306 
19307 typedef struct pkcs7_digest_st {
19308     ASN1_INTEGER *version; /* version 0 */
19309     X509_ALGOR *md; /* md used */
19310     struct pkcs7_st *contents;
19311     ASN1_OCTET_STRING *digest;
19312 } PKCS7_DIGEST;
19313 
19314 typedef struct pkcs7_encrypted_st {
19315     ASN1_INTEGER *version; /* version 0 */
19316     PKCS7_ENC_CONTENT *enc_data;
19317 } PKCS7_ENCRYPT;
19318 
19319 typedef struct pkcs7_st {
19320     /*
19321      * The following is non NULL if it contains ASN1 encoding of this
19322      * structure
19323      */
19324     unsigned char *asn1;
19325     long length;
19326 
19327 
19328 
19329     int state; /* used during processing */
19330     int detached;
19331     ASN1_OBJECT *type;
19332     /* content as defined by the type */
19333     /*
19334      * all encryption/message digests are applied to the 'contents', leaving
19335      * out the 'type' field.
19336      */
19337     union {
19338         char *ptr;
19339         /* NID_pkcs7_data */
19340         ASN1_OCTET_STRING *data;
19341         /* NID_pkcs7_signed */
19342         PKCS7_SIGNED *sign;
19343         /* NID_pkcs7_enveloped */
19344         PKCS7_ENVELOPE *enveloped;
19345         /* NID_pkcs7_signedAndEnveloped */
19346         PKCS7_SIGN_ENVELOPE *signed_and_enveloped;
19347         /* NID_pkcs7_digest */
19348         PKCS7_DIGEST *digest;
19349         /* NID_pkcs7_encrypted */
19350         PKCS7_ENCRYPT *encrypted;
19351         /* Anything else */
19352         ASN1_TYPE *other;
19353     } d;
19354 } PKCS7;
19355 
19356 struct stack_st_PKCS7 { _STACK stack; };
19357 
19358 
19359 # 227 "/usr/include/openssl/pkcs7.h" 3 4
19360 /* S/MIME related flags */
19361 # 246 "/usr/include/openssl/pkcs7.h" 3 4
19362 /* Flags: for compatibility with older code */
19363 # 258 "/usr/include/openssl/pkcs7.h" 3 4
19364 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;
19365 
19366 int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
19367                                    const EVP_MD *type, unsigned char *md,
19368                                    unsigned int *len);
19369 
19370 PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
19371 int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);
19372 
19373 PKCS7 *PKCS7_dup(PKCS7 *p7);
19374 PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
19375 int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);
19376 int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
19377 int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);
19378 
19379 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;
19380 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;
19381 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;
19382 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;
19383 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;
19384 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;
19385 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;
19386 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;
19387 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;
19388 
19389 extern const ASN1_ITEM PKCS7_ATTR_SIGN_it;
19390 extern const ASN1_ITEM PKCS7_ATTR_VERIFY_it;
19391 
19392 int i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out);
19393 int PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx);
19394 
19395 long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);
19396 
19397 int PKCS7_set_type(PKCS7 *p7, int type);
19398 int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
19399 int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
19400 int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
19401                           const EVP_MD *dgst);
19402 int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
19403 int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
19404 int PKCS7_add_certificate(PKCS7 *p7, X509 *x509);
19405 int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);
19406 int PKCS7_content_new(PKCS7 *p7, int nid);
19407 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
19408                      BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
19409 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
19410                           X509 *x509);
19411 
19412 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
19413 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
19414 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
19415 
19416 PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
19417                                        EVP_PKEY *pkey, const EVP_MD *dgst);
19418 X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
19419 int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
19420 struct stack_st_PKCS7_SIGNER_INFO *PKCS7_get_signer_info(PKCS7 *p7);
19421 
19422 PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
19423 void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
19424                                  X509_ALGOR **pdig, X509_ALGOR **psig);
19425 void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
19426 int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
19427 int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
19428 int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);
19429 int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);
19430 
19431 PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
19432 ASN1_OCTET_STRING *PKCS7_digest_from_attributes(struct stack_st_X509_ATTRIBUTE *sk);
19433 int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
19434                                void *data);
19435 int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
19436                         void *value);
19437 ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);
19438 ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);
19439 int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
19440                                 struct stack_st_X509_ATTRIBUTE *sk);
19441 int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
19442                          struct stack_st_X509_ATTRIBUTE *sk);
19443 
19444 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, struct stack_st_X509 *certs,
19445                   BIO *data, int flags);
19446 
19447 PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
19448                                          X509 *signcert, EVP_PKEY *pkey,
19449                                          const EVP_MD *md, int flags);
19450 
19451 int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
19452 int PKCS7_verify(PKCS7 *p7, struct stack_st_X509 *certs, X509_STORE *store,
19453                  BIO *indata, BIO *out, int flags);
19454 struct stack_st_X509 *PKCS7_get0_signers(PKCS7 *p7, struct stack_st_X509 *certs,
19455                                    int flags);
19456 PKCS7 *PKCS7_encrypt(struct stack_st_X509 *certs, BIO *in, const EVP_CIPHER *cipher,
19457                      int flags);
19458 int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
19459                   int flags);
19460 
19461 int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
19462                               struct stack_st_X509_ALGOR *cap);
19463 struct stack_st_X509_ALGOR *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
19464 int PKCS7_simple_smimecap(struct stack_st_X509_ALGOR *sk, int nid, int arg);
19465 
19466 int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
19467 int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
19468 int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
19469                              const unsigned char *md, int mdlen);
19470 
19471 int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
19472 PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
19473 
19474 BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
19475 
19476 /* BEGIN ERROR CODES */
19477 /*
19478  * The following lines are auto generated by the script mkerr.pl. Any changes
19479  * made after this point may be overwritten when the script is next run.
19480  */
19481 void ERR_load_PKCS7_strings(void);
19482 
19483 /* Error codes for the PKCS7 functions. */
19484 
19485 /* Function codes. */
19486 # 421 "/usr/include/openssl/pkcs7.h" 3 4
19487 /* Reason codes. */
19488 # 583 "/usr/include/openssl/x509.h" 2 3 4
19489 # 592 "/usr/include/openssl/x509.h" 3 4
19490 /* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */
19491 # 608 "/usr/include/openssl/x509.h" 3 4
19492 void X509_CRL_set_default_method(const X509_CRL_METHOD *meth);
19493 X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
19494                                      int (*crl_free) (X509_CRL *crl),
19495                                      int (*crl_lookup) (X509_CRL *crl,
19496                                                         X509_REVOKED **ret,
19497                                                         ASN1_INTEGER *ser,
19498                                                         X509_NAME *issuer),
19499                                      int (*crl_verify) (X509_CRL *crl,
19500                                                         EVP_PKEY *pk));
19501 void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
19502 
19503 void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
19504 void *X509_CRL_get_meth_data(X509_CRL *crl);
19505 
19506 /*
19507  * This one is only used so that a binary form can output, as in
19508  * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)
19509  */
19510 
19511 
19512 const char *X509_verify_cert_error_string(long n);
19513 
19514 
19515 int X509_verify(X509 *a, EVP_PKEY *r);
19516 
19517 int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
19518 int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);
19519 int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);
19520 
19521 NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);
19522 char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);
19523 EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);
19524 int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
19525 
19526 int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
19527 
19528 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);
19529 int X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);
19530 
19531 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
19532 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
19533 int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
19534 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
19535 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
19536 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
19537 int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
19538 int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl);
19539 int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
19540 
19541 int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
19542                        unsigned char *md, unsigned int *len);
19543 int X509_digest(const X509 *data, const EVP_MD *type,
19544                 unsigned char *md, unsigned int *len);
19545 int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
19546                     unsigned char *md, unsigned int *len);
19547 int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
19548                     unsigned char *md, unsigned int *len);
19549 int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
19550                      unsigned char *md, unsigned int *len);
19551 
19552 
19553 
19554 X509 *d2i_X509_fp(FILE *fp, X509 **x509);
19555 int i2d_X509_fp(FILE *fp, X509 *x509);
19556 X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);
19557 int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);
19558 X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);
19559 int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);
19560 
19561 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);
19562 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);
19563 RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);
19564 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);
19565 RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
19566 int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
19567 
19568 
19569 DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);
19570 int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);
19571 DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
19572 int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
19573 
19574 
19575 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
19576 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
19577 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
19578 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
19579 
19580 X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);
19581 int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);
19582 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
19583                                                 PKCS8_PRIV_KEY_INFO **p8inf);
19584 int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);
19585 int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);
19586 int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);
19587 EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
19588 int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
19589 EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
19590 
19591 
19592 
19593 X509 *d2i_X509_bio(BIO *bp, X509 **x509);
19594 int i2d_X509_bio(BIO *bp, X509 *x509);
19595 X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
19596 int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);
19597 X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);
19598 int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);
19599 
19600 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);
19601 int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);
19602 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
19603 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);
19604 RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
19605 int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
19606 
19607 
19608 DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);
19609 int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
19610 DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
19611 int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
19612 
19613 
19614 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
19615 int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
19616 EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
19617 int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
19618 
19619 X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);
19620 int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);
19621 PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
19622                                                  PKCS8_PRIV_KEY_INFO **p8inf);
19623 int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);
19624 int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);
19625 int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
19626 EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
19627 int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
19628 EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
19629 
19630 
19631 X509 *X509_dup(X509 *x509);
19632 X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
19633 X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
19634 X509_CRL *X509_CRL_dup(X509_CRL *crl);
19635 X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);
19636 X509_REQ *X509_REQ_dup(X509_REQ *req);
19637 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
19638 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,
19639                     void *pval);
19640 void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
19641                      X509_ALGOR *algor);
19642 void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
19643 int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
19644 
19645 X509_NAME *X509_NAME_dup(X509_NAME *xn);
19646 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
19647 
19648 int X509_cmp_time(const ASN1_TIME *s, time_t *t);
19649 int X509_cmp_current_time(const ASN1_TIME *s);
19650 ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
19651 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,
19652                             int offset_day, long offset_sec, time_t *t);
19653 ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);
19654 
19655 const char *X509_get_default_cert_area(void);
19656 const char *X509_get_default_cert_dir(void);
19657 const char *X509_get_default_cert_file(void);
19658 const char *X509_get_default_cert_dir_env(void);
19659 const char *X509_get_default_cert_file_env(void);
19660 const char *X509_get_default_private_dir(void);
19661 
19662 X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
19663 X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);
19664 
19665 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;
19666 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;
19667 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;
19668 
19669 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;
19670 
19671 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
19672 EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);
19673 int X509_get_pubkey_parameters(EVP_PKEY *pkey, struct stack_st_X509 *chain);
19674 int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);
19675 EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);
19676 
19677 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
19678 RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
19679 
19680 
19681 int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);
19682 DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
19683 
19684 
19685 int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
19686 EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
19687 
19688 
19689 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;
19690 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;
19691 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;
19692 
19693 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;
19694 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
19695 
19696 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;
19697 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;
19698 
19699 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;
19700 
19701 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;
19702 
19703 int X509_NAME_set(X509_NAME **xn, X509_NAME *name);
19704 
19705 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;
19706 
19707 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;
19708 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;
19709 
19710 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;
19711 
19712 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
19713                           CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
19714 int X509_set_ex_data(X509 *r, int idx, void *arg);
19715 void *X509_get_ex_data(X509 *r, int idx);
19716 int i2d_X509_AUX(X509 *a, unsigned char **pp);
19717 X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);
19718 
19719 int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
19720 
19721 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
19722                          const X509 *x);
19723 int X509_get_signature_nid(const X509 *x);
19724 
19725 int X509_alias_set1(X509 *x, unsigned char *name, int len);
19726 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
19727 unsigned char *X509_alias_get0(X509 *x, int *len);
19728 unsigned char *X509_keyid_get0(X509 *x, int *len);
19729 int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
19730                                                                 int);
19731 int X509_TRUST_set(int *t, int trust);
19732 int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
19733 int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
19734 void X509_trust_clear(X509 *x);
19735 void X509_reject_clear(X509 *x);
19736 
19737 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;
19738 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;
19739 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;
19740 
19741 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
19742 int X509_CRL_get0_by_serial(X509_CRL *crl,
19743                             X509_REVOKED **ret, ASN1_INTEGER *serial);
19744 int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
19745 
19746 X509_PKEY *X509_PKEY_new(void);
19747 void X509_PKEY_free(X509_PKEY *a);
19748 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);
19749 X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,
19750                          long length);
19751 
19752 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;
19753 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;
19754 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;
19755 
19756 
19757 X509_INFO *X509_INFO_new(void);
19758 void X509_INFO_free(X509_INFO *a);
19759 char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
19760 
19761 int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,
19762                 ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);
19763 
19764 int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
19765                 unsigned char *md, unsigned int *len);
19766 
19767 int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,
19768               X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
19769               char *data, EVP_PKEY *pkey, const EVP_MD *type);
19770 
19771 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,
19772                      unsigned char *md, unsigned int *len);
19773 
19774 int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
19775                      ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);
19776 
19777 int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
19778                    X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,
19779                    EVP_PKEY *pkey, const EVP_MD *type);
19780 int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
19781                        X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
19782                        void *asn, EVP_MD_CTX *ctx);
19783 
19784 
19785 int X509_set_version(X509 *x, long version);
19786 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
19787 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
19788 int X509_set_issuer_name(X509 *x, X509_NAME *name);
19789 X509_NAME *X509_get_issuer_name(X509 *a);
19790 int X509_set_subject_name(X509 *x, X509_NAME *name);
19791 X509_NAME *X509_get_subject_name(X509 *a);
19792 int X509_set_notBefore(X509 *x, const ASN1_TIME *tm);
19793 int X509_set_notAfter(X509 *x, const ASN1_TIME *tm);
19794 int X509_set_pubkey(X509 *x, EVP_PKEY *pkey);
19795 EVP_PKEY *X509_get_pubkey(X509 *x);
19796 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
19797 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
19798 
19799 int X509_REQ_set_version(X509_REQ *x, long version);
19800 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
19801 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
19802 EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
19803 int X509_REQ_extension_nid(int nid);
19804 int *X509_REQ_get_extension_nids(void);
19805 void X509_REQ_set_extension_nids(int *nids);
19806 struct stack_st_X509_EXTENSION *X509_REQ_get_extensions(X509_REQ *req);
19807 int X509_REQ_add_extensions_nid(X509_REQ *req, struct stack_st_X509_EXTENSION *exts,
19808                                 int nid);
19809 int X509_REQ_add_extensions(X509_REQ *req, struct stack_st_X509_EXTENSION *exts);
19810 int X509_REQ_get_attr_count(const X509_REQ *req);
19811 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
19812 int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
19813                              int lastpos);
19814 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
19815 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
19816 int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
19817 int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
19818                               const ASN1_OBJECT *obj, int type,
19819                               const unsigned char *bytes, int len);
19820 int X509_REQ_add1_attr_by_NID(X509_REQ *req,
19821                               int nid, int type,
19822                               const unsigned char *bytes, int len);
19823 int X509_REQ_add1_attr_by_txt(X509_REQ *req,
19824                               const char *attrname, int type,
19825                               const unsigned char *bytes, int len);
19826 
19827 int X509_CRL_set_version(X509_CRL *x, long version);
19828 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
19829 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
19830 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
19831 int X509_CRL_sort(X509_CRL *crl);
19832 
19833 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
19834 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
19835 
19836 X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
19837                         EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
19838 
19839 int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);
19840 
19841 int X509_check_private_key(X509 *x509, EVP_PKEY *pkey);
19842 int X509_chain_check_suiteb(int *perror_depth,
19843                             X509 *x, struct stack_st_X509 *chain,
19844                             unsigned long flags);
19845 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
19846 struct stack_st_X509 *X509_chain_up_ref(struct stack_st_X509 *chain);
19847 
19848 int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
19849 unsigned long X509_issuer_and_serial_hash(X509 *a);
19850 
19851 int X509_issuer_name_cmp(const X509 *a, const X509 *b);
19852 unsigned long X509_issuer_name_hash(X509 *a);
19853 
19854 int X509_subject_name_cmp(const X509 *a, const X509 *b);
19855 unsigned long X509_subject_name_hash(X509 *x);
19856 
19857 
19858 unsigned long X509_issuer_name_hash_old(X509 *a);
19859 unsigned long X509_subject_name_hash_old(X509 *x);
19860 
19861 
19862 int X509_cmp(const X509 *a, const X509 *b);
19863 int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
19864 unsigned long X509_NAME_hash(X509_NAME *x);
19865 unsigned long X509_NAME_hash_old(X509_NAME *x);
19866 
19867 int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
19868 int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
19869 
19870 int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,
19871                      unsigned long cflag);
19872 int X509_print_fp(FILE *bp, X509 *x);
19873 int X509_CRL_print_fp(FILE *bp, X509_CRL *x);
19874 int X509_REQ_print_fp(FILE *bp, X509_REQ *req);
19875 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
19876                           unsigned long flags);
19877 
19878 
19879 
19880 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
19881 int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
19882                        unsigned long flags);
19883 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,
19884                   unsigned long cflag);
19885 int X509_print(BIO *bp, X509 *x);
19886 int X509_ocspid_print(BIO *bp, X509 *x);
19887 int X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);
19888 int X509_CRL_print(BIO *bp, X509_CRL *x);
19889 int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
19890                       unsigned long cflag);
19891 int X509_REQ_print(BIO *bp, X509_REQ *req);
19892 
19893 
19894 int X509_NAME_entry_count(X509_NAME *name);
19895 int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
19896 int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
19897                               char *buf, int len);
19898 
19899 /*
19900  * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use
19901  * lastpos, search after that position on.
19902  */
19903 int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
19904 int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
19905                                int lastpos);
19906 X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
19907 X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
19908 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
19909                         int loc, int set);
19910 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
19911                                unsigned char *bytes, int len, int loc,
19912                                int set);
19913 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
19914                                unsigned char *bytes, int len, int loc,
19915                                int set);
19916 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
19917                                                const char *field, int type,
19918                                                const unsigned char *bytes,
19919                                                int len);
19920 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
19921                                                int type, unsigned char *bytes,
19922                                                int len);
19923 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
19924                                const unsigned char *bytes, int len, int loc,
19925                                int set);
19926 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
19927                                                ASN1_OBJECT *obj, int type,
19928                                                const unsigned char *bytes,
19929                                                int len);
19930 int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
19931 int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
19932                              const unsigned char *bytes, int len);
19933 ASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
19934 ASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
19935 
19936 int X509v3_get_ext_count(const struct stack_st_X509_EXTENSION *x);
19937 int X509v3_get_ext_by_NID(const struct stack_st_X509_EXTENSION *x,
19938                           int nid, int lastpos);
19939 int X509v3_get_ext_by_OBJ(const struct stack_st_X509_EXTENSION *x,
19940                           ASN1_OBJECT *obj, int lastpos);
19941 int X509v3_get_ext_by_critical(const struct stack_st_X509_EXTENSION *x,
19942                                int crit, int lastpos);
19943 X509_EXTENSION *X509v3_get_ext(const struct stack_st_X509_EXTENSION *x, int loc);
19944 X509_EXTENSION *X509v3_delete_ext(struct stack_st_X509_EXTENSION *x, int loc);
19945 struct stack_st_X509_EXTENSION *X509v3_add_ext(struct stack_st_X509_EXTENSION **x,
19946                                          X509_EXTENSION *ex, int loc);
19947 
19948 int X509_get_ext_count(X509 *x);
19949 int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
19950 int X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);
19951 int X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
19952 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
19953 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
19954 int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
19955 void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
19956 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
19957                       unsigned long flags);
19958 
19959 int X509_CRL_get_ext_count(X509_CRL *x);
19960 int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
19961 int X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);
19962 int X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
19963 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
19964 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
19965 int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
19966 void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
19967 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
19968                           unsigned long flags);
19969 
19970 int X509_REVOKED_get_ext_count(X509_REVOKED *x);
19971 int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
19972 int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,
19973                                 int lastpos);
19974 int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
19975 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
19976 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
19977 int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
19978 void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
19979 int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
19980                               unsigned long flags);
19981 
19982 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
19983                                              int nid, int crit,
19984                                              ASN1_OCTET_STRING *data);
19985 X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
19986                                              ASN1_OBJECT *obj, int crit,
19987                                              ASN1_OCTET_STRING *data);
19988 int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);
19989 int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
19990 int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
19991 ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
19992 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
19993 int X509_EXTENSION_get_critical(X509_EXTENSION *ex);
19994 
19995 int X509at_get_attr_count(const struct stack_st_X509_ATTRIBUTE *x);
19996 int X509at_get_attr_by_NID(const struct stack_st_X509_ATTRIBUTE *x, int nid,
19997                            int lastpos);
19998 int X509at_get_attr_by_OBJ(const struct stack_st_X509_ATTRIBUTE *sk,
19999                            ASN1_OBJECT *obj, int lastpos);
20000 X509_ATTRIBUTE *X509at_get_attr(const struct stack_st_X509_ATTRIBUTE *x, int loc);
20001 X509_ATTRIBUTE *X509at_delete_attr(struct stack_st_X509_ATTRIBUTE *x, int loc);
20002 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr(struct stack_st_X509_ATTRIBUTE **x,
20003                                            X509_ATTRIBUTE *attr);
20004 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_OBJ(struct stack_st_X509_ATTRIBUTE
20005                                                   **x, const ASN1_OBJECT *obj,
20006                                                   int type,
20007                                                   const unsigned char *bytes,
20008                                                   int len);
20009 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_NID(struct stack_st_X509_ATTRIBUTE
20010                                                   **x, int nid, int type,
20011                                                   const unsigned char *bytes,
20012                                                   int len);
20013 struct stack_st_X509_ATTRIBUTE *X509at_add1_attr_by_txt(struct stack_st_X509_ATTRIBUTE
20014                                                   **x, const char *attrname,
20015                                                   int type,
20016                                                   const unsigned char *bytes,
20017                                                   int len);
20018 void *X509at_get0_data_by_OBJ(struct stack_st_X509_ATTRIBUTE *x, ASN1_OBJECT *obj,
20019                               int lastpos, int type);
20020 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
20021                                              int atrtype, const void *data,
20022                                              int len);
20023 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
20024                                              const ASN1_OBJECT *obj,
20025                                              int atrtype, const void *data,
20026                                              int len);
20027 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
20028                                              const char *atrname, int type,
20029                                              const unsigned char *bytes,
20030                                              int len);
20031 int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);
20032 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
20033                              const void *data, int len);
20034 void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,
20035                                void *data);
20036 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
20037 ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
20038 ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
20039 
20040 int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
20041 int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
20042 int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
20043                              int lastpos);
20044 X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
20045 X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
20046 int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
20047 int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
20048                               const ASN1_OBJECT *obj, int type,
20049                               const unsigned char *bytes, int len);
20050 int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
20051                               int nid, int type,
20052                               const unsigned char *bytes, int len);
20053 int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
20054                               const char *attrname, int type,
20055                               const unsigned char *bytes, int len);
20056 
20057 int X509_verify_cert(X509_STORE_CTX *ctx);
20058 
20059 /* lookup a cert from a X509 STACK */
20060 X509 *X509_find_by_issuer_and_serial(struct stack_st_X509 *sk, X509_NAME *name,
20061                                      ASN1_INTEGER *serial);
20062 X509 *X509_find_by_subject(struct stack_st_X509 *sk, X509_NAME *name);
20063 
20064 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;
20065 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;
20066 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;
20067 
20068 int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
20069                          const unsigned char *salt, int saltlen);
20070 
20071 X509_ALGOR *PKCS5_pbe_set(int alg, int iter,
20072                           const unsigned char *salt, int saltlen);
20073 X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
20074                            unsigned char *salt, int saltlen);
20075 X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
20076                               unsigned char *salt, int saltlen,
20077                               unsigned char *aiv, int prf_nid);
20078 
20079 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
20080                              int prf_nid, int keylen);
20081 
20082 /* PKCS#8 utilities */
20083 
20084 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;
20085 
20086 EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);
20087 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);
20088 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);
20089 PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
20090 
20091 int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,
20092                     int version, int ptype, void *pval,
20093                     unsigned char *penc, int penclen);
20094 int PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,
20095                     const unsigned char **pk, int *ppklen,
20096                     X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);
20097 
20098 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
20099                            int ptype, void *pval,
20100                            unsigned char *penc, int penclen);
20101 int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
20102                            const unsigned char **pk, int *ppklen,
20103                            X509_ALGOR **pa, X509_PUBKEY *pub);
20104 
20105 int X509_check_trust(X509 *x, int id, int flags);
20106 int X509_TRUST_get_count(void);
20107 X509_TRUST *X509_TRUST_get0(int idx);
20108 int X509_TRUST_get_by_id(int id);
20109 int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
20110                    char *name, int arg1, void *arg2);
20111 void X509_TRUST_cleanup(void);
20112 int X509_TRUST_get_flags(X509_TRUST *xp);
20113 char *X509_TRUST_get0_name(X509_TRUST *xp);
20114 int X509_TRUST_get_trust(X509_TRUST *xp);
20115 
20116 /* BEGIN ERROR CODES */
20117 /*
20118  * The following lines are auto generated by the script mkerr.pl. Any changes
20119  * made after this point may be overwritten when the script is next run.
20120  */
20121 
20122 void ERR_load_X509_strings(void);
20123 
20124 /* Error codes for the X509 functions. */
20125 
20126 /* Function codes. */
20127 # 1291 "/usr/include/openssl/x509.h" 3 4
20128 /* Reason codes. */
20129 # 45 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
20130 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 1
20131 /*
20132  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20133  *
20134  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20135  * Use is subject to license terms.
20136  */
20137 
20138 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
20139 /*	  All Rights Reserved  	*/
20140 
20141 /*
20142  * BIND 4.9.3:
20143  *
20144  * Copyright (c) 1980, 1983, 1988, 1993
20145  *	The Regents of the University of California.  All rights reserved.
20146  *
20147  * Redistribution and use in source and binary forms, with or without
20148  * modification, are permitted provided that the following conditions
20149  * are met:
20150  * 1. Redistributions of source code must retain the above copyright
20151  *    notice, this list of conditions and the following disclaimer.
20152  * 2. Redistributions in binary form must reproduce the above copyright
20153  *    notice, this list of conditions and the following disclaimer in the
20154  *    documentation and/or other materials provided with the distribution.
20155  * 3. All advertising materials mentioning features or use of this software
20156  *    must display the following acknowledgement:
20157  *	This product includes software developed by the University of
20158  *	California, Berkeley and its contributors.
20159  * 4. Neither the name of the University nor the names of its contributors
20160  *    may be used to endorse or promote products derived from this software
20161  *    without specific prior written permission.
20162  *
20163  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20164  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20165  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20166  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20167  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20168  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20169  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20170  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20171  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20172  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20173  * SUCH DAMAGE.
20174  * -
20175  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
20176  *
20177  * Permission to use, copy, modify, and distribute this software for any
20178  * purpose with or without fee is hereby granted, provided that the above
20179  * copyright notice and this permission notice appear in all copies, and that
20180  * the name of Digital Equipment Corporation not be used in advertising or
20181  * publicity pertaining to distribution of the document or software without
20182  * specific, written prior permission.
20183  *
20184  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
20185  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
20186  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
20187  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
20188  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
20189  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
20190  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20191  * SOFTWARE.
20192  * --Copyright--
20193  *
20194  * End BIND 4.9.3
20195  */
20196 
20197 /*
20198  * Structures returned by network data base library.
20199  * All addresses are supplied in host order, and
20200  * returned in network order (suitable for use in system calls).
20201  */
20202 
20203 
20204 
20205 
20206 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20207 /*
20208  * CDDL HEADER START
20209  *
20210  * The contents of this file are subject to the terms of the
20211  * Common Development and Distribution License (the "License").
20212  * You may not use this file except in compliance with the License.
20213  *
20214  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20215  * or http://www.opensolaris.org/os/licensing.
20216  * See the License for the specific language governing permissions
20217  * and limitations under the License.
20218  *
20219  * When distributing Covered Code, include this CDDL HEADER in each
20220  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20221  * If applicable, add the following below this CDDL HEADER, with the
20222  * fields enclosed by brackets "[]" replaced with your own identifying
20223  * information: Portions Copyright [yyyy] [name of copyright owner]
20224  *
20225  * CDDL HEADER END
20226  */
20227 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20228 /*	  All Rights Reserved  	*/
20229 
20230 
20231 /*
20232  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20233  * Use is subject to license terms.
20234  *
20235  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20236  * Copyright 2016 Joyent, Inc.
20237  */
20238 # 77 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
20239 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
20240 /*
20241  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20242  * Use is subject to license terms.
20243  *
20244  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
20245  */
20246 /*
20247  * Copyright (c) 1982, 1986 Regents of the University of California.
20248  * All rights reserved.
20249  *
20250  * Redistribution and use in source and binary forms are permitted
20251  * provided that this notice is preserved and that due credit is given
20252  * to the University of California at Berkeley. The name of the University
20253  * may not be used to endorse or promote products derived from this
20254  * software without specific prior written permission. This software
20255  * is provided ``as is'' without express or implied warranty.
20256  */
20257 
20258 /*
20259  * Constants and structures defined by the internet system,
20260  * according to following documents
20261  *
20262  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
20263  *	http://www.iana.org/assignments/protocol-numbers
20264  *	http://www.iana.org/assignments/port-numbers
20265  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
20266  *
20267  */
20268 
20269 
20270 
20271 
20272 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
20273 /*
20274  * CDDL HEADER START
20275  *
20276  * The contents of this file are subject to the terms of the
20277  * Common Development and Distribution License (the "License").
20278  * You may not use this file except in compliance with the License.
20279  *
20280  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20281  * or http://www.opensolaris.org/os/licensing.
20282  * See the License for the specific language governing permissions
20283  * and limitations under the License.
20284  *
20285  * When distributing Covered Code, include this CDDL HEADER in each
20286  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20287  * If applicable, add the following below this CDDL HEADER, with the
20288  * fields enclosed by brackets "[]" replaced with your own identifying
20289  * information: Portions Copyright [yyyy] [name of copyright owner]
20290  *
20291  * CDDL HEADER END
20292  */
20293 
20294 /*
20295  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
20296  * Copyright 2016 Joyent, Inc.
20297  *
20298  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
20299  * Use is subject to license terms.
20300  */
20301 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
20302 
20303 
20304 
20305 
20306 
20307 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20308 /*
20309  * CDDL HEADER START
20310  *
20311  * The contents of this file are subject to the terms of the
20312  * Common Development and Distribution License (the "License").
20313  * You may not use this file except in compliance with the License.
20314  *
20315  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20316  * or http://www.opensolaris.org/os/licensing.
20317  * See the License for the specific language governing permissions
20318  * and limitations under the License.
20319  *
20320  * When distributing Covered Code, include this CDDL HEADER in each
20321  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20322  * If applicable, add the following below this CDDL HEADER, with the
20323  * fields enclosed by brackets "[]" replaced with your own identifying
20324  * information: Portions Copyright [yyyy] [name of copyright owner]
20325  *
20326  * CDDL HEADER END
20327  */
20328 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20329 /*	  All Rights Reserved  	*/
20330 
20331 
20332 /*
20333  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20334  * Use is subject to license terms.
20335  *
20336  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20337  * Copyright 2016 Joyent, Inc.
20338  */
20339 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
20340 
20341 
20342 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
20343 /*
20344  * CDDL HEADER START
20345  *
20346  * The contents of this file are subject to the terms of the
20347  * Common Development and Distribution License (the "License").
20348  * You may not use this file except in compliance with the License.
20349  *
20350  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20351  * or http://www.opensolaris.org/os/licensing.
20352  * See the License for the specific language governing permissions
20353  * and limitations under the License.
20354  *
20355  * When distributing Covered Code, include this CDDL HEADER in each
20356  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20357  * If applicable, add the following below this CDDL HEADER, with the
20358  * fields enclosed by brackets "[]" replaced with your own identifying
20359  * information: Portions Copyright [yyyy] [name of copyright owner]
20360  *
20361  * CDDL HEADER END
20362  */
20363 /*
20364  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20365  * Use is subject to license terms.
20366  */
20367 
20368 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
20369 /*	  All Rights Reserved	*/
20370 
20371 /*
20372  * Portions of this source code were derived from Berkeley 4.3 BSD
20373  * under license from the Regents of the University of California.
20374  */
20375 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h"
20376 typedef uint16_t sa_family_t;
20377 
20378 
20379 /*
20380  * Structure used by kernel to store most
20381  * addresses.
20382  */
20383 struct sockaddr {
20384  sa_family_t sa_family; /* address family */
20385  char sa_data[14]; /* up to 14 bytes of direct address */
20386 };
20387 
20388 
20389 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h" 1
20390 /*
20391  * CDDL HEADER START
20392  *
20393  * The contents of this file are subject to the terms of the
20394  * Common Development and Distribution License (the "License").
20395  * You may not use this file except in compliance with the License.
20396  *
20397  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20398  * or http://www.opensolaris.org/os/licensing.
20399  * See the License for the specific language governing permissions
20400  * and limitations under the License.
20401  *
20402  * When distributing Covered Code, include this CDDL HEADER in each
20403  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20404  * If applicable, add the following below this CDDL HEADER, with the
20405  * fields enclosed by brackets "[]" replaced with your own identifying
20406  * information: Portions Copyright [yyyy] [name of copyright owner]
20407  *
20408  * CDDL HEADER END
20409  */
20410 /*
20411  * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
20412  */
20413 
20414 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
20415 /*	  All Rights Reserved  	*/
20416 
20417 /*
20418  * University Copyright- Copyright (c) 1982, 1986, 1988
20419  * The Regents of the University of California
20420  * All Rights Reserved
20421  *
20422  * University Acknowledgment- Portions of this document are derived from
20423  * software developed by the University of California, Berkeley, and its
20424  * contributors.
20425  */
20426 # 50 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
20427 /*
20428  * Definitions for UNIX IPC domain.
20429  */
20430 struct sockaddr_un {
20431  sa_family_t sun_family; /* AF_UNIX */
20432  char sun_path[108]; /* path name (gag) */
20433 };
20434 
20435 
20436 
20437 /*
20438  * NOTE: If we ever go to BSD-style sun_len + sun_family, this macro needs to
20439  * change.
20440  *
20441  * Also, include a strlen() prototype, and we have to protect it w.r.t.
20442  * UNIX{98,03}.  And because there's strlen, we need size_t as well.
20443  */
20444 # 76 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/un.h"
20445 extern size_t strlen(const char *);
20446 # 57 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
20447 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/net/if_dl.h" 1
20448 /*
20449  * Copyright 1993-2003 Sun Microsystems, Inc.  All rights reserved.
20450  * Use is subject to license terms.
20451  */
20452 /*
20453  * Copyright (c) 1990, 1993
20454  *	The Regents of the University of California.  All rights reserved.
20455  *
20456  * Redistribution and use in source and binary forms, with or without
20457  * modification, are permitted provided that the following conditions
20458  * are met:
20459  * 1. Redistributions of source code must retain the above copyright
20460  *    notice, this list of conditions and the following disclaimer.
20461  * 2. Redistributions in binary form must reproduce the above copyright
20462  *    notice, this list of conditions and the following disclaimer in the
20463  *    documentation and/or other materials provided with the distribution.
20464  * 3. All advertising materials mentioning features or use of this software
20465  *    must display the following acknowledgement:
20466  *	This product includes software developed by the University of
20467  *	California, Berkeley and its contributors.
20468  * 4. Neither the name of the University nor the names of its contributors
20469  *    may be used to endorse or promote products derived from this software
20470  *    without specific prior written permission.
20471  *
20472  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20473  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20474  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20475  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20476  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20477  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20478  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20479  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20480  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
20481  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
20482  * SUCH DAMAGE.
20483  */
20484 
20485 
20486 
20487 
20488 #pragma ident "%Z%%M%	%I%	%E% SMI"
20489 /* from UCB 8.1 (Berkeley) 6/10/93 */
20490 
20491 
20492 
20493 
20494 
20495 /*
20496  * A Link-Level Sockaddr may specify the interface in one of two
20497  * ways: either by means of a system-provided index number (computed
20498  * anew and possibly differently on every reboot), or by a human-readable
20499  * string such as "il0" (for managerial convenience).
20500  *
20501  * Census taking actions, such as something akin to SIOCGCONF would return
20502  * both the index and the human name.
20503  *
20504  * High volume transactions (such as giving a link-level ``from'' address
20505  * in a recvfrom or recvmsg call) may be likely only to provide the indexed
20506  * form, (which requires fewer copy operations and less space).
20507  *
20508  * The form and interpretation  of the link-level address is purely a matter
20509  * of convention between the device driver and its consumers; however, it is
20510  * expected that all drivers for an interface of a given if_type will agree.
20511  */
20512 
20513 /*
20514  * Structure of a Link-Level sockaddr:
20515  */
20516 struct sockaddr_dl {
20517  ushort_t sdl_family; /* AF_LINK */
20518  ushort_t sdl_index; /* if != 0, system given index for interface */
20519  uchar_t sdl_type; /* interface type */
20520  uchar_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
20521  uchar_t sdl_alen; /* link level address length */
20522  uchar_t sdl_slen; /* link layer selector length */
20523  char sdl_data[244]; /* contains both if name and ll address */
20524 };
20525 
20526 
20527 
20528 
20529 extern char *_link_ntoa(const unsigned char *, char *, int, int);
20530 extern unsigned char *_link_aton(const char *, int *);
20531 # 58 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 2
20532 
20533 
20534 
20535 /*
20536  * sockaddr_storage:
20537  * Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
20538  * structures. Has sufficient size and alignment for those sockaddrs.
20539  */
20540 
20541 /*
20542  * Desired maximum size, alignment size and related types.
20543  */
20544 
20545 
20546 /*
20547  * To represent desired sockaddr max alignment for platform, a
20548  * type is chosen which may depend on implementation platform architecture.
20549  * Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
20550  * We desire to force up to (but no more than) 64-bit (8 byte) alignment,
20551  * on platforms where it is possible to do so. (e.g not possible on ia32).
20552  * For all currently supported platforms by our implementation
20553  * in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
20554  * type "double" is suitable for that intent.
20555  *
20556  * Note: Type "double" is chosen over the more obvious integer type int64_t.
20557  *   int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
20558  */
20559 typedef double sockaddr_maxalign_t;
20560 
20561 
20562 
20563 /*
20564  * Definitions used for sockaddr_storage structure paddings design.
20565  */
20566 
20567 
20568 
20569 
20570 struct sockaddr_storage {
20571  sa_family_t ss_family; /* Address family */
20572  /* Following fields are implementation specific */
20573  char _ss_pad1[((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t))];
20574  sockaddr_maxalign_t _ss_align;
20575  char _ss_pad2[(256 - (sizeof (sa_family_t)+ ((sizeof (sockaddr_maxalign_t)) - sizeof (sa_family_t)) + (sizeof (sockaddr_maxalign_t))))];
20576 };
20577 
20578 
20579 /*
20580  * To be compatible with the Linux interfaces used, this structure is
20581  * placed in socket_impl.h so that an include for <sys/socket.h> will
20582  * pickup this structure. This structure is for use with PF_PACKET
20583  * sockets.
20584  */
20585 struct sockaddr_ll {
20586  uint16_t sll_family;
20587  uint16_t sll_protocol;
20588  int32_t sll_ifindex;
20589  uint16_t sll_hatype;
20590  uint8_t sll_pkttype;
20591  uint8_t sll_halen;
20592  uint8_t sll_addr[8];
20593 };
20594 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
20595 
20596 
20597 
20598 
20599 
20600 /*
20601  * The socklen definitions are reproduced here from sys/socket.h so as to
20602  * not introduce that namespace into existing users of netinet/in.h.
20603  */
20604 
20605 
20606 
20607 typedef uint32_t socklen_t;
20608 
20609 
20610 
20611 
20612 
20613 typedef void *Psocklen_t;
20614 
20615 
20616 
20617 
20618 
20619 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 1
20620 /*
20621  * CDDL HEADER START
20622  *
20623  * The contents of this file are subject to the terms of the
20624  * Common Development and Distribution License (the "License").
20625  * You may not use this file except in compliance with the License.
20626  *
20627  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20628  * or http://www.opensolaris.org/os/licensing.
20629  * See the License for the specific language governing permissions
20630  * and limitations under the License.
20631  *
20632  * When distributing Covered Code, include this CDDL HEADER in each
20633  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20634  * If applicable, add the following below this CDDL HEADER, with the
20635  * fields enclosed by brackets "[]" replaced with your own identifying
20636  * information: Portions Copyright [yyyy] [name of copyright owner]
20637  *
20638  * CDDL HEADER END
20639  */
20640 /*
20641  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20642  * Use is subject to license terms.
20643  */
20644 
20645 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20646 /*	  All Rights Reserved  	*/
20647 
20648 
20649 
20650 
20651 
20652 /*
20653  * For source compatibility
20654  */
20655 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
20656 /*
20657  * CDDL HEADER START
20658  *
20659  * The contents of this file are subject to the terms of the
20660  * Common Development and Distribution License (the "License").
20661  * You may not use this file except in compliance with the License.
20662  *
20663  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20664  * or http://www.opensolaris.org/os/licensing.
20665  * See the License for the specific language governing permissions
20666  * and limitations under the License.
20667  *
20668  *
20669  * When distributing Covered Code, include this CDDL HEADER in each
20670  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20671  * If applicable, add the following below this CDDL HEADER, with the
20672  * fields enclosed by brackets "[]" replaced with your own identifying
20673  * information: Portions Copyright [yyyy] [name of copyright owner]
20674  *
20675  * CDDL HEADER END
20676  */
20677 
20678 /*
20679  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
20680  * Use is subject to license terms.
20681  * Copyright 2016 Joyent, Inc.
20682  */
20683 # 37 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
20684 
20685 
20686 
20687 
20688 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h" 1
20689 /*
20690  * CDDL HEADER START
20691  *
20692  * The contents of this file are subject to the terms of the
20693  * Common Development and Distribution License, Version 1.0 only
20694  * (the "License").  You may not use this file except in compliance
20695  * with the License.
20696  *
20697  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20698  * or http://www.opensolaris.org/os/licensing.
20699  * See the License for the specific language governing permissions
20700  * and limitations under the License.
20701  *
20702  * When distributing Covered Code, include this CDDL HEADER in each
20703  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20704  * If applicable, add the following below this CDDL HEADER, with the
20705  * fields enclosed by brackets "[]" replaced with your own identifying
20706  * information: Portions Copyright [yyyy] [name of copyright owner]
20707  *
20708  * CDDL HEADER END
20709  */
20710 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20711 /*	  All Rights Reserved  	*/
20712 
20713 
20714 /*
20715  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
20716  *
20717  * Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
20718  * All rights reserved.
20719  */
20720 
20721 /*
20722  * Copyright 2015, Joyent, Inc.
20723  */
20724 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
20725 /*
20726  * Structure of file descriptor/event pairs supplied in
20727  * the poll arrays.
20728  */
20729 typedef struct pollfd {
20730  int fd; /* file desc to poll */
20731  short events; /* events of interest on fd */
20732  short revents; /* events that occurred on fd */
20733 } pollfd_t;
20734 
20735 typedef unsigned long nfds_t;
20736 
20737 /*
20738  * Testable select events
20739  */
20740 # 70 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
20741 /*
20742  * Non-testable poll events (may not be specified in events field,
20743  * but may be returned in revents field).
20744  */
20745 
20746 
20747 
20748 
20749 /*
20750  * These events will never be specified in revents, but may be specified in
20751  * events to control /dev/poll behavior.
20752  */
20753 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/poll.h"
20754 int poll(struct pollfd *, nfds_t, int);
20755 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
20756 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/strmdep.h" 1
20757 /*
20758  * CDDL HEADER START
20759  *
20760  * The contents of this file are subject to the terms of the
20761  * Common Development and Distribution License, Version 1.0 only
20762  * (the "License").  You may not use this file except in compliance
20763  * with the License.
20764  *
20765  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20766  * or http://www.opensolaris.org/os/licensing.
20767  * See the License for the specific language governing permissions
20768  * and limitations under the License.
20769  *
20770  * When distributing Covered Code, include this CDDL HEADER in each
20771  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20772  * If applicable, add the following below this CDDL HEADER, with the
20773  * fields enclosed by brackets "[]" replaced with your own identifying
20774  * information: Portions Copyright [yyyy] [name of copyright owner]
20775  *
20776  * CDDL HEADER END
20777  */
20778 /*
20779  * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
20780  * All rights reserved.
20781  */
20782 
20783 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20784 /*	  All Rights Reserved  	*/
20785 
20786 
20787 
20788 
20789 
20790 #pragma ident "%Z%%M%	%I%	%E% SMI"
20791 
20792 
20793 
20794 
20795 
20796 /*
20797  * This file contains all machine-dependent declarations
20798  * in STREAMS.
20799  */
20800 
20801 /*
20802  * Copy data from one data buffer to another.
20803  * The addresses must be word aligned - if not, use bcopy!
20804  */
20805 
20806 
20807 /*
20808  * save the address of the calling function on the 3b2 to
20809  * enable tracking of who is allocating message blocks
20810  */
20811 
20812 
20813 /*
20814  * macro to check pointer alignment
20815  * (true if alignment is sufficient for worst case)
20816  */
20817 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
20818 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 1
20819 /*
20820  * CDDL HEADER START
20821  *
20822  * The contents of this file are subject to the terms of the
20823  * Common Development and Distribution License (the "License").
20824  * You may not use this file except in compliance with the License.
20825  *
20826  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20827  * or http://www.opensolaris.org/os/licensing.
20828  * See the License for the specific language governing permissions
20829  * and limitations under the License.
20830  *
20831  * When distributing Covered Code, include this CDDL HEADER in each
20832  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20833  * If applicable, add the following below this CDDL HEADER, with the
20834  * fields enclosed by brackets "[]" replaced with your own identifying
20835  * information: Portions Copyright [yyyy] [name of copyright owner]
20836  *
20837  * CDDL HEADER END
20838  */
20839 /*
20840  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20841  * Use is subject to license terms.
20842  */
20843 
20844 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
20845 /*	  All Rights Reserved  	*/
20846 
20847 /*
20848  * Portions of this source code were derived from Berkeley 4.3 BSD
20849  * under license from the Regents of the University of California.
20850  */
20851 
20852 
20853 
20854 
20855 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20856 /*
20857  * CDDL HEADER START
20858  *
20859  * The contents of this file are subject to the terms of the
20860  * Common Development and Distribution License (the "License").
20861  * You may not use this file except in compliance with the License.
20862  *
20863  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20864  * or http://www.opensolaris.org/os/licensing.
20865  * See the License for the specific language governing permissions
20866  * and limitations under the License.
20867  *
20868  * When distributing Covered Code, include this CDDL HEADER in each
20869  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20870  * If applicable, add the following below this CDDL HEADER, with the
20871  * fields enclosed by brackets "[]" replaced with your own identifying
20872  * information: Portions Copyright [yyyy] [name of copyright owner]
20873  *
20874  * CDDL HEADER END
20875  */
20876 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20877 /*	  All Rights Reserved  	*/
20878 
20879 
20880 /*
20881  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20882  * Use is subject to license terms.
20883  *
20884  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
20885  * Copyright 2016 Joyent, Inc.
20886  */
20887 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/cred.h" 2
20888 
20889 
20890 
20891 
20892 
20893 /*
20894  * The credential is an opaque kernel private data structure defined in
20895  * <sys/cred_impl.h>.
20896  */
20897 
20898 typedef struct cred cred_t;
20899 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
20900 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 1
20901 /*
20902  * CDDL HEADER START
20903  *
20904  * The contents of this file are subject to the terms of the
20905  * Common Development and Distribution License, Version 1.0 only
20906  * (the "License").  You may not use this file except in compliance
20907  * with the License.
20908  *
20909  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20910  * or http://www.opensolaris.org/os/licensing.
20911  * See the License for the specific language governing permissions
20912  * and limitations under the License.
20913  *
20914  * When distributing Covered Code, include this CDDL HEADER in each
20915  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20916  * If applicable, add the following below this CDDL HEADER, with the
20917  * fields enclosed by brackets "[]" replaced with your own identifying
20918  * information: Portions Copyright [yyyy] [name of copyright owner]
20919  *
20920  * CDDL HEADER END
20921  */
20922 /*
20923  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
20924  * All rights reserved.
20925  */
20926 
20927 /*
20928  * t_lock.h:	Prototypes for disp_locks, plus include files
20929  *		that describe the interfaces to kernel synch.
20930  *		objects.
20931  */
20932 
20933 
20934 
20935 
20936 #pragma ident "%Z%%M%	%I%	%E% SMI"
20937 
20938 
20939 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 1
20940 /*
20941  * CDDL HEADER START
20942  *
20943  * The contents of this file are subject to the terms of the
20944  * Common Development and Distribution License (the "License").
20945  * You may not use this file except in compliance with the License.
20946  *
20947  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20948  * or http://www.opensolaris.org/os/licensing.
20949  * See the License for the specific language governing permissions
20950  * and limitations under the License.
20951  *
20952  * When distributing Covered Code, include this CDDL HEADER in each
20953  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20954  * If applicable, add the following below this CDDL HEADER, with the
20955  * fields enclosed by brackets "[]" replaced with your own identifying
20956  * information: Portions Copyright [yyyy] [name of copyright owner]
20957  *
20958  * CDDL HEADER END
20959  */
20960 /*
20961  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
20962  * Use is subject to license terms.
20963  * Copyright 2016 Joyent, Inc.
20964  */
20965 
20966 
20967 
20968 
20969 #pragma ident "%Z%%M%	%I%	%E% SMI"
20970 
20971 
20972 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
20973 /*
20974  * CDDL HEADER START
20975  *
20976  * The contents of this file are subject to the terms of the
20977  * Common Development and Distribution License (the "License").
20978  * You may not use this file except in compliance with the License.
20979  *
20980  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20981  * or http://www.opensolaris.org/os/licensing.
20982  * See the License for the specific language governing permissions
20983  * and limitations under the License.
20984  *
20985  * When distributing Covered Code, include this CDDL HEADER in each
20986  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20987  * If applicable, add the following below this CDDL HEADER, with the
20988  * fields enclosed by brackets "[]" replaced with your own identifying
20989  * information: Portions Copyright [yyyy] [name of copyright owner]
20990  *
20991  * CDDL HEADER END
20992  */
20993 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
20994 /*	  All Rights Reserved  	*/
20995 
20996 
20997 /*
20998  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
20999  * Use is subject to license terms.
21000  *
21001  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21002  * Copyright 2016 Joyent, Inc.
21003  */
21004 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
21005 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
21006 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21007 /*	  All Rights Reserved  	*/
21008 
21009 
21010 /*
21011  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
21012  * All rights reserved.  The Berkeley software License Agreement
21013  * specifies the terms and conditions for redistribution.
21014  */
21015 
21016 /*
21017  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21018  *
21019  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21020  * Use is subject to license terms.
21021  *
21022  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21023  */
21024 
21025 /*
21026  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
21027  */
21028 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h" 2
21029 # 61 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
21030 typedef lock_t disp_lock_t; /* dispatcher lock type */
21031 
21032 /*
21033  * SPIN_LOCK() macro indicates whether lock is implemented as a spin lock or
21034  * an adaptive mutex, depending on what interrupt levels use it.
21035  */
21036 
21037 
21038 /*
21039  * Macro to control loops which spin on a lock and then check state
21040  * periodically.  Its passed an integer, and returns a boolean value
21041  * that if true indicates its a good time to get the scheduler lock and
21042  * check the state of the current owner of the lock.
21043  */
21044 
21045 
21046 /*
21047  * Externs for CLOCK_LOCK and clock resolution
21048  */
21049 extern volatile uint32_t hres_lock;
21050 extern hrtime_t hrtime_base;
21051 extern int clock_res;
21052 
21053 
21054 
21055 /*
21056  * The definitions of the symbolic interrupt levels:
21057  *
21058  *   CLOCK_LEVEL =>  The level at which one must be to block the clock.
21059  *
21060  *   LOCK_LEVEL  =>  The highest level at which one may block (and thus the
21061  *                   highest level at which one may acquire adaptive locks)
21062  *                   Also the highest level at which one may be preempted.
21063  *
21064  *   DISP_LEVEL  =>  The level at which one must be to perform dispatcher
21065  *                   operations.
21066  *
21067  * The constraints on the platform:
21068  *
21069  *  - CLOCK_LEVEL must be less than or equal to LOCK_LEVEL
21070  *  - LOCK_LEVEL must be less than DISP_LEVEL
21071  *  - DISP_LEVEL should be as close to LOCK_LEVEL as possible
21072  *
21073  * Note that LOCK_LEVEL and CLOCK_LEVEL have historically always been equal;
21074  * changing this relationship is probably possible but not advised.
21075  *
21076  */
21077 # 117 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/machlock.h"
21078 /*
21079  * The following mask is for the cpu_intr_actv bits corresponding to
21080  * high-level PILs. It should equal:
21081  * ((((1 << PIL_MAX + 1) - 1) >> LOCK_LEVEL + 1) << LOCK_LEVEL + 1)
21082  */
21083 
21084 
21085 /*
21086  * The semaphore code depends on being able to represent a lock plus
21087  * owner in a single 32-bit word.  (Mutexes used to have a similar
21088  * dependency, but no longer.)  Thus the owner must contain at most
21089  * 24 significant bits.  At present only threads and semaphores
21090  * must be aware of this vile constraint.  Different ISAs may handle this
21091  * differently depending on their capabilities (e.g. compare-and-swap)
21092  * and limitations (e.g. constraints on alignment and/or KERNELBASE).
21093  */
21094 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
21095 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
21096 /*
21097  * CDDL HEADER START
21098  *
21099  * The contents of this file are subject to the terms of the
21100  * Common Development and Distribution License (the "License").
21101  * You may not use this file except in compliance with the License.
21102  *
21103  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21104  * or http://www.opensolaris.org/os/licensing.
21105  * See the License for the specific language governing permissions
21106  * and limitations under the License.
21107  *
21108  * When distributing Covered Code, include this CDDL HEADER in each
21109  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21110  * If applicable, add the following below this CDDL HEADER, with the
21111  * fields enclosed by brackets "[]" replaced with your own identifying
21112  * information: Portions Copyright [yyyy] [name of copyright owner]
21113  *
21114  * CDDL HEADER END
21115  */
21116 
21117 /*
21118  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
21119  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
21120  */
21121 
21122 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
21123 /*	  All Rights Reserved  	*/
21124 
21125 /*
21126  * University Copyright- Copyright (c) 1982, 1986, 1988
21127  * The Regents of the University of California
21128  * All Rights Reserved
21129  *
21130  * University Acknowledgment- Portions of this document are derived from
21131  * software developed by the University of California, Berkeley, and its
21132  * contributors.
21133  */
21134 
21135 
21136 
21137 
21138 
21139 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21140 /*
21141  * CDDL HEADER START
21142  *
21143  * The contents of this file are subject to the terms of the
21144  * Common Development and Distribution License (the "License").
21145  * You may not use this file except in compliance with the License.
21146  *
21147  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21148  * or http://www.opensolaris.org/os/licensing.
21149  * See the License for the specific language governing permissions
21150  * and limitations under the License.
21151  *
21152  * When distributing Covered Code, include this CDDL HEADER in each
21153  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21154  * If applicable, add the following below this CDDL HEADER, with the
21155  * fields enclosed by brackets "[]" replaced with your own identifying
21156  * information: Portions Copyright [yyyy] [name of copyright owner]
21157  *
21158  * CDDL HEADER END
21159  */
21160 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21161 /*	  All Rights Reserved  	*/
21162 
21163 
21164 /*
21165  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21166  * Use is subject to license terms.
21167  *
21168  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21169  * Copyright 2016 Joyent, Inc.
21170  */
21171 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
21172 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
21173 /*
21174  * CDDL HEADER START
21175  *
21176  * The contents of this file are subject to the terms of the
21177  * Common Development and Distribution License (the "License").
21178  * You may not use this file except in compliance with the License.
21179  *
21180  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21181  * or http://www.opensolaris.org/os/licensing.
21182  * See the License for the specific language governing permissions
21183  * and limitations under the License.
21184  *
21185  *
21186  * When distributing Covered Code, include this CDDL HEADER in each
21187  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21188  * If applicable, add the following below this CDDL HEADER, with the
21189  * fields enclosed by brackets "[]" replaced with your own identifying
21190  * information: Portions Copyright [yyyy] [name of copyright owner]
21191  *
21192  * CDDL HEADER END
21193  */
21194 
21195 /*
21196  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
21197  * Use is subject to license terms.
21198  * Copyright 2016 Joyent, Inc.
21199  */
21200 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
21201 
21202 
21203 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/null.h" 1
21204 /*
21205  * This file and its contents are supplied under the terms of the
21206  * Common Development and Distribution License ("CDDL"), version 1.0.
21207  * You may only use this file in accordance with the terms of version
21208  * 1.0 of the CDDL.
21209  *
21210  * A full copy of the text of the CDDL should have accompanied this
21211  * source.  A copy of the CDDL is also available via the Internet at
21212  * http://www.illumos.org/license/CDDL.
21213  */
21214 
21215 /*
21216  * Copyright 2014-2016 PALO, Richard.
21217  */
21218 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
21219 
21220 
21221 
21222 
21223 
21224 /*
21225  * Fundamental variables; don't change too often.
21226  */
21227 
21228 /*
21229  * _POSIX_VDISABLE has historically been defined in <sys/param.h> since
21230  * an early merge with AT&T source.  It has also historically been defined
21231  * in <sys/termios.h>. The POSIX standard, IEEE Std. 1003.1-1988 initially
21232  * required the existence of _POSIX_VDISABLE in <sys/termios.h>.
21233  * Subsequent versions of the IEEE Standard as well as the X/Open
21234  * specifications required that _POSIX_VDISABLE be defined in <unistd.h>
21235  * while still allowing for it's existence in other headers.  With the
21236  * introduction of XPG6, _POSIX_VDISABLE can only be defined in <unistd.h>.
21237  */
21238 # 123 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21239     /* compatibility purposes only	*/
21240     /* and will be removed in a	*/
21241     /* later release		*/
21242 
21243 /*
21244  * These define the maximum and minimum allowable values of the
21245  * configurable parameter NGROUPS_MAX.
21246  */
21247 
21248 
21249 
21250 
21251 /*
21252  * NGROUPS_MAX_DEFAULT: *MUST* match NGROUPS_MAX value in limits.h.
21253  */
21254 
21255 
21256 /*
21257  * Default process priority.  Keep it in sync with limits.h.
21258  */
21259 
21260 
21261 /*
21262  * Fundamental constants of the implementation--cannot be changed easily.
21263  */
21264 # 171 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21265 /* REMOTE -- whether machine is primary, secondary, or regular */
21266 
21267 
21268 
21269 /*
21270  * MAXPATHLEN defines the longest permissible path length,
21271  * including the terminating null, after expanding symbolic links.
21272  * TYPICALMAXPATHLEN is used in a few places as an optimization
21273  * with a local buffer on the stack to avoid kmem_alloc().
21274  * MAXSYMLINKS defines the maximum number of symbolic links
21275  * that may be expanded in a path name. It should be set high
21276  * enough to allow all legitimate uses, but halt infinite loops
21277  * reasonably quickly.
21278  * MAXNAMELEN is the length (including the terminating null) of
21279  * the longest permissible file (component) name.
21280  */
21281 
21282 
21283 
21284 
21285 
21286 /*
21287  * MAXLINKNAMELEN defines the longest possible permitted datalink name,
21288  * including the terminating NUL.  Note that this must not be larger
21289  * than related networking constants such as LIFNAMSIZ.
21290  */
21291 
21292 
21293 
21294 
21295 
21296 
21297 /*
21298  * The following are defined to be the same as
21299  * defined in /usr/include/limits.h.  They are
21300  * needed for pipe and FIFO compatibility.
21301  */
21302 # 220 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21303 /* macros replacing interleaving functions */
21304 
21305 
21306 
21307 /*
21308  * File system parameters and macros.
21309  *
21310  * The file system is made out of blocks of at most MAXBSIZE units,
21311  * with smaller units (fragments) only in the last direct block.
21312  * MAXBSIZE primarily determines the size of buffers in the buffer
21313  * pool. It may be made larger without any effect on existing
21314  * file systems; however making it smaller make make some file
21315  * systems unmountable.
21316  *
21317  * Note that the blocked devices are assumed to have DEV_BSIZE
21318  * "sectors" and that fragments must be some multiple of this size.
21319  */
21320 # 261 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21321 /*	64 bit versions of btodb and dbtob */
21322 # 276 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21323 /*
21324  * Size of arg list passed in by user.
21325  */
21326 # 287 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21327 /*
21328  * Scale factor for scaled integers used to count
21329  * %cpu time and load averages.
21330  */
21331 
21332 
21333 
21334 /*
21335  * Delay units are in microseconds.
21336  *
21337  * XXX	These macros are not part of the DDI!
21338  */
21339 # 317 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21340 /*
21341  * The following is to free utilities from machine dependencies within
21342  * an architecture. Must be included after definition of DEV_BSIZE.
21343  */
21344 # 471 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h"
21345 /*
21346  * The following are assorted machine dependent values which can be
21347  * obtained in a machine independent manner through sysconf(2) or
21348  * sysinfo(2). In order to guarantee that these provide the expected
21349  * value at all times, the System Private interface (leading underscore)
21350  * is used.
21351  */
21352 
21353 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 1
21354 /*
21355  * CDDL HEADER START
21356  *
21357  * The contents of this file are subject to the terms of the
21358  * Common Development and Distribution License (the "License").
21359  * You may not use this file except in compliance with the License.
21360  *
21361  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21362  * or http://www.opensolaris.org/os/licensing.
21363  * See the License for the specific language governing permissions
21364  * and limitations under the License.
21365  *
21366  * When distributing Covered Code, include this CDDL HEADER in each
21367  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21368  * If applicable, add the following below this CDDL HEADER, with the
21369  * fields enclosed by brackets "[]" replaced with your own identifying
21370  * information: Portions Copyright [yyyy] [name of copyright owner]
21371  *
21372  * CDDL HEADER END
21373  */
21374 
21375 /*
21376  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
21377  *	  All Rights Reserved
21378  *
21379  */
21380 
21381 /*
21382  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21383  * Use is subject to license terms.
21384  */
21385 
21386 /*
21387  * WARNING: This is an implementation-specific header,
21388  * its contents are not guaranteed. Applications
21389  * should include <unistd.h> and not this header.
21390  */
21391 
21392 
21393 
21394 
21395 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
21396 /*
21397  * CDDL HEADER START
21398  *
21399  * The contents of this file are subject to the terms of the
21400  * Common Development and Distribution License (the "License").
21401  * You may not use this file except in compliance with the License.
21402  *
21403  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21404  * or http://www.opensolaris.org/os/licensing.
21405  * See the License for the specific language governing permissions
21406  * and limitations under the License.
21407  *
21408  * When distributing Covered Code, include this CDDL HEADER in each
21409  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21410  * If applicable, add the following below this CDDL HEADER, with the
21411  * fields enclosed by brackets "[]" replaced with your own identifying
21412  * information: Portions Copyright [yyyy] [name of copyright owner]
21413  *
21414  * CDDL HEADER END
21415  */
21416 
21417 /*
21418  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
21419  * Copyright 2016 Joyent, Inc.
21420  *
21421  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
21422  * Use is subject to license terms.
21423  */
21424 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h" 2
21425 
21426 
21427 
21428 
21429 
21430 /* command names for confstr */
21431 
21432 
21433 
21434 /*
21435  * command names for large file configuration information
21436  */
21437 /* large file compilation environment configuration */
21438 
21439 
21440 
21441 
21442 /* transitional large file interface configuration */
21443 
21444 
21445 
21446 
21447 
21448 /* UNIX 98 */
21449 # 84 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21450 /* UNIX 03 */
21451 # 103 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21452 /* command names for POSIX sysconf */
21453 
21454 /* POSIX.1 names */
21455 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21456 /* SVR4 names */
21457 
21458 
21459 
21460 
21461 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
21462 
21463 
21464 
21465 
21466 /* POSIX.4 names */
21467 # 152 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21468 /* XPG4 names */
21469 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21470 /* additional XSH4/XCU4 command names for sysconf */
21471 
21472 
21473 
21474 /* additional XPG4v2 (UNIX 95) command names */
21475 
21476 
21477 
21478 
21479 
21480 /* defined for XTI (XNS Issue 5) */
21481 
21482 
21483 
21484 
21485 
21486 
21487 
21488 /*
21489  * Hardware specific items
21490  * Note that not all items are supported on all architectures
21491  */
21492 # 214 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21493 /*
21494  * POSIX.1c (pthreads) names. These values are defined above
21495  * the sub-500 range. See psarc case 1995/257.
21496  */
21497 # 235 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21498 /* UNIX 98 */
21499 # 244 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21500 /* UNIX 03 */
21501 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21502 /* command names for POSIX pathconf */
21503 
21504 /* POSIX.1 names */
21505 # 297 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21506 /* POSIX.4 names */
21507 
21508 
21509 
21510 /* UNIX 03 names */
21511 # 315 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21512 /* UNIX 08 names */
21513 
21514 
21515 /*
21516  * Large File Summit names
21517  *
21518  * This value matches the MIPS ABI choice, but leaves a large gap in the
21519  * value space.
21520  */
21521 
21522 
21523 /*
21524  * Extended attributes
21525  */
21526 
21527 
21528 
21529 /*
21530  * If you add a _PC define above 101, you must change _PC_LAST (and truss).
21531  */
21532 
21533 
21534 /*
21535  * Case sensitivity values (related to _PC_CASE_BEHAVIOR)
21536  */
21537 
21538 
21539 
21540 /*
21541  * The value of 0 is returned when
21542  * ACL's are not supported
21543  */
21544 # 366 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21545 /*
21546  * Marked LEGACY in SUSv2 and removed in SUSv3. Though SUSv3 applications
21547  * should not rely on this value, it has been aligned with the current
21548  * standard to avoid confusion if used.
21549  */
21550 # 408 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/unistd.h"
21551 /* UNIX 03 names */
21552 # 480 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 2
21553 
21554 
21555 
21556 
21557 
21558 
21559 extern long _sysconf(int); /* System Private interface to sysconf() */
21560 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
21561 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 1
21562 /*
21563  * CDDL HEADER START
21564  *
21565  * The contents of this file are subject to the terms of the
21566  * Common Development and Distribution License (the "License").
21567  * You may not use this file except in compliance with the License.
21568  *
21569  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21570  * or http://www.opensolaris.org/os/licensing.
21571  * See the License for the specific language governing permissions
21572  * and limitations under the License.
21573  *
21574  * When distributing Covered Code, include this CDDL HEADER in each
21575  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21576  * If applicable, add the following below this CDDL HEADER, with the
21577  * fields enclosed by brackets "[]" replaced with your own identifying
21578  * information: Portions Copyright [yyyy] [name of copyright owner]
21579  *
21580  * CDDL HEADER END
21581  */
21582 /*
21583  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
21584  */
21585 
21586 
21587 
21588 
21589 
21590 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21591 /*
21592  * CDDL HEADER START
21593  *
21594  * The contents of this file are subject to the terms of the
21595  * Common Development and Distribution License (the "License").
21596  * You may not use this file except in compliance with the License.
21597  *
21598  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21599  * or http://www.opensolaris.org/os/licensing.
21600  * See the License for the specific language governing permissions
21601  * and limitations under the License.
21602  *
21603  * When distributing Covered Code, include this CDDL HEADER in each
21604  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21605  * If applicable, add the following below this CDDL HEADER, with the
21606  * fields enclosed by brackets "[]" replaced with your own identifying
21607  * information: Portions Copyright [yyyy] [name of copyright owner]
21608  *
21609  * CDDL HEADER END
21610  */
21611 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21612 /*	  All Rights Reserved  	*/
21613 
21614 
21615 /*
21616  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21617  * Use is subject to license terms.
21618  *
21619  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21620  * Copyright 2016 Joyent, Inc.
21621  */
21622 # 30 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h" 2
21623 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/mutex.h"
21624 /*
21625  * Public interface to mutual exclusion locks.  See mutex(9F) for details.
21626  *
21627  * The basic mutex type is MUTEX_ADAPTIVE, which is expected to be used
21628  * in almost all of the kernel.  MUTEX_SPIN provides interrupt blocking
21629  * and must be used in interrupt handlers above LOCK_LEVEL.  The iblock
21630  * cookie argument to mutex_init() encodes the interrupt level to block.
21631  * The iblock cookie must be NULL for adaptive locks.
21632  *
21633  * MUTEX_DEFAULT is the type usually specified (except in drivers) to
21634  * mutex_init().  It is identical to MUTEX_ADAPTIVE.
21635  *
21636  * MUTEX_DRIVER is always used by drivers.  mutex_init() converts this to
21637  * either MUTEX_ADAPTIVE or MUTEX_SPIN depending on the iblock cookie.
21638  *
21639  * Mutex statistics can be gathered on the fly, without rebooting or
21640  * recompiling the kernel, via the lockstat driver (lockstat(7D)).
21641  */
21642 typedef enum {
21643  MUTEX_ADAPTIVE = 0, /* spin if owner is running, otherwise block */
21644  MUTEX_SPIN = 1, /* block interrupts and spin */
21645  MUTEX_DRIVER = 4, /* driver (DDI) mutex */
21646  MUTEX_DEFAULT = 6 /* kernel default mutex */
21647 } kmutex_type_t;
21648 
21649 typedef struct mutex {
21650 
21651 
21652 
21653  void *_opaque[2];
21654 
21655 } kmutex_t;
21656 # 42 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
21657 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 1
21658 /*
21659  * CDDL HEADER START
21660  *
21661  * The contents of this file are subject to the terms of the
21662  * Common Development and Distribution License (the "License").
21663  * You may not use this file except in compliance with the License.
21664  *
21665  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21666  * or http://www.opensolaris.org/os/licensing.
21667  * See the License for the specific language governing permissions
21668  * and limitations under the License.
21669  *
21670  * When distributing Covered Code, include this CDDL HEADER in each
21671  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21672  * If applicable, add the following below this CDDL HEADER, with the
21673  * fields enclosed by brackets "[]" replaced with your own identifying
21674  * information: Portions Copyright [yyyy] [name of copyright owner]
21675  *
21676  * CDDL HEADER END
21677  */
21678 /*
21679  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
21680  * Use is subject to license terms.
21681  */
21682 
21683 /*
21684  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
21685  */
21686 
21687 
21688 
21689 
21690 /*
21691  * Public interface to readers/writer locks.  See rwlock(9F) for details.
21692  */
21693 
21694 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21695 /*
21696  * CDDL HEADER START
21697  *
21698  * The contents of this file are subject to the terms of the
21699  * Common Development and Distribution License (the "License").
21700  * You may not use this file except in compliance with the License.
21701  *
21702  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21703  * or http://www.opensolaris.org/os/licensing.
21704  * See the License for the specific language governing permissions
21705  * and limitations under the License.
21706  *
21707  * When distributing Covered Code, include this CDDL HEADER in each
21708  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21709  * If applicable, add the following below this CDDL HEADER, with the
21710  * fields enclosed by brackets "[]" replaced with your own identifying
21711  * information: Portions Copyright [yyyy] [name of copyright owner]
21712  *
21713  * CDDL HEADER END
21714  */
21715 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21716 /*	  All Rights Reserved  	*/
21717 
21718 
21719 /*
21720  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21721  * Use is subject to license terms.
21722  *
21723  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21724  * Copyright 2016 Joyent, Inc.
21725  */
21726 # 38 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/rwlock.h" 2
21727 
21728 
21729 
21730 
21731 
21732 
21733 
21734 typedef enum {
21735  RW_DRIVER = 2, /* driver (DDI) rwlock */
21736  RW_DEFAULT = 4 /* kernel default rwlock */
21737 } krw_type_t;
21738 
21739 typedef enum {
21740  RW_WRITER,
21741  RW_READER,
21742  RW_READER_STARVEWRITER
21743 } krw_t;
21744 
21745 typedef struct _krwlock {
21746  void *_opaque[1];
21747 } krwlock_t;
21748 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
21749 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h" 1
21750 /*
21751  * CDDL HEADER START
21752  *
21753  * The contents of this file are subject to the terms of the
21754  * Common Development and Distribution License, Version 1.0 only
21755  * (the "License").  You may not use this file except in compliance
21756  * with the License.
21757  *
21758  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21759  * or http://www.opensolaris.org/os/licensing.
21760  * See the License for the specific language governing permissions
21761  * and limitations under the License.
21762  *
21763  * When distributing Covered Code, include this CDDL HEADER in each
21764  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21765  * If applicable, add the following below this CDDL HEADER, with the
21766  * fields enclosed by brackets "[]" replaced with your own identifying
21767  * information: Portions Copyright [yyyy] [name of copyright owner]
21768  *
21769  * CDDL HEADER END
21770  */
21771 /*
21772  * Copyright (c) 1993-1998 by Sun Microsystems, Inc.
21773  * All rights reserved.
21774  */
21775 
21776 
21777 
21778 
21779 #pragma ident "%Z%%M%	%I%	%E% SMI"
21780 
21781 /*
21782  * Public interface to semaphores.  See semaphore(9F) for details.
21783  */
21784 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/semaphore.h"
21785 typedef enum {
21786  SEMA_DEFAULT,
21787  SEMA_DRIVER
21788 } ksema_type_t;
21789 
21790 typedef struct _ksema {
21791  void * _opaque[2]; /* 2 words on 4 byte alignment */
21792 } ksema_t;
21793 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
21794 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 1
21795 /*
21796  * CDDL HEADER START
21797  *
21798  * The contents of this file are subject to the terms of the
21799  * Common Development and Distribution License (the "License").
21800  * You may not use this file except in compliance with the License.
21801  *
21802  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21803  * or http://www.opensolaris.org/os/licensing.
21804  * See the License for the specific language governing permissions
21805  * and limitations under the License.
21806  *
21807  * When distributing Covered Code, include this CDDL HEADER in each
21808  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21809  * If applicable, add the following below this CDDL HEADER, with the
21810  * fields enclosed by brackets "[]" replaced with your own identifying
21811  * information: Portions Copyright [yyyy] [name of copyright owner]
21812  *
21813  * CDDL HEADER END
21814  */
21815 /*
21816  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21817  * Use is subject to license terms.
21818  */
21819 
21820 /*
21821  * Copyright (c) 2012 by Delphix. All rights reserved.
21822  */
21823 
21824 /*
21825  * condvar.h:
21826  *
21827  * definitions for thread synchronization primitives: condition variables
21828  * This is the public part of the interface to condition variables. The
21829  * private (implementation-specific) part is in <arch>/sys/condvar_impl.h.
21830  */
21831 
21832 
21833 
21834 
21835 
21836 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
21837 /*
21838  * CDDL HEADER START
21839  *
21840  * The contents of this file are subject to the terms of the
21841  * Common Development and Distribution License (the "License").
21842  * You may not use this file except in compliance with the License.
21843  *
21844  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21845  * or http://www.opensolaris.org/os/licensing.
21846  * See the License for the specific language governing permissions
21847  * and limitations under the License.
21848  *
21849  * When distributing Covered Code, include this CDDL HEADER in each
21850  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21851  * If applicable, add the following below this CDDL HEADER, with the
21852  * fields enclosed by brackets "[]" replaced with your own identifying
21853  * information: Portions Copyright [yyyy] [name of copyright owner]
21854  *
21855  * CDDL HEADER END
21856  */
21857 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21858 /*	  All Rights Reserved  	*/
21859 
21860 
21861 /*
21862  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21863  * Use is subject to license terms.
21864  *
21865  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21866  * Copyright 2016 Joyent, Inc.
21867  */
21868 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
21869 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/time.h" 1
21870 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
21871 /*	  All Rights Reserved  	*/
21872 
21873 
21874 /*
21875  * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
21876  * All rights reserved.  The Berkeley software License Agreement
21877  * specifies the terms and conditions for redistribution.
21878  */
21879 
21880 /*
21881  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
21882  *
21883  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
21884  * Use is subject to license terms.
21885  *
21886  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
21887  */
21888 
21889 /*
21890  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
21891  */
21892 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h" 2
21893 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/condvar.h"
21894 /*
21895  * Condtion variables.
21896  */
21897 
21898 typedef struct _kcondvar {
21899  ushort_t _opaque;
21900 } kcondvar_t;
21901 
21902 typedef enum {
21903  CV_DEFAULT,
21904  CV_DRIVER
21905 } kcv_type_t;
21906 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h" 2
21907 # 53 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/t_lock.h"
21908 /*
21909  * Mutual exclusion locks described in common/sys/mutex.h.
21910  *
21911  * Semaphores described in common/sys/semaphore.h.
21912  *
21913  * Readers/Writer locks described in common/sys/rwlock.h.
21914  *
21915  * Condition variables described in common/sys/condvar.h
21916  */
21917 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
21918 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 1
21919 /*
21920  * CDDL HEADER START
21921  *
21922  * The contents of this file are subject to the terms of the
21923  * Common Development and Distribution License, Version 1.0 only
21924  * (the "License").  You may not use this file except in compliance
21925  * with the License.
21926  *
21927  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21928  * or http://www.opensolaris.org/os/licensing.
21929  * See the License for the specific language governing permissions
21930  * and limitations under the License.
21931  *
21932  * When distributing Covered Code, include this CDDL HEADER in each
21933  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21934  * If applicable, add the following below this CDDL HEADER, with the
21935  * fields enclosed by brackets "[]" replaced with your own identifying
21936  * information: Portions Copyright [yyyy] [name of copyright owner]
21937  *
21938  * CDDL HEADER END
21939  */
21940 /*
21941  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
21942  * Use is subject to license terms.
21943  */
21944 
21945 
21946 
21947 
21948 #pragma ident "%Z%%M%	%I%	%E% SMI"
21949 # 40 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
21950 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
21951 /*
21952  * CDDL HEADER START
21953  *
21954  * The contents of this file are subject to the terms of the
21955  * Common Development and Distribution License (the "License").
21956  * You may not use this file except in compliance with the License.
21957  *
21958  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21959  * or http://www.opensolaris.org/os/licensing.
21960  * See the License for the specific language governing permissions
21961  * and limitations under the License.
21962  *
21963  *
21964  * When distributing Covered Code, include this CDDL HEADER in each
21965  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21966  * If applicable, add the following below this CDDL HEADER, with the
21967  * fields enclosed by brackets "[]" replaced with your own identifying
21968  * information: Portions Copyright [yyyy] [name of copyright owner]
21969  *
21970  * CDDL HEADER END
21971  */
21972 
21973 /*
21974  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
21975  * Use is subject to license terms.
21976  * Copyright 2016 Joyent, Inc.
21977  */
21978 # 41 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h" 2
21979 # 69 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/model.h"
21980 /*
21981  * XXX	Ick.  This type needs to be visible outside the above guard because
21982  * the proc structure is visible outside the _KERNEL | _KMEMUSER guard.
21983  * If we can make proc internals less visible, (which we obviously should)
21984  * then this can be invisible too.
21985  */
21986 typedef unsigned int model_t;
21987 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h" 2
21988 
21989 
21990 
21991 
21992 
21993 /*
21994  * Data queue.
21995  *
21996  * NOTE: The *only* public fields are documented in queue(9S).
21997  *       Everything else is implementation-private.
21998  *
21999  * The locking rules for the queue_t structure are extremely subtle and vary
22000  * widely depending on the field in question.  As such, each field is
22001  * annotated according to the following legend:
22002  *
22003  *   Q9S: The field is documented in queue(9S) and may be accessed without
22004  *        locks by a STREAMS module when inside an entry point (e.g., put(9E)).
22005  *        However, no fields can be directly modified unless q_lock is held
22006  *        (which is not possible in a DDI compliant STREAMS module), with the
22007  *        following exceptions:
22008  *
22009  *	   - q_ptr: can be modified as per the rules of the STREAMS module.
22010  *		    The STREAMS framework ignores q_ptr and thus imposes *no*
22011  *		    locking rules on it.
22012  *         - q_qinfo: can be modified before qprocson().
22013  *
22014  *	   - q_minpsz, q_maxpsz, q_hiwat, q_lowat: can be modified as per the
22015  *		    rules of the STREAMS module.  The STREAMS framework never
22016  *		    modifies these fields, and is tolerant of temporarily
22017  *		    stale field values.
22018  *
22019  *	  In general, the STREAMS framework employs one of the following
22020  *	  techniques to ensure STREAMS modules can safely access Q9S fields:
22021  *
22022  *	   - The field is only modified by the framework when the stream is
22023  *	     locked with strlock() (q_next).
22024  *
22025  *	   - The field is modified by the framework, but the modifies are
22026  *	     atomic, and temporarily stale values are harmless (q_count,
22027  *	     q_first, q_last).
22028  *
22029  *	   - The field is modified by the framework, but the field's visible
22030  *	     values are either constant or directly under the control
22031  *	     of the STREAMS module itself (q_flag).
22032  *
22033  *   QLK: The field must be accessed or modified under q_lock, except when
22034  *        the stream has been locked with strlock().  If multiple q_locks must
22035  *        be acquired, q_locks at higher addresses must be taken first.
22036  *
22037  *   STR: The field can be accessed without a lock, but must be modified under
22038  *	  strlock().
22039  *
22040  *   SQLK: The field must be accessed or modified under SQLOCK().
22041  *
22042  *   NOLK: The field can be accessed without a lock, but can only be modified
22043  *	   when the queue_t is not known to any other threads.
22044  *
22045  *   SVLK: The field must be accessed or modified under the service_queue lock.
22046  *         Note that service_lock must be taken after any needed q_locks,
22047  *	   and that no other lock should be taken while service_lock is held.
22048  *
22049  * In addition, it is always acceptable to modify a field that is not yet
22050  * known to any other threads -- and other special case exceptions exist in
22051  * the code.  Also, q_lock is used with q_wait to implement a stream head
22052  * monitor for reads and writes.
22053  */
22054 typedef struct queue {
22055  struct qinit *q_qinfo; /* Q9S: Q processing procedure  */
22056  struct msgb *q_first; /* Q9S: first message in Q	*/
22057  struct msgb *q_last; /* Q9S: last message in Q	*/
22058  struct queue *q_next; /* Q9S: next Q in stream	*/
22059  struct queue *q_link; /* SVLK: next Q for scheduling	*/
22060  void *q_ptr; /* Q9S: module-specific data	*/
22061  size_t q_count; /* Q9S: number of bytes on Q	*/
22062  uint_t q_flag; /* Q9S: Q state			*/
22063  ssize_t q_minpsz; /* Q9S: smallest packet OK on Q */
22064  ssize_t q_maxpsz; /* Q9S: largest packet OK on Q	*/
22065  size_t q_hiwat; /* Q9S: Q high water mark	*/
22066  size_t q_lowat; /* Q9S: Q low water mark	*/
22067  struct qband *q_bandp; /* QLK: band flow information	*/
22068  kmutex_t q_lock; /* NOLK: structure lock		*/
22069  struct stdata *q_stream; /* NOLK: stream backpointer	*/
22070  struct syncq *q_syncq; /* NOLK: associated syncq 	*/
22071  unsigned char q_nband; /* QLK: number of bands		*/
22072  kcondvar_t q_wait; /* NOLK: read/write sleep CV	*/
22073  struct queue *q_nfsrv; /* STR: next Q with svc routine */
22074  ushort_t q_draining; /* QLK: Q is draining		*/
22075  short q_struiot; /* QLK: sync streams Q UIO mode	*/
22076  clock_t q_qtstamp; /* QLK: when Q was enabled	*/
22077  size_t q_mblkcnt; /* QLK: mblk count		*/
22078  uint_t q_syncqmsgs; /* QLK: syncq message count	*/
22079  size_t q_rwcnt; /* QLK: # threads in rwnext()	*/
22080  pri_t q_spri; /* QLK: Q scheduling priority	*/
22081 
22082  /*
22083 	 * Syncq scheduling
22084 	 */
22085  struct msgb *q_sqhead; /* QLK: first syncq message	*/
22086  struct msgb *q_sqtail; /* QLK: last syncq message 	*/
22087  struct queue *q_sqnext; /* SQLK: next Q on syncq list	*/
22088  struct queue *q_sqprev; /* SQLK: prev Q on syncq list 	*/
22089  uint_t q_sqflags; /* SQLK: syncq flags		*/
22090  clock_t q_sqtstamp; /* SQLK: when Q was scheduled for sq */
22091 
22092  /*
22093 	 * NOLK: Reference to the queue's module's implementation
22094 	 * structure. This will be NULL for queues associated with drivers.
22095 	 */
22096  struct fmodsw_impl *q_fp;
22097 } queue_t;
22098 
22099 /*
22100  * Queue flags; unused flags not documented in queue(9S) can be recycled.
22101  */
22102 # 169 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22103 /*	UNUSED		0x00000200	   was QHLIST			*/
22104 /* 	UNUSED 		0x00000400	   was QUNSAFE			*/
22105 
22106 
22107 
22108 
22109 
22110 
22111      /* all MT type flags		*/
22112 
22113 
22114 
22115 
22116 
22117 
22118 /*	UNUSED		0x00400000	   was QHOT			*/
22119 /*	UNUSED		0x00800000	   was QNEXTHOT			*/
22120 /* 	UNUSED		0x01000000	   was _QNEXTLESS		*/
22121 
22122 
22123 
22124 
22125      /* direct interface to/from sockfs */
22126 
22127 /* queue sqflags (protected by SQLOCK). */
22128 
22129 
22130      /* This is also noted by the	*/
22131      /* q_draining field, but this one is */
22132      /* protected by SQLOCK */
22133 
22134 /*
22135  * Structure that describes the separate information
22136  * for each priority band in the queue.
22137  */
22138 typedef struct qband {
22139  struct qband *qb_next; /* next band's info */
22140  size_t qb_count; /* number of bytes in band */
22141  struct msgb *qb_first; /* beginning of band's data */
22142  struct msgb *qb_last; /* end of band's data */
22143  size_t qb_hiwat; /* high water mark for band */
22144  size_t qb_lowat; /* low water mark for band */
22145  uint_t qb_flag; /* see below */
22146  size_t qb_mblkcnt; /* mblk counter for runaway msgs */
22147 } qband_t;
22148 
22149 /*
22150  * qband flags
22151  */
22152 
22153 
22154 
22155 
22156 /*
22157  * Maximum number of bands.
22158  */
22159 
22160 
22161 /*
22162  * Fields that can be manipulated through strqset() and strqget().
22163  */
22164 typedef enum qfields {
22165  QHIWAT = 0, /* q_hiwat or qb_hiwat */
22166  QLOWAT = 1, /* q_lowat or qb_lowat */
22167  QMAXPSZ = 2, /* q_maxpsz */
22168  QMINPSZ = 3, /* q_minpsz */
22169  QCOUNT = 4, /* q_count or qb_count */
22170  QFIRST = 5, /* q_first or qb_first */
22171  QLAST = 6, /* q_last or qb_last */
22172  QFLAG = 7, /* q_flag or qb_flag */
22173  QSTRUIOT = 8, /* q_struiot */
22174  QBAD = 9
22175 } qfields_t;
22176 
22177 /*
22178  * Module information structure
22179  */
22180 struct module_info {
22181  ushort_t mi_idnum; /* module id number */
22182  char *mi_idname; /* module name */
22183  ssize_t mi_minpsz; /* min packet size accepted */
22184  ssize_t mi_maxpsz; /* max packet size accepted */
22185  size_t mi_hiwat; /* hi-water mark */
22186  size_t mi_lowat; /* lo-water mark */
22187 };
22188 
22189 /*
22190  * queue information structure (with Synchronous STREAMS extensions)
22191  */
22192 struct qinit {
22193  int (*qi_putp)(); /* put procedure */
22194  int (*qi_srvp)(); /* service procedure */
22195  int (*qi_qopen)(); /* called on startup */
22196  int (*qi_qclose)(); /* called on finish */
22197  int (*qi_qadmin)(); /* for future use */
22198  struct module_info *qi_minfo; /* module information structure */
22199  struct module_stat *qi_mstat; /* module statistics structure */
22200  int (*qi_rwp)(); /* r/w procedure */
22201  int (*qi_infop)(); /* information procedure */
22202  int qi_struiot; /* stream uio type for struio() */
22203 };
22204 
22205 /*
22206  * Values for qi_struiot and q_struiot:
22207  */
22208 
22209 
22210 
22211 
22212 /*
22213  * Streamtab (used in cdevsw and fmodsw to point to module or driver)
22214  */
22215 struct streamtab {
22216  struct qinit *st_rdinit;
22217  struct qinit *st_wrinit;
22218  struct qinit *st_muxrinit;
22219  struct qinit *st_muxwinit;
22220 };
22221 
22222 /*
22223  * Structure sent to mux drivers to indicate a link.
22224  */
22225 struct linkblk {
22226  queue_t *l_qtop; /* lowest level write queue of upper stream */
22227     /* (set to NULL for persistent links) */
22228  queue_t *l_qbot; /* highest level write queue of lower stream */
22229  int l_index; /* index for lower stream. */
22230 };
22231 
22232 /*
22233  * Esballoc data buffer freeing routine
22234  */
22235 typedef struct free_rtn {
22236  void (*free_func)();
22237  caddr_t free_arg;
22238 } frtn_t;
22239 
22240 /*
22241  * Data block descriptor
22242  *
22243  * NOTE: db_base, db_lim, db_ref and db_type are the *only* public fields,
22244  * as described in datab(9S).  Everything else is implementation-private.
22245  */
22246 
22247 
22248 
22249 typedef struct datab {
22250  frtn_t *db_frtnp;
22251  unsigned char *db_base;
22252  unsigned char *db_lim;
22253  unsigned char db_ref;
22254  unsigned char db_type;
22255  unsigned char db_flags;
22256  unsigned char db_struioflag;
22257  pid_t db_cpid; /* cached pid, needs verification */
22258  void *db_cache; /* kmem cache descriptor */
22259  struct msgb *db_mblk;
22260  void (*db_free)(struct msgb *, struct datab *);
22261  void (*db_lastfree)(struct msgb *, struct datab *);
22262  intptr_t db_cksumstart;
22263  intptr_t db_cksumend;
22264  intptr_t db_cksumstuff;
22265  union {
22266   double enforce_alignment;
22267   unsigned char data[8];
22268   struct {
22269    union {
22270     uint32_t u32;
22271     uint16_t u16;
22272    } cksum_val; /* used to store calculated cksum */
22273    uint16_t flags;
22274    uint16_t pad;
22275   } cksum;
22276   /*
22277 		 * Union used for future extensions (pointer to data ?).
22278 		 */
22279  } db_struioun;
22280  struct fthdr *db_fthdr;
22281  cred_t *db_credp; /* credential */
22282 } dblk_t;
22283 
22284 
22285 
22286 
22287 /*
22288  * Accessor macros for private dblk_t fields (the rest are in <sys/strsun.h>).
22289  */
22290 
22291 
22292 
22293 /*
22294  * Used by GLDv2 to store the TCI information.
22295  */
22296 
22297 
22298 /*
22299  * Message block descriptor
22300  */
22301 typedef struct msgb {
22302  struct msgb *b_next;
22303  struct msgb *b_prev;
22304  struct msgb *b_cont;
22305  unsigned char *b_rptr;
22306  unsigned char *b_wptr;
22307  struct datab *b_datap;
22308  unsigned char b_band;
22309  unsigned char b_tag;
22310  unsigned short b_flag;
22311  queue_t *b_queue; /* for sync queues */
22312 } mblk_t;
22313 
22314 /*
22315  * bcache descriptor
22316  */
22317 typedef struct bcache {
22318  kmutex_t mutex;
22319  struct kmem_cache *buffer_cache;
22320  struct kmem_cache *dblk_cache;
22321  int alloc;
22322  int destroy;
22323  size_t size;
22324  uint_t align;
22325 } bcache_t;
22326 
22327 /*
22328  * db_flags values (all implementation private!)
22329  */
22330 
22331 
22332 
22333 
22334 /*
22335  * db_struioflag values:
22336  */
22337 
22338 
22339 
22340 
22341 
22342 
22343 /*
22344  * Message flags.  These are interpreted by the stream head.
22345  */
22346 
22347 
22348     /* write side of stream */
22349 
22350 /*	UNUSED		0x08	   was MSGNOGET (can be recycled) */
22351 
22352 
22353 
22354 
22355 /*
22356  * Streams message types.
22357  */
22358 
22359 /*
22360  * Data and protocol messages (regular and priority)
22361  */
22362 
22363 
22364 
22365 
22366 /*
22367  * Control messages (regular and priority)
22368  */
22369 # 445 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22370 /*
22371  * Control messages (high priority; go to head of queue)
22372  */
22373 # 468 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22374 /*
22375  * Queue message class definitions.
22376  */
22377 
22378 
22379 
22380 /*
22381  *  IOCTL structure - this structure is the format of the M_IOCTL message type.
22382  */
22383 # 488 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22384 struct iocblk {
22385  int ioc_cmd; /* ioctl command type */
22386  cred_t *ioc_cr; /* full credentials */
22387  uint_t ioc_id; /* ioctl id */
22388  size_t ioc_count; /* count of bytes in data field */
22389  int ioc_error; /* error code */
22390  int ioc_rval; /* return value  */
22391  int ioc_fill1;
22392  uint_t ioc_flag; /* see below */
22393  int ioc_filler[2]; /* reserved for future use */
22394 };
22395 
22396 
22397 typedef struct iocblk *IOCP;
22398 
22399 /* {ioc,cp}_flags values */
22400 
22401 
22402 
22403 
22404 
22405 
22406 
22407 /*
22408  *	Is the ioctl data formatted for our native model?
22409  */
22410 
22411 
22412 
22413 /*
22414  * structure for the M_COPYIN and M_COPYOUT message types.
22415  */
22416 # 531 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22417 struct copyreq {
22418  int cq_cmd; /* ioctl command (from ioc_cmd) */
22419  cred_t *cq_cr; /* full credentials */
22420  uint_t cq_id; /* ioctl id (from ioc_id) */
22421  caddr_t cq_addr; /* address to copy data to/from */
22422  size_t cq_size; /* number of bytes to copy */
22423  uint_t cq_flag; /* must be zero */
22424  mblk_t *cq_private; /* private state information */
22425  int cq_filler[4]; /* reserved for future use */
22426 };
22427 
22428 
22429 /*
22430  * structure for the M_IOCDATA message type.
22431  */
22432 # 557 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22433 struct copyresp {
22434  int cp_cmd; /* ioctl command (from ioc_cmd) */
22435  cred_t *cp_cr; /* full credentials */
22436  uint_t cp_id; /* ioctl id (from ioc_id) */
22437  caddr_t cp_rval; /* status of request: 0 -> success */
22438      /* 		non-zero -> failure */
22439  size_t cp_pad1;
22440  uint_t cp_pad2;
22441  mblk_t *cp_private; /* private state information */
22442  uint_t cp_flag; /* datamodel IOC_ flags; see above */
22443  int cp_filler[3];
22444 };
22445 
22446 
22447 /*
22448  * Since these structures are all intended to travel in the same message
22449  * at different stages of a STREAMS ioctl, this union is used to determine
22450  * the message size in strdoioctl().
22451  */
22452 union ioctypes {
22453  struct iocblk iocblk;
22454  struct copyreq copyreq;
22455  struct copyresp copyresp;
22456 };
22457 
22458 /*
22459  * Options structure for M_SETOPTS message.  This is sent upstream
22460  * by a module or driver to set stream head options.
22461  */
22462 struct stroptions {
22463  uint_t so_flags; /* options to set */
22464  short so_readopt; /* read option */
22465  ushort_t so_wroff; /* write offset */
22466  ssize_t so_minpsz; /* minimum read packet size */
22467  ssize_t so_maxpsz; /* maximum read packet size */
22468  size_t so_hiwat; /* read queue high water mark */
22469  size_t so_lowat; /* read queue low water mark */
22470  unsigned char so_band; /* band for water marks */
22471  ushort_t so_erropt; /* error option */
22472  ssize_t so_maxblk; /* maximum message block size */
22473  ushort_t so_copyopt; /* copy options (see stropts.h) */
22474  ushort_t so_tail; /* space available at the end */
22475 };
22476 
22477 /* flags for stream options set message */
22478 # 673 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/stream.h"
22479 /*
22480  * Miscellaneous parameters and flags.
22481  */
22482 
22483 /*
22484  * Values for stream flag in open to indicate module open, clone open,
22485  * and the return value for failure.
22486  */
22487 
22488 
22489 
22490 
22491 /*
22492  * Priority definitions for block allocation.
22493  */
22494 
22495 
22496 
22497 
22498 /*
22499  * Value for packet size that denotes infinity
22500  */
22501 
22502 
22503 /*
22504  * Flags for flushq()
22505  */
22506 
22507 
22508 
22509 /*
22510  * Flag for transparent ioctls
22511  */
22512 
22513 
22514 /*
22515  * Stream head default high/low water marks
22516  */
22517 
22518 
22519 
22520 /*
22521  * qwriter perimeter types
22522  */
22523 
22524 
22525 
22526 /*
22527  * Definitions of Streams macros and function interfaces.
22528  */
22529 
22530 /*
22531  * canenable - check if queue can be enabled by putq().
22532  */
22533 
22534 
22535 /*
22536  * Test if data block type is one of the data messages (i.e. not a control
22537  * message).
22538  */
22539 
22540 
22541 
22542 
22543 
22544 
22545 
22546 /*
22547  * Extract queue class of message block.
22548  */
22549 
22550 
22551 /*
22552  * Align address on next lower word boundary.
22553  */
22554 
22555 
22556 /*
22557  * Find the max size of data block.
22558  */
22559 # 68 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22560 
22561 /*
22562  * Symbols such as htonl() are required to be exposed through this file,
22563  * per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
22564  */
22565 
22566 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 1
22567 /*
22568  * CDDL HEADER START
22569  *
22570  * The contents of this file are subject to the terms of the
22571  * Common Development and Distribution License (the "License").
22572  * You may not use this file except in compliance with the License.
22573  *
22574  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22575  * or http://www.opensolaris.org/os/licensing.
22576  * See the License for the specific language governing permissions
22577  * and limitations under the License.
22578  *
22579  * When distributing Covered Code, include this CDDL HEADER in each
22580  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22581  * If applicable, add the following below this CDDL HEADER, with the
22582  * fields enclosed by brackets "[]" replaced with your own identifying
22583  * information: Portions Copyright [yyyy] [name of copyright owner]
22584  *
22585  * CDDL HEADER END
22586  */
22587 
22588 /*
22589  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22590  * Use is subject to license terms.
22591  */
22592 
22593 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
22594 /*	  All Rights Reserved  	*/
22595 
22596 /*
22597  * University Copyright- Copyright (c) 1982, 1986, 1988
22598  * The Regents of the University of California
22599  * All Rights Reserved
22600  *
22601  * University Acknowledgment- Portions of this document are derived from
22602  * software developed by the University of California, Berkeley, and its
22603  * contributors.
22604  */
22605 
22606 
22607 
22608 
22609 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/isa_defs.h" 1
22610 /*
22611  * CDDL HEADER START
22612  *
22613  * The contents of this file are subject to the terms of the
22614  * Common Development and Distribution License (the "License").
22615  * You may not use this file except in compliance with the License.
22616  *
22617  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22618  * or http://www.opensolaris.org/os/licensing.
22619  * See the License for the specific language governing permissions
22620  * and limitations under the License.
22621  *
22622  *
22623  * When distributing Covered Code, include this CDDL HEADER in each
22624  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22625  * If applicable, add the following below this CDDL HEADER, with the
22626  * fields enclosed by brackets "[]" replaced with your own identifying
22627  * information: Portions Copyright [yyyy] [name of copyright owner]
22628  *
22629  * CDDL HEADER END
22630  */
22631 
22632 /*
22633  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
22634  * Use is subject to license terms.
22635  * Copyright 2016 Joyent, Inc.
22636  */
22637 # 44 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
22638 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/int_types.h" 1
22639 /*
22640  * CDDL HEADER START
22641  *
22642  * The contents of this file are subject to the terms of the
22643  * Common Development and Distribution License, Version 1.0 only
22644  * (the "License").  You may not use this file except in compliance
22645  * with the License.
22646  *
22647  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
22648  * or http://www.opensolaris.org/os/licensing.
22649  * See the License for the specific language governing permissions
22650  * and limitations under the License.
22651  *
22652  * When distributing Covered Code, include this CDDL HEADER in each
22653  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
22654  * If applicable, add the following below this CDDL HEADER, with the
22655  * fields enclosed by brackets "[]" replaced with your own identifying
22656  * information: Portions Copyright [yyyy] [name of copyright owner]
22657  *
22658  * CDDL HEADER END
22659  */
22660 /*
22661  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
22662  *
22663  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
22664  * Use is subject to license terms.
22665  */
22666 # 45 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h" 2
22667 # 55 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
22668 /*
22669  * macros for conversion between host and (internet) network byte order
22670  */
22671 # 74 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
22672 typedef uint16_t in_port_t;
22673 
22674 
22675 
22676 
22677 typedef uint32_t in_addr_t;
22678 
22679 
22680 
22681 extern uint32_t htonl(uint32_t);
22682 extern uint16_t htons(uint16_t);
22683 extern uint32_t ntohl(uint32_t);
22684 extern uint16_t ntohs(uint16_t);
22685 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
22686 extern uint64_t htonll(uint64_t);
22687 extern uint64_t ntohll(uint64_t);
22688 
22689 
22690 
22691 
22692 
22693 
22694 /*
22695  * Macros to reverse byte order
22696  */
22697 # 141 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
22698 /*
22699  * Macros to convert from a specific byte order to/from native byte order
22700  */
22701 # 164 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
22702 /*
22703  * Macros to read unaligned values from a specific byte order to
22704  * native byte order
22705  */
22706 # 204 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/byteorder.h"
22707 /*
22708  * Macros to write unaligned values from native byte order to a specific byte
22709  * order.
22710  */
22711 # 75 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 2
22712 
22713 
22714 
22715 
22716 
22717 
22718 
22719 /*
22720  * Note: IPv4 address data structures usage conventions.
22721  * The "in_addr_t" type below (required by Unix standards)
22722  * is NOT a typedef of "struct in_addr" and violates the usual
22723  * conventions where "struct <name>" and <name>_t are corresponding
22724  * typedefs.
22725  * To minimize confusion, kernel data structures/usage prefers use
22726  * of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
22727  * The user level APIs continue to follow the historic popular
22728  * practice of using "struct in_addr".
22729  */
22730 
22731 
22732 
22733 
22734 
22735 
22736 
22737 typedef uint32_t ipaddr_t;
22738 
22739 
22740 
22741 
22742 struct in6_addr {
22743  union {
22744   /*
22745 		 * Note: Static initalizers of "union" type assume
22746 		 * the constant on the RHS is the type of the first member
22747 		 * of union.
22748 		 * To make static initializers (and efficient usage) work,
22749 		 * the order of members exposed to user and kernel view of
22750 		 * this data structure is different.
22751 		 * User environment sees specified uint8_t type as first
22752 		 * member whereas kernel sees most efficient type as
22753 		 * first member.
22754 		 */
22755 
22756 
22757 
22758 
22759   uint8_t _S6_u8[16]; /* IPv6 address */
22760   uint32_t _S6_u32[4]; /* IPv6 address */
22761 
22762   uint32_t __S6_align; /* Align on 32 bit boundary */
22763  } _S6_un;
22764 };
22765 
22766 
22767 
22768 
22769 
22770 
22771 
22772 typedef struct in6_addr in6_addr_t;
22773 # 144 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22774 /*
22775  * Protocols
22776  *
22777  * Some of these constant names are copied for the DTrace IP provider in
22778  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
22779  * in sync.
22780  */
22781 # 177 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22782       /* Transmission Protocol */
22783 # 186 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22784 /*
22785  * Port/socket numbers: network standard functions
22786  *
22787  * Entries should exist here for each port number compiled into an ON
22788  * component, such as snoop.
22789  */
22790 # 208 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22791 /*
22792  * Port/socket numbers: host specific functions
22793  */
22794 # 229 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22795 /*
22796  * Internet Key Exchange (IKE) ports
22797  */
22798 
22799 
22800 
22801 /*
22802  * UNIX TCP sockets
22803  */
22804 
22805 
22806 
22807 
22808 
22809 
22810 /*
22811  * UNIX UDP sockets
22812  */
22813 
22814 
22815 
22816 
22817 
22818 
22819 
22820 /*
22821  * DHCPv6 UDP ports
22822  */
22823 
22824 
22825 
22826 
22827 
22828 /*
22829  * Ports < IPPORT_RESERVED are reserved for
22830  * privileged processes (e.g. root).
22831  * Ports > IPPORT_USERRESERVED are reserved
22832  * for servers, not necessarily privileged.
22833  */
22834 
22835 
22836 
22837 /*
22838  * Link numbers
22839  */
22840 
22841 
22842 
22843 
22844 /*
22845  * IPv4 Internet address
22846  *	This definition contains obsolete fields for compatibility
22847  *	with SunOS 3.x and 4.2bsd.  The presence of subnets renders
22848  *	divisions into fixed fields misleading at best.  New code
22849  *	should use only the s_addr field.
22850  */
22851 # 293 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22852 struct in_addr {
22853  union {
22854   struct { uint8_t s_b1, s_b2, s_b3, s_b4; } S_un_b;
22855   struct { uint16_t s_w1, s_w2; } S_un_w;
22856 
22857   uint32_t S_addr;
22858 
22859 
22860 
22861  } S_un;
22862 
22863 
22864 
22865 
22866 
22867 
22868 };
22869 
22870 /*
22871  * Definitions of bits in internet address integers.
22872  * On subnets, the decomposition of addresses to host and net parts
22873  * is done according to subnet mask, not the masks here.
22874  *
22875  * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
22876  * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
22877  * obsolete". IN_MULTICAST macro should be used to test if a address
22878  * is a multicast address.
22879  */
22880 # 348 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22881 /*
22882  * We have removed CLASS E checks from the kernel
22883  * But we preserve these defines for userland in order
22884  * to avoid compile  breakage of some 3rd party piece of software
22885  */
22886 # 369 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22887 /* Scoped IPv4 prefixes (in host byte-order) */
22888 # 379 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22889 /* RFC 3927 IPv4 link local address (i in host byte-order) */
22890 
22891 
22892 /* Well known 6to4 Relay Router Anycast address defined in RFC 3068 */
22893 
22894 
22895 
22896 
22897 
22898 
22899 /*
22900  * Define a macro to stuff the loopback address into an Internet address
22901  */
22902 
22903 
22904 
22905 
22906 
22907 
22908 /*
22909  * IPv4 Socket address.
22910  */
22911 struct sockaddr_in {
22912  sa_family_t sin_family;
22913  in_port_t sin_port;
22914  struct in_addr sin_addr;
22915 
22916  char sin_zero[8];
22917 
22918 
22919 
22920 };
22921 
22922 
22923 /*
22924  * IPv6 socket address.
22925  */
22926 struct sockaddr_in6 {
22927  sa_family_t sin6_family;
22928  in_port_t sin6_port;
22929  uint32_t sin6_flowinfo;
22930  struct in6_addr sin6_addr;
22931  uint32_t sin6_scope_id; /* Depends on scope of sin6_addr */
22932  uint32_t __sin6_src_id; /* Impl. specific - UDP replies */
22933 };
22934 
22935 /*
22936  * Macros for accessing the traffic class and flow label fields from
22937  * sin6_flowinfo.
22938  * These are designed to be applied to a 32-bit value.
22939  */
22940 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22941 /* masks */
22942 
22943 
22944 
22945 
22946 
22947 /*
22948  * Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
22949  * use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
22950  * only. They need to be different for User/Kernel versions because union
22951  * component data structure is defined differently (it is identical at
22952  * binary representation level).
22953  *
22954  * const struct in6_addr IN6ADDR_ANY_INIT;
22955  * const struct in6_addr IN6ADDR_LOOPBACK_INIT;
22956  */
22957 # 478 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22958 /*
22959  * RFC 2553 specifies the following macros. Their type is defined
22960  * as "int" in the RFC but they only have boolean significance
22961  * (zero or non-zero). For the purposes of our comment notation,
22962  * we assume a hypothetical type "bool" defined as follows to
22963  * write the prototypes assumed for macros in our comments better.
22964  *
22965  * typedef int bool;
22966  */
22967 
22968 /*
22969  * IN6 macros used to test for special IPv6 addresses
22970  * (Mostly from spec)
22971  *
22972  * bool  IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
22973  * bool  IN6_IS_ADDR_LOOPBACK    (const struct in6_addr *);
22974  * bool  IN6_IS_ADDR_MULTICAST   (const struct in6_addr *);
22975  * bool  IN6_IS_ADDR_LINKLOCAL   (const struct in6_addr *);
22976  * bool  IN6_IS_ADDR_SITELOCAL   (const struct in6_addr *);
22977  * bool  IN6_IS_ADDR_V4MAPPED    (const struct in6_addr *);
22978  * bool  IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
22979  * bool  IN6_IS_ADDR_V4COMPAT    (const struct in6_addr *);
22980  * bool  IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
22981  * bool  IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
22982  * bool  IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
22983  * bool  IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
22984  * bool  IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
22985  * bool  IN6_IS_ADDR_MC_GLOBAL   (const struct in6_addr *);
22986  * bool  IN6_IS_ADDR_6TO4	 (const struct in6_addr *); -- Not from RFC2553
22987  * bool  IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
22988  *	     const struct in6_addr *);			    -- Not from RFC2553
22989  * bool  IN6_IS_ADDR_LINKSCOPE	 (const struct in6addr  *); -- Not from RFC2553
22990  */
22991 # 568 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22992 /*
22993  * IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
22994  * Note: This macro is currently NOT defined in RFC2553 specification
22995  * and not a standard macro that portable applications should use.
22996  */
22997 # 587 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
22998 /* Exclude loopback and unspecified address */
22999 # 605 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23000 /*
23001  * Note:
23002  * IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
23003  * specification and not a standard macro that portable applications
23004  * should use.
23005  */
23006 # 660 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23007 /*
23008  * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
23009  * RFC, and shouldn't be used by portable applications.  It is used to see
23010  * if an address is a solicited-node multicast address, which is prefixed
23011  * with ff02:0:0:0:0:1:ff00::/104.
23012  */
23013 # 680 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23014 /*
23015  * Macros to a) test for 6to4 IPv6 address, and b) to test if two
23016  * 6to4 addresses have the same /48 prefix, and, hence, are from the
23017  * same 6to4 site.
23018  */
23019 # 699 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23020 /*
23021  * IN6_IS_ADDR_LINKSCOPE
23022  * Identifies an address as being either link-local, link-local multicast or
23023  * node-local multicast.  All types of addresses are considered to be unique
23024  * within the scope of a given link.
23025  */
23026 
23027 
23028 
23029 
23030 /*
23031  * Useful utility macros for operations with IPv6 addresses
23032  * Note: These macros are NOT defined in the RFC2553 or any other
23033  * standard specification and are not standard macros that portable
23034  * applications should use.
23035  */
23036 
23037 /*
23038  * IN6_V4MAPPED_TO_INADDR
23039  * IN6_V4MAPPED_TO_IPADDR
23040  *	Assign a IPv4-Mapped IPv6 address to an IPv4 address.
23041  *	Note: These macros are NOT defined in RFC2553 or any other standard
23042  *	specification and are not macros that portable applications should
23043  *	use.
23044  *
23045  * void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
23046  * void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
23047  *
23048  */
23049 
23050 
23051 
23052 
23053 
23054 /*
23055  * IN6_INADDR_TO_V4MAPPED
23056  * IN6_IPADDR_TO_V4MAPPED
23057  *	Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
23058  *	address.
23059  *	Note: These macros are NOT defined in RFC2553 or any other standard
23060  *	specification and are not macros that portable applications should
23061  *	use.
23062  *
23063  * void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
23064  * void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
23065  *
23066  */
23067 # 770 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23068 /*
23069  * IN6_6TO4_TO_V4ADDR
23070  *	Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
23071  *      address.
23072  *	Note: This macro is NOT defined in RFC2553 or any other standard
23073  *	specification and is not a macro that portable applications should
23074  *	use.
23075  *	Note: we don't use the IPADDR form of the macro because we need
23076  *	to do a bytewise copy; the V4ADDR in the 6to4 address is not
23077  *	32-bit aligned.
23078  *
23079  * void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
23080  *
23081  */
23082 
23083 
23084 
23085 
23086 
23087 
23088 /*
23089  * IN6_V4ADDR_TO_6TO4
23090  *	Given an IPv4 address and an IPv6 address for output, a 6to4 address
23091  *	will be created from the IPv4 Address.
23092  *	Note:  This method for creating 6to4 addresses is not standardized
23093  *	outside of Solaris.  The newly created 6to4 address will be of the form
23094  *	2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
23095  *	HOSTID will equal 1.
23096  *
23097  * void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
23098  *
23099  */
23100 # 828 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23101 /*
23102  * IN6_ARE_ADDR_EQUAL (defined in RFC2292)
23103  *	 Compares if IPv6 addresses are equal.
23104  * Note: Compares in order of high likelyhood of a miss so we minimize
23105  * compares. (Current heuristic order, compare in reverse order of
23106  * uint32_t units)
23107  *
23108  * bool  IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
23109  *			    const struct in6_addr *);
23110  */
23111 
23112 
23113 
23114 
23115 
23116 
23117 /*
23118  * IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
23119  *	Compares if prefixed parts of IPv6 addresses are equal.
23120  *
23121  * uint32_t IN6_MASK_FROM_PREFIX(int, int);
23122  * bool     IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
23123  *				       const struct in6_addr *,
23124  *				       int);
23125  */
23126 # 879 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23127 /*
23128  * Options for use with [gs]etsockopt at the IP level.
23129  *
23130  * Note: Some of the IP_ namespace has conflict with and
23131  * and is exposed through <xti.h>. (It also requires exposing
23132  * options not implemented). The options with potential
23133  * for conflicts use #ifndef guards.
23134  */
23135 # 919 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23136 /*
23137  * IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
23138  * is used to differentiate b/w the two.
23139  */
23140 
23141 
23142 
23143 
23144 
23145 /*
23146  * Different preferences that can be requested from IPSEC protocols.
23147  */
23148 
23149 
23150 
23151 
23152 /*
23153  * This can be used with the setsockopt() call to set per socket security
23154  * options. When the application uses per-socket API, we will reflect
23155  * the request on both outbound and inbound packets.
23156  */
23157 
23158 typedef struct ipsec_req {
23159  uint_t ipsr_ah_req; /* AH request */
23160  uint_t ipsr_esp_req; /* ESP request */
23161  uint_t ipsr_self_encap_req; /* Self-Encap request */
23162  uint8_t ipsr_auth_alg; /* Auth algs for AH */
23163  uint8_t ipsr_esp_alg; /* Encr algs for ESP */
23164  uint8_t ipsr_esp_auth_alg; /* Auth algs for ESP */
23165 } ipsec_req_t;
23166 
23167 /*
23168  * MCAST_* options are protocol-independent.  The actual definitions
23169  * are with the v6 options below; this comment is here to note the
23170  * namespace usage.
23171  *
23172  * #define	MCAST_JOIN_GROUP	0x29
23173  * #define	MCAST_LEAVE_GROUP	0x2a
23174  * #define	MCAST_BLOCK_SOURCE	0x2b
23175  * #define	MCAST_UNBLOCK_SOURCE	0x2c
23176  * #define	MCAST_JOIN_SOURCE_GROUP	0x2d
23177  * #define	MCAST_LEAVE_SOURCE_GROUP 0x2e
23178  */
23179 
23180 
23181 /*
23182  * SunOS private (potentially not portable) IP_ option names
23183  */
23184 
23185 
23186 
23187 /* can be reused		0x44 */
23188 
23189 
23190 /*
23191  * Option values and names (when !_XPG5) shared with <xti_inet.h>
23192  */
23193 # 988 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23194 /*
23195  * The following option values are reserved by <xti_inet.h>
23196  *
23197  * T_IP_OPTIONS	0x107	 -  IP per-packet options
23198  * T_IP_TOS	0x108	 -  IP per packet type of service
23199  */
23200 
23201 /*
23202  * Default value constants for multicast attributes controlled by
23203  * IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
23204  */
23205 
23206 
23207 
23208 
23209 /*
23210  * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
23211  */
23212 struct ip_mreq {
23213  struct in_addr imr_multiaddr; /* IP multicast address of group */
23214  struct in_addr imr_interface; /* local IP address of interface */
23215 };
23216 
23217 /*
23218  * Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
23219  * IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
23220  */
23221 struct ip_mreq_source {
23222  struct in_addr imr_multiaddr; /* IP address of group */
23223  struct in_addr imr_sourceaddr; /* IP address of source */
23224  struct in_addr imr_interface; /* IP address of interface */
23225 };
23226 
23227 /*
23228  * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
23229  * IPv6 addresses.
23230  */
23231 struct ipv6_mreq {
23232  struct in6_addr ipv6mr_multiaddr; /* IPv6 multicast addr */
23233  unsigned int ipv6mr_interface; /* interface index */
23234 };
23235 
23236 /*
23237  * Use #pragma pack() construct to force 32-bit alignment on amd64.
23238  * This is needed to keep the structure size and offsets consistent
23239  * between a 32-bit app and the 64-bit amd64 kernel in structures
23240  * where 64-bit alignment would create gaps (in this case, structures
23241  * which have a uint32_t followed by a struct sockaddr_storage).
23242  */
23243 
23244 
23245 
23246 
23247 /*
23248  * Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
23249  */
23250 struct group_req {
23251  uint32_t gr_interface; /* interface index */
23252  struct sockaddr_storage gr_group; /* group address */
23253 };
23254 
23255 /*
23256  * Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
23257  * MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
23258  */
23259 struct group_source_req {
23260  uint32_t gsr_interface; /* interface index */
23261  struct sockaddr_storage gsr_group; /* group address */
23262  struct sockaddr_storage gsr_source; /* source address */
23263 };
23264 
23265 /*
23266  * Argument for SIOC[GS]MSFILTER ioctls
23267  */
23268 struct group_filter {
23269  uint32_t gf_interface; /* interface index */
23270  struct sockaddr_storage gf_group; /* multicast address */
23271  uint32_t gf_fmode; /* filter mode */
23272  uint32_t gf_numsrc; /* number of sources */
23273  struct sockaddr_storage gf_slist[1]; /* source address */
23274 };
23275 # 1078 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23276 /*
23277  * Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
23278  */
23279 struct ip_msfilter {
23280  struct in_addr imsf_multiaddr; /* IP multicast address of group */
23281  struct in_addr imsf_interface; /* local IP address of interface */
23282  uint32_t imsf_fmode; /* filter mode */
23283  uint32_t imsf_numsrc; /* number of sources in src_list */
23284  struct in_addr imsf_slist[1]; /* start of source list */
23285 };
23286 
23287 
23288 
23289 
23290 
23291 /*
23292  * Multicast source filter manipulation functions in libsocket;
23293  * defined in RFC 3678.
23294  */
23295 int setsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t,
23296    uint_t, struct sockaddr_storage *);
23297 
23298 int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t, uint32_t *,
23299    uint_t *, struct sockaddr_storage *);
23300 
23301 int setipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t,
23302    uint32_t, struct in_addr *);
23303 
23304 int getipv4sourcefilter(int, struct in_addr, struct in_addr, uint32_t *,
23305    uint32_t *, struct in_addr *);
23306 
23307 /*
23308  * Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
23309  */
23310 
23311 
23312 
23313 /*
23314  * Argument struct for IP_PKTINFO option
23315  */
23316 typedef struct in_pktinfo {
23317  unsigned int ipi_ifindex; /* send/recv interface index */
23318  struct in_addr ipi_spec_dst; /* matched source address */
23319  struct in_addr ipi_addr; /* src/dst address in IP hdr */
23320 } in_pktinfo_t;
23321 
23322 /*
23323  * Argument struct for IPV6_PKTINFO option
23324  */
23325 struct in6_pktinfo {
23326  struct in6_addr ipi6_addr; /* src/dst IPv6 address */
23327  unsigned int ipi6_ifindex; /* send/recv interface index */
23328 };
23329 
23330 /*
23331  * Argument struct for IPV6_MTUINFO option
23332  */
23333 struct ip6_mtuinfo {
23334  struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
23335  uint32_t ip6m_mtu; /* path MTU in host byte order */
23336 };
23337 
23338 /*
23339  * IPv6 routing header types
23340  */
23341 
23342 
23343 extern socklen_t inet6_rth_space(int type, int segments);
23344 extern void *inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments);
23345 extern int inet6_rth_add(void *bp, const struct in6_addr *addr);
23346 extern int inet6_rth_reverse(const void *in, void *out);
23347 extern int inet6_rth_segments(const void *bp);
23348 extern struct in6_addr *inet6_rth_getaddr(const void *bp, int index);
23349 
23350 extern int inet6_opt_init(void *extbuf, socklen_t extlen);
23351 extern int inet6_opt_append(void *extbuf, socklen_t extlen, int offset,
23352  uint8_t type, socklen_t len, uint_t align, void **databufp);
23353 extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);
23354 extern int inet6_opt_set_val(void *databuf, int offset, void *val,
23355  socklen_t vallen);
23356 extern int inet6_opt_next(void *extbuf, socklen_t extlen, int offset,
23357  uint8_t *typep, socklen_t *lenp, void **databufp);
23358 extern int inet6_opt_find(void *extbufp, socklen_t extlen, int offset,
23359  uint8_t type, socklen_t *lenp, void **databufp);
23360 extern int inet6_opt_get_val(void *databuf, int offset, void *val,
23361  socklen_t vallen);
23362 
23363 
23364 /*
23365  * Argument structure for IP_ADD_PROXY_ADDR.
23366  * Note that this is an unstable, experimental interface. It may change
23367  * later. Don't use it unless you know what it is.
23368  */
23369 typedef struct {
23370  struct in_addr in_prefix_addr;
23371  unsigned int in_prefix_len;
23372 } in_prefix_t;
23373 
23374 
23375 
23376 /*
23377  * IPv6 options
23378  */
23379 
23380      /* packets. */
23381      /* argument type: uint_t */
23382 
23383      /* multicast packets. */
23384      /* argument type: struct in6_addr */
23385 
23386      /* multicast packets. */
23387      /* argument type: uint_t */
23388 
23389      /* multicast packets on same socket. */
23390      /* argument type: uint_t */
23391 
23392      /* argument type: struct ipv6_mreq */
23393 
23394      /* argument type: struct ipv6_mreq */
23395 
23396 /*
23397  * Other XPG6 constants.
23398  */
23399 
23400      /* decimal notation. */
23401 
23402      /* standard colon-hex notation. */
23403 
23404 
23405 
23406 
23407 
23408 /*
23409  * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept
23410  * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP
23411  * and IPV6_LEAVE_GROUP respectively.
23412  */
23413 
23414      /* argument type: struct ipv6_mreq */
23415 
23416      /* argument type: struct ipv6_mreq */
23417 
23418 
23419      /* arg type: "struct in6_pktingo" - */
23420 
23421 
23422 
23423 
23424      /* the routing header */
23425 
23426 
23427      /* the routing header */
23428 
23429 
23430 
23431 
23432 /*
23433  * This options exists for backwards compatability and should no longer be
23434  * used.  Use IPV6_RECVDSTOPTS instead.
23435  */
23436 
23437 
23438 
23439 
23440 /*
23441  * enable/disable IPV6_RTHDRDSTOPTS.  Now obsolete.  IPV6_RECVDSTOPTS enables
23442  * the receipt of both headers.
23443  */
23444 # 1259 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23445 /*
23446  * enable/disable receipt of both both IPV6_DSTOPTS headers.
23447  */
23448 
23449 
23450 /*
23451  * protocol-independent multicast membership options.
23452  */
23453 
23454 
23455 
23456 
23457 
23458 
23459 
23460 /* 32Bit field for IPV6_SRC_PREFERENCES */
23461 # 1295 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h"
23462 /*
23463  * SunOS private (potentially not portable) IPV6_ option names
23464  */
23465 
23466 
23467      /* unspecified (all zeros) */
23468 
23469 /*
23470  * Miscellaneous IPv6 constants.
23471  */
23472 
23473 
23474 
23475 
23476 /*
23477  * Extern declarations for pre-defined global const variables
23478  */
23479 
23480 
23481 
23482 extern const struct in6_addr in6addr_any;
23483 extern const struct in6_addr in6addr_loopback;
23484 # 78 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
23485 
23486 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 1
23487 /*
23488  * CDDL HEADER START
23489  *
23490  * The contents of this file are subject to the terms of the
23491  * Common Development and Distribution License (the "License").
23492  * You may not use this file except in compliance with the License.
23493  *
23494  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23495  * or http://www.opensolaris.org/os/licensing.
23496  * See the License for the specific language governing permissions
23497  * and limitations under the License.
23498  *
23499  * When distributing Covered Code, include this CDDL HEADER in each
23500  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23501  * If applicable, add the following below this CDDL HEADER, with the
23502  * fields enclosed by brackets "[]" replaced with your own identifying
23503  * information: Portions Copyright [yyyy] [name of copyright owner]
23504  *
23505  * CDDL HEADER END
23506  */
23507 /*
23508  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23509  *
23510  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23511  */
23512 
23513 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23514 /*	  All Rights Reserved	*/
23515 
23516 /*
23517  * University Copyright- Copyright (c) 1982, 1986, 1988
23518  * The Regents of the University of California
23519  * All Rights Reserved
23520  *
23521  * University Acknowledgment- Portions of this document are derived from
23522  * software developed by the University of California, Berkeley, and its
23523  * contributors.
23524  */
23525 
23526 /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
23527 
23528 
23529 
23530 
23531 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23532 /*
23533  * CDDL HEADER START
23534  *
23535  * The contents of this file are subject to the terms of the
23536  * Common Development and Distribution License (the "License").
23537  * You may not use this file except in compliance with the License.
23538  *
23539  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23540  * or http://www.opensolaris.org/os/licensing.
23541  * See the License for the specific language governing permissions
23542  * and limitations under the License.
23543  *
23544  * When distributing Covered Code, include this CDDL HEADER in each
23545  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23546  * If applicable, add the following below this CDDL HEADER, with the
23547  * fields enclosed by brackets "[]" replaced with your own identifying
23548  * information: Portions Copyright [yyyy] [name of copyright owner]
23549  *
23550  * CDDL HEADER END
23551  */
23552 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23553 /*	  All Rights Reserved  	*/
23554 
23555 
23556 /*
23557  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23558  * Use is subject to license terms.
23559  *
23560  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23561  * Copyright 2016 Joyent, Inc.
23562  */
23563 # 46 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
23564 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 1
23565 /*
23566  * CDDL HEADER START
23567  *
23568  * The contents of this file are subject to the terms of the
23569  * Common Development and Distribution License (the "License").
23570  * You may not use this file except in compliance with the License.
23571  *
23572  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23573  * or http://www.opensolaris.org/os/licensing.
23574  * See the License for the specific language governing permissions
23575  * and limitations under the License.
23576  *
23577  * When distributing Covered Code, include this CDDL HEADER in each
23578  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23579  * If applicable, add the following below this CDDL HEADER, with the
23580  * fields enclosed by brackets "[]" replaced with your own identifying
23581  * information: Portions Copyright [yyyy] [name of copyright owner]
23582  *
23583  * CDDL HEADER END
23584  */
23585 /*
23586  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23587  *
23588  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23589  * Use is subject to license terms.
23590  *
23591  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23592  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
23593  */
23594 
23595 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23596 /*	  All Rights Reserved  	*/
23597 
23598 /*
23599  * University Copyright- Copyright (c) 1982, 1986, 1988
23600  * The Regents of the University of California
23601  * All Rights Reserved
23602  *
23603  * University Acknowledgment- Portions of this document are derived from
23604  * software developed by the University of California, Berkeley, and its
23605  * contributors.
23606  */
23607 
23608 
23609 
23610 
23611 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
23612 /*
23613  * CDDL HEADER START
23614  *
23615  * The contents of this file are subject to the terms of the
23616  * Common Development and Distribution License (the "License").
23617  * You may not use this file except in compliance with the License.
23618  *
23619  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23620  * or http://www.opensolaris.org/os/licensing.
23621  * See the License for the specific language governing permissions
23622  * and limitations under the License.
23623  *
23624  * When distributing Covered Code, include this CDDL HEADER in each
23625  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23626  * If applicable, add the following below this CDDL HEADER, with the
23627  * fields enclosed by brackets "[]" replaced with your own identifying
23628  * information: Portions Copyright [yyyy] [name of copyright owner]
23629  *
23630  * CDDL HEADER END
23631  */
23632 
23633 /*
23634  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
23635  * Copyright 2016 Joyent, Inc.
23636  *
23637  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23638  * Use is subject to license terms.
23639  */
23640 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
23641 
23642 
23643 
23644 
23645 
23646 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
23647 /*
23648  * CDDL HEADER START
23649  *
23650  * The contents of this file are subject to the terms of the
23651  * Common Development and Distribution License (the "License").
23652  * You may not use this file except in compliance with the License.
23653  *
23654  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23655  * or http://www.opensolaris.org/os/licensing.
23656  * See the License for the specific language governing permissions
23657  * and limitations under the License.
23658  *
23659  * When distributing Covered Code, include this CDDL HEADER in each
23660  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23661  * If applicable, add the following below this CDDL HEADER, with the
23662  * fields enclosed by brackets "[]" replaced with your own identifying
23663  * information: Portions Copyright [yyyy] [name of copyright owner]
23664  *
23665  * CDDL HEADER END
23666  */
23667 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23668 /*	  All Rights Reserved  	*/
23669 
23670 
23671 /*
23672  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23673  * Use is subject to license terms.
23674  *
23675  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
23676  * Copyright 2016 Joyent, Inc.
23677  */
23678 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h" 2
23679 
23680 /*
23681  * I/O parameter information.  A uio structure describes the I/O which
23682  * is to be performed by an operation.  Typically the data movement will
23683  * be performed by a routine such as uiomove(), which updates the uio
23684  * structure to reflect what was done.
23685  */
23686 
23687 
23688 
23689 
23690 
23691 
23692 
23693 typedef struct iovec {
23694  caddr_t iov_base;
23695 
23696 
23697 
23698  long iov_len;
23699 
23700 } iovec_t;
23701 # 90 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23702 /*
23703  * Segment flag values.
23704  */
23705 typedef enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE, UIO_USERISPACE } uio_seg_t;
23706 
23707 typedef struct uio {
23708  iovec_t *uio_iov; /* pointer to array of iovecs */
23709  int uio_iovcnt; /* number of iovecs */
23710  lloff_t _uio_offset; /* file offset */
23711  uio_seg_t uio_segflg; /* address space (kernel or user) */
23712  uint16_t uio_fmode; /* file mode flags */
23713  uint16_t uio_extflg; /* extended flags */
23714  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
23715  ssize_t uio_resid; /* residual count */
23716 } uio_t;
23717 
23718 /*
23719  * Extended uio_t uioa_t used for asynchronous uio.
23720  *
23721  * Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
23722  *	 as there isn't a formal definition of IOV_MAX for the kernel.
23723  */
23724 
23725 
23726 typedef struct uioa_page_s { /* locked uio_iov state */
23727  int uioa_pfncnt; /* count of pfn_t(s) in *uioa_ppp */
23728  void **uioa_ppp; /* page_t or pfn_t arrary */
23729  caddr_t uioa_base; /* address base */
23730  size_t uioa_len; /* span length */
23731 } uioa_page_t;
23732 
23733 typedef struct uioa_s {
23734  iovec_t *uio_iov; /* pointer to array of iovecs */
23735  int uio_iovcnt; /* number of iovecs */
23736  lloff_t _uio_offset; /* file offset */
23737  uio_seg_t uio_segflg; /* address space (kernel or user) */
23738  uint16_t uio_fmode; /* file mode flags */
23739  uint16_t uio_extflg; /* extended flags */
23740  lloff_t _uio_limit; /* u-limit (maximum byte offset) */
23741  ssize_t uio_resid; /* residual count */
23742  /*
23743 	 * uioa extended members.
23744 	 */
23745  uint32_t uioa_state; /* state of asynch i/o */
23746  ssize_t uioa_mbytes; /* bytes that have been uioamove()ed */
23747  uioa_page_t *uioa_lcur; /* pointer into uioa_locked[] */
23748  void **uioa_lppp; /* pointer into lcur->uioa_ppp[] */
23749  void *uioa_hwst[4]; /* opaque hardware state */
23750  uioa_page_t uioa_locked[16]; /* Per iov locked pages */
23751 } uioa_t;
23752 
23753 /*
23754  * uio extensions
23755  *
23756  * PSARC 2009/478: Copy Reduction Interfaces
23757  */
23758 typedef enum xuio_type {
23759  UIOTYPE_ASYNCIO,
23760  UIOTYPE_ZEROCOPY
23761 } xuio_type_t;
23762 
23763 typedef struct xuio {
23764  uio_t xu_uio; /* Embedded UIO structure */
23765 
23766  /* Extended uio fields */
23767  enum xuio_type xu_type; /* What kind of uio structure? */
23768  union {
23769   /* Async I/O Support, intend to replace uioa_t. */
23770   struct {
23771    uint32_t xu_a_state; /* state of async i/o */
23772    /* bytes that have been uioamove()ed */
23773    ssize_t xu_a_mbytes;
23774    uioa_page_t *xu_a_lcur; /* pointer into uioa_locked[] */
23775    /* pointer into lcur->uioa_ppp[] */
23776    void **xu_a_lppp;
23777    void *xu_a_hwst[4]; /* opaque hardware state */
23778    /* Per iov locked pages */
23779    uioa_page_t xu_a_locked[16];
23780   } xu_aio;
23781 
23782   /*
23783 		 * Copy Reduction Support -- facilate loaning / returning of
23784 		 * filesystem cache buffers.
23785 		 */
23786   struct {
23787    int xu_zc_rw; /* read or write buffer */
23788    void *xu_zc_priv; /* fs specific */
23789   } xu_zc;
23790  } xu_ext;
23791 } xuio_t;
23792 # 207 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23793 /*
23794  * I/O direction.
23795  */
23796 typedef enum uio_rw { UIO_READ, UIO_WRITE } uio_rw_t;
23797 
23798 /*
23799  * uio_extflg: extended flags
23800  *
23801  * NOTE: This flag will be used in uiomove to determine if non-temporal
23802  * access, ie, access bypassing caches, should be used.  Filesystems that
23803  * don't initialize this field could experience suboptimal performance due to
23804  * the random data the field contains.
23805  *
23806  * NOTE: This flag is also used by uioasync callers to pass an extended
23807  * uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
23808  * consumers of a uioa_t require the uio_extflg to be initialized.
23809  */
23810 
23811 
23812 
23813 
23814 
23815 
23816 /*
23817  * Global uioasync capability shadow state.
23818  */
23819 typedef struct uioasync_s {
23820  boolean_t enabled; /* Is uioasync enabled? */
23821  size_t mincnt; /* Minimum byte count for use of */
23822 } uioasync_t;
23823 # 257 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23824 extern ssize_t readv(int, const struct iovec *, int);
23825 extern ssize_t writev(int, const struct iovec *, int);
23826 
23827 /*
23828  * When in the large file compilation environment,
23829  * map preadv/pwritev to their 64 bit offset versions
23830  */
23831 
23832 
23833 
23834 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23835 #pragma redefine_extname preadv preadv64
23836 # 266 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23837 
23838 
23839 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23840 #pragma redefine_extname pwritev pwritev64
23841 # 267 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23842 
23843 
23844 
23845 
23846 
23847 
23848 
23849 /* In the LP64 compilation environment, the APIs are already large file */
23850 # 285 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/uio.h"
23851 extern ssize_t preadv(int, const struct iovec *, int, off_t);
23852 extern ssize_t pwritev(int, const struct iovec *, int, off_t);
23853 
23854 /*
23855  * preadv64 and pwritev64 should be defined when:
23856  * - Using the transitional compilation environment, and not
23857  *     the large file compilation environment.
23858  */
23859 
23860 
23861 extern ssize_t preadv64(int, const struct iovec *, int, off64_t);
23862 extern ssize_t pwritev64(int, const struct iovec *, int, off64_t);
23863 # 47 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
23864 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
23865 /*
23866  * CDDL HEADER START
23867  *
23868  * The contents of this file are subject to the terms of the
23869  * Common Development and Distribution License (the "License").
23870  * You may not use this file except in compliance with the License.
23871  *
23872  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23873  * or http://www.opensolaris.org/os/licensing.
23874  * See the License for the specific language governing permissions
23875  * and limitations under the License.
23876  *
23877  * When distributing Covered Code, include this CDDL HEADER in each
23878  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23879  * If applicable, add the following below this CDDL HEADER, with the
23880  * fields enclosed by brackets "[]" replaced with your own identifying
23881  * information: Portions Copyright [yyyy] [name of copyright owner]
23882  *
23883  * CDDL HEADER END
23884  */
23885 
23886 /*
23887  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
23888  * Copyright 2016 Joyent, Inc.
23889  *
23890  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23891  * Use is subject to license terms.
23892  */
23893 # 48 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
23894 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket_impl.h" 1
23895 /*
23896  * CDDL HEADER START
23897  *
23898  * The contents of this file are subject to the terms of the
23899  * Common Development and Distribution License (the "License").
23900  * You may not use this file except in compliance with the License.
23901  *
23902  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23903  * or http://www.opensolaris.org/os/licensing.
23904  * See the License for the specific language governing permissions
23905  * and limitations under the License.
23906  *
23907  * When distributing Covered Code, include this CDDL HEADER in each
23908  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23909  * If applicable, add the following below this CDDL HEADER, with the
23910  * fields enclosed by brackets "[]" replaced with your own identifying
23911  * information: Portions Copyright [yyyy] [name of copyright owner]
23912  *
23913  * CDDL HEADER END
23914  */
23915 /*
23916  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23917  * Use is subject to license terms.
23918  */
23919 
23920 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
23921 /*	  All Rights Reserved	*/
23922 
23923 /*
23924  * Portions of this source code were derived from Berkeley 4.3 BSD
23925  * under license from the Regents of the University of California.
23926  */
23927 # 49 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
23928 
23929 
23930 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h" 1
23931 /*
23932  * CDDL HEADER START
23933  *
23934  * The contents of this file are subject to the terms of the
23935  * Common Development and Distribution License, Version 1.0 only
23936  * (the "License").  You may not use this file except in compliance
23937  * with the License.
23938  *
23939  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23940  * or http://www.opensolaris.org/os/licensing.
23941  * See the License for the specific language governing permissions
23942  * and limitations under the License.
23943  *
23944  * When distributing Covered Code, include this CDDL HEADER in each
23945  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23946  * If applicable, add the following below this CDDL HEADER, with the
23947  * fields enclosed by brackets "[]" replaced with your own identifying
23948  * information: Portions Copyright [yyyy] [name of copyright owner]
23949  *
23950  * CDDL HEADER END
23951  */
23952 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23953 /*	  All Rights Reserved  	*/
23954 
23955 
23956 /*
23957  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23958  *
23959  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
23960  * Use is subject to license terms.
23961  */
23962 # 43 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
23963 struct netconfig {
23964  char *nc_netid; /* network identifier		*/
23965  unsigned int nc_semantics; /* defined below		*/
23966  unsigned int nc_flag; /* defined below		*/
23967  char *nc_protofmly; /* protocol family name		*/
23968  char *nc_proto; /* protocol name		*/
23969  char *nc_device; /* device name for network id	*/
23970  unsigned int nc_nlookups; /* # of entries in nc_lookups	*/
23971  char **nc_lookups; /* list of lookup directories	*/
23972  unsigned int nc_unused[8]; /* borrowed for lockd etc.	*/
23973 };
23974 
23975 typedef struct {
23976  struct netconfig **nc_head;
23977  struct netconfig **nc_curr;
23978 } NCONF_HANDLE;
23979 
23980 /*
23981  *	Values of nc_semantics
23982  */
23983 
23984 
23985 
23986 
23987 
23988 /*
23989  * NOT FOR PUBLIC USE, Solaris internal only.
23990  * This value of nc_semantics is strictly for use of Remote Direct
23991  * Memory Access provider interfaces in Solaris only and not for
23992  * general use. Do not use this value for general purpose user or
23993  * kernel programming. If used the behavior is undefined.
23994  * This is a PRIVATE interface to be used by Solaris kRPC only.
23995  */
23996 
23997 
23998 /*
23999  *	Values of nc_flag
24000  */
24001 
24002 
24003 
24004 
24005 
24006 /*
24007  *	Values of nc_protofmly
24008  */
24009 # 114 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/netconfig.h"
24010 /*
24011  * NOT FOR PUBLIC USE, Solaris internal only.
24012  * This value of nc_semantics is strictly for use of Remote Direct
24013  * Memory Access provider interfaces in Solaris only and not for
24014  * general use. Do not use this value for general purpose user or
24015  * kernel programming. If used the behavior is undefined.
24016  * This is a PRIVATE interface to be used by Solaris kRPC only.
24017  */
24018 
24019 
24020 /*
24021  *	Values for nc_proto
24022  */
24023 
24024 
24025 
24026 
24027 
24028 
24029 /*
24030  * 	Values for nc_proto for "rdma" protofmly
24031  */
24032 
24033 
24034 
24035 
24036 extern void *setnetconfig(void);
24037 extern int endnetconfig(void *);
24038 extern struct netconfig *getnetconfig(void *);
24039 extern struct netconfig *getnetconfigent(const char *);
24040 extern void freenetconfigent(struct netconfig *);
24041 extern void *setnetpath(void);
24042 extern int endnetpath(void *);
24043 extern struct netconfig *getnetpath(void *);
24044 extern void nc_perror(const char *);
24045 extern char *nc_sperror(void);
24046 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
24047 
24048 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netinet/in.h" 1
24049 /*
24050  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24051  * Use is subject to license terms.
24052  *
24053  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24054  */
24055 /*
24056  * Copyright (c) 1982, 1986 Regents of the University of California.
24057  * All rights reserved.
24058  *
24059  * Redistribution and use in source and binary forms are permitted
24060  * provided that this notice is preserved and that due credit is given
24061  * to the University of California at Berkeley. The name of the University
24062  * may not be used to endorse or promote products derived from this
24063  * software without specific prior written permission. This software
24064  * is provided ``as is'' without express or implied warranty.
24065  */
24066 
24067 /*
24068  * Constants and structures defined by the internet system,
24069  * according to following documents
24070  *
24071  * Internet ASSIGNED NUMBERS (RFC1700) and its successors:
24072  *	http://www.iana.org/assignments/protocol-numbers
24073  *	http://www.iana.org/assignments/port-numbers
24074  * Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
24075  *
24076  */
24077 # 54 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h" 2
24078 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24079 /*
24080  * Definitions related to sockets: types, address families, options.
24081  */
24082 # 94 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24083 /*
24084  * Types
24085  */
24086 # 110 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24087 /*
24088  * Flags for socket() and accept4()
24089  */
24090 
24091 
24092 
24093 
24094 /*
24095  * Option flags per-socket.
24096  */
24097 # 132 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24098 /*
24099  * Socket options are passed using a signed integer, but it is also rare
24100  * for more than one to ever be passed at the same time with setsockopt
24101  * and only one at a time can be retrieved with getsockopt.
24102  *
24103  * Since the lower numbers cannot be renumbered for compatibility reasons,
24104  * it would seem that we need to start a new number space (0x40000000 -
24105  * 0x7fffffff) for those that don't need to be stored as a bit flag
24106  * somewhere. This limits the flag options to 30 but that seems to be
24107  * plenty, anyway. 0x40000000 is reserved for future use.
24108  */
24109 # 159 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24110 /*
24111  * N.B.: The following definition is present only for compatibility
24112  * with release 3.0.  It will disappear in later releases.
24113  */
24114 
24115 
24116 /*
24117  * Additional options, not kept in so_options.
24118  */
24119 # 183 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24120 /* "Socket"-level control message types: */
24121 # 200 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24122 /*
24123  * Socket filter options
24124  */
24125 
24126 
24127 
24128 
24129 
24130 /*
24131  * Structure returned by FIL_LIST
24132  */
24133 struct fil_info {
24134  int fi_flags; /* see below (FILF_*) */
24135  int fi_pos; /* position (0 is bottom) */
24136  char fi_name[32]; /* filter name */
24137 };
24138 # 237 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24139 /*
24140  * Structure used for manipulating linger option.
24141  */
24142 struct linger {
24143  int l_onoff; /* option on/off */
24144  int l_linger; /* linger time */
24145 };
24146 
24147 /*
24148  * Levels for (get/set)sockopt() that don't apply to a specific protocol.
24149  */
24150 
24151 
24152 
24153 
24154 
24155 
24156 
24157 /*
24158  * Address families.
24159  *
24160  * Some of these constant names are copied for the DTrace IP provider in
24161  * usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
24162  * in sync.
24163  */
24164 # 300 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24165 /*
24166  * Protocol families, same as address families for now.
24167  */
24168 # 341 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24169 /*
24170  * Maximum queue length specifiable by listen.
24171  */
24172 
24173 
24174 /*
24175  * Message header for recvmsg and sendmsg calls.
24176  */
24177 struct msghdr {
24178  void *msg_name; /* optional address */
24179  socklen_t msg_namelen; /* size of address */
24180  struct iovec *msg_iov; /* scatter/gather array */
24181  int msg_iovlen; /* # elements in msg_iov */
24182 
24183 
24184 
24185 
24186 
24187 
24188  caddr_t msg_accrights; /* access rights sent/received */
24189  int msg_accrightslen;
24190 
24191 };
24192 # 412 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24193 /* Added for XPGv2 compliance */
24194 
24195 
24196 
24197 
24198 
24199      /* with left over data */
24200 /* End of XPGv2 compliance */
24201 # 438 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24202 /* Added for XPGv2 compliance */
24203 
24204 
24205 
24206 
24207 struct cmsghdr {
24208  socklen_t cmsg_len; /* data byte count, including hdr */
24209  int cmsg_level; /* originating protocol */
24210  int cmsg_type; /* protocol-specific type */
24211 };
24212 # 528 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/socket.h"
24213 extern int accept(int, struct sockaddr *, Psocklen_t);
24214 extern int accept4(int, struct sockaddr *, Psocklen_t, int);
24215 extern int bind(int, const struct sockaddr *, socklen_t);
24216 extern int connect(int, const struct sockaddr *, socklen_t);
24217 extern int getpeername(int, struct sockaddr *, Psocklen_t);
24218 extern int getsockname(int, struct sockaddr *, Psocklen_t);
24219 extern int getsockopt(int, int, int, void *, Psocklen_t);
24220 extern int listen(int, int); /* XXX - fixme???  where do I go */
24221 extern int socketpair(int, int, int, int *);
24222 extern ssize_t recv(int, void *, size_t, int);
24223 extern ssize_t recvfrom(int, void *, size_t, int,
24224  struct sockaddr *, Psocklen_t);
24225 extern ssize_t recvmsg(int, struct msghdr *, int);
24226 extern ssize_t send(int, const void *, size_t, int);
24227 extern ssize_t sendmsg(int, const struct msghdr *, int);
24228 extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
24229  socklen_t);
24230 extern int setsockopt(int, int, int, const void *, socklen_t);
24231 extern int shutdown(int, int);
24232 extern int socket(int, int, int);
24233 
24234 
24235 extern int sockatmark(int);
24236 # 80 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
24237 
24238 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/feature_tests.h" 1
24239 /*
24240  * CDDL HEADER START
24241  *
24242  * The contents of this file are subject to the terms of the
24243  * Common Development and Distribution License (the "License").
24244  * You may not use this file except in compliance with the License.
24245  *
24246  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24247  * or http://www.opensolaris.org/os/licensing.
24248  * See the License for the specific language governing permissions
24249  * and limitations under the License.
24250  *
24251  * When distributing Covered Code, include this CDDL HEADER in each
24252  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24253  * If applicable, add the following below this CDDL HEADER, with the
24254  * fields enclosed by brackets "[]" replaced with your own identifying
24255  * information: Portions Copyright [yyyy] [name of copyright owner]
24256  *
24257  * CDDL HEADER END
24258  */
24259 
24260 /*
24261  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
24262  * Copyright 2016 Joyent, Inc.
24263  *
24264  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24265  * Use is subject to license terms.
24266  */
24267 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h" 2
24268 # 96 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
24269 struct hostent {
24270  char *h_name; /* official name of host */
24271  char **h_aliases; /* alias list */
24272  int h_addrtype; /* host address type */
24273  int h_length; /* length of address */
24274  char **h_addr_list; /* list of addresses from name server */
24275 
24276 };
24277 
24278 
24279 /*
24280  * addrinfo introduced with IPv6 for Protocol-Independent Hostname
24281  * and Service Name Translation.
24282  */
24283 
24284 
24285 struct addrinfo {
24286  int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */
24287  int ai_family; /* PF_xxx */
24288  int ai_socktype; /* SOCK_xxx */
24289  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
24290 
24291 
24292 
24293  socklen_t ai_addrlen;
24294  char *ai_canonname; /* canonical name for hostname */
24295  struct sockaddr *ai_addr; /* binary address */
24296  struct addrinfo *ai_next; /* next structure in linked list */
24297 };
24298 
24299 /*
24300  * The flag 0x8000 is currently reserved for private use between libnsl and
24301  * libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
24302  */
24303 /* addrinfo flags */
24304 
24305 
24306 
24307 
24308 
24309 /* getipnodebyname() flags */
24310 
24311 
24312 
24313 
24314 
24315 /*
24316  * These were defined in RFC 2553 but not SUSv3
24317  * or RFC 3493 which obsoleted 2553.
24318  */
24319 
24320 
24321 
24322 /* addrinfo errors */
24323 # 166 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
24324 /* getnameinfo flags */
24325 
24326 
24327 
24328 
24329 
24330 
24331 
24332 /* Not listed in any standards document */
24333 
24334 
24335 
24336 /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */
24337 
24338 
24339 
24340 
24341 
24342 /*
24343  * Scope delimit character
24344  */
24345 
24346 
24347 
24348 /*
24349  * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
24350  * and algorithms.
24351  */
24352 
24353 typedef struct ipsecalgent {
24354  char **a_names; /* algorithm names */
24355  int a_proto_num; /* protocol number */
24356  int a_alg_num; /* algorithm number */
24357  char *a_mech_name; /* encryption framework mechanism name */
24358  int *a_block_sizes; /* supported block sizes */
24359  int *a_key_sizes; /* supported key sizes */
24360  int a_key_increment; /* key size increment */
24361  int *a_mech_params; /* mechanism specific parameters */
24362  int a_alg_flags; /* algorithm flags */
24363 } ipsecalgent_t;
24364 
24365 /* well-known IPsec protocol numbers */
24366 
24367 
24368 
24369 
24370 
24371 /*
24372  * Assumption here is that a network number
24373  * fits in 32 bits -- probably a poor one.
24374  */
24375 struct netent {
24376  char *n_name; /* official name of net */
24377  char **n_aliases; /* alias list */
24378  int n_addrtype; /* net address type */
24379  in_addr_t n_net; /* network # */
24380 };
24381 
24382 struct protoent {
24383  char *p_name; /* official protocol name */
24384  char **p_aliases; /* alias list */
24385  int p_proto; /* protocol # */
24386 };
24387 
24388 struct servent {
24389  char *s_name; /* official service name */
24390  char **s_aliases; /* alias list */
24391  int s_port; /* port # */
24392  char *s_proto; /* protocol to use */
24393 };
24394 
24395 
24396 struct hostent *gethostbyname_r
24397  (const char *, struct hostent *, char *, int, int *h_errnop);
24398 struct hostent *gethostbyaddr_r
24399  (const char *, int, int, struct hostent *, char *, int, int *h_errnop);
24400 struct hostent *getipnodebyname(const char *, int, int, int *);
24401 struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
24402 void freehostent(struct hostent *);
24403 struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop);
24404 
24405 struct servent *getservbyname_r
24406  (const char *name, const char *, struct servent *, char *, int);
24407 struct servent *getservbyport_r
24408  (int port, const char *, struct servent *, char *, int);
24409 struct servent *getservent_r(struct servent *, char *, int);
24410 
24411 struct netent *getnetbyname_r
24412  (const char *, struct netent *, char *, int);
24413 struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int);
24414 struct netent *getnetent_r(struct netent *, char *, int);
24415 
24416 struct protoent *getprotobyname_r
24417  (const char *, struct protoent *, char *, int);
24418 struct protoent *getprotobynumber_r
24419  (int, struct protoent *, char *, int);
24420 struct protoent *getprotoent_r(struct protoent *, char *, int);
24421 
24422 int getnetgrent_r(char **, char **, char **, char *, int);
24423 int innetgr(const char *, const char *, const char *, const char *);
24424 
24425 
24426 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
24427 struct hostent *gethostbyname(const char *);
24428 struct hostent *gethostent(void);
24429 struct netent *getnetbyaddr(in_addr_t, int);
24430 struct netent *getnetbyname(const char *);
24431 struct netent *getnetent(void);
24432 struct protoent *getprotobyname(const char *);
24433 struct protoent *getprotobynumber(int);
24434 struct protoent *getprotoent(void);
24435 struct servent *getservbyname(const char *, const char *);
24436 struct servent *getservbyport(int, const char *);
24437 struct servent *getservent(void);
24438 
24439 /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
24440 
24441 struct hostent *gethostbyaddr(const void *, socklen_t, int);
24442 
24443 
24444 
24445 
24446 
24447 int endhostent(void);
24448 int endnetent(void);
24449 int endprotoent(void);
24450 int endservent(void);
24451 int sethostent(int);
24452 int setnetent(int);
24453 int setprotoent(int);
24454 int setservent(int);
24455 # 318 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
24456 int getaddrinfo(const char *,
24457    const char *,
24458    const struct addrinfo *,
24459    struct addrinfo **);
24460 void freeaddrinfo(struct addrinfo *);
24461 const char *gai_strerror(int);
24462 int getnameinfo(const struct sockaddr *,
24463    socklen_t, char *, socklen_t,
24464    char *, socklen_t, int);
24465 
24466 
24467 
24468 int getnetgrent(char **, char **, char **);
24469 int setnetgrent(const char *);
24470 int endnetgrent(void);
24471 int rcmd(char **, unsigned short,
24472  const char *, const char *, const char *, int *);
24473 int rcmd_af(char **, unsigned short,
24474  const char *, const char *, const char *, int *, int);
24475 int rresvport_af(int *, int);
24476 int rresvport_addr(int *, struct sockaddr_storage *);
24477 int rexec(char **, unsigned short,
24478  const char *, const char *, const char *, int *);
24479 int rexec_af(char **, unsigned short,
24480  const char *, const char *, const char *, int *, int);
24481 int rresvport(int *);
24482 int ruserok(const char *, int, const char *, const char *);
24483 /* BIND */
24484 struct hostent *gethostbyname2(const char *, int);
24485 void herror(const char *);
24486 const char *hstrerror(int);
24487 /* End BIND */
24488 
24489 /* IPsec algorithm prototype definitions */
24490 struct ipsecalgent *getipsecalgbyname(const char *, int, int *);
24491 struct ipsecalgent *getipsecalgbynum(int, int, int *);
24492 int getipsecprotobyname(const char *doi_name);
24493 char *getipsecprotobynum(int doi_domain);
24494 void freeipsecalgent(struct ipsecalgent *ptr);
24495 /* END IPsec algorithm prototype definitions */
24496 
24497 
24498 
24499 /*
24500  * Error return codes from gethostbyname() and gethostbyaddr()
24501  * (when using the resolver)
24502  */
24503 
24504 extern int h_errno;
24505 # 377 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
24506 /*
24507  * Error return codes from gethostbyname() and gethostbyaddr()
24508  * (left in extern int h_errno).
24509  */
24510 # 389 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/netdb.h"
24511 /* BIND */
24512 
24513 
24514 /* End BIND */
24515 # 46 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
24516 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 1
24517 /*
24518  * CDDL HEADER START
24519  *
24520  * The contents of this file are subject to the terms of the
24521  * Common Development and Distribution License, Version 1.0 only
24522  * (the "License").  You may not use this file except in compliance
24523  * with the License.
24524  *
24525  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24526  * or http://www.opensolaris.org/os/licensing.
24527  * See the License for the specific language governing permissions
24528  * and limitations under the License.
24529  *
24530  * When distributing Covered Code, include this CDDL HEADER in each
24531  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24532  * If applicable, add the following below this CDDL HEADER, with the
24533  * fields enclosed by brackets "[]" replaced with your own identifying
24534  * information: Portions Copyright [yyyy] [name of copyright owner]
24535  *
24536  * CDDL HEADER END
24537  */
24538 /*
24539  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24540  * Use is subject to license terms.
24541  */
24542 
24543 
24544 
24545 
24546 #pragma ident "%Z%%M%	%I%	%E% SMI"
24547 
24548 
24549 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/types.h" 1
24550 /*
24551  * CDDL HEADER START
24552  *
24553  * The contents of this file are subject to the terms of the
24554  * Common Development and Distribution License (the "License").
24555  * You may not use this file except in compliance with the License.
24556  *
24557  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24558  * or http://www.opensolaris.org/os/licensing.
24559  * See the License for the specific language governing permissions
24560  * and limitations under the License.
24561  *
24562  * When distributing Covered Code, include this CDDL HEADER in each
24563  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24564  * If applicable, add the following below this CDDL HEADER, with the
24565  * fields enclosed by brackets "[]" replaced with your own identifying
24566  * information: Portions Copyright [yyyy] [name of copyright owner]
24567  *
24568  * CDDL HEADER END
24569  */
24570 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
24571 /*	  All Rights Reserved  	*/
24572 
24573 
24574 /*
24575  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24576  * Use is subject to license terms.
24577  *
24578  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
24579  * Copyright 2016 Joyent, Inc.
24580  */
24581 # 34 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
24582 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h" 1
24583 /*
24584  * CDDL HEADER START
24585  *
24586  * The contents of this file are subject to the terms of the
24587  * Common Development and Distribution License, Version 1.0 only
24588  * (the "License").  You may not use this file except in compliance
24589  * with the License.
24590  *
24591  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24592  * or http://www.opensolaris.org/os/licensing.
24593  * See the License for the specific language governing permissions
24594  * and limitations under the License.
24595  *
24596  * When distributing Covered Code, include this CDDL HEADER in each
24597  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24598  * If applicable, add the following below this CDDL HEADER, with the
24599  * fields enclosed by brackets "[]" replaced with your own identifying
24600  * information: Portions Copyright [yyyy] [name of copyright owner]
24601  *
24602  * CDDL HEADER END
24603  */
24604 /*
24605  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
24606  * Use is subject to license terms.
24607  */
24608 
24609 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
24610 /*	  All Rights Reserved  	*/
24611 
24612 /*
24613  * University Copyright- Copyright (c) 1982, 1986, 1988
24614  * The Regents of the University of California
24615  * All Rights Reserved
24616  *
24617  * University Acknowledgment- Portions of this document are derived from
24618  * software developed by the University of California, Berkeley, and its
24619  * contributors.
24620  */
24621 
24622 
24623 
24624 
24625 #pragma ident "%Z%%M%	%I%	%E% SMI"
24626 
24627 
24628 
24629 
24630 
24631 /*
24632  * Error codes
24633  */
24634 # 102 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24635 /* Filesystem Quotas */
24636 
24637 
24638 /* Convergent Error Returns */
24639 # 116 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24640 /* Interprocess Robust Locks */
24641 
24642 
24643 
24644 /* stream problems */
24645 # 136 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24646 /* Interprocess Robust Locks */
24647 # 148 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24648 /* shared library problems */
24649 # 162 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24650 /* BSD Networking Software */
24651  /* argument errors */
24652 # 174 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24653     /* protocol family */
24654 
24655 
24656  /* operational errors */
24657 
24658 
24659 
24660     /* of reset */
24661 
24662 
24663 
24664 
24665 
24666 /* XENIX has 135 - 142 */
24667 # 198 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/errno.h"
24668 /* SUN Network File System */
24669 # 35 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
24670 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 1
24671 /*
24672  * CDDL HEADER START
24673  *
24674  * The contents of this file are subject to the terms of the
24675  * Common Development and Distribution License, Version 1.0 only
24676  * (the "License").  You may not use this file except in compliance
24677  * with the License.
24678  *
24679  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24680  * or http://www.opensolaris.org/os/licensing.
24681  * See the License for the specific language governing permissions
24682  * and limitations under the License.
24683  *
24684  * When distributing Covered Code, include this CDDL HEADER in each
24685  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24686  * If applicable, add the following below this CDDL HEADER, with the
24687  * fields enclosed by brackets "[]" replaced with your own identifying
24688  * information: Portions Copyright [yyyy] [name of copyright owner]
24689  *
24690  * CDDL HEADER END
24691  */
24692 /*
24693  * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
24694  * Use is subject to license terms.
24695  */
24696 
24697 
24698 
24699 
24700 #pragma ident "%Z%%M%	%I%	%E% SMI"
24701 
24702 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/sys/param.h" 1
24703 /*
24704  * CDDL HEADER START
24705  *
24706  * The contents of this file are subject to the terms of the
24707  * Common Development and Distribution License (the "License").
24708  * You may not use this file except in compliance with the License.
24709  *
24710  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24711  * or http://www.opensolaris.org/os/licensing.
24712  * See the License for the specific language governing permissions
24713  * and limitations under the License.
24714  *
24715  * When distributing Covered Code, include this CDDL HEADER in each
24716  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24717  * If applicable, add the following below this CDDL HEADER, with the
24718  * fields enclosed by brackets "[]" replaced with your own identifying
24719  * information: Portions Copyright [yyyy] [name of copyright owner]
24720  *
24721  * CDDL HEADER END
24722  */
24723 
24724 /*
24725  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
24726  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
24727  */
24728 
24729 /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
24730 /*	  All Rights Reserved  	*/
24731 
24732 /*
24733  * University Copyright- Copyright (c) 1982, 1986, 1988
24734  * The Regents of the University of California
24735  * All Rights Reserved
24736  *
24737  * University Acknowledgment- Portions of this document are derived from
24738  * software developed by the University of California, Berkeley, and its
24739  * contributors.
24740  */
24741 # 33 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h" 2
24742 # 52 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/parseURL.h"
24743 typedef struct {
24744  char hostname[256];
24745  ushort_t port;
24746 } url_hport_t;
24747 
24748 typedef struct {
24749  boolean_t https;
24750  url_hport_t hport;
24751  char abspath[1024];
24752 } url_t;
24753 
24754 extern int url_parse_hostport(const char *, url_hport_t *, ushort_t);
24755 extern int url_parse(const char *, url_t *);
24756 # 36 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h" 2
24757 
24758 
24759 
24760 
24761 
24762 /* State information returned by http_conn_info() */
24763 typedef struct {
24764  url_t uri; /* URI last loaded */
24765  url_hport_t proxy; /* proxy, if any being used */
24766  boolean_t keepalive; /* Keepalive setting being used */
24767  uint_t read_timeout; /* Timeout to use for socket reads */
24768 } http_conninfo_t;
24769 
24770 
24771 /* Structure for version of the http file */
24772 typedef struct {
24773  uint_t maj_ver; /* Major version */
24774  uint_t min_ver; /* Minor version */
24775  uint_t micro_ver; /* Micro version */
24776 } boot_http_ver_t;
24777 
24778 /* Internal Libhttp errors */
24779 
24780 
24781 
24782     /* necessarily the underlying transport */
24783     /* connection). */
24784 
24785     /* error. */
24786 
24787 
24788 
24789     /* No matching entry */
24790 # 82 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/boot_http.h"
24791 /* Sources of errors */
24792 
24793 
24794 
24795 
24796 
24797 
24798 
24799 typedef struct {
24800  uint_t code; /* status code */
24801  char *statusmsg; /* status message */
24802  uint_t nresphdrs; /* number of response headers */
24803 } http_respinfo_t;
24804 
24805 
24806 typedef void *http_handle_t;
24807 
24808 boot_http_ver_t const *http_get_version(void);
24809 void http_set_p12_format(int);
24810 void http_set_verbose(boolean_t);
24811 int http_set_cipher_list(const char *);
24812 http_handle_t http_srv_init(const url_t *);
24813 int http_set_proxy(http_handle_t, const url_hport_t *);
24814 int http_set_keepalive(http_handle_t, boolean_t);
24815 int http_set_socket_read_timeout(http_handle_t, uint_t);
24816 int http_set_basic_auth(http_handle_t, const char *, const char *);
24817 int http_set_random_file(http_handle_t, const char *);
24818 int http_set_certificate_authority_file(const char *);
24819 int http_set_client_certificate_file(http_handle_t, const char *);
24820 int http_set_password(http_handle_t, const char *);
24821 int http_set_key_file_password(http_handle_t, const char *);
24822 int http_set_private_key_file(http_handle_t, const char *);
24823 
24824 int http_srv_connect(http_handle_t);
24825 int http_head_request(http_handle_t, const char *);
24826 int http_get_request(http_handle_t, const char *);
24827 int http_get_range_request(http_handle_t, const char *, offset_t, offset_t);
24828 void http_free_respinfo(http_respinfo_t *);
24829 int http_process_headers(http_handle_t, http_respinfo_t **);
24830 int http_process_part_headers(http_handle_t, http_respinfo_t **);
24831 char *http_get_header_value(http_handle_t, const char *);
24832 char *http_get_response_header(http_handle_t, uint_t);
24833 int http_read_body(http_handle_t, char *, size_t);
24834 int http_srv_disconnect(http_handle_t);
24835 int http_srv_close(http_handle_t);
24836 http_conninfo_t *http_get_conn_info(http_handle_t);
24837 int http_conn_is_https(http_handle_t, boolean_t *);
24838 ulong_t http_get_lasterr(http_handle_t, uint_t *);
24839 void http_decode_err(ulong_t, int *, int *, int *);
24840 char const *http_errorstr(uint_t, ulong_t);
24841 # 47 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
24842 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
24843 /*
24844  * CDDL HEADER START
24845  *
24846  * The contents of this file are subject to the terms of the
24847  * Common Development and Distribution License (the "License").
24848  * You may not use this file except in compliance with the License.
24849  *
24850  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24851  * or http://www.opensolaris.org/os/licensing.
24852  * See the License for the specific language governing permissions
24853  * and limitations under the License.
24854  *
24855  * When distributing Covered Code, include this CDDL HEADER in each
24856  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24857  * If applicable, add the following below this CDDL HEADER, with the
24858  * fields enclosed by brackets "[]" replaced with your own identifying
24859  * information: Portions Copyright [yyyy] [name of copyright owner]
24860  *
24861  * CDDL HEADER END
24862  */
24863 
24864 /*
24865  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24866  * Use is subject to license terms.
24867  */
24868 
24869 
24870 
24871 
24872 
24873 /*
24874  * Module:	pkgerr.h
24875  * Description:
24876  *
24877  *   Implements error routines to handle the creation,
24878  *   management, and destruction of error objects, which
24879  *   hold error messages and codes returned from libpkg
24880  *   routines that support the objects defined herein.
24881  */
24882 
24883 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/stdio.h" 1
24884 /*
24885  * CDDL HEADER START
24886  *
24887  * The contents of this file are subject to the terms of the
24888  * Common Development and Distribution License (the "License").
24889  * You may not use this file except in compliance with the License.
24890  *
24891  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24892  * or http://www.opensolaris.org/os/licensing.
24893  * See the License for the specific language governing permissions
24894  * and limitations under the License.
24895  *
24896  * When distributing Covered Code, include this CDDL HEADER in each
24897  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24898  * If applicable, add the following below this CDDL HEADER, with the
24899  * fields enclosed by brackets "[]" replaced with your own identifying
24900  * information: Portions Copyright [yyyy] [name of copyright owner]
24901  *
24902  * CDDL HEADER END
24903  */
24904 
24905 /*
24906  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24907  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24908  */
24909 
24910 /*	Copyright (c) 1988 AT&T	*/
24911 /*	  All Rights Reserved  	*/
24912 
24913 /*
24914  * User-visible pieces of the ANSI C standard I/O package.
24915  */
24916 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 2
24917 
24918 
24919 
24920 
24921 
24922 /*
24923  * Public Definitions
24924  */
24925 
24926 typedef enum {
24927  PKGERR_OK = 0,
24928  PKGERR_EXIST,
24929  PKGERR_READ,
24930  PKGERR_CORRUPT,
24931  PKGERR_PARSE,
24932  PKGERR_BADPASS,
24933  PKGERR_BADALIAS,
24934  PKGERR_INTERNAL,
24935  PKGERR_UNSUP,
24936  PKGERR_NOALIAS,
24937  PKGERR_NOALIASMATCH,
24938  PKGERR_MULTIPLE,
24939  PKGERR_INCOMPLETE,
24940  PKGERR_NOPRIVKEY,
24941  PKGERR_NOPUBKEY,
24942  PKGERR_NOCACERT,
24943  PKGERR_NOMEM,
24944  PKGERR_CHAIN,
24945  PKGERR_LOCKED,
24946  PKGERR_WRITE,
24947  PKGERR_UNLOCK,
24948  PKGERR_TIME,
24949  PKGERR_DUPLICATE,
24950  PKGERR_WEB,
24951  PKGERR_VERIFY
24952 } PKG_ERR_CODE;
24953 
24954 /*
24955  * Public Structures
24956  */
24957 
24958 /* external reference to PKG_ERR object (contents private) */
24959 typedef PKG_ERR_CODE pkg_err_t;
24960 
24961 typedef struct _pkg_err_struct PKG_ERR;
24962 
24963 /*
24964  * Public Methods
24965  */
24966 
24967 PKG_ERR *pkgerr_new();
24968 void pkgerr_add(PKG_ERR *, PKG_ERR_CODE, char *, ...);
24969 void pkgerr_clear(PKG_ERR *);
24970 int pkgerr_dump(PKG_ERR *, FILE *);
24971 int pkgerr_num(PKG_ERR *);
24972 char *pkgerr_get(PKG_ERR *, int);
24973 void pkgerr_free(PKG_ERR *);
24974 # 48 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
24975 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 1
24976 /*
24977  * CDDL HEADER START
24978  *
24979  * The contents of this file are subject to the terms of the
24980  * Common Development and Distribution License (the "License").
24981  * You may not use this file except in compliance with the License.
24982  *
24983  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24984  * or http://www.opensolaris.org/os/licensing.
24985  * See the License for the specific language governing permissions
24986  * and limitations under the License.
24987  *
24988  * When distributing Covered Code, include this CDDL HEADER in each
24989  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
24990  * If applicable, add the following below this CDDL HEADER, with the
24991  * fields enclosed by brackets "[]" replaced with your own identifying
24992  * information: Portions Copyright [yyyy] [name of copyright owner]
24993  *
24994  * CDDL HEADER END
24995  */
24996 
24997 /*
24998  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24999  * Use is subject to license terms.
25000  */
25001 
25002 
25003 
25004 
25005 
25006 /*
25007  * Module:	keystore.h
25008  * Description:	This module contains the structure definitions for processing
25009  *		package keystore files.
25010  */
25011 
25012 
25013 
25014 
25015 
25016 # 1 "/usr/include/openssl/evp.h" 1 3 4
25017 /* crypto/evp/evp.h */
25018 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25019  * All rights reserved.
25020  *
25021  * This package is an SSL implementation written
25022  * by Eric Young (eay@cryptsoft.com).
25023  * The implementation was written so as to conform with Netscapes SSL.
25024  *
25025  * This library is free for commercial and non-commercial use as long as
25026  * the following conditions are aheared to.  The following conditions
25027  * apply to all code found in this distribution, be it the RC4, RSA,
25028  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25029  * included with this distribution is covered by the same copyright terms
25030  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25031  *
25032  * Copyright remains Eric Young's, and as such any Copyright notices in
25033  * the code are not to be removed.
25034  * If this package is used in a product, Eric Young should be given attribution
25035  * as the author of the parts of the library used.
25036  * This can be in the form of a textual message at program startup or
25037  * in documentation (online or textual) provided with the package.
25038  *
25039  * Redistribution and use in source and binary forms, with or without
25040  * modification, are permitted provided that the following conditions
25041  * are met:
25042  * 1. Redistributions of source code must retain the copyright
25043  *    notice, this list of conditions and the following disclaimer.
25044  * 2. Redistributions in binary form must reproduce the above copyright
25045  *    notice, this list of conditions and the following disclaimer in the
25046  *    documentation and/or other materials provided with the distribution.
25047  * 3. All advertising materials mentioning features or use of this software
25048  *    must display the following acknowledgement:
25049  *    "This product includes cryptographic software written by
25050  *     Eric Young (eay@cryptsoft.com)"
25051  *    The word 'cryptographic' can be left out if the rouines from the library
25052  *    being used are not cryptographic related :-).
25053  * 4. If you include any Windows specific code (or a derivative thereof) from
25054  *    the apps directory (application code) you must include an acknowledgement:
25055  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25056  *
25057  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25058  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25059  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25060  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25061  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25062  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25063  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25064  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25065  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25066  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25067  * SUCH DAMAGE.
25068  *
25069  * The licence and distribution terms for any publically available version or
25070  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25071  * copied and put under another distribution licence
25072  * [including the GNU Public Licence.]
25073  */
25074 # 42 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
25075 # 1 "/usr/include/openssl/x509.h" 1 3 4
25076 /* crypto/x509/x509.h */
25077 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
25078  * All rights reserved.
25079  *
25080  * This package is an SSL implementation written
25081  * by Eric Young (eay@cryptsoft.com).
25082  * The implementation was written so as to conform with Netscapes SSL.
25083  *
25084  * This library is free for commercial and non-commercial use as long as
25085  * the following conditions are aheared to.  The following conditions
25086  * apply to all code found in this distribution, be it the RC4, RSA,
25087  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
25088  * included with this distribution is covered by the same copyright terms
25089  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
25090  *
25091  * Copyright remains Eric Young's, and as such any Copyright notices in
25092  * the code are not to be removed.
25093  * If this package is used in a product, Eric Young should be given attribution
25094  * as the author of the parts of the library used.
25095  * This can be in the form of a textual message at program startup or
25096  * in documentation (online or textual) provided with the package.
25097  *
25098  * Redistribution and use in source and binary forms, with or without
25099  * modification, are permitted provided that the following conditions
25100  * are met:
25101  * 1. Redistributions of source code must retain the copyright
25102  *    notice, this list of conditions and the following disclaimer.
25103  * 2. Redistributions in binary form must reproduce the above copyright
25104  *    notice, this list of conditions and the following disclaimer in the
25105  *    documentation and/or other materials provided with the distribution.
25106  * 3. All advertising materials mentioning features or use of this software
25107  *    must display the following acknowledgement:
25108  *    "This product includes cryptographic software written by
25109  *     Eric Young (eay@cryptsoft.com)"
25110  *    The word 'cryptographic' can be left out if the rouines from the library
25111  *    being used are not cryptographic related :-).
25112  * 4. If you include any Windows specific code (or a derivative thereof) from
25113  *    the apps directory (application code) you must include an acknowledgement:
25114  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
25115  *
25116  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
25117  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25118  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25119  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25120  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25121  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25122  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25123  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25124  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25125  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25126  * SUCH DAMAGE.
25127  *
25128  * The licence and distribution terms for any publically available version or
25129  * derivative of this code cannot be changed.  i.e. this code cannot simply be
25130  * copied and put under another distribution licence
25131  * [including the GNU Public Licence.]
25132  */
25133 /* ====================================================================
25134  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
25135  * ECDH support in OpenSSL originally developed by
25136  * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
25137  */
25138 # 43 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
25139 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkgerr.h" 1
25140 /*
25141  * CDDL HEADER START
25142  *
25143  * The contents of this file are subject to the terms of the
25144  * Common Development and Distribution License (the "License").
25145  * You may not use this file except in compliance with the License.
25146  *
25147  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25148  * or http://www.opensolaris.org/os/licensing.
25149  * See the License for the specific language governing permissions
25150  * and limitations under the License.
25151  *
25152  * When distributing Covered Code, include this CDDL HEADER in each
25153  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25154  * If applicable, add the following below this CDDL HEADER, with the
25155  * fields enclosed by brackets "[]" replaced with your own identifying
25156  * information: Portions Copyright [yyyy] [name of copyright owner]
25157  *
25158  * CDDL HEADER END
25159  */
25160 
25161 /*
25162  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
25163  * Use is subject to license terms.
25164  */
25165 # 44 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/keystore.h" 2
25166 
25167 /* keystore structures */
25168 
25169 /* this opaque type represents a keystore */
25170 typedef void *keystore_handle_t;
25171 
25172 /* flags passed to open_keystore */
25173 
25174 /* opens keystore read-only.  Attempts to modify results in an error */
25175 
25176 
25177 /* opens keystore read-write */
25178 
25179 
25180 /*
25181  * tells open_keystore to fall back to app-generic paths in the case that
25182  * the app-specific paths do not exist.
25183  */
25184 
25185 
25186 /*
25187  * tells open_keystore to use the app-specific paths no matter what,
25188  * failing if they cannot be used for any reason.
25189  */
25190 
25191 
25192 /* masks off various types of flags */
25193 
25194 
25195 
25196 /* default is read-only, soft */
25197 
25198 
25199 
25200 /*
25201  * possible encoding formats used by the library, used
25202  * by print_cert
25203  */
25204 typedef enum {
25205  KEYSTORE_FORMAT_PEM,
25206  KEYSTORE_FORMAT_DER,
25207  KEYSTORE_FORMAT_TEXT
25208 } keystore_encoding_format_t;
25209 
25210 /*
25211  * structure passed back to password callback for determining how
25212  * to prompt for passphrase, and where to record errors
25213  */
25214 typedef struct {
25215  PKG_ERR *err;
25216 } keystore_passphrase_data;
25217 
25218 
25219 /* max length of a passphrase.  One could use a short story! */
25220 
25221 
25222 /* callback for collecting passphrase when open_keystore() is called */
25223 typedef int keystore_passphrase_cb(char *, int, int, void *);
25224 
25225 /* names of the individual files within the keystore path */
25226 
25227 
25228 
25229 
25230 /* keystore.c */
25231 extern int open_keystore(PKG_ERR *, char *, char *,
25232     keystore_passphrase_cb, long flags, keystore_handle_t *);
25233 
25234 extern int print_certs(PKG_ERR *, keystore_handle_t, char *,
25235     keystore_encoding_format_t, FILE *);
25236 
25237 extern int check_cert(PKG_ERR *, X509 *);
25238 
25239 extern int check_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *);
25240 
25241 extern int print_cert(PKG_ERR *, X509 *,
25242     keystore_encoding_format_t, char *, boolean_t, FILE *);
25243 
25244 extern int close_keystore(PKG_ERR *, keystore_handle_t,
25245     keystore_passphrase_cb);
25246 
25247 extern int merge_ca_cert(PKG_ERR *, X509 *, keystore_handle_t);
25248 extern int merge_cert_and_key(PKG_ERR *, X509 *, EVP_PKEY *,
25249     char *, keystore_handle_t);
25250 
25251 extern int delete_cert_and_keys(PKG_ERR *, keystore_handle_t,
25252     char *);
25253 
25254 extern int find_key_cert_pair(PKG_ERR *, keystore_handle_t,
25255     char *, EVP_PKEY **, X509 **);
25256 
25257 extern int find_ca_certs(PKG_ERR *, keystore_handle_t,
25258     struct stack_st_X509 **);
25259 
25260 extern int find_cl_certs(PKG_ERR *, keystore_handle_t,
25261     struct stack_st_X509 **);
25262 # 49 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
25263 # 1 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 1
25264 /*
25265  * CDDL HEADER START
25266  *
25267  * The contents of this file are subject to the terms of the
25268  * Common Development and Distribution License (the "License").
25269  * You may not use this file except in compliance with the License.
25270  *
25271  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25272  * or http://www.opensolaris.org/os/licensing.
25273  * See the License for the specific language governing permissions
25274  * and limitations under the License.
25275  *
25276  * When distributing Covered Code, include this CDDL HEADER in each
25277  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25278  * If applicable, add the following below this CDDL HEADER, with the
25279  * fields enclosed by brackets "[]" replaced with your own identifying
25280  * information: Portions Copyright [yyyy] [name of copyright owner]
25281  *
25282  * CDDL HEADER END
25283  */
25284 
25285 /*
25286  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25287  * Use is subject to license terms.
25288  */
25289 # 35 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h"
25290 # 1 "/home/git3/dehawe/titanic_53/proto/root_i386/usr/include/pkgstrct.h" 1
25291 /*
25292  * CDDL HEADER START
25293  *
25294  * The contents of this file are subject to the terms of the
25295  * Common Development and Distribution License (the "License").
25296  * You may not use this file except in compliance with the License.
25297  *
25298  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25299  * or http://www.opensolaris.org/os/licensing.
25300  * See the License for the specific language governing permissions
25301  * and limitations under the License.
25302  *
25303  * When distributing Covered Code, include this CDDL HEADER in each
25304  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25305  * If applicable, add the following below this CDDL HEADER, with the
25306  * fields enclosed by brackets "[]" replaced with your own identifying
25307  * information: Portions Copyright [yyyy] [name of copyright owner]
25308  *
25309  * CDDL HEADER END
25310  */
25311 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
25312 /*	  All Rights Reserved  	*/
25313 
25314 /*
25315  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25316  * Use is subject to license terms.
25317  */
25318 # 36 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/cfext.h" 2
25319 
25320 struct mergstat {
25321  unsigned setuid:1; /* pkgmap entry has setuid */
25322  unsigned setgid:1; /* ... and/or setgid bit set */
25323  unsigned contchg:1; /* contents of the files different */
25324  unsigned attrchg:1; /* attributes are different */
25325  unsigned shared:1; /* > 1 pkg associated with this */
25326  unsigned osetuid:1; /* installed set[ug]id process ... */
25327  unsigned osetgid:1; /* ... being overwritten by pkg. */
25328  unsigned rogue:1; /* conflicting file not owned by a package */
25329  unsigned dir2nondir:1; /* was a directory & now a non-directory */
25330  unsigned replace:1; /* merge makes no sense for this object pair */
25331  unsigned denied:1; /* for some reason this was not allowed in */
25332  unsigned preloaded:1; /* already checked in a prior pkg op */
25333  unsigned processed:1; /* already installed or removed */
25334  unsigned parentsyml2dir:1;
25335  /* parent directory changed from symlink to a directory */
25336 };
25337 
25338 /*
25339  * This is information required by pkgadd for fast operation. A
25340  * cfextra struct is tagged to each cfent structure requiring
25341  * processing. This is how we avoid some unneeded repetition. The
25342  * entries incorporating the word 'local' refer to the path that
25343  * gets us to the delivered package file. In other words, to install
25344  * a file we usually copy from 'local' to 'path' below. In the case
25345  * of a link, where no actual copying takes place, local is the source
25346  * of the link. Note that environment variables are not evaluated in
25347  * the locals unless they are links since the literal path is how
25348  * pkgadd finds the entry under the reloc directory.
25349  */
25350 struct cfextra {
25351  struct cfent cf_ent; /* basic contents file entry */
25352  struct mergstat mstat; /* merge status for installs */
25353  uint32_t fsys_value; /* fstab[] entry index */
25354  uint32_t fsys_base; /* actual base filesystem in fs_tab[] */
25355  char *client_path; /* the client-relative path */
25356  char *server_path; /* the server-relative path */
25357  char *map_path; /* as read from the pkgmap */
25358  char *client_local; /* client_relative local */
25359  char *server_local; /* server relative local */
25360 };
25361 # 50 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h" 2
25362 
25363 /*
25364  * The contents database file interface.
25365  */
25366 
25367 typedef struct pkg_server *PKGserver;
25368 
25369 /* Some commands modify the internal database: add them here */
25370 # 82 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25371 typedef enum {
25372  INVALID, /* Not initialized */
25373  NEVER, /* Don't start, does check if it is running. */
25374  FLUSH_LOG, /* Run it once to incorporate the log. */
25375  RUN_ONCE, /* Run until the current client stops. */
25376  TIMEOUT, /* Run until a timeout occurs. */
25377  PERMANENT, /* Run until it is externally terminated. */
25378  DEFAULTMODE = TIMEOUT /* The default mode, must come last */
25379 } start_mode_t;
25380 
25381 typedef struct pkgcmd {
25382  int cmd;
25383  char buf[1];
25384 } pkgcmd_t;
25385 
25386 typedef struct pkgfilter {
25387  int cmd;
25388  int len;
25389  char buf[1];
25390 } pkgfilter_t;
25391 
25392 /*
25393  * Virtual File Protocol definitions
25394  */
25395 
25396 /*
25397  * flags associated with virtual file protocol operations; note that these flags
25398  * may only occupy the low order 16 bits of the 32-bit unsigned flag.
25399  */
25400 
25401 typedef unsigned long VFPFLAGS_T;
25402 # 121 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25403 /* virtual file protocol object */
25404 
25405 typedef struct _vfp VFP_T;
25406 
25407 /* structure behind the virtual file protocol object */
25408 
25409 struct _vfp {
25410  FILE *_vfpFile; /* -> opened FILE */
25411  char *_vfpCurr; /* -> current byte to read/write */
25412  char *_vfpHighWater; /* -> last byte modified */
25413  char *_vfpEnd; /* -> last data byte */
25414  char *_vfpPath; /* -> path associated with FILE */
25415  char *_vfpStart; /* -> first data byte */
25416  void *_vfpExtra; /* undefined */
25417  size_t _vfpSize; /* size of mapped/allocated area */
25418  size_t _vfpMapSize; /* # mapped bytes */
25419  VFPFLAGS_T _vfpFlags; /* flags associated with vfp/data */
25420  int _vfpOverflow; /* non-zero if buffer write overflow */
25421  blkcnt_t _vfpCkStBlocks; /* checkpoint # blocks */
25422  dev_t _vfpCkDev; /* checkpoint device i.d. */
25423  ino_t _vfpCkIno; /* checkpoint inode # */
25424  off_t _vfpCkSize; /* checkpoint size */
25425  time_t _vfpCkMtime; /* checkpoint modification time */
25426 };
25427 
25428 /*
25429  * get highest modified byte (length) contained in vfp
25430  *
25431  * determine number of bytes to write - it will be the highest of:
25432  *  -- the current pointer into the file - this is updated whenever
25433  *	the location of the file is changed by a single byte
25434  *  -- the last "high water mark" - the last known location that
25435  *	was written to the file - updated only when the location
25436  *	of the file is directly changed - e.g. vfpSetCurrCharPtr,
25437  *	vfpTruncate, vfpRewind.
25438  * this reduces the "bookkeeping" that needs to be done to know
25439  * how many bytes to write out to the file - typically a file is
25440  * written sequentially so the current file pointer is sufficient
25441  * to determine how many bytes to write out.
25442  */
25443 # 169 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25444 /*
25445  * increment current pointer by specified delta
25446  * if the delta exceeds the buffer size, set pointer to buffer end
25447  */
25448 # 185 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25449 /* get the path associated with the vfp */
25450 
25451 
25452 /* get a string from the vfp into a fixed size buffer */
25453 # 207 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25454 /* get number of bytes remaining to read */
25455 
25456 
25457 
25458 
25459 /* get number of bytes remaining to write */
25460 
25461 
25462 
25463 
25464 /* put current character and increment to next */
25465 
25466 
25467 
25468 
25469 
25470 
25471 /* put integer to current character and increment */
25472 
25473 
25474 /* put long to current character and increment */
25475 
25476 
25477 /* get current character and increment to next */
25478 
25479 
25480 /* get current character - do not increment */
25481 
25482 
25483 /* get pointer to current character */
25484 
25485 
25486 /* increment current character pointer */
25487 
25488 
25489 /* decrement current character pointer */
25490 
25491 
25492 /* get pointer to first data byte in buffer */
25493 
25494 
25495 /* get pointer to last data byte in buffer */
25496 
25497 
25498 /* set pointer to current character */
25499 
25500 
25501 
25502 
25503 
25504 
25505 /* set pointer to last data byte in buffer */
25506 # 267 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25507 /* seek to end of file - one past last data byte in file */
25508 
25509 
25510 /* get number of bytes between current char and specified char */
25511 
25512 
25513 
25514 /* put string to current character and increment */
25515 # 284 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25516 /* put fixed number of bytes to current character and increment */
25517 # 298 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25518 /* put format one arg to current character and increment */
25519 
25520 
25521 
25522 
25523 
25524 
25525 
25526 struct dm_buf {
25527  char *text_buffer; /* start of allocated buffer */
25528  int offset; /* number of bytes into the text_buffer */
25529  int allocation; /* size of buffer in bytes */
25530 };
25531 
25532 /* This structure is used to hold a dynamically growing string */
25533 
25534 struct dstr {
25535  char *pc;
25536  int len;
25537  int max;
25538 };
25539 
25540 /* setmapmode() defines */
25541 # 330 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25542 /* max length for printed attributes */
25543 
25544 
25545 /*
25546  * These three defines indicate that the prototype file contains a '?'
25547  * meaning do not specify this data in the pkgmap entry.
25548  */
25549 # 366 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25550 /* Settings for network admin defaults */
25551 # 377 "/home/git3/dehawe/titanic_53/usr/src/lib/libpkg/common/pkglib.h"
25552 /* package header magic tokens */
25553 
25554 
25555 
25556 /* name of security files */
25557 
25558 
25559 
25560 
25561 
25562 
25563 /*
25564  * The next three mean that no mode, owner or group was specified or that the
25565  * one specified is invalid for some reason. Sometimes this is an error in
25566  * which case it is generally converted to CUR* with a warning. Other times
25567  * it means "look it up" by stating the existing file system object pointred
25568  * to in the prototype file.
25569  */
25570 
25571 
25572 
25573 
25574 /* string comparitor abbreviators */
25575 
25576 
25577 
25578 
25579 
25580 
25581 extern FILE *epopen(char *cmd, char *mode);
25582 extern char **gpkglist(char *dir, char **pkg, char **catg);
25583 extern int is_not_valid_length(char **category);
25584 extern int is_not_valid_category(char **category, char *progname);
25585 extern int is_same_CATEGORY(char **category, char *installed_category);
25586 extern char **get_categories(char *catg_arg);
25587 
25588 extern void pkglist_cont(char *keyword);
25589 extern char **pkgalias(char *pkg);
25590 extern char *get_prog_name(void);
25591 extern char *set_prog_name(char *name);
25592 extern int averify(int fix, char *ftype, char *path, struct ainfo *ainfo);
25593 extern int ckparam(char *param, char *value);
25594 extern int ckvolseq(char *dir, int part, int nparts);
25595 extern int cverify(int fix, char *ftype, char *path, struct cinfo *cinfo,
25596    int allow_checksum);
25597 extern unsigned long compute_checksum(int *r_cksumerr, char *a_path);
25598 extern int fverify(int fix, char *ftype, char *path, struct ainfo *ainfo,
25599       struct cinfo *cinfo);
25600 extern char *getErrbufAddr(void);
25601 extern int getErrbufSize(void);
25602 extern char *getErrstr(void);
25603 extern void setErrstr(char *errstr);
25604 extern int devtype(char *alias, struct pkgdev *devp);
25605 extern int ds_totread; /* total number of parts read */
25606 extern int ds_close(int pkgendflg);
25607 extern int ds_findpkg(char *device, char *pkg);
25608 extern int ds_getinfo(char *string);
25609 extern int ds_getpkg(char *device, int n, char *dstdir);
25610 extern int ds_ginit(char *device);
25611 extern boolean_t ds_fd_open(void);
25612 extern int ds_init(char *device, char **pkg, char *norewind);
25613 extern int BIO_ds_dump_header(PKG_ERR *, BIO *);
25614 extern int BIO_ds_dump(PKG_ERR *, char *, BIO *);
25615 extern int BIO_dump_cmd(char *cmd, BIO *bio);
25616 extern int ds_next(char *, char *);
25617 extern int ds_readbuf(char *device);
25618 extern int epclose(FILE *pp);
25619 extern int esystem(char *cmd, int ifd, int ofd);
25620 extern int e_ExecCmdArray(int *r_status, char **r_results,
25621    char *a_inputFile, char *a_cmd, char **a_args);
25622 extern int e_ExecCmdList(int *r_status, char **r_results,
25623    char *a_inputFile, char *a_cmd, ...);
25624 extern int gpkgmap(struct cfent *ept, FILE *fp);
25625 extern int gpkgmapvfp(struct cfent *ept, VFP_T *fpv);
25626 extern void setmapmode(int mode_no);
25627 extern int isFdRemote(int a_fd);
25628 extern int isFstypeRemote(char *a_fstype);
25629 extern int isPathRemote(char *a_path);
25630 extern int iscpio(char *path, int *iscomp);
25631 extern int isdir(char *path);
25632 extern int isfile(char *dir, char *file);
25633 extern int fmkdir(char *a_path, int a_mode);
25634 extern int pkgexecl(char *filein, char *fileout, char *uname, char *gname,
25635    ...);
25636 extern int pkgexecv(char *filein, char *fileout, char *uname, char *gname,
25637    char *arg[]);
25638 extern int pkghead(char *device);
25639 extern int pkgmount(struct pkgdev *devp, char *pkg, int part, int nparts,
25640    int getvolflg);
25641 extern int pkgtrans(char *device1, char *device2, char **pkg,
25642    int options, keystore_handle_t, char *);
25643 extern int pkgumount(struct pkgdev *devp);
25644 extern int ppkgmap(struct cfent *ept, FILE *fp);
25645 extern int putcfile(struct cfent *ept, FILE *fp);
25646 extern int putcvfpfile(struct cfent *ept, VFP_T *vfp);
25647 extern int rrmdir(char *path);
25648 extern void set_memalloc_failure_func(void (*)(int));
25649 extern void *xmalloc(size_t size);
25650 extern void *xrealloc(void *ptr, size_t size);
25651 extern char *xstrdup(char *str);
25652 extern void set_passphrase_prompt(char *);
25653 extern void set_passphrase_passarg(char *);
25654 extern int pkg_passphrase_cb(char *, int, int, void *);
25655 
25656 extern int srchcfile(struct cfent *ept, char *path, PKGserver server);
25657 extern struct group *cgrgid(gid_t gid);
25658 extern struct group *cgrnam(char *nam);
25659 extern struct passwd *cpwnam(char *nam);
25660 extern struct passwd *cpwuid(uid_t uid);
25661 extern struct group *clgrgid(gid_t gid);
25662 extern struct group *clgrnam(char *nam);
25663 extern struct passwd *clpwnam(char *nam);
25664 extern struct passwd *clpwuid(uid_t uid);
25665 extern void basepath(char *path, char *basedir, char *ir);
25666 extern void canonize(char *file);
25667 extern void canonize_slashes(char *file);
25668 extern void checksum_off(void);
25669 extern void checksum_on(void);
25670 extern void cvtpath(char *path, char *copy);
25671 extern void ds_order(char *list[]);
25672 extern void ds_putinfo(char *buf, size_t);
25673 extern void ds_skiptoend(char *device);
25674 extern void ecleanup(void);
25675 /*PRINTFLIKE1*/
25676 extern void logerr(char *fmt, ...);
25677 extern int mappath(int flag, char *path);
25678 extern int mapvar(int flag, char *varname);
25679 /*PRINTFLIKE1*/
25680 extern void progerr(char *fmt, ...);
25681 extern void pkgerr(PKG_ERR *);
25682 extern void rpterr(void);
25683 extern void tputcfent(struct cfent *ept, FILE *fp);
25684 extern void set_nonABI_symlinks(void);
25685 extern int nonABI_symlinks(void);
25686 extern void disable_attribute_check(void);
25687 extern int get_disable_attribute_check(void);
25688 
25689 /* security.c */
25690 extern void sec_init(void);
25691 extern char *get_subject_display_name(X509 *);
25692 extern char *get_issuer_display_name(X509 *);
25693 extern char *get_serial_num(X509 *);
25694 extern char *get_fingerprint(X509 *, const EVP_MD *);
25695 extern int get_cert_chain(PKG_ERR *, X509 *, struct stack_st_X509 *,
25696     struct stack_st_X509 *, struct stack_st_X509 **);
25697 
25698 /* pkgstr.c */
25699 void pkgstrConvertUllToTimeString_r(unsigned long long a_time,
25700    char *a_buf, int a_bufLen);
25701 char *pkgstrConvertPathToBasename(char *a_path);
25702 char *pkgstrConvertPathToDirname(char *a_path);
25703 char *pkgstrDup(char *a_str);
25704 char *pkgstrLocatePathBasename(char *a_path);
25705 void pkgstrScaleNumericString(char *a_buf, unsigned long long scale);
25706 void pkgstrAddToken(char **a_old, char *a_new, char a_separator);
25707 boolean_t pkgstrContainsToken(char *a_string, char *a_token,
25708    char *a_separators);
25709 void pkgstrExpandTokens(char **a_old, char *a_string,
25710    char a_separator, char *a_separators);
25711 char *pkgstrGetToken(char *r_sep, char *a_string, int a_index,
25712    char *a_separators);
25713 void pkgstrGetToken_r(char *r_sep, char *a_string, int a_index,
25714    char *a_separators, char *a_buf, int a_bufLen);
25715 unsigned long pkgstrNumTokens(char *a_string, char *a_separators);
25716 char *pkgstrPrintf(char *a_format, ...);
25717 void pkgstrPrintf_r(char *a_buf, int a_bufLen, char *a_format, ...);
25718 void pkgstrRemoveToken(char **r_string, char *a_token,
25719    char *a_separators, int a_index);
25720 void pkgstrRemoveLeadingWhitespace(char **a_str);
25721 /* vfpops.c */
25722 extern int vfpCheckpointFile(VFP_T **r_destVfp, VFP_T **a_vfp,
25723    char *a_path);
25724 extern int vfpCheckpointOpen(VFP_T **a_cvfp, VFP_T **r_vfp, char *a_path,
25725    char *a_mode, VFPFLAGS_T a_flags);
25726 extern int vfpClearModified(VFP_T *a_vfp);
25727 extern int vfpClose(VFP_T **r_vfp);
25728 extern int vfpGetModified(VFP_T *a_vfp);
25729 extern int vfpOpen(VFP_T **r_vfp, char *a_path, char *a_mode,
25730    VFPFLAGS_T a_flags);
25731 extern void vfpRewind(VFP_T *a_vfp);
25732 extern ssize_t vfpSafePwrite(int a_fildes, void *a_buf,
25733    size_t a_nbyte, off_t a_offset);
25734 extern ssize_t vfpSafeWrite(int a_fildes, void *a_buf, size_t a_nbyte);
25735 extern int vfpSetFlags(VFP_T *a_vfp, VFPFLAGS_T a_flags);
25736 extern int vfpSetModified(VFP_T *a_vfp);
25737 extern int vfpSetSize(VFP_T *a_vfp, size_t a_size);
25738 extern void vfpTruncate(VFP_T *a_vfp);
25739 extern int vfpWriteToFile(VFP_T *a_vfp, char *a_path);
25740 
25741 /* handlelocalfs.c */
25742 boolean_t enable_local_fs(void);
25743 boolean_t restore_local_fs(void);
25744 
25745 /* pkgserv.c */
25746 extern PKGserver pkgopenserver(const char *, const char *, boolean_t);
25747 extern void pkgcloseserver(PKGserver);
25748 extern int pkgcmd(PKGserver, void *, size_t, char **, size_t *,
25749     int *);
25750 extern boolean_t pkgsync_needed(const char *, const char *, boolean_t);
25751 extern int pkgsync(const char *, const char *, boolean_t);
25752 extern int pkgservercommitfile(VFP_T *, PKGserver);
25753 extern int pkgopenfilter(PKGserver server, const char *pkginst);
25754 extern void pkgclosefilter(PKGserver);
25755 extern char *pkggetentry(PKGserver, int *, int *);
25756 extern char *pkggetentry_named(PKGserver, const char *, int *,
25757     int *);
25758 extern void pkgserversetmode(start_mode_t);
25759 extern start_mode_t pkgservergetmode(void);
25760 extern start_mode_t pkgparsemode(const char *);
25761 extern char *pkgmodeargument(start_mode_t);
25762 # 35 "backup.c" 2
25763 
25764 extern char savlog[];
25765 extern int warnflag;
25766 
25767 void
25768 backup(char *path, int mode)
25769 {
25770  static int count = 0;
25771  static FILE *fp;
25772 
25773  /* mode probably used in the future */
25774  if (count++ == 0) {
25775   if ((fp = fopen(savlog, "w")) == 0) {
25776    logerr(gettext("WARNING: unable to open logfile <%s>"),
25777        savlog);
25778    warnflag++;
25779   }
25780  }
25781 
25782  if (fp == 0)
25783   return;
25784 
25785  (void) fprintf(fp, "%s%s", path, mode ? "\n" :
25786      gettext(" <attributes only>\n"));
25787  /* we don't really back anything up; we just log the pathname */
25788 }
25789