5841N/AFor the avoidance of doubt, except that if any license choice other
5841N/Athan GPL or LGPL is available it will apply instead, Sun elects to
5841N/Ause only the General Public License version 2 (GPLv2) at this time
5841N/Afor any software where a choice of GPL license versions is made
5841N/Aavailable with the language indicating that GPLv2 or any later
5841N/Aversion may be used, or where a choice of which version of the GPL
5841N/Ais applied is otherwise unspecified.
5841N/A--------------------------------------------------------------------
5841N/A libcfg+ - precise command line & config file parsing library
5841N/A ____________________________________________________________
5841N/A Developed by Ondrej Jombik <nepto@platon.sk>
5841N/A and Lubomir Host <rajo@platon.sk>
5841N/A See README file for more information about this software.
5841N/A See COPYING file for license information.
5841N/A Download the latest version from
5841N/A @brief shared stuff for command line and config file parsing header file
5841N/A @author Ondrej Jombik <nepto@platon.sk>
5841N/A @author Lubomir Host <rajo@platon.sk>
5841N/A--------------------------------------------------------------------
5841N/A libcfg+ - precise command line & config file parsing library
5841N/A cfg+.c - main implementation
5841N/A ____________________________________________________________
5841N/A Developed by Ondrej Jombik <nepto@platon.sk>
5841N/A and Lubomir Host <rajo@platon.sk>
5841N/A See README file for more information about this software.
5841N/A See COPYING file for license information.
5841N/A Download the latest version from
5841N/A--------------------------------------------------------------------
5841N/A*************************************************************************
5841N/A Advanced string locate, counting, removing, altering *
5841N/A Programmed by Ondrej Jombik <nepto@platon.sk> *
5841N/A Copyright (c) 1997-2000 Condy software inc. *
5841N/A Copyright (c) 2001-2004 Platon Software Development Group *
5841N/A Updates: 16.4.2000, 8.11.2000, 5.10.2001, 21.10.2001, 5.12.2001 *
5841N/A 20.12.2001 - str_white_str() added (thanks to <rbarlik@yahoo.com>) *
5841N/A 4. 2.2002 - strins() added *
5841N/A 28. 2.2002 - str_white_str() bugfix *
5841N/A 24. 9.2003 - stristr() rewritten *
5841N/A *************************************************************************
5841N/A Advanced string locate, counting, removing, inserting
5841N/A @author Ondrej Jombik <nepto@platon.sk>
5841N/A--------------------------------------------------------------------
5842N/A Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006 Free
5842N/A Copyright (C) 2005 Free Software Foundation, Inc.
5841N/A Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5841N/A This program is free software; you can redistribute it
and/or 5841N/A modify it under the terms of the GNU General Public License as
5841N/A published by the Free Software Foundation; either version 2, or (at
5841N/A your option) any later version.
5841N/A This program is distributed in the hope that it will be useful, but
5841N/A WITHOUT ANY WARRANTY; without even the implied warranty of
5841N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5841N/A General Public License for more details.
5841N/A You should have received a copy of the GNU General Public License
5841N/A along with this program; if not, write to the Free Software
5841N/A Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
5841N/A Written by Simon Josefsson.
5841N/A Get size_t, FILE, ssize_t. And getdelim, if available.
5841N/A Ported from glibc by Simon Josefsson.
5841N/A Get size_t, FILE, ssize_t. And getline, if available.
5841N/A--------------------------------------------------------------------
5841N/A libcfg+ - precise command line & config file parsing library
5841N/A ____________________________________________________________
5841N/A Developed by Ondrej Jombik <nepto@platon.sk>
5841N/A and Lubomir Host <rajo@platon.sk>
5841N/A See README file for more information about this software.
5841N/A See COPYING file for license information.
5841N/A Download the latest version from
@brief command line parsing header file
@author Ondrej Jombik <nepto@platon.sk>
@author Lubomir Host <rajo@platon.sk>
@version \$Platon: libcfg+
/src/cmdline.h,v 1.13 2004/01/12 06:03:09 nepto Exp $
--------------------------------------------------------------------
Copyright (C) 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2002 Fabio Fiorina
This file is part of LIBTASN1.
LIBTASN1 is free software; you can redistribute it
and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
LIBTASN1 is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with LIBTASN1; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
--------------------------------------------------------------------
Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software
This program is free software; you can redistribute it
and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function.
--------------------------------------------------------------------
libcfg+ - precise command line & config file parsing library
____________________________________________________________
Developed by Ondrej Jombik <nepto@platon.sk>
and Lubomir Host <rajo@platon.sk>
See README file for more information about this software.
See COPYING file for license information.
Download the latest version from
--------------------------------------------------------------------
Author: Nikos Mavroyanopoulos
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2000,2001,2002,2003,2006 Nikos Mavroyanopoulos
Copyright (C) 2001,2002 Paul Sheer
Copyright (C) 2004 Simon Josefsson
Copyright (C) 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2004, 2005, 2006 Simon Josefsson
Copyright (C) 2004, 2006 Free Software Foundation
Portions Copyright (C) 2002,2003 Nikos Mavroyanopoulos
This file is part of GNUTLS.
GNUTLS is free software; you can redistribute it
and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GNUTLS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Academics always want to implement hash tables (
i.e. dictionaries),
singly or doubly linked lists, and queues, because ... well ... they
These datatypes are nonsense for the following reasons:
hash tables: Hash tables are a mapping of some
string to some data, where that data is going to
be accessed COMPLETELY RANDOMLY. This is what it
is for. However it is extremely rare to have a
large number of data elements which really are
being accessed in a completely random way.
lists: appending and searching through lists is always
slow because these operations search all the way
queues: whats the difference between a queue and a list?
The system implemented here is a doubly linked list with previous
search index that can be appended or prepended with no overhead,
implemented entirely in macros. It is hence as versatile as a
doubly/singly linked list or queue and blazingly fast. Hence doing
sequential searches where the next search result is likely to be
closely indexed to the previous (usual case), is efficient.
Of course this doesn't mean you should use this as a hash table
where you REALLY need a hash table.
********* example usage *********
extern void free (void *x);
extern char *strdup (char *s);
consider a list of elements containing an `int' and a `char *'
LIST_TYPE_DECLARE (names, char *s; int i;);
for sorting, to compare elements
static int cm (names **a, names **b)
return strcmp ((*a)->s, (*b)->s);
to free the contents of an element
static void free_item (names *a)
int main (int argc, char **argv)
you can separate these into LIST_TYPE_DECLARE(), LIST_DECLARE() and linit() if needed.
LIST_DECLARE_INIT (l, names, free_item);
printf ("%ld\n\n", lcount (l));
lloopforward (l, j, printf ("%d %s\n", j->i, j->s));
lloopforward (l, j, printf ("%d %s\n", j->i, j->s));
lloopreverse (l, j, if (j->i <= 3) ldeleteinc (l, j););
lloopforward (l, j, printf ("%d %s\n", j->i, j->s));
lloopforward (l, j, printf ("%d %s\n", j->i, j->s));
This server is heavily modified for GNUTLS by Nikos Mavroyanopoulos
(which means it is quite unreadable)
--------------------------------------------------------------------
Copyright (C) 2004, 2005 Free Software Foundation
Copyright (C) 2005, 2006 Free Software Foundation
Copyright (C) 2006 Free Software Foundation
This file is part of GNUTLS.
GNUTLS is free software; you can redistribute it
and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GNUTLS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNUTLS; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Parts copied from GnuTLS example programs.
--------------------------------------------------------------------
libcfg+ - precise command line & config file parsing library
parse.c - universal parsing functions
____________________________________________________________
Developed by Ondrej Jombik <nepto@platon.sk>
and Lubomir Host <rajo@platon.sk>
See README file for more information about this software.
See COPYING file for license information.
Download the latest version from
@brief config file parsing header file
@author Ondrej Jombik <nepto@platon.sk>
@author Lubomir Host <rajo@platon.sk>
@version \$Platon: libcfg+
/src/cfgfile.h,v 1.13 2004/01/12 06:03:09 nepto Exp $
$Platon: libcfg+
/src/parse.c,v 1.24 2004/01/12 06:03:09 nepto Exp $
--------------------------------------------------------------------
Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006 Free
Copyright (C) 1992-2001, 2003, 2004, 2005, 2006 Free Software
Software Foundation, Inc.
This file is part of the GNU C Library.
Convenience header for conditional use of GNU <
libintl.h>.
This program is free software; you can redistribute it
and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
--------------------------------------------------------------------
Author: Nikos Mavroyanopoulos
Author: Timo Schulz <twoaday@freakmail.de>
Author: Timo Schulz, Nikos Mavroyanopoulos
Copyright (C) 2001, 2004, 2005 Free Software Foundation
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2004, 2005 Free Software Foundation
Copyright (C) 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2005, 2006 Free Software Foundation
Copyright (c) 2002 Andrew McDonald <andrew@mcdonald.org.uk>
This file is part of GNUTLS-EXTRA.
GNUTLS-EXTRA is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
GNUTLS-EXTRA is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNUTLS-EXTRA; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Functions on OpenPGP key parsing
Functions on OpenPGP keyring and trustdb parsing
WARNING: Error functions aren't currently thread-safe
This file contains prototypes about the OPENSSL compatibility
layer in GNUTLS. GNUTLS is not a replacement of OPENSSL so
this compatibility layer only support limited OPENSSL functionality.
New programs should avoid using this compatibility layer, and
use the native GNUTLS API.
This file includes all functions that were in the
0.5.x and
0.8.x gnutls API. They are now implemented over the new certificate parsing
Functions on OpenPGP privkey parsing
Note the libgnutls-extra is not a standalone library. It requires
to link also against libgnutls.
Compatibility functions on OpenPGP key parsing.
--------------------------------------------------------------------
libcfg+ - precise command line & config file parsing library
cfg+.h - main implementation header file
____________________________________________________________
Developed by Ondrej Jombik <nepto@platon.sk>
and Lubomir Host <rajo@platon.sk>
See README file for more information about this software.
See COPYING file for license information.
Download the latest version from
$Platon: libcfg+
/src/cfg+.h,v 1.60 2004/01/12 06:03:08 nepto Exp $
@brief main implementation header file
@author Ondrej Jombik <nepto@platon.sk>
@author Lubomir Host <rajo@platon.sk>
@version \$Platon: libcfg+
/src/cfg+.h,v 1.60 2004/01/12 06:03:08 nepto Exp $
--------------------------------------------------------------------
Copyright (C) 2002 Fabio Fiorina
Copyright (C) 2002, 2005 Fabio Fiorina
Copyright (C) 2004, 2006 Free Software Foundation
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of LIBTASN1.
The LIBTASN1 library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
***************************************************
Description: Functions to create and delete an
Description: Functions to create a DER coding of
Description: Functions to manage DER decoding
***************************************************
--------------------------------------------------------------------
Copyright (C) 2000, 2001, 2002, 2003 Fabio Fiorina
Copyright (C) 2000,2001 Fabio Fiorina
Copyright (C) 2002 Nikos Mavroyanopoulos
Copyright (C) 2004, 2006 Free Software Foundation
Copyright (C) 2006 Free Software Foundation
Author: Nikos Mavroyanopoulos
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation
Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation
Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2000, 2004, 2005 Free Software Foundation
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
Copyright (C) 2001, 2004, 2005 Free Software Foundation
Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2002 Andrew McDonald
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
Copyright (C) 2002, 2004, 2005 Free Software Foundation
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2003, 2004, 2005 Free Software Foundation
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation
Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation
Copyright (C) 2004, 2005, 2006 Free Software Foundation
Copyright (C) 2005 Free Software Foundation
Copyright (C) 2005, 2006 Free Software Foundation
This file is part of LIBTASN1.
The LIBTASN1 library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
minip12.c - A mini pkcs-12 implementation (modified for gnutls)
This file is part of GNUTLS.
The GNUTLS library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
This is the only file that uses the berkeley sockets API.
Also holds all the buffering code used in gnutls.
The buffering code works as:
we got but they were not requested, yet.
(see gnutls_record_buffer_put(), gnutls_record_buffer_get_size() etc.)
2. uses a buffer to hold data that were incomplete (ie the
read/write (see _gnutls_io_read_buffered(), _gnutls_io_write_buffered() etc.)
1. Uses a buffer to hold data that was not sent or received
complete. (
E.g. sent 10 bytes of a handshake packet that is 20 bytes
(see _gnutls_handshake_send_int(), _gnutls_handshake_recv_int())
2. Uses buffer to hold the last received handshake message.
(see _gnutls_handshake_buffer_put() etc.)
This file contains code for DSA keys.
Functions that are supposed to run after the handshake procedure is
finished. These functions activate the established security parameters.
This file contains the PSK Diffie Hellman key exchange part of
the PSK authentication. The functions here are used in the
This file contains the Anonymous Diffie Hellman key exchange part of
the anonymous authentication. The functions here are used in the
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
This file contains the types and prototypes for the OpenPGP
key and private key parsing functions.
This file contains functions which are wrappers for the key exchange
part of TLS. They are called by the handshake functions (gnutls_handshake)
Some high level functions to be used in the record encryption are
This file contains common stuff in Ephemeral Diffie Hellman (DHE) and
Anonymous DH key exchange(DHA). These are used in the handshake procedure
of the certificate and anoymous authentication.
This file contains the RSA key exchange part of the certificate
This file contains everything for the Ephemeral Diffie Hellman (DHE)
key exchange. This is used in the handshake procedure of the certificate
Here lies the code of the gnutls_*_set_priority() functions.
This file contains the code for the Max Record Size TLS extension.
This file contains the types and prototypes for the X.509
certificate and CRL handling functions.
Functions that relate to the TLS hello extension parsing.
Hello extensions are packets appended in the TLS hello packet, and
allow for extra functionality.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
***************************************************
Description: Functions with the read and write
***************************************************
This debug file was contributed by
Paul Sheer <psheer@icon.co.za>. Some changes were made by nmav.
Its purpose is to debug non blocking behaviour of gnutls. The included
send() and recv() functions return EAGAIN errors in random.
Functions that relate to base64 encoding and decoding.
Functions for operating in an SRP passwd file are included here
Functions that relate to the TLS handshake procedure.
Functions that relate on PKCS12 Bag packet parsing.
Functions that relate to the X.509 extension parsing.
Maps record size to numbers according to the
Contains functions that are supposed to pack and unpack session data,
before and after they are sent to the database backend.
All functions which relate to X.509 certificate signing stuff are
All functions which relate to X.509 certificate verification stuff are
This file contains functions to handle PKCS #10 certificate requests.
This file contains the functions which convert the TLS plaintext
packet to TLS compressed packet.
Functions that relate on PKCS7 certificate lists parsing.
This file contains the code the Certificate Type TLS extension.
This extension is currently gnutls specific.
contains functions that make it easier to
write vectors of <size|data>. The destination size
Functions that are record layer specific, are included in this file.
This file contains certificate authentication functions to be exported in the
API and did not fit elsewhere.
Some of the stuff needed for Certificate authentication is contained
This file has the required functions to convert an X.509 DER certificate
Functions to manipulate the session (
gnutls_int.h), and some other stuff
are included here. The file's name is traditionally gnutls_state even if the
state has been renamed to session.
This file handles all the internal functions that cope with hashes
Here lie everything that has to do with large numbers, libgcrypt and
other stuff that didn't fit anywhere else.
Functions for operating in an PSK passwd file are included here
Functions that relate on PKCS12 packet parsing.
Functions to parse the SSLv2.0 hello message.
This file contains functions that manipulate a database backend
Functions on X.509 Certificate parsing
This file contains code for RSA temporary keys. These keys are
only used in export cipher suites.
Functions for manipulating the PSK credentials.
This file contains functions to handle CRL generation.
The certificate authentication functions which are needed in the handshake,
and are common to RSA and DHE key exchange, are in this file.
This file contains functions to handle X.509 certificate generation.
This file contains the functions needed for
RSA/DSA public key
encryption and signatures.
This file contains the functions needed for 64 bit integer support in
TLS, and functions which ease the access to TLS vectors (data of given size).
--------------------------------------------------------------------
Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
Copyright (C) 1997, 2000, 2002, 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
Copyright (C) 1999, 2002-2003, 2005-2006 Free Software Foundation, Inc.
Copyright (C) 1999, 2002-2003, 2006 Free Software Foundation, Inc.
Copyright (C) 1999, 2002-2006 Free Software Foundation, Inc.
Copyright (C) 1999-2000, 2002-2003, 2006 Free Software Foundation, Inc.
Copyright (C) 2002-2004 Free Software Foundation, Inc.
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 1991,92,93,94,96,97,98,2000,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Formatted output to strings.
Convenience header for conditional use of GNU <
libintl.h>.
vsprintf with automatic memory allocation.
Compare strings while treating digits characters numerically.
This file is part of the GNU C Library.
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
Written by Simon Josefsson.
Parse printf format string.
Written by Simon Josefsson and Paul Eggert.
Decomposed printf argument list.
This program is free software; you can redistribute it
and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Tell glibc's <
stdio.h> to provide a prototype for snprintf().
--------------------------------------------------------------------
Copyright (C) 1995,1996,1997,1999,2000,2001,2002,2003,2005,2006
Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2006
Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software
Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Functions to compute MD4 message digest of files or memory blocks.
according to the definition of MD4 in RFC 1320 from April 1992.
Free Software Foundation, Inc.
sha1.c - Functions to compute SHA1 message digest of files or
memory blocks according to the NIST specification FIPS-180-1.
Declarations of functions and data types used for MD2 sum
Functions to compute MD2 message digest of files or memory blocks.
according to the definition of MD2 in RFC 1319 from April 1992.
Free Software Foundation, Inc.
Declarations of functions and data types used for SHA1 sum
Declarations of functions and data types used for MD4 sum
This program is free software; you can redistribute it
and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1, or (at your option) any
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
Adapted by Simon Josefsson from gnulib md5.? and Libgcrypt
Written by Scott G. Miller
Robert Klep <robert@ilse.nl> -- Expansion function fix
Adapted by Simon Josefsson from public domain Libtomcrypt 1.06 by
--------------------------------------------------------------------
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
Copyright (C) 1998,1999,2000,2001,2002 Free Software Foundation, Inc.
Copyright (C) 1998-2001 Free Software Foundation
Copyright (C) 1998-2002 Free Software Foundation
Copyright (C) 1998-2002 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003 Timo Schulz
Copyright (C) 2001, 2002, 2003, 2004 Timo Schulz
Copyright (C) 2001, 2002, 2003, 2005 Timo Schulz
Copyright (C) 2002 Timo Schulz
Copyright (C) 2002, 2003 Timo Schulz
Copyright (C) 2003 Timo Schulz
Copyright (C) 2006 Free Software Foundation
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Timo Schulz
Copyright (C) 2002, 2003, 2004 Timo Schulz
Copyright (C) 2006 Free Software Foundation
Copyright (C) 2006 Free Software Foundation, Inc.
stream.h - internal definiton for the STREAM object
new-packet.c - General packet handling (freeing, copying, ...)
trustdb.c - High level interface for ownertrust handling
kbnode.c - keyblock node utility functions
opencdk.h - Open Crypto Development Kit (OpenCDK)
This file is part of OpenCDK.
OpenCDK is free software; you can redistribute it
and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
OpenCDK is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenCDK; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
ChangeLog for basic BASE64 code (base64_encode, base64_decode):
Original author: Eric S. Raymond (Fetchmail)
Heavily modified by Brendan Cully <brendan@kublai.com> (Mutt)
Modify the code for generic use by Timo Schulz <twoaday@freakmail.de>
along with OpenCDK; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
--------------------------------------------------------------------
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
lzoconf.h -- configuration for the LZO real-time data compression library
This file is part of the LZO real-time data compression library.
testmini.c -- very simple test program for the miniLZO library
This file is part of the LZO real-time data compression library.
minilzo.h -- mini subset of the LZO real-time data compression library
This file is part of the LZO real-time data compression library.
minilzo.c -- mini subset of the LZO real-time data compression library
This file is part of the LZO real-time data compression library.
lzodefs.h -- architecture, OS and compiler specific defines
This file is part of the LZO real-time data compression library.
The LZO library is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
The LZO library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the LZO library; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
the full LZO package can be found at
--------------------------------------------------------------------
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
Copyright (C) 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 Free Software
Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson
Copyright (C) 2002, 2003, 2004, 2005, 2006 Simon Josefsson
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
Free Software Foundation, Inc.
arctwo.c --- The RC2 cipher as described in RFC 2268.
des.h --- DES cipher implementation.
Free Software Foundation, Inc.
gc-gnulib.c --- Common gnulib internal crypto interface functions
gc.h --- Header file for implementation agnostic crypto wrapper API.
This file is free software; you can redistribute it
and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1, or (at your
option) any later version.
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this file; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Adapted for gnulib by Simon Josefsson.
@version 2.9 (December 2000)
@version 3.0 (December 2000)
Optimised ANSI C code for the Rijndael cipher (now AES)
@author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
@author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
@author Paulo Barreto <paulo.barreto@terra.com.br>
This code is hereby placed in the public domain.
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We are deeply indebted to the following people for their bug reports,
fixes, and improvement suggestions to this implementation. Though we
tried to list all contributions, we apologise in advance for any
Andrew Bales <Andrew.Bales@Honeywell.com>
Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
John Skodon <skodonj@webquill.com>
Note: This file is only built if GC uses Libgcrypt.
Adapted for gnulib by Simon Josefsson, based on Libgcrypt.
For a description of triple encryption, see:
Bruce Schneier: Applied Cryptography. Second Edition.
John Wiley & Sons, 1996. ISBN 0-471-12845-7. Pages 358 ff.
This implementation is according to the definition of DES in FIPS
PUB 46-2 from December 1993.
Written by Michael Roth <mroth@nessie.de>, September 1998
encryption context with a key.
A DES key is 64bit wide but only 56bits of the key are used. The remaining
bits are parity bits and they will _not_ checked in this implementation, but
For Triple-DES you could use either two 64bit keys or three 64bit keys.
The parity bits will _not_ checked, too.
After initializing a context with a key you could use this context to
encrypt or decrypt data in 64bit blocks in Electronic Codebook Mode.
unsigned char plaintext[8];
unsigned char ciphertext[8];
unsigned char recoverd[8];
// Fill 'key' and 'plaintext' with some data
// Set up the DES encryption context
des_setkey(&context, key);
des_ecb_encrypt(&context, plaintext, ciphertext);
// To recover the orginal plaintext from ciphertext use:
des_ecb_decrypt(&context, ciphertext, recoverd);
unsigned char plaintext[8];
unsigned char ciphertext[8];
unsigned char recoverd[8];
// If you would like to use two 64bit keys, fill 'key1' and'key2'
// then setup the encryption context:
tripledes_set2keys(&context, key1, key2);
// To use three 64bit keys with Triple-DES use:
tripledes_set3keys(&context, key1, key2, key3);
// Encrypting plaintext with Triple-DES
tripledes_ecb_encrypt(&context, plaintext, ciphertext);
// Decrypting ciphertext to recover the plaintext with Triple-DES
tripledes_ecb_decrypt(&context, ciphertext, recoverd);
Based on public domain "Optimised C code" retrieved from (SHA1
7c8e4b00d06685d1dbc6724a9e0d502353de339e):
Code from Libgcrypt adapted for gnulib by Simon Josefsson.
For a description of the algorithm, see:
Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
ISBN 0-471-11709-9. Pages 397 ff.
This implementation was written by Nikos Mavroyanopoulos for GNUTLS
direct use by Libgcrypt by Werner Koch. This implementation is
only useful for pkcs#12 decryption.
The implementation here is based on Peter Gutmann's RRC.2 paper.
Note: This file is only built if GC uses internal functions.
--------------------------------------------------------------------
Copyright (C) 1995, 1998, 2001, 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006
Copyright (C) 1996-2002, 2003, 2004, 2005, 2006
Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software
Copyright (C) 1997, 2003 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Copyright (C) 2001, 2006 Free Software Foundation, Inc.
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2003 Free Software Foundation, Inc.
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2005-2006 Free Software Foundation, Inc.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
Copyright (C) 2004 Free Software Foundation
Copyright (c) 1996,1999 by Internet Software Consortium.
Copyright (c) 1996-1999 by Internet Software Consortium.
copyright notice and this permission notice appear in all copies.
hmac.h -- hashed message authentication codes
Declaration of functions and data types used for MD5 sum computing
Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it
and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1, or (at your option) any
size_max.h -- declare SIZE_MAX through system headers
Written by Simon Josefsson.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
Provide a more complete
sys/stat header file.
A dummy file, to prevent empty libraries from breaking builds.
Provide a
sys/socket header file for systems lacking it (read: MinGW).
Written by Simon Josefsson.
Compare strings while treating digits characters numerically.
xsize.h -- Checked size_t computations.
Written by Simon Josefsson
Written by Simon Josefsson and Bruno Haible.
memxor.h -- perform binary exclusive OR operation on memory blocks.
Written by Simon Josefsson.
memxor.c -- perform binary exclusive OR operation of two memory blocks.
This program is free software; you can redistribute it
and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Written by Simon Josefsson.
Written by Simon Josefsson. The comments in this file are taken
Written by Eric Blake, Paul Eggert, and Jim Meyering.
A dummy file, to prevent empty libraries from breaking builds.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
Provide a
sys/socket header file for systems lacking it (read: MinGW).
Written by Simon Josefsson.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
inttostr.c -- convert integers to printable strings
Contributed by Simon Josefsson <jas@extundo.com>, 2004.
Convert internet address from internal to printable, presentable format.
Convert internet address from text to binary format.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
Get address information (partial implementation).
Contributed by Simon Josefsson <simon@josefsson.org>.
inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
Written by Simon Josefsson
Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
Written by Simon Josefsson
inttostr.h -- convert integers to printable strings
This program is free software; you can redistribute it
and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
This program is free software; you can redistribute it
and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Some systems, reportedly OpenBSD and Mac OS X, refuse to create
libraries without any object files. You might get an error like:
> ar: no archive members specified
Compiling this file, and adding its object file to the library, will
prevent the library from being empty.
This declaration is solely to ensure that after preprocessing
this file is never empty.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Written by Simon Josefsson. The interface was inspired by memxor
in Niels Möller's Nettle.
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
--------------------------------------------------------------------